diff --git a/pkg/azurefile/controllerserver.go b/pkg/azurefile/controllerserver.go index 750616e689..797d69773e 100644 --- a/pkg/azurefile/controllerserver.go +++ b/pkg/azurefile/controllerserver.go @@ -1272,7 +1272,9 @@ func (d *Driver) generateSASToken(accountName, accountKey, storageEndpointSuffix if err != nil { 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())) } - serviceClient, err := service.NewClientWithSharedKeyCredential(fmt.Sprintf("https://%s.file.%s/", accountName, storageEndpointSuffix), credential, nil) + clientOptions := service.ClientOptions{} + clientOptions.InsecureAllowCredentialWithHTTP = true + serviceClient, err := service.NewClientWithSharedKeyCredential(fmt.Sprintf("https://%s.file.%s/", accountName, storageEndpointSuffix), credential, &clientOptions) if err != nil { 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())) }