Skip to content

Commit bc66580

Browse files
Merge pull request #1021 from flavianmissi/OCPBUGS-32328
OCPBUGS-32328: azure-path-fix: support auth via account key (without clientID)
2 parents d87f0c7 + 6dcff1f commit bc66580

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
@@ -367,10 +367,10 @@ func validate(opts *configOpts) error {
367367
if len(opts.clientSecret) == 0 && len(opts.federatedTokenFile) == 0 && len(opts.accountKey) == 0 {
368368
return fmt.Errorf("One of AZURE_CLIENT_SECRET or AZURE_FEDERATED_TOKEN_FILE or AZURE_ACCOUNTKEY is required for authentication")
369369
}
370-
if len(opts.clientID) == 0 {
370+
if len(opts.clientID) == 0 && len(opts.accountKey) == 0 {
371371
return fmt.Errorf("AZURE_CLIENT_ID is required for authentication")
372372
}
373-
if len(opts.tenantID) == 0 {
373+
if len(opts.tenantID) == 0 && len(opts.accountKey) == 0 {
374374
return fmt.Errorf("AZURE_TENANT_ID is required for authentication")
375375
}
376376
if len(opts.storageAccountName) == 0 {

0 commit comments

Comments
 (0)