[Core] Support bring-your-own access token#31575
Conversation
️✔️AzureCLI-FullTest
|
️✔️AzureCLI-BreakingChangeTest
|
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
| _AZURE_CLI_SUBSCRIPTION_ID = 'AZURE_CLI_SUBSCRIPTION_ID' | ||
| _AZURE_CLI_TENANT_ID = 'AZURE_CLI_TENANT_ID' | ||
| _AZURE_CLI_ACCESS_TOKEN = 'AZURE_CLI_ACCESS_TOKEN' |
There was a problem hiding this comment.
I explicitly choose AZURE_CLI_ prefix instead of AZURE_ to avoid conflicting with other client tools, such as Azure SDK.
|
Thank you for this @jiasli! Just wondering how this would interact with The reason why I'm asking is on our team, we are using sops to decrypt/encrypt from key vault. We would like to use the Please tell me we might be able to do something like |
|
@ThomasShih, supporting bring-your-own access token will not require
Please do not follow this path. As described in #19853 (comment),
You can directly read the access token from |
Related command
Description
Close #16459
Set
AZURE_CLI_ACCESS_TOKENenvironment variable to let Azure CLIaz loginThe caller is responsible for providing a valid access token satisfying the below requirements:
scopeAzure CLI doesn't not perform any check on the access token, so the error may vary depending on the service response.
Optionally, set
AZURE_CLI_SUBSCRIPTION_IDif the command requires a subscription ID, such asaz group listwhich internally calls Resource Groups - ListAZURE_CLI_TENANT_IDif the command requires a tenant ID, such asaz keyvault createwhich internally calls Vaults - Create Or UpdateFor more details on authentication via environment variables, see #10241.
Testing Guide
Install Azure CLI from source code: #31133
History Notes
[Component Name 1] BREAKING CHANGE:
az command a: Make some customer-facing breaking change[Component Name 2]
az command b: Add some customer-facing featureThis 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.
I adhere to the Error Handling Guidelines.