spring-projects / spring-security

Spring Security
http://spring.io/projects/spring-security
Apache License 2.0
8.83k stars 5.9k forks source link

Add JdbcRelyingPartyRegistrationRepository #16012

Open sasirekha98 opened 2 weeks ago

sasirekha98 commented 2 weeks ago

I have an application where the SP metadata is generated as XML and put in the database. We pull the XML and generate the authentication request. When I want to move to Spring Security, I don't find the same option where I can get the relying party details from the data source or directly provide the XML file location.

Currently, as per my understanding, we have the option to load the XML file of the IDP through metadata locations through spring security like this

RelyingPartyRegistrations .fromMetadataLocation(oktaMetadataUrl) .registrationId("okta")).build();

Similar to that, it would be nice to have an option where we can load the relying party details when we have them in the database or some location already. We just need to load that file instead of adding the details one by one to the RelyingpartyRegistration.

it will be easier if I have an option where I have to mention the metadata location of the sp as well like this RelyingPartyRegistrations .fromMetadataLocationofSP(location) .fromMetadataLocationofIDP(oktaMetadataUrl) .registrationId("okta")).build();

jzheaux commented 1 week ago

Thanks for the suggestion, @sasirekha98. Are you interested in supplying a PR for this? You can look at the various JdbcXXX classes already in Spring Security for guidance.

wapkch commented 4 days ago

@jzheaux May i work on this?