Skip to content

Commit a4d9d35

Browse files
authored
Merge pull request #286432 from wchigit/wc/storage-mi-support
Wc/storage mi support
2 parents 5eb4bf7 + 1855442 commit a4d9d35

File tree

4 files changed

+85
-14
lines changed

4 files changed

+85
-14
lines changed

articles/service-connector/how-to-integrate-storage-blob.md

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ The table below shows which combinations of authentication methods and clients a
2929
|--------------------|----------------------------------|--------------------------------|----------------------------|-------------------|
3030
| .NET | Yes | Yes | Yes | Yes |
3131
| Java | Yes | Yes | Yes | Yes |
32-
| Java - Spring Boot | No | No | Yes | No |
32+
| Java - Spring Boot | Yes | Yes | Yes | Yes |
3333
| Node.js | Yes | Yes | Yes | Yes |
3434
| Python | Yes | Yes | Yes | Yes |
3535
| Go | Yes | Yes | Yes | Yes |
@@ -43,7 +43,17 @@ Reference the connection details and sample code in the following tables, accord
4343

4444
### System-assigned managed identity
4545

46-
For default environment variables and sample code of other authentication type, please choose from beginning of the documentation.
46+
#### SpringBoot client
47+
48+
Authenticating with a system-assigned managed identity is only available for Spring Cloud Azure version 4.0 or higher.
49+
50+
| Default environment variable name | Description | Example value |
51+
|---------------------------------------------------------------------|--------------------------------------|---------------------------------------------------------|
52+
| spring.cloud.azure.storage.blob.credential.managed-identity-enabled | Whether to enable managed identity | `True` |
53+
| spring.cloud.azure.storage.blob.account-name | Name for the storage account | `storage-account-name` |
54+
| spring.cloud.azure.storage.blob.endpoint | Blob Storage endpoint | `https://<storage-account-name>.blob.core.windows.net/` |
55+
56+
#### Other clients
4757

4858
| Default environment variable name | Description | Example value |
4959
| ---------------------------------- | --------------------- | --------------------------------------------------------- |
@@ -56,7 +66,18 @@ Refer to the steps and code below to connect to Azure Blob Storage using a syste
5666

5767
### User-assigned managed identity
5868

59-
For default environment variables and sample code of other authentication type, please choose from beginning of the documentation.
69+
#### SpringBoot client
70+
71+
Authenticating with a user-assigned managed identity is only available for Spring Cloud Azure version 4.0 or higher.
72+
73+
| Default environment variable name | Description | Example value |
74+
|---------------------------------------------------------------------|--------------------------------------------------|---------------------------------------------------------|
75+
| spring.cloud.azure.storage.blob.credential.managed-identity-enabled | Whether to enable managed identity | `True` |
76+
| spring.cloud.azure.storage.blob.account-name | Name for the storage account | `storage-account-name` |
77+
| spring.cloud.azure.storage.blob.endpoint | Blob Storage endpoint | `https://<storage-account-name>.blob.core.windows.net/` |
78+
| spring.cloud.azure.storage.blob.credential.client-id | Client ID of the user-assigned managed identity | `00001111-aaaa-2222-bbbb-3333cccc4444` |
79+
80+
#### Other clients
6081

6182
| Default environment variable name | Description | Example value |
6283
| ---------------------------------- | --------------------- | --------------------------------------------------------- |
@@ -73,9 +94,7 @@ Refer to the steps and code below to connect to Azure Blob Storage using a user-
7394
> [!WARNING]
7495
> Microsoft recommends that you use the most secure authentication flow available. The authentication flow described in this procedure requires a very high degree of trust in the application, and carries risks that are not present in other flows. You should only use this flow when other more secure flows, such as managed identities, aren't viable.
7596
76-
For default environment variables and sample code of other authentication type, please choose from beginning of the documentation.
77-
78-
#### SpringBoot client type
97+
#### SpringBoot client
7998

8099
| Application properties | Description | Example value |
81100
| --------------------------- | ------------------------------ | --------------------------------------------------------- |
@@ -86,7 +105,8 @@ For default environment variables and sample code of other authentication type,
86105
| spring.cloud.azure.storage.blob.account-key | Your Blob Storage account key for Spring Cloud Azure version 4.0 or above | `<account-key>` |
87106
| spring.cloud.azure.storage.blob.endpoint | Your Blob Storage endpoint for Spring Cloud Azure version 4.0 or above | `https://<storage-account-name>.blob.core.windows.net/` |
88107

89-
#### Other client types
108+
#### Other clients
109+
90110
| Default environment variable name | Description | Example value |
91111
|------------------------------------|--------------------------------|---------------------------------------------------------------------------------------------------------------------|
92112
| AZURE_STORAGEBLOB_CONNECTIONSTRING | Blob Storage connection string | `DefaultEndpointsProtocol=https;AccountName=<account name>;AccountKey=<account-key>;EndpointSuffix=core.windows.net` |
@@ -98,7 +118,18 @@ Refer to the steps and code below to connect to Azure Blob Storage using a conne
98118

99119
### Service principal
100120

101-
For default environment variables and sample code of other authentication type, please choose from beginning of the documentation.
121+
#### SpringBoot client
122+
123+
Authenticating with a service principal is only available for Spring Cloud Azure version 4.0 or higher.
124+
125+
| Default environment variable name | Description | Example value |
126+
|---------------------------------------------------------------------|--------------------------------------------------|---------------------------------------------------------|
127+
| spring.cloud.azure.storage.blob.account-name | Name for the storage account | `storage-account-name` |
128+
| spring.cloud.azure.storage.blob.endpoint | Blob Storage endpoint | `https://<storage-account-name>.blob.core.windows.net/` |
129+
| spring.cloud.azure.storage.blob.credential.client-id | Client ID of the service principal | `00001111-aaaa-2222-bbbb-3333cccc4444` |
130+
| spring.cloud.azure.storage.blob.credential.client-secret | Client secret to perform service principal authentication | `Aa1Bb~2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_Jj0Kk1Ll2` |
131+
132+
#### Other clients
102133

103134
| Default environment variable name | Description | Example value |
104135
| ---------------------------------- | --------------------- | --------------------------------------------------------- |

articles/service-connector/how-to-integrate-storage-queue.md

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ The table below shows which combinations of authentication methods and clients a
2929
|--------------------|----------------------------------|--------------------------------|----------------------------|-------------------|
3030
| .NET | Yes | Yes | Yes | Yes |
3131
| Java | Yes | Yes | Yes | Yes |
32-
| Java - Spring Boot | No | No | Yes | No |
32+
| Java - Spring Boot | Yes | Yes | Yes | Yes |
3333
| Node.js | Yes | Yes | Yes | Yes |
3434
| Python | Yes | Yes | Yes | Yes |
3535

@@ -42,6 +42,18 @@ Use the connection details below to connect compute services to Queue Storage. F
4242

4343
### System-assigned managed identity
4444

45+
#### SpringBoot client
46+
47+
Authenticating with a system-assigned managed identity is only available for Spring Cloud Azure version 4.0 or higher.
48+
49+
| Default environment variable name | Description | Example value |
50+
|---------------------------------------------------------------------|--------------------------------------|---------------------------------------------------------|
51+
| spring.cloud.azure.storage.queue.credential.managed-identity-enabled | Whether to enable managed identity | `True` |
52+
| spring.cloud.azure.storage.queue.account-name | Name for the storage account | `storage-account-name` |
53+
| spring.cloud.azure.storage.queue.endpoint | Queue Storage endpoint | `https://<storage-account-name>.queue.core.windows.net/` |
54+
55+
#### Other clients
56+
4557
| Default environment variable name | Description | Example value |
4658
| ----------------------------------- | ---------------------- | ---------------------------------------------------------- |
4759
| AZURE_STORAGEQUEUE_RESOURCEENDPOINT | Queue storage endpoint | `https://<storage-account-name>.queue.core.windows.net/` |
@@ -53,6 +65,20 @@ Refer to the steps and code below to connect to Azure Queue Storage using a syst
5365

5466
### User-assigned managed identity
5567

68+
#### SpringBoot client
69+
70+
Authenticating with a user-assigned managed identity is only available for Spring Cloud Azure version 4.0 or higher.
71+
72+
| Default environment variable name | Description | Example value |
73+
|---------------------------------------------------------------------|--------------------------------------------------|---------------------------------------------------------|
74+
| spring.cloud.azure.storage.queue.credential.managed-identity-enabled | Whether to enable managed identity | `True` |
75+
| spring.cloud.azure.storage.queue.account-name | Name for the storage account | `storage-account-name` |
76+
| spring.cloud.azure.storage.queue.endpoint | Queue Storage endpoint | `https://<storage-account-name>.queue.core.windows.net/` |
77+
| spring.cloud.azure.storage.queue.credential.client-id | Client ID of the user-assigned managed identity | `00001111-aaaa-2222-bbbb-3333cccc4444` |
78+
79+
#### Other clients
80+
81+
5682
| Default environment variable name | Description | Example value |
5783
| ----------------------------------- | ---------------------- | ---------------------------------------------------------- |
5884
| AZURE_STORAGEQUEUE_RESOURCEENDPOINT | Queue storage endpoint | `https://<storage-account-name>.queue.core.windows.net/` |
@@ -67,7 +93,8 @@ Refer to the steps and code below to connect to Azure Queue Storage using a user
6793
> [!WARNING]
6894
> Microsoft recommends that you use the most secure authentication flow available. The authentication flow described in this procedure requires a very high degree of trust in the application, and carries risks that are not present in other flows. You should only use this flow when other more secure flows, such as managed identities, aren't viable.
6995
70-
#### SpringBoot client type
96+
#### SpringBoot client
97+
7198

7299
| Application properties | Description | Example value |
73100
|----------------------------------------|----------------------------|--------------------------|
@@ -77,7 +104,7 @@ Refer to the steps and code below to connect to Azure Queue Storage using a user
77104
| spring.cloud.azure.storage.queue.account-key | Queue storage account key for Spring Cloud Azure version above 4.0 | `<account-key>` |
78105
| spring.cloud.azure.storage.queue.endpoint | Queue storage endpoint for Spring Cloud Azure version above 4.0 | `https://<storage-account-name>.queue.core.windows.net/` |
79106

80-
#### Other client types
107+
#### Other clients
81108

82109
| Default environment variable name | Description | Example value |
83110
|-------------------------------------|---------------------------------|----------------------------------------------------------------------------------------------------------------------|
@@ -90,6 +117,19 @@ Refer to the steps and code below to connect to Azure Queue Storage using a conn
90117

91118
### Service principal
92119

120+
#### SpringBoot client
121+
122+
Authenticating with a service principal is only available for Spring Cloud Azure version 4.0 or higher.
123+
124+
| Default environment variable name | Description | Example value |
125+
|---------------------------------------------------------------------|--------------------------------------------------|---------------------------------------------------------|
126+
| spring.cloud.azure.storage.queue.account-name | Name for the storage account | `storage-account-name` |
127+
| spring.cloud.azure.storage.queue.endpoint | Queue Storage endpoint | `https://<storage-account-name>.queue.core.windows.net/` |
128+
| spring.cloud.azure.storage.queue.credential.client-id | Client ID of the service principal | `00001111-aaaa-2222-bbbb-3333cccc4444` |
129+
| spring.cloud.azure.storage.queue.credential.client-secret | Client secret to perform service principal authentication | `Aa1Bb~2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_Jj0Kk1Ll2` |
130+
131+
#### Other clients
132+
93133
| Default environment variable name | Description | Example value |
94134
| ----------------------------------- | ---------------------- | ---------------------------------------------------------- |
95135
| AZURE_STORAGEQUEUE_RESOURCEENDPOINT | Queue storage endpoint | `https://<storage-account-name>.queue.core.windows.net/` |

articles/service-connector/includes/code-blob-me-id.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ var blobServiceClient = new BlobServiceClient(
8989
.buildClient();
9090
```
9191

92-
### [springBoot](#tab/springBoot)
93-
Authentication type is not supported for Spring Boot.
92+
### [SpringBoot](#tab/springBoot)
93+
Refer to [Upload a file to an Azure Blob Storage](/azure/developer/java/spring-framework/configure-spring-boot-starter-java-app-with-azure-storage?toc=%2Fazure%2Fstorage%2Fblobs%2Ftoc.json) and set up your Spring application. The configuration properties (of Spring Cloud Azure 4.0 and above) are added to Spring Apps by Service Connector. For more information about configuration properties, see [Azure Storage Blob Properties](https://microsoft.github.io/spring-cloud-azure/current/reference/html/appendix.html#azure_storage_blob_proeprties).
9494

9595
### [Python](#tab/python)
9696
1. Install dependencies

articles/service-connector/includes/code-queue-me-id.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ ms.author: wchi
8686
```
8787
8888
### [SpringBoot](#tab/springBoot)
89-
Spring Boot client type doesn't support the authentication type.
89+
Refer to [Spring Cloud Azure Storage Queue Operation Code Sample](https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_v4.3.0/storage/spring-cloud-azure-starter-storage-queue/storage-queue-client) to set up your Spring application. The configuration properties (of Spring Cloud Azure 4.0 and above) are added to Spring Apps by Service Connector. For more information about configuration properties, check [Azure Storage Queue Properties](https://microsoft.github.io/spring-cloud-azure/current/reference/html/appendix.html#azure_storage_queue_proeprties).
9090
9191
### [Python](#tab/python)
9292
1. Install dependencies.

0 commit comments

Comments
 (0)