Allow customization of auth2 client to support strong authentication via acr_values parameter #7168
Labels
in: oauth2
An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)
status: invalid
An issue that we don't feel is valid
Summary
The OpenID specification describes usage of an URL parameter (acr_values) that can be used to request strong authentication from an OAuth2 server.
The spring-seucrity-oauth2-client is not customizable to set this parameter.
Actual Behavior
When I use ServerHttpSecurity.oauth2Login(), an OAuth2AuthorizationRequestRedirectWebFilter is setup automatically, that uses an DefaultServerOAuth2AuthorizationRequestResolver to create a redirect to a login service. DefaultServerOAuth2AuthorizationRequestResolver.authorizationRequest() creates a redirect request, that does not allow to specify additional URL parameters like e.g. the acr_values parameter.
It is neither possible to modify the behavior of DefaultServerOAuth2AuthorizationRequestResolver nor is it possible to prevent its instantiation by providing an alternative bean for it.
Expected Behavior
ClientRegistration.Builder should allow to either directly specify acr_values or more generally to set values for the additionalAttributes parameters, that DefaultServerOAuth2AuthorizationRequestResolver should consider.
Configuration
Version
spring-security-oauth2-client:5.1.5.RELEASE
Sample
The following addition to ... would do the trick:
The text was updated successfully, but these errors were encountered: