JCLOUDS-1558: Implement Azure Blob Azure AD auth 120/head
authorTimur Alperovich <timur@timuralp.com>
Tue, 10 Aug 2021 06:46:24 +0000 (23:46 -0700)
committerAndrew Gaul <andrew@gaul.org>
Sun, 22 Aug 2021 06:52:48 +0000 (15:52 +0900)
commit0b68e8adee5e370184311c3fe4931ed8416d12d4
treea974be45824c4da2bd3cb6fb24bdceffca97536d
parent519bee9f60cdfe5acf58a838afba2c7315e98494
JCLOUDS-1558: Implement Azure Blob Azure AD auth

Implements the Azure AD authentication for Azure Blob, using the OAuth
module. Added more parameters to the AzureBlob provider:
- azureblob.auth
- azureblob.account
- azureblob.tenantId

The "auth" parameter is used to specify whether Key/SAS auth or Active
Directory is used. When using Active Directory auth, the identity no
longer maps to the storage account, which has to be specified
explicitly. The tenant ID also needs to be supplied to construct the
auth URL to obtain the token correctly.
16 files changed:
providers/azureblob/pom.xml
providers/azureblob/src/main/java/org/jclouds/azure/storage/config/AuthType.java [new file with mode: 0644]
providers/azureblob/src/main/java/org/jclouds/azure/storage/config/AzureStorageOAuthConfigFactory.java [new file with mode: 0644]
providers/azureblob/src/main/java/org/jclouds/azure/storage/config/AzureStorageProperties.java [new file with mode: 0644]
providers/azureblob/src/main/java/org/jclouds/azure/storage/filters/SharedKeyLiteAuthentication.java
providers/azureblob/src/main/java/org/jclouds/azure/storage/util/storageurl/StorageAccountInVhost.java
providers/azureblob/src/main/java/org/jclouds/azureblob/AzureBlobApiMetadata.java
providers/azureblob/src/main/java/org/jclouds/azureblob/AzureBlobProviderMetadata.java
providers/azureblob/src/main/java/org/jclouds/azureblob/binders/BindAzureBlobMetadataToRequest.java
providers/azureblob/src/main/java/org/jclouds/azureblob/blobstore/AzureBlobRequestSigner.java
providers/azureblob/src/main/java/org/jclouds/azureblob/blobstore/config/AzureBlobStoreContextModule.java
providers/azureblob/src/main/java/org/jclouds/azureblob/config/AzureBlobHttpApiModule.java
providers/azureblob/src/main/java/org/jclouds/azureblob/config/AzureBlobModule.java
providers/azureblob/src/test/java/org/jclouds/azure/storage/util/storageurl/StorageAccountInVhostTest.java
providers/azureblob/src/test/java/org/jclouds/azureblob/AzureBlobClientAdTest.java [new file with mode: 0644]
providers/azureblob/src/test/java/org/jclouds/azureblob/AzureBlobClientLiveTest.java