Skip to content
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

Support login using token from az login #10

Open
carolynvs opened this issue Jan 30, 2020 · 4 comments
Open

Support login using token from az login #10

carolynvs opened this issue Jan 30, 2020 · 4 comments
Labels
1 - 🍫 Eat chocolate _after_ emergency donuts enhancement New code incoming!

Comments

@carolynvs
Copy link
Member

See https://mikhail.io/2019/07/how-azure-cli-manages-access-tokens/ for where azure puts the goods after az login. We can make the ~/.azure/* dir one of the credentials, instead of passing in a service principal and then that inside the bundle to allow az to authenticate without requiring people to run az login manually in each action.

Note that the bundle consumer would need to run az login before executing the bundle. Long term plugins could have a hook before bundles run to help out with stuff like that.

It is up to the bundle author if they prefer that style of credential over service principals.

@carolynvs carolynvs added the enhancement New code incoming! label Jan 30, 2020
@carolynvs carolynvs added this to Inbox in Porter and Mixins [OLD] via automation Jan 30, 2020
@effndc
Copy link

effndc commented Jul 1, 2020

Please add this enhancement, many of us that have Azure subscriptions managed through large corporate IT providers are blocked by policy from access to service principal accounts.

@carolynvs
Copy link
Member Author

carolynvs commented Jul 6, 2020

@effndc Thanks for letting us know about that limitation! I wasn't aware that using a service principal wasn't an option for everyone.

I'm putting this on the backlog and will try to get a solution soon. This really makes the az plugin unusable for some users... 🙁

@carolynvs carolynvs added the 1 - 🍫 Eat chocolate _after_ emergency donuts label Jul 6, 2020
@carolynvs carolynvs moved this from Inbox to Backlog in Porter and Mixins [OLD] Jul 6, 2020
@vdice vdice removed this from Backlog in Porter and Mixins [OLD] Sep 16, 2020
@vdice vdice added this to Backlog in Porter and Mixins Sep 16, 2020
@aguywithcode
Copy link

I was digging around to see if it's possible to "chain" your az login information somehow so that link was enlightening. Curious that you can't request an id and key from your logged in account. Looks like copying the user's profile.json file into the environment should make work. Similar to using a kubeconfig for the kubernetes plugin.

@Doommius
Copy link

Doommius commented Sep 4, 2023

It seems to be possible to use the azidentity.NewDefaultAzureCredential to pick up the credentials, should be able to use both the azcli credentials, managed identities, and service principles from build agents in Azure DevOps and Github runners.

Looking a bit deeper in the docs it only seems to back this up. I don't personally have experience in go, but i'll add my 2 cents :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - 🍫 Eat chocolate _after_ emergency donuts enhancement New code incoming!
Projects
Porter and Mixins
  
Backlog
Development

No branches or pull requests

4 participants