-
Notifications
You must be signed in to change notification settings - Fork 522
feat: enable system-assigned identity by default #3856
Changes from all commits
acc8aa9
beb78e7
c3d176b
6b22340
ed25e4c
4424538
f4facf4
36e3244
a92b91d
5c1332b
f75f4bc
2ca66f4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -121,7 +121,7 @@ type authArgs struct { | |
func addAuthFlags(authArgs *authArgs, f *flag.FlagSet) { | ||
f.StringVar(&authArgs.RawAzureEnvironment, "azure-env", "AzurePublicCloud", "the target Azure cloud") | ||
f.StringVarP(&authArgs.rawSubscriptionID, "subscription-id", "s", "", "azure subscription id (required)") | ||
f.StringVar(&authArgs.AuthMethod, "auth-method", "client_secret", "auth method (default:`client_secret`, `cli`, `client_certificate`, `device`)") | ||
f.StringVar(&authArgs.AuthMethod, "auth-method", "cli", "auth method (default:`client_secret`, `cli`, `client_certificate`, `device`)") | ||
f.StringVar(&authArgs.rawClientID, "client-id", "", "client id (used with --auth-method=[client_secret|client_certificate])") | ||
f.StringVar(&authArgs.ClientSecret, "client-secret", "", "client secret (used with --auth-method=client_secret)") | ||
f.StringVar(&authArgs.CertificatePath, "certificate-path", "", "path to client certificate (used with --auth-method=client_certificate)") | ||
|
@@ -146,6 +146,11 @@ func (authArgs *authArgs) validateAuthArgs() error { | |
return errors.New("--auth-method is a required parameter") | ||
} | ||
|
||
// Back-compat to accommodate existing client usage patterns that assume that "client-secret" is the default | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jadarsie Do you have any concerns here for Azure Stack? Does the The goal for us is to default to CLI as the auth model because for most users it is easier (don't have to generate/maintain service principals, easier command statements). If there's a reason that a local There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ping @jadarsie @haofan-ms |
||
if authArgs.AuthMethod == "cli" && authArgs.rawClientID != "" && authArgs.ClientSecret != "" { | ||
authArgs.AuthMethod = "client_secret" | ||
} | ||
|
||
if authArgs.AuthMethod == "client_secret" || authArgs.AuthMethod == "client_certificate" { | ||
authArgs.ClientID, err = uuid.Parse(authArgs.rawClientID) | ||
if err != nil { | ||
|
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.
This shouldn't be a warning, it's literally a CLI feature