Repository navigation
add support for CLI credentials when uploading to Azure - #2745
Merged
Merged
Conversation
brlane-rht
reviewed
Oct 6, 2026
croissanne
previously approved these changes
Oct 7, 2026
croissanne
left a comment
Member
There was a problem hiding this comment.
LGTM, thank you. I agree with Brian though that maybe splitting the description into short and long could be nicer.
Member
Author
|
I moved the big description to |
supakeen
approved these changes
Oct 8, 2026
supakeen
enabled auto-merge
October 8, 2026 07:12
I would like to introduce multiple ways to do Azure authentication. In order to prepare for this, I factored out a method responsible for creating a client that takes a generic TokenCredential instead of the specific ClientSecret one.
If the credentials arg is empty, let's default to the CLICredential, i.e. image-builder will re-use the authentication from the azure CLI (use az login to initialize it). This is nice for developer experience because they don't have service credentials lying around - but it's simple for them to authenticate az.
The previous commit added support to the azure library for using the CLI credentials, this commit wires it up to the CLI. This means image-builder can now re-use the same credentials as azure-cli uses on my machine which I found pretty neat.
Member
Author
|
Rebased to fix the failing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I needed to test some Azure uploads, I had
azinstalled and authenticated, and I was wondering whyimage-buildercannot just re-use the credentials. Instead it "wanted" me to create a service account...Turns out the azure sdk has support for using the CLI credentials, so I plumbed it through our azure library and through the CLI layer.
I tested this locally, and it's quite convenient. And it brings parity to what the AWS integration can do.