Skip to content

Add Workload Identity Auth Support in KV JCA#47051

Open
g2vinay wants to merge 9 commits intoAzure:mainfrom
g2vinay:add-workload-identity-support-kvjca
Open

Add Workload Identity Auth Support in KV JCA#47051
g2vinay wants to merge 9 commits intoAzure:mainfrom
g2vinay:add-workload-identity-support-kvjca

Conversation

@g2vinay
Copy link
Member

@g2vinay g2vinay commented Oct 20, 2025

Adds Workload Identity Auth Support in KV JCA

@github-actions github-actions bot added the azure-spring All azure-spring related issues label Oct 20, 2025
@g2vinay g2vinay marked this pull request as ready for review November 4, 2025 07:05
@g2vinay g2vinay requested a review from rujche as a code owner November 4, 2025 07:05
Copilot AI review requested due to automatic review settings November 4, 2025 07:05
@g2vinay g2vinay requested review from a team, Netyyyy, moarychan and saragluna as code owners November 4, 2025 07:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for Azure Workload Identity authentication for Azure Kubernetes Service (AKS) workloads in the Key Vault JCA library. This enables credential-free authentication for AKS pods using federated tokens.

Key changes:

  • Implemented federated token-based authentication flow using environment variables (AZURE_FEDERATED_TOKEN_FILE, AZURE_CLIENT_ID, AZURE_TENANT_ID)
  • Added automatic detection and prioritization of Workload Identity authentication
  • Updated documentation with detailed authentication method examples and selection logic

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/implementation/utils/AccessTokenUtil.java Added Workload Identity support with detection logic, token file reading, and OAuth2 client assertion flow implementation
sdk/keyvault/azure-security-keyvault-jca/README.md Added comprehensive authentication method documentation with examples for Service Principal, Managed Identity, and Workload Identity
sdk/keyvault/azure-security-keyvault-jca/CHANGELOG.md Documented new Workload Identity feature in the unreleased version section

@writemevenkat
Copy link

Any ETA for this implementation ?

@github-actions
Copy link
Contributor

Hi @g2vinay. Thank you for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days.

@github-actions github-actions bot added the no-recent-activity There has been no recent activity on this issue. label Jan 16, 2026
@writemevenkat
Copy link

Hi Azure SDK Team,

Our team is currently blocked from moving to AKS due to the absence of this feature. Please prioritize this enhancement, as it is critical for our migration plans. @g2vinay

Copy link
Member

@rujche rujche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the PR according to the comments and this PR: https://github.com/Azure/azure-sdk-for-java/pull/47749/files

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Spring Cloud Azure Jan 21, 2026
@rujche rujche added this to the 2026-02 milestone Jan 21, 2026
@github-actions
Copy link
Contributor

Hi @g2vinay. Thank you for your contribution. Since there hasn't been recent engagement, we're going to close this out. Feel free to respond with a comment containing /reopen if you'd like to continue working on these changes. Please be sure to use the command to reopen or remove the no-recent-activity label; otherwise, this is likely to be closed again with the next cleanup pass.

@github-actions github-actions bot closed this Jan 28, 2026
@github-project-automation github-project-automation bot moved this from In Progress to Done in Spring Cloud Azure Jan 28, 2026
@writemevenkat
Copy link

Hi @g2vinay, @rujche - I’m not sure why this PR was auto-closed even though there was recent activity. Could you please take a look and continue/reopen it? We’ve been waiting for this feature to be available.

@github-actions
Copy link
Contributor

Sorry, @writemevenkat, only the original author can reopen this pull request.

@rujche
Copy link
Member

rujche commented Jan 29, 2026

Hi, @g2vinay I opened this PR. Could you please update this PR when you have time?

@rujche rujche reopened this Jan 29, 2026
@github-project-automation github-project-automation bot moved this from Done to In Progress in Spring Cloud Azure Jan 29, 2026
@github-actions github-actions bot removed the no-recent-activity There has been no recent activity on this issue. label Jan 29, 2026
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add another auth type from here: #47850

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, please add the auth type of access token. And sort them by priority.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added it.

@g2vinay
Copy link
Member Author

g2vinay commented Jan 29, 2026

Thanks @rujche for the feedback, I will be addressing the feedback today for this PR.

@g2vinay
Copy link
Member Author

g2vinay commented Jan 29, 2026

Hi @g2vinay, @rujche - I’m not sure why this PR was auto-closed even though there was recent activity. Could you please take a look and continue/reopen it? We’ve been waiting for this feature to be available.

Thanks for following up on this feature.
We will get this PR merged sometime early to mid next week.

From there on @rujche will release this as part of next scheduled release I believe.

@rujche
Copy link
Member

rujche commented Feb 2, 2026

Hi, @g2vinay , could you please resolve the conflicts in this PR?

= AccessTokenUtil.getAccessToken(resource, aadAuthenticationUri, tenantId, clientId, clientSecret);
} else if (AccessTokenUtil.isWorkloadIdentityAvailable()) {
accessToken
= AccessTokenUtil.getAccessTokenWithWorkloadIdentity(keyVaultBaseUri, tenantId, clientId, null);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you test it? If you have tested it, could you please share the screenshot to improve that it worked?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

End to end testing, requires resources setup, that is what I am currently working on.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, please add the auth type of access token. And sort them by priority.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

azure-spring All azure-spring related issues

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

4 participants