Skip to content

[KeyVault] Externalize ChallengeBasedAuthenticationPolicy token cache#5518

Merged
sophiajt merged 1 commit intoAzure:masterfrom
daviwil:keyvault-cache-challenge-tokens
Oct 13, 2019
Merged

[KeyVault] Externalize ChallengeBasedAuthenticationPolicy token cache#5518
sophiajt merged 1 commit intoAzure:masterfrom
daviwil:keyvault-cache-challenge-tokens

Conversation

@daviwil
Copy link
Contributor

@daviwil daviwil commented Oct 10, 2019

This PR fixes an issue reported in #5021 which states that the ChallengeBasedAuthenticationPolicy is authenticating with AAD for every request to the KeyVault service instead of reusing the original access token that it received. The fix is to use a similar approach to PR #4174 and store the token cache externally because RequestPolicy instances get recreated for each request in core-http.

The changes for all 3 file are identical because this class is currently duplicated across the @azure/keyvault-* libraries.

Fixes #5021.

@daviwil daviwil requested review from schaabs and sophiajt October 10, 2019 22:16
@daviwil daviwil requested a review from sadasant as a code owner October 10, 2019 22:16
@sophiajt sophiajt merged commit d4017a7 into Azure:master Oct 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[KeyVault] ChallengeBasedAuthenticationPolicy improperly caches access token and challenge

3 participants