Skip to content

Commit a6ec63b

Browse files
rdarkmostynb
authored andcommitted
fix azure auth regression in 2.6.0
* changes in 2.6.0 meant that azure blob storage only supported shared key authentication or no authentication: When valid credentials were passed in, and no shared key was present in configuration, this would result in a NewClientWithNoCredential being created, the credentials were ignored
1 parent 91084d0 commit a6ec63b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cache/azblobproxy/azblobproxy.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,9 @@ func New(
144144
var err error
145145
var client *azblob.Client
146146

147-
if creds == nil && len(sharedKey) > 0 {
147+
if creds != nil {
148+
client, err = azblob.NewClient(url, creds, nil)
149+
} else if len(sharedKey) > 0 {
148150
cred, e := azblob.NewSharedKeyCredential(storageAccount, sharedKey)
149151
if e != nil {
150152
log.Fatalln(e)

0 commit comments

Comments
 (0)