-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
[Key Vault] Support CAE in challenge auth policy #37358
Conversation
API change check API changes are not detected in this pull request. |
...yvault-administration/azure/keyvault/administration/_internal/async_challenge_auth_policy.py
Outdated
Show resolved
Hide resolved
...ault/azure-keyvault-administration/azure/keyvault/administration/_internal/http_challenge.py
Outdated
Show resolved
Hide resolved
sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/challenge_auth_policy.py
Show resolved
Hide resolved
Can we reuse the code we added into core? #37652 |
@xiangyan99 unfortunately I don't know if we could effectively borrow the Core implementation. Our |
In fact, I was wondering if we could reuse the code to parse claims, challenges, etc. |
Okay, understood! Yeah, we can align some of the parsing logic. I had borrowed the claims parsing logic largely from |
We can revisit it in MQ. :) |
...yvault-administration/azure/keyvault/administration/_internal/async_challenge_auth_policy.py
Show resolved
Hide resolved
Given you implement your own auth policy, you may need something like #36565 to support the new protocol. |
@xiangyan99 This support is now implemented (and tested by all of our policy tests) in 93c7eaa 🙂 |
Description
Resolves https://github.com/Azure/azure-sdk-for-python-pr/issues/919. Based on Azure/azure-sdk-for-java#41814. The
HttpChallenge
model now has aclaims
attribute, which contains the decoded claims from an authentication challenge if one is present. Parsing logic is largely pulled from the_parse_claims_challenge
utility inazure-mgmt-core
.In order to support the unique challenge flow that KV+CAE enables -- where we handle two consecutive challenges -- we need to implement the
send
method on the KV challenge auth policy. Doing so on the async side requires some awaiting logic that's been lifted fromazure-core
utilities.All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines