Class AbstractSecurityConfiguration

java.lang.Object
se.swedenconnect.opensaml.xmlsec.config.AbstractSecurityConfiguration
All Implemented Interfaces:
SecurityConfiguration
Direct Known Subclasses:
DefaultSecurityConfiguration, SAML2IntSecurityConfiguration

public abstract class AbstractSecurityConfiguration extends Object implements SecurityConfiguration
Abstract base class for SecurityConfiguration. Subclasses should implement the create-methods for the different operations they wish to override.
Author:
Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
  • Constructor Details

    • AbstractSecurityConfiguration

      public AbstractSecurityConfiguration()
      Constructor.

      Note: Subclasses MUST NOT create any XML objects that require that OpenSAML has been initialized in the constructor. The reason for this is that a SecurityConfiguration object most likely is setup as an argument to the OpenSAMLSecurityDefaultsConfig which is passed to the OpenSAMLInitializer.

  • Method Details

    • getEncryptionConfiguration

      public final org.opensaml.xmlsec.EncryptionConfiguration getEncryptionConfiguration()
      Returns the encryption configuration that has been configured.
      Specified by:
      getEncryptionConfiguration in interface SecurityConfiguration
      Returns:
      encryption configuration
    • getDefaultEncryptionConfiguration

      protected final org.opensaml.xmlsec.EncryptionConfiguration getDefaultEncryptionConfiguration()
      Returns the default encryption configuration for this instance.
      Returns:
      default encryption configuration, or null if this security configuration object has not overridden the system defaults
    • createDefaultEncryptionConfiguration

      protected org.opensaml.xmlsec.EncryptionConfiguration createDefaultEncryptionConfiguration()
      Creates the default encryption configuration for this instance.

      The default implementation returns null which means that the EncryptionConfiguration held by ConfigurationService will be returned when SecurityConfiguration.getEncryptionConfiguration() is called.

      Returns:
      default encryption configuration, or null if the security configuration object does not need to modify the system defaults
    • getDecryptionConfiguration

      public final org.opensaml.xmlsec.DecryptionConfiguration getDecryptionConfiguration()
      Returns the decryption configuration that has been configured.
      Specified by:
      getDecryptionConfiguration in interface SecurityConfiguration
      Returns:
      decryption configuration
    • getDefaultDecryptionConfiguration

      protected final org.opensaml.xmlsec.DecryptionConfiguration getDefaultDecryptionConfiguration()
      Returns the default decryption configuration for this instance.
      Returns:
      default decryption configuration, or null if this security configuration object has not overridden the system defaults
    • createDefaultDecryptionConfiguration

      protected org.opensaml.xmlsec.DecryptionConfiguration createDefaultDecryptionConfiguration()
      Creates the default decryption configuration for this instance.

      The default implementation returns null which means that the DecryptionConfiguration held by ConfigurationService will be returned when SecurityConfiguration.getDecryptionConfiguration() is called.

      Returns:
      default decryption configuration, or null if the security configuration object does not need to modify the system defaults
    • getSignatureSigningConfiguration

      public final org.opensaml.xmlsec.SignatureSigningConfiguration getSignatureSigningConfiguration()
      Returns the signing configuration that has been configued.
      Specified by:
      getSignatureSigningConfiguration in interface SecurityConfiguration
      Returns:
      signing configuration
    • getDefaultSignatureSigningConfiguration

      protected final org.opensaml.xmlsec.SignatureSigningConfiguration getDefaultSignatureSigningConfiguration()
      Returns the default signature configuration for this instance.
      Returns:
      default signature configuration, or null if this security configuration object has not overridden the system defaults
    • createDefaultSignatureSigningConfiguration

      protected org.opensaml.xmlsec.SignatureSigningConfiguration createDefaultSignatureSigningConfiguration()
      Creates the default signature configuration for this instance.

      The default implementation returns null which means that the SignatureSigningConfiguration held by ConfigurationService will be returned when SecurityConfiguration.getSignatureSigningConfiguration() is called.

      Returns:
      default signature configuration, or null if the security configuration object does not need to modify the system defaults
    • getSignatureValidationConfiguration

      public final org.opensaml.xmlsec.SignatureValidationConfiguration getSignatureValidationConfiguration()
      Returns the signature validation configuration that has been configured.
      Specified by:
      getSignatureValidationConfiguration in interface SecurityConfiguration
      Returns:
      signature validation configuration
    • getDefaultSignatureValidationConfiguration

      protected final org.opensaml.xmlsec.SignatureValidationConfiguration getDefaultSignatureValidationConfiguration()
      Returns the default signature validation configuration for this instance.
      Returns:
      default signature validation configuration, or null if this security configuration object has not overridden the system defaults
    • createDefaultSignatureValidationConfiguration

      protected org.opensaml.xmlsec.SignatureValidationConfiguration createDefaultSignatureValidationConfiguration()
      Creates the default signature validation configuration for this instance.

      The default implementation returns null which means that the SignatureValidationConfiguration held by ConfigurationService will be returned when SecurityConfiguration.getSignatureValidationConfiguration() is called.

      Returns:
      default signature validation configuration, or null if the security configuration object does not need to modify the system defaults
    • initOpenSAML

      public void initOpenSAML() throws org.opensaml.core.config.InitializationException
      Initializes OpenSAML with the defaults that has been installed for this instance.

      ConfigurationService.register(XXXConfiguration.class, xxxConfiguration);

      Specified by:
      initOpenSAML in interface SecurityConfiguration
      Throws:
      org.opensaml.core.config.InitializationException - for initialization errors