Skip to content

Commit 4d007d6

Browse files
committed
fix: avoid using managed identity auth in fallback
1 parent f360b76 commit 4d007d6

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
@@ -882,7 +882,7 @@ func (d *Driver) authorizeAzcopyWithIdentity() ([]string, error) {
882882
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) {
883883
var authAzcopyEnv []string
884884
var err error
885-
if !d.useDataPlaneAPI("", accountName) && len(secrets) == 0 && len(secretName) == 0 {
885+
if !useSasToken && !d.useDataPlaneAPI("", accountName) && len(secrets) == 0 && len(secretName) == 0 {
886886
// search in cache first
887887
if cache, err := d.azcopySasTokenCache.Get(accountName, azcache.CacheReadTypeDefault); err == nil && cache != nil {
888888
klog.V(2).Infof("use sas token for account(%s) since this account is found in azcopySasTokenCache", accountName)

0 commit comments

Comments
 (0)