Skip to content

Commit 367570e

Browse files
Merge pull request #1023 from openshift-cherrypick-robot/cherry-pick-1022-to-release-4.14
[release-4.14] OCPBUGS-32450: azure-path-fix: support auth via account key (without clientID)
2 parents d139e6b + 0726e81 commit 367570e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/move-blobs/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,10 +366,10 @@ func validate(opts *configOpts) error {
366366
if len(opts.clientSecret) == 0 && len(opts.federatedTokenFile) == 0 && len(opts.accountKey) == 0 {
367367
return fmt.Errorf("One of AZURE_CLIENT_SECRET or AZURE_FEDERATED_TOKEN_FILE or AZURE_ACCOUNTKEY is required for authentication")
368368
}
369-
if len(opts.clientID) == 0 {
369+
if len(opts.clientID) == 0 && len(opts.accountKey) == 0 {
370370
return fmt.Errorf("AZURE_CLIENT_ID is required for authentication")
371371
}
372-
if len(opts.tenantID) == 0 {
372+
if len(opts.tenantID) == 0 && len(opts.accountKey) == 0 {
373373
return fmt.Errorf("AZURE_TENANT_ID is required for authentication")
374374
}
375375
if len(opts.storageAccountName) == 0 {

0 commit comments

Comments
 (0)