简体   繁体   中英

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.

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();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM