I am integrating spring-security-saml extension to support SSO in my web-application, my application should allow different customers to add their IDP metadata and their certificate to my webapp (which is an SP) so that my webapp can initiate SSO against their idp.
Right now I am defining a "metadata" bean in my java config where in I add the idp metadata to CachingMetadataManager. But this happens only once, I am not able to figure out how do I add a new idp metadata to MetadataManager at runtime (without re-starting my app). Can I just get the metadata bean from spring ApplicationContext and add a new provider to it? Will it work?
What is the general practice to support the above use case (adding new idp's at runtime) with spring-SAML? are there any other java libraries which support this.
Thanks in advance
The CachingMetadataManager
is synchronized and you can add/remove MetadataProviders
during runtime by getting the bean from the application context and calling addMetadataProvider
/removeMetadataProvider
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With