-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[AppConfig] Support AAD auth for data operations #15160
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
Conversation
eb01f76 to
badda2f
Compare
|
hi @bim-msft could you pls review the PR? thanks. |
badda2f to
176810e
Compare
|
Hi @recao, could you please help review this PR? |
f0f435f to
5968768
Compare
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
2df627d to
b112dad
Compare
|
hi @fengzhou-msft could you pls help to review since @bim-msft is oof? thanks. |
shenmuxiaosen
left a comment
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.
![]()
|
Hi @yonzhan , since Jiashuo is OOF, can someone else help review this PR? |
|
@avanigupta We are in Chinese National holiday. @jiasli can help review this PR after holiday. Sorry for the inconvenience caused. |
|
/azp run |
|
No pipelines are associated with this pull request. |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
ba3811f to
f3eac0a
Compare
| argcomplete==1.11.1 | ||
| asn1crypto==0.24.0 | ||
| azure-appconfiguration==1.1.0 | ||
| azure-appconfiguration==1.1.1 |
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.
pls run live test to make sure no breaking change in sdk version bumping
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.
I've run all live tests and updated test recordings in this PR.
| # Due to this bug in get_login_credentials: https://github.com/Azure/azure-cli/issues/15179, | ||
| # we need to manage the AAD scope by passing appconfig endpoint as resource | ||
| cred, _, _ = profile.get_login_credentials(resource=endpoint) |
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.
#15184 has been merged. You may now safely remove resource=endpoint.
Description
App Configuration supports AAD authentication and authorization for all data operations. Since we are now using the official Python SDK for AppConfiguration, we can easily support AAD auth in appconfig CLI module by utilizing the
az logincredentials.This PR introduces two new arguments for users to authenticate using AAD credentials:
--auth-mode (login or key; default is key which preserves the current behavior)
--endpoint (AppConfiguration endpoint like
https://storename.azconfig.io)For any existing AppConfig commands, providing the
--nameand--connection-stringparameters will use key (HMAC) auth for data operations (preserving current behavior). Instead of these two arguments, if users provide--auth-mode loginand--endpointparameters, AAD credentials will be used to connect to AzureAppConfigurationClient.Testing Guide
This read request should succeed:
az appconfig kv show --key testKey --auth-mode login --endpoint https://aadtestcli.azconfig.ioThis write request should fail with 'Forbidden' error:
az appconfig kv lock --key testKey --auth-mode login --endpoint https://aadtestcli.azconfig.ioHistory Notes
This checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.