Skip to content
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

Allow setting Oauth 2.0 Resource Indicators in Oauth client calls #16605

Open
pat-mccusker opened this issue Feb 14, 2025 · 0 comments
Open

Allow setting Oauth 2.0 Resource Indicators in Oauth client calls #16605

pat-mccusker opened this issue Feb 14, 2025 · 0 comments
Labels
status: waiting-for-triage An issue we've not yet triaged type: enhancement A general enhancement

Comments

@pat-mccusker
Copy link
Contributor

Expected Behavior

Allow the setting of Resource Indicators for Oauth 2.0 on ClientRegistration to then be used for authentication requests.

Current Behavior

The current process for setting an RFC 8707 resource indicator might appear to be begin with either

  1. Implementing a custom Oauth2AuthorizedClientManager and in the authorize method adding the indicator as a custom attribute entry to the Oauth2AuthorizationContext.
  2. Instantiating an existing Oauth2AuthorizedClientManager implementation and setting a contextAttributesMapper on that instance that would create the resource indicator entry.

However, it seems that this value would ultimately not be applied by a parametersConverter such as the OAuth2ClientCredentialsGrantRequestEntityConverter, so quite a bit more custom work appears to be necessary.

Context

My specific case involves a client credentials flow involving a resource indicator rather than core oauth 2 scopes, using WebClient and a ServletOAuth2AuthorizedClientExchangeFilterFunction. I'm also leveraging spring-boot oauth client autoconfiguration properties, but as that project's property values are applied to spring-security ClientRegistrations starting here seems to make the most sense.

The only existing issues involving resource indicators that I'm aware of are this project's #6972 and the spring-authorization-server project's support request.

Are there any other workarounds that I'm unaware of?

@pat-mccusker pat-mccusker added status: waiting-for-triage An issue we've not yet triaged type: enhancement A general enhancement labels Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant