Skip to content

Commit 2deca2e

Browse files
andyzhangxk8s-infra-cherrypick-robot
authored andcommitted
fix: allow http auth in volume clone
1 parent d884472 commit 2deca2e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/blob/controllerserver.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,9 @@ func (d *Driver) generateSASToken(accountName, accountKey, storageEndpointSuffix
923923
if err != nil {
924924
return "", status.Errorf(codes.Internal, fmt.Sprintf("failed to generate sas token in creating new shared key credential, accountName: %s, err: %s", accountName, err.Error()))
925925
}
926-
serviceClient, err := service.NewClientWithSharedKeyCredential(fmt.Sprintf("https://%s.blob.%s/", accountName, storageEndpointSuffix), credential, nil)
926+
clientOptions := service.ClientOptions{}
927+
clientOptions.InsecureAllowCredentialWithHTTP = true
928+
serviceClient, err := service.NewClientWithSharedKeyCredential(fmt.Sprintf("https://%s.blob.%s/", accountName, storageEndpointSuffix), credential, &clientOptions)
927929
if err != nil {
928930
return "", status.Errorf(codes.Internal, fmt.Sprintf("failed to generate sas token in creating new client with shared key credential, accountName: %s, err: %s", accountName, err.Error()))
929931
}

0 commit comments

Comments
 (0)