Ashish Singh
Ashish Singh

Reputation: 127

How to dynamically load Identity Provider (IdP) from Database at runtime Sprint Security SAML

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

Answers (1)

Sébastien PRAT
Sébastien PRAT

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

Related Questions