-
Notifications
You must be signed in to change notification settings - Fork 41.1k
Add AutoConfiguration support for OIDC Configuration Provider #13210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Given that Spring Boot 2.1.0.M1 will ship with Spring Security 5.1.0.M1, we can do this for 2.1.0.M2. |
Spring Boot 2.1.0.M1 is now scheduled for July 12th which is after Spring Security 5.1.0.M2's scheduled date, so this doesn't need to be blocked anymore for 2.1.0.M1. |
@rwinch I find it quite confusing that the |
@mbhave Agreed. This is just the defaulted value. You should be able to make any changes you want to the builder that is returned. |
@rwinch Can't the default value be the key used in properties? Seems more logical to me than using the host. |
@snicoll Yes I think that makes sense. However, ClientRegistration okta = OidcConfigurationProvider.issuer(issuer)
.registrationId(theKeyToUse) // Override with the value Boot wants to use
.clientId(clientId)
.clientSecret(clientSecret)
.build(); NOTE: When writing the actual example I realized that registrationId was not writable on the Builder. Perhaps this is where the confusion was? I created and resolved spring-projects/spring-security#5527 so this will be possible once Spring Security's build finishes. |
yeah, that's what caused my confusion. I've got the latest snapshot now. thanks! |
Spring Boot should add auto configuration support
OidcConfigurationProvider
. This will allow simplifying how an OAuth Provider is configured. For example, right now a user must create the following configuration:By leveraging
OidcConfigurationProvider
the configuration should be able to be simplified to something like this:Then Spring Boot's Auto Configuration support can can create a
ClientRegistration
using:This should be done for Servlet environments and WebFlux based environments along with #13142
Related: spring-projects/spring-security#4413
NOTE: You can refer to OidcConfigurationProviderTests for sample output of the URL and how to write a test using
MockWebServer
. You can also use Google's Issuer https://accounts.google.com/ which will request https://accounts.google.com/.well-known/openid-configuration for a simple way of integration testing a sample application.The text was updated successfully, but these errors were encountered: