Reputation: 127
Is there a way to add a new IdP at runtime from database while using Spring Security Extension for SAML 2.0
how to add new Identity Provider into Java Web application by taking required attributes from User at runtime without restarting the server or application.
and What all generic attributes(like entityId, SSO authentication URL, and public X.509 certificate) needs to be taken as input for adding new IdP into existing web application without server restart.
Upvotes: 3
Views: 1019
Reputation: 449
You can manipulate the MetadataManager to dynamically add new IdPs or remove existings IdPs.
yourMetadataManagerBean.removeMetadataProvider(MetadataProvider provider)
yourMetadataManagerBean.addMetadataPRovider(MetadataProvider newProvider)
Then do not forget to refresh the context by calling
yourMetadataManagerBean.setRefreshRequired(true);
yourMetadataManagerBean.refreshMetadata();
Upvotes: 1