Class DefaultSAMLBootstrap

  • All Implemented Interfaces:
    org.springframework.beans.factory.config.BeanFactoryPostProcessor

    public final class DefaultSAMLBootstrap
    extends org.springframework.security.saml.SAMLBootstrap
    By default, Spring Security SAML uses SHA1withRSA for signature algorithm and SHA-1 for digest algorithm.

    This class allows app to use stronger encryption such as SHA-256.

    See: http://stackoverflow.com/questions/23681362/how-to-change-the-signature-algorithm-of-saml-request-in-spring-security See: http://stackoverflow.com/questions/25982093/setting-the-extendedmetadata-signingalgorithm-field/26004147

    • Constructor Detail

      • DefaultSAMLBootstrap

        public DefaultSAMLBootstrap()
        Default signature algorithm is SHA256withRSA and default digest algorithm is SHA-256.
      • DefaultSAMLBootstrap

        public DefaultSAMLBootstrap​(String signatureAlgorithmName,
                                    String signatureAlgorithmURI,
                                    String digestAlgorithmURI)
        Allows user to specify different algorithm URIs.
        Parameters:
        signatureAlgorithmName - Signature algorithm name
        signatureAlgorithmURI - Signature algorithm URI
        digestAlgorithmURI - Digest algorithm URI
    • Method Detail

      • postProcessBeanFactory

        public void postProcessBeanFactory​(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
                                    throws org.springframework.beans.BeansException
        Specified by:
        postProcessBeanFactory in interface org.springframework.beans.factory.config.BeanFactoryPostProcessor
        Overrides:
        postProcessBeanFactory in class org.springframework.security.saml.SAMLBootstrap
        Throws:
        org.springframework.beans.BeansException