org.fcrepo.server.security
Class BESecurityConfig

java.lang.Object
  extended by org.fcrepo.server.security.BESecurityConfig
All Implemented Interfaces:
Constants

public class BESecurityConfig
extends Object
implements Constants

Security configuration for backend services.

Author:
Chris Wilper

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.fcrepo.common.Constants
Constants.FedoraHome
 
Field Summary
 
Fields inherited from interface org.fcrepo.common.Constants
ACCESS, ACTION, API, ATOM_APIM1_0, ATOM_ZIP1_1, ATOM1_1, AUDIT, AUDIT1_0, BATCH_MODIFY, BATCH_MODIFY1_1, BE_SECURITY, BE_SECURITY1_0, BINDING_SPEC, DATASTREAM, DC, DISSEMINATOR, DS_COMPOSITE_MODEL, DS_COMPOSITE_MODEL1_0, DS_INPUT_SPEC1_0, DS_INPUT_SPEC1_1, ENVIRONMENT, FCFG, FEDORA, FEDORA_APP_CONTEXT_NAME, FEDORA_DEFAULT_APP_CONTEXT, FEDORA_HOME, FOXML, FOXML1_0, FOXML1_0_LEGACY, FOXML1_1, HTTP_REQUEST, MANAGEMENT, METHOD_MAP, METS, METS_EXT, METS_EXT1_0, METS_EXT1_0_LEGACY, METS_EXT1_1, MODEL, MULGARA, OAI_DC, OAI_DC2_0, OAI_FRIENDS, OAI_FRIENDS2_0, OAI_IDENTIFIER, OAI_IDENTIFIER2_0, OAI_PMH, OAI_PMH2_0, OAI_PROV, OAI_PROV2_0, OBJ_DATASTREAMS1_0, OBJ_HISTORY1_0, OBJ_ITEMS1_0, OBJ_METHODS1_0, OBJ_PROFILE1_0, OBJ_VALIDATION1_0, OBJECT, OLD_XLINK, PID_LIST1_0, RDF, RDF_XSD, RECOVERY, RELS_EXT, RELS_EXT1_0, RELS_INT1_0, REPO_DESC1_0, RESOURCE, SDEF, SDEF_METHOD_MAP1_0, SDEP, SDEP_METHOD_MAP1_0, SDEP_METHOD_MAP1_1, SERVICE_PROFILE, SOAP, SOAP_ENC, SUBJECT, TYPES, VIEW, WSDL, WSDL_HTTP, WSDL_MIME, XACML_POLICY, XACML_POLICY1_0, XLINK, XML_XSD, XMLNS, XSI
 
Constructor Summary
BESecurityConfig()
          Create an empty BESecurityConfig with an empty map of ServiceDeploymentRoleConfigs and null values for everything else.
 
Method Summary
 void addEmptyConfigs(Map pidToMethodList)
          Add empty sDep and method configurations given by the map if they are not already already defined.
static BESecurityConfig fromStream(InputStream in)
          Instantiate a BESecurityConfig from an XML stream.
 DefaultRoleConfig getDefaultConfig()
          Get the default role configuration.
 Boolean getEffectiveInternalBasicAuth()
          Get whether basic auth is effectively used for Fedora-to-self calls.
 String[] getEffectiveInternalIPList()
          Get the effective list of internal IP addresses.
 String getEffectiveInternalPassword()
          Get the effective internal password for basic auth Fedora-to-self calls.
 Boolean getEffectiveInternalSSL()
          Get whether SSL is effectively used for Fedora-to-self calls.
 String getEffectiveInternalUsername()
          Get the effective internal username for basic auth Fedora-to-self calls.
 Boolean getInternalBasicAuth()
          Get whether basic auth should be used for Fedora-to-self calls.
 String[] getInternalIPList()
          Get the list of internal IP addresses.
 String getInternalPassword()
          Get the internal password.
 Boolean getInternalSSL()
          Get whether SSL should be used for Fedora-to-self calls.
 String getInternalUsername()
          Get the internal username.
 SortedMap<String,ServiceDeploymentRoleConfig> getServiceDeploymentConfigs()
          Get the mutable, sorted, PID-keyed map of ServiceDeploymentRoleConfigs.
 void setDefaultConfig(DefaultRoleConfig config)
          Set the default role configuration.
 void setInternalBasicAuth(Boolean value)
          Set whether basic auth is used for Fedora-to-self calls.
 void setInternalIPList(String[] ips)
          Set the list of internal IP addresses.
 void setInternalPassword(String password)
          Set the internal password.
 void setInternalSSL(Boolean value)
          Set whether SSL is used for Fedora-to-self calls.
 void setInternalUsername(String username)
          Set the internal username.
 void toStream(boolean skipNonOverrides, OutputStream out)
          Serialize to the given stream, closing it when finished.
 void write(boolean skipNonOverrides, boolean withXMLDeclaration, PrintWriter writer)
          Serialize to the given writer, keeping it open when finished.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BESecurityConfig

public BESecurityConfig()
Create an empty BESecurityConfig with an empty map of ServiceDeploymentRoleConfigs and null values for everything else.

Method Detail

getDefaultConfig

public DefaultRoleConfig getDefaultConfig()
Get the default role configuration.


setDefaultConfig

public void setDefaultConfig(DefaultRoleConfig config)
Set the default role configuration.


getInternalSSL

public Boolean getInternalSSL()
Get whether SSL should be used for Fedora-to-self calls. This should be true if API-A is only available via SSL.


getEffectiveInternalSSL

public Boolean getEffectiveInternalSSL()
Get whether SSL is effectively used for Fedora-to-self calls. This will be the internalSSL value, if set, or the inherited call value from the default role, if set, or Boolean.FALSE.


setInternalSSL

public void setInternalSSL(Boolean value)
Set whether SSL is used for Fedora-to-self calls.


getInternalBasicAuth

public Boolean getInternalBasicAuth()
Get whether basic auth should be used for Fedora-to-self calls. This should be true if API-A requires basic auth.


getEffectiveInternalBasicAuth

public Boolean getEffectiveInternalBasicAuth()
Get whether basic auth is effectively used for Fedora-to-self calls. This will be the internalBasicAuth value, if set, or the inherited call value from the default role, if set, or Boolean.FALSE.


setInternalBasicAuth

public void setInternalBasicAuth(Boolean value)
Set whether basic auth is used for Fedora-to-self calls.


getInternalUsername

public String getInternalUsername()
Get the internal username.


getEffectiveInternalUsername

public String getEffectiveInternalUsername()
Get the effective internal username for basic auth Fedora-to-self calls. This will be the internal username, if set, or the inherited call value from the default role, if set, or null.


setInternalUsername

public void setInternalUsername(String username)
Set the internal username.


getInternalPassword

public String getInternalPassword()
Get the internal password.


getEffectiveInternalPassword

public String getEffectiveInternalPassword()
Get the effective internal password for basic auth Fedora-to-self calls. This will be the internal password, if set, or the inherited call value from the default role, if set, or null.


setInternalPassword

public void setInternalPassword(String password)
Set the internal password.


getInternalIPList

public String[] getInternalIPList()
Get the list of internal IP addresses.


getEffectiveInternalIPList

public String[] getEffectiveInternalIPList()
Get the effective list of internal IP addresses. This will be the internalIPList value, if set, or the inherited value from the default role, if set, or null.


setInternalIPList

public void setInternalIPList(String[] ips)
Set the list of internal IP addresses.


getServiceDeploymentConfigs

public SortedMap<String,ServiceDeploymentRoleConfig> getServiceDeploymentConfigs()
Get the mutable, sorted, PID-keyed map of ServiceDeploymentRoleConfigs.


addEmptyConfigs

public void addEmptyConfigs(Map pidToMethodList)
Add empty sDep and method configurations given by the map if they are not already already defined.


fromStream

public static BESecurityConfig fromStream(InputStream in)
                                   throws Exception
Instantiate a BESecurityConfig from an XML stream.

Throws:
Exception

toStream

public void toStream(boolean skipNonOverrides,
                     OutputStream out)
              throws Exception
Serialize to the given stream, closing it when finished. If skipNonOverrides is true, any configuration whose values are all null will not be written.

Throws:
Exception

write

public void write(boolean skipNonOverrides,
                  boolean withXMLDeclaration,
                  PrintWriter writer)
Serialize to the given writer, keeping it open when finished. If skipNonOverrides is true, any configuration whose values are all null will not be written.



Copyright © 2011 DuraSpace. All Rights Reserved.