Skip to content

[Identity] Renamed AZURE_POD_IDENTITY_TOKEN_URL -> AZURE_POD_IDENTITY_AUTHORITY_HOST#16682

Merged
sadasant merged 4 commits intoAzure:mainfrom
sadasant:identity/fix16454
Aug 9, 2021
Merged

[Identity] Renamed AZURE_POD_IDENTITY_TOKEN_URL -> AZURE_POD_IDENTITY_AUTHORITY_HOST#16682
sadasant merged 4 commits intoAzure:mainfrom
sadasant:identity/fix16454

Conversation

@sadasant
Copy link
Contributor

The requester of this feature would prefer to specify only the scheme and host of their IMDS proxy in AZURE_POD_IDENTITY_TOKEN_URL, and have ManagedIdentityCredential form the rest of the URL. This PR adjusts accordingly and renames AZURE_POD_IDENTITY_TOKEN_URL to AZURE_POD_IDENTITY_AUTHORITY_HOST to reflect the change in its expected value.

From: Azure/azure-sdk-for-python#19867

Fixes #16454

@sadasant sadasant requested a review from schaabs as a code owner July 30, 2021 20:41
@sadasant sadasant self-assigned this Jul 30, 2021
@ghost ghost added the Azure.Identity label Jul 30, 2021
@sadasant sadasant requested a review from chlowell August 7, 2021 00:22

return {
url: process.env.AZURE_POD_IDENTITY_TOKEN_URL ?? `${imdsEndpoint}?${query}`,
url: `${process.env.AZURE_POD_IDENTITY_AUTHORITY_HOST ?? imdsHost}${imdsEndpointPath}?${query}`,
Copy link
Member

Choose a reason for hiding this comment

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

If $AZURE_POD_IDENTITY_AUTHORITY_HOST is https://foo/ you'll end up with https://foo//metadata/identity/oauth2/token

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good point! thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed here: be78f8c

@sadasant sadasant requested a review from chlowell August 9, 2021 17:40
@sadasant sadasant merged commit b9f9bb5 into Azure:main Aug 9, 2021
@sadasant sadasant deleted the identity/fix16454 branch August 9, 2021 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename AZURE_POD_IDENTITY_TOKEN_URL -> AZURE_POD_IDENTITY_AUTHORITY_HOST

3 participants