-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Updated KeyVaultCredentialPolicy
to extend BearerTokenAuthenticationPolicy
in Key Vault clients.
#24199
Merged
+2,373
−1,515
Merged
Updated KeyVaultCredentialPolicy
to extend BearerTokenAuthenticationPolicy
in Key Vault clients.
#24199
Changes from 5 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
36c18da
Replaced all uses of KeyVaultCredentialPolicy with BearerTokenAuthent…
vcolin7 095fc64
We now pass the appropriate scope to BearerTokenAuthenticationPolicy …
vcolin7 eed5e56
Added tests and recordings for KEK tests on MHSM. Fixed and cleaned u…
vcolin7 1d55f52
Removed unused imports.
vcolin7 e936df1
Renamed MHSM_SCOPE to MANAGED_HSM_SCOPE in all client builders.
vcolin7 911d295
Reintroduced KeyVaultCredentialPolicy and modified it to extend from …
vcolin7 a9a5a74
Fixed CvheckStyle errors.
vcolin7 d63983d
Made changes to KeyVaultCredentialPolicy so we don't set the body of …
vcolin7 ddc8659
Removed scope constants from Key vault client builders.
vcolin7 8947d6d
Attempted to fix flaky live tests.
vcolin7 acecf59
Removed verify test for HSM as the FromSource test already verifies t…
vcolin7 c331b23
Reverted KeyVaultCredentialPolicy in all libraries to set the request…
vcolin7 3038a19
Fixed KV Administration client live tests that failed due to the auth…
vcolin7 be31274
Fixed CheckStyle issues.
vcolin7 16de813
Fixed another CheckStyle issue.
vcolin7 2ba9e74
Fixed issue that caused an NPE in KeyVaultCredentialPolicy if the con…
vcolin7 5b58aaf
Updated KeyVaultCredentialPolicy in all other libraries.
vcolin7 674e4a9
Made an attempt at fixing the backup async live tests.
vcolin7 a7f5d98
Added sleep timer when running against service for restore operations.
vcolin7 938c74c
Applied PR feedback.
vcolin7 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
125 changes: 0 additions & 125 deletions
125
...a/com/azure/security/keyvault/administration/implementation/KeyVaultCredentialPolicy.java
This file was deleted.
Oops, something went wrong.
60 changes: 0 additions & 60 deletions
60
.../main/java/com/azure/security/keyvault/administration/implementation/ScopeTokenCache.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to utilize the Challenge Based Auth Support in BTA policy from azure-core
we need to create a custom policy in KV package that doesn't hard code the scopes as above.
The scopes and tenant id are dynamically parsed in KV challenge that gets returned back from the service.
Here's the .NET impl for reference: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/keyvault/Azure.Security.KeyVault.Shared/src/ChallengeBasedAuthenticationPolicy.cs#L13
You can port that over to Java and then utilize that policy here, instead of above.
cc: @schaabs @AlexGhiondea @heaths
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @g2vinay!