You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OpenSAML gets initialized by Spring Security lazily via a package-private class OpenSamlImplementation. This setup makes it tricky for an application to override the defaults that Spring Security specifies.
For example, to use a different ParserPool configuration, one needs to ensure that they call XMLObjectProviderRegistrySupport.setParserPool only after OpenSamlAuthenticationProvider or OpenSamlAuthenticationRequestFactory is classloaded since those are the two classes that use an instance of OpenSamlImplementation.
It may be cleaner to initialize OpenSAML as part of the container lifecycle, for example as a BeanFactoryPostProcessor. In this way, an application can register their own BeanFactoryPostProcessor to override the behavior.
At that point, the code can be removed in OpenSamlImplementation that initializes OpenSAML.
The text was updated successfully, but these errors were encountered:
With the introduction of OpenSAML into the EnableWebSecurity annotation,
it became necessary to have PowerMock-enabled tests ignore those classes.
Issue spring-projectsgh-8772
OpenSAML gets initialized by Spring Security lazily via a package-private class
OpenSamlImplementation
. This setup makes it tricky for an application to override the defaults that Spring Security specifies.For example, to use a different
ParserPool
configuration, one needs to ensure that they callXMLObjectProviderRegistrySupport.setParserPool
only afterOpenSamlAuthenticationProvider
orOpenSamlAuthenticationRequestFactory
is classloaded since those are the two classes that use an instance ofOpenSamlImplementation
.It may be cleaner to initialize OpenSAML as part of the container lifecycle, for example as a
BeanFactoryPostProcessor
. In this way, an application can register their ownBeanFactoryPostProcessor
to override the behavior.At that point, the code can be removed in
OpenSamlImplementation
that initializes OpenSAML.The text was updated successfully, but these errors were encountered: