org.fcrepo.server.security
Class BackendSecuritySpec

java.lang.Object
  extended by org.fcrepo.server.security.BackendSecuritySpec

public class BackendSecuritySpec
extends Object

Class that instantiates information parsed from the beSecurity.xml file. Methods are provided to set and get backend security properties by role id.

Author:
payette

Constructor Summary
BackendSecuritySpec()
           
 
Method Summary
 Hashtable<String,String> getDefaultSecuritySpec()
          Get the default backend security properties.
 Hashtable<String,String> getSecuritySpec(String roleKey)
          Get security properties for either the a backend service or a method within that backend service.
 Hashtable<String,String> getSecuritySpec(String serviceRoleID, String methodName)
          Get security properties for either the a backend service or a method within that backend service.
 Set<String> listRoleKeys()
           
 void setSecuritySpec(String serviceRoleID, String methodName, Hashtable<String,String> properties)
          Set the security properties at the backend service or for a method of that backend service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BackendSecuritySpec

public BackendSecuritySpec()
Method Detail

setSecuritySpec

public void setSecuritySpec(String serviceRoleID,
                            String methodName,
                            Hashtable<String,String> properties)
                     throws GeneralException
Set the security properties at the backend service or for a method of that backend service.

Parameters:
serviceRoleID - - the role identifier for a service. Valid values for this parameter are: - a sDep PID for a backend service - "default" to indicate the default properties for any service - "fedoraInternalCall-1" for Fedora calling back to itself as a service
methodName - - optional method name within the backend service. If specified security properties at the service method level will be recorded. If null, service properties at the service level will be recorded.
properties -
Throws:
GeneralException

getDefaultSecuritySpec

public Hashtable<String,String> getDefaultSecuritySpec()
Get the default backend security properties.


getSecuritySpec

public Hashtable<String,String> getSecuritySpec(String serviceRoleID,
                                                String methodName)
Get security properties for either the a backend service or a method within that backend service.

Parameters:
serviceRoleID - - role identifier for a backend service. Valid options: - "default" (the overall default for backend services) - "fedoraInternalCall-1" (the role key for fedora calling back to itself) - A sDep PID (e.g., "sDep:9") as the identifier for a backend service
methodName - - a method name that is specified within a sDep service. If values is null, then this method will return the security properties defined for the backend service specified by the serviceRoleID parameter.
Returns:
a Hashtable containing the backend security properties for the role or role/method. The security property names, defined in BackendSecurityDeserializer.java, are: - BackendSecurityDeserializer.CALL_BASIC_AUTH - BackendSecurityDeserializer.CALL_SSL - BackendSecurityDeserializer.CALL_USERNAME - BackendSecurityDeserializer.CALL_PASSWORD - BackendSecurityDeserializer.CALLBACK_BASIC_AUTH - BackendSecurityDeserializer.CALLBACK_SSL - BackendSecurityDeserializer.IPLIST

getSecuritySpec

public Hashtable<String,String> getSecuritySpec(String roleKey)
Get security properties for either the a backend service or a method within that backend service.

Parameters:
roleKey - = the role identifier for the backend service, for example: - "default" (the overall default for backend services) - "fedoraInternalCall-1" (the role key for fedora calling back to itself) - "sDep:9" (the role key for a backend service) - "sDe:9/getThumb" (the role key for a method within a backend service)
Returns:
a Hashtable containing the backend security properties for the roleKey. The security property names, defined in BackendSecurityDeserializer.java, are: - BackendSecurityDeserializer.CALL_BASIC_AUTH - BackendSecurityDeserializer.CALL_SSL - BackendSecurityDeserializer.CALL_USERNAME - BackendSecurityDeserializer.CALL_PASSWORD - BackendSecurityDeserializer.CALLBACK_BASIC_AUTH - BackendSecurityDeserializer.CALLBACK_SSL - BackendSecurityDeserializer.IPLIST

listRoleKeys

public Set<String> listRoleKeys()


Copyright © 2011 DuraSpace. All Rights Reserved.