Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
4.7.0, 4.8.0
-
None
-
Unknown
Description
In FilesOperations the client builder only handles the SHARED_ACCOUNT_KEY CredentialType, the others are misplaced under that if:
if (configuration.getCredentialType().equals(CredentialType.SHARED_ACCOUNT_KEY)) { if (sharedKey != null) { var keyB64 = FilesURIStrings.reconstructBase64EncodedValue(sharedKey); builder.credential(new StorageSharedKeyCredential(configuration.getAccount(), keyB64)); } else if (configuration.getCredentialType().equals(CredentialType.AZURE_SAS)) { builder = builder.sasToken(token.toURIQuery()); } else if (configuration.getCredentialType().equals(CredentialType.AZURE_IDENTITY)) { builder = builder.credential(new DefaultAzureCredentialBuilder().build()); } }
Fix should be easy:
if (configuration.getCredentialType().equals(CredentialType.SHARED_ACCOUNT_KEY) && sharedKey != null) { var keyB64 = FilesURIStrings.reconstructBase64EncodedValue(sharedKey); builder.credential(new StorageSharedKeyCredential(configuration.getAccount(), keyB64)); } else if (configuration.getCredentialType().equals(CredentialType.AZURE_SAS)) { builder = builder.sasToken(token.toURIQuery()); } else if (configuration.getCredentialType().equals(CredentialType.AZURE_IDENTITY)) { builder = builder.credential(new DefaultAzureCredentialBuilder().build()); }
Attachments
Issue Links
- links to