Skip to content

Commit b890cb7

Browse files
committed
support springboot storage mi
1 parent 6005dd5 commit b890cb7

File tree

4 files changed

+79
-10
lines changed

4 files changed

+79
-10
lines changed

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

Lines changed: 36 additions & 6 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 type
47+
48+
Using a system-assigned managed identity as the authentication type 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 client types
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 type
70+
71+
Using a user-assigned managed identity as the authentication type 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 client types
6081

6182
| Default environment variable name | Description | Example value |
6283
| ---------------------------------- | --------------------- | --------------------------------------------------------- |
@@ -70,8 +91,6 @@ Refer to the steps and code below to connect to Azure Blob Storage using a user-
7091

7192
### Connection string
7293

73-
For default environment variables and sample code of other authentication type, please choose from beginning of the documentation.
74-
7594
#### SpringBoot client type
7695

7796
| Application properties | Description | Example value |
@@ -95,7 +114,18 @@ Refer to the steps and code below to connect to Azure Blob Storage using a conne
95114

96115
### Service principal
97116

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

100130
| Default environment variable name | Description | Example value |
101131
| ---------------------------------- | --------------------- | --------------------------------------------------------- |

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

Lines changed: 40 additions & 1 deletion
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 type
46+
47+
Using a system-assigned managed identity as the authentication type 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 client types
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 type
69+
70+
Using a user-assigned managed identity as the authentication type 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 client types
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/` |
@@ -87,6 +113,19 @@ Refer to the steps and code below to connect to Azure Queue Storage using a conn
87113

88114
### Service principal
89115

116+
#### SpringBoot client type
117+
118+
Using a service principal as the authentication type is only available for Spring Cloud Azure version 4.0 or higher.
119+
120+
| Default environment variable name | Description | Example value |
121+
|---------------------------------------------------------------------|--------------------------------------------------|---------------------------------------------------------|
122+
| spring.cloud.azure.storage.queue.account-name | Name for the storage account | `storage-account-name` |
123+
| spring.cloud.azure.storage.queue.endpoint | Queue Storage endpoint | `https://<storage-account-name>.queue.core.windows.net/` |
124+
| spring.cloud.azure.storage.queue.credential.client-id | Client ID of the service principal | `00001111-aaaa-2222-bbbb-3333cccc4444` |
125+
| spring.cloud.azure.storage.queue.credential.client-secret | Client secret to perform service principal authentication | `Aa1Bb~2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_Jj0Kk1Ll2` |
126+
127+
#### Other client types
128+
90129
| Default environment variable name | Description | Example value |
91130
| ----------------------------------- | ---------------------- | ---------------------------------------------------------- |
92131
| 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-
The authentication type is not supported by Spring Boot client 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)