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

Support for using Azure WorkloadIdentity with Oauth2 Authorization Code Grant Flow #16677

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

Comments

@cprutle
Copy link

cprutle commented Feb 28, 2025

Expected Behavior

You should be able to use the oauth2.client.registration to configure the application to use the Federated token for client authentication in the Oauth2 Authorization Code Grant Flow.

i.e.

    spring:
      security:
        oauth2:
          client:
            registration:
              azure:
                provider: azure
                client-id: <CLIENT_ID>
                federated-token-file-path: <PATH TO FILE>
                scope: <SCOPE LIST>

Spring Security should handle reading in the token file and updating it when the token expires and is rotated.

The following parameters should be added to the request:

client_assertion_type: "urn:ietf:params:oauth:client-assertion-type:jwt-bearer"
client_assertion: <FEDERATED_TOKEN>

Implementation for spring-web is straight forward for non-reactive spring-web but will be more complex for reactive spring-webflux as reading a file is a blocking method.

Current Behavior

Currently this is not supported out of box. It can be achieved through custom parameter converters.

Context

@cprutle cprutle added status: waiting-for-triage An issue we've not yet triaged type: enhancement A general enhancement labels Feb 28, 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