azure-cli-extensions icon indicating copy to clipboard operation
azure-cli-extensions copied to clipboard

Adding custom token support

Open akashkeshari opened this issue 2 years ago • 6 comments


This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

General Guidelines

  • [ ] Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • [ ] Have you run python scripts/ci/test_index.py -q locally?

For new extensions:

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
The precondition is to put your code inside this repository and upgrade the version in the pull request but do not modify src/index.json.

Changes in the PR:

  1. Adding custom AAD token support which does not require az login. User can directly pass the AAD access token to the CLI and execute the connectedk8s commands
  2. Adding a flag for overriding container log path in the connect and update command

akashkeshari avatar Aug 25 '22 07:08 akashkeshari

connectedk8s

yonzhan avatar Aug 25 '22 09:08 yonzhan

Just out of curiosity, may I ask is it safe to put tokens into the environment variables? + CLI Authentication expert @jiasli help review this PR

zhoxing-ms avatar Oct 10 '22 06:10 zhoxing-ms

Just out of curiosity, may I ask is it safe to put tokens into the environment variables? + CLI Authentication expert @jiasli help review this PR

@zhoxing-ms , wanted to clarify one thing from our side. the custom token support in connectedk8s CLI will only be consumed by internal partners. They have a use case where they want to use the managed identity token for executing the connectedk8s operations. Also, in these scenarios, the connectedk8s CLI will be running inside a container and not on user's machine, so we're fine with setting it as environment variable

akashkeshari avatar Oct 10 '22 07:10 akashkeshari

the custom token support in connectedk8s CLI will only be consumed by internal partners. They have a use case where they want to use the managed identity token for executing the connectedk8s operations. Also, in these scenarios, the connectedk8s CLI will be running inside a container and not on user's machine, so we're fine with setting it as environment variable

@akashkeshari Got it, thanks~

zhoxing-ms avatar Oct 10 '22 07:10 zhoxing-ms

/azp run

zhoxing-ms avatar Oct 10 '22 08:10 zhoxing-ms

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Oct 10 '22 08:10 azure-pipelines[bot]

[Release] Update index.json for extension [ connectedk8s ] : https://dev.azure.com/azclitools/internal/_build/results?buildId=32118&view=results

azclibot avatar Feb 06 '23 07:02 azclibot