Skip to content

Commit a18e024

Browse files
andyzhangxk8s-infra-cherrypick-robot
authored andcommitted
fix: avoid using managed identity auth in fallback
1 parent 04606ea commit a18e024

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/blob/controllerserver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,7 @@ func (d *Driver) authorizeAzcopyWithIdentity() ([]string, error) {
877877
func (d *Driver) getAzcopyAuth(ctx context.Context, accountName, accountKey, storageEndpointSuffix string, accountOptions *azure.AccountOptions, secrets map[string]string, secretName, secretNamespace string, useSasToken bool) (string, []string, error) {
878878
var authAzcopyEnv []string
879879
var err error
880-
if !d.useDataPlaneAPI("", accountName) && len(secrets) == 0 && len(secretName) == 0 {
880+
if !useSasToken && !d.useDataPlaneAPI("", accountName) && len(secrets) == 0 && len(secretName) == 0 {
881881
// search in cache first
882882
if cache, err := d.azcopySasTokenCache.Get(accountName, azcache.CacheReadTypeDefault); err == nil && cache != nil {
883883
klog.V(2).Infof("use sas token for account(%s) since this account is found in azcopySasTokenCache", accountName)

0 commit comments

Comments
 (0)