Skip to content

Commit 5664674

Browse files
Merge pull request #295404 from maud-lv/patch-65
Add information about managed identity
2 parents a8ebe91 + a253dbb commit 5664674

File tree

5 files changed

+55
-13
lines changed

5 files changed

+55
-13
lines changed

articles/service-connector/how-to-integrate-cosmos-cassandra.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: maud-lv
55
ms.author: malev
66
ms.service: service-connector
77
ms.topic: how-to
8-
ms.date: 02/02/2024
8+
ms.date: 03/14/2025
99
---
1010

1111
# Integrate Azure Cosmos DB for Cassandra with Service Connector
@@ -38,11 +38,14 @@ The table below shows which combinations of client types and authentication meth
3838

3939
This table indicates that all combinations of client types and authentication methods in the table are supported, except for the Java - Spring Boot client type, which only supports the Secret / connection string method. All other client types can use any of the authentication methods to connect to Azure Cosmos DB for Apache Cassandra using Service Connector.
4040

41-
## Default environment variable names or application properties and Sample code
41+
> [!NOTE]
42+
> Cosmos DB does not natively support authentication via managed identity. Therefore, Service Connector uses the managed identity to retrieve the connection string, and the connection is subsequently established using that connection string.
43+
44+
## Default environment variable names or application properties and sample code
4245

4346
Reference the connection details and sample code in the following tables, according to your connection's authentication type and client type, to connect your compute services to Azure Cosmos DB for Apache Cassandra. For more information about naming conventions, check the [Service Connector internals](concept-service-connector-internals.md#configuration-naming-convention) article.
4447

45-
### System-assigned Managed Identity
48+
### System-assigned managed identity
4649

4750
| Default environment variable name | Description | Example value |
4851
| --------------------------------- | -------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -57,9 +60,12 @@ Reference the connection details and sample code in the following tables, accord
5760
#### Sample code
5861

5962
Refer to the steps and code below to connect to Azure Cosmos DB for Cassandra using a system-assigned managed identity.
63+
64+
Since Cosmos DB doesn't natively support authentication via managed identity, in the following code sample, we use the managed identity to retrieve the connection string, and the connection is then established using that connection string.
65+
6066
[!INCLUDE [code sample for cassandra](./includes/code-cosmoscassandra-me-id.md)]
6167

62-
### User-assigned Managed Identity
68+
### User-assigned managed identity
6369

6470
| Default environment variable name | Description | Example value |
6571
| --------------------------------- | -------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -75,14 +81,17 @@ Refer to the steps and code below to connect to Azure Cosmos DB for Cassandra us
7581
#### Sample code
7682

7783
Refer to the steps and code below to connect to Azure Cosmos DB for Cassandra using a user-assigned managed identity.
84+
85+
Since Cosmos DB doesn't natively support authentication via managed identity, in the following code sample, we use the managed identity to retrieve the connection string, and the connection is then established using that connection string.
86+
7887
[!INCLUDE [code sample for cassandra](./includes/code-cosmoscassandra-me-id.md)]
7988

80-
### Connection String
89+
### Connection string
8190

8291
> [!WARNING]
8392
> 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.
8493
85-
#### SpringBoot client type
94+
#### Spring Boot client type
8695

8796
| Default environment variable name | Description | Example value |
8897
| -------------------------------------- | -------------------------------------------------- | -------------------------------------------------------- |

articles/service-connector/how-to-integrate-cosmos-db.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: maud-lv
55
ms.author: malev
66
ms.service: service-connector
77
ms.topic: how-to
8-
ms.date: 02/02/2024
8+
ms.date: 03/14/2025
99
---
1010

1111
# Integrate Azure Cosmos DB for MongoDB with Service Connector
@@ -38,6 +38,9 @@ The table below shows which combinations of client types and authentication meth
3838

3939
This table indicates that all combinations of client types and authentication methods in the table are supported, except for the Java - Spring Boot client type, which only supports the Secret / connection string method. All other client types can use any of the authentication methods to connect to Azure Cosmos DB for MongoDB using Service Connector.
4040

41+
> [!NOTE]
42+
> Cosmos DB does not natively support authentication via managed identity. Therefore, Service Connector uses the managed identity to retrieve the connection string, and the connection is subsequently established using that connection string.
43+
4144
## Default environment variable names or application properties and sample code
4245

4346
Use the connection details below to connect compute services to Azure Cosmos DB. This page also shows default environment variable names and values (or Spring Boot configuration) you get when you create the service connection, as well as sample code. For each example below, replace the placeholder texts `<mongo-db-admin-user>`, `<password>`, `<Azure-Cosmos-DB-API-for-MongoDB-account>`, `<subscription-ID>`, `<resource-group-name>`, `<client-secret>`, and `<tenant-id>` with your own information. For more information about naming conventions, check the [Service Connector internals](concept-service-connector-internals.md#configuration-naming-convention) article.
@@ -53,6 +56,8 @@ Use the connection details below to connect compute services to Azure Cosmos DB.
5356
#### Sample code
5457

5558
Refer to the steps and code below to connect to Azure Cosmos DB for MongoDB using a system-assigned managed identity.
59+
60+
Since Cosmos DB doesn't natively support authentication via managed identity, in the following code sample, we use the managed identity to retrieve the connection string, and the connection is then established using that connection string.
5661
[!INCLUDE [code sample for mongo](./includes/code-cosmosmongo-me-id.md)]
5762

5863
### User-assigned managed identity
@@ -67,14 +72,16 @@ Refer to the steps and code below to connect to Azure Cosmos DB for MongoDB usin
6772
#### Sample code
6873

6974
Refer to the steps and code below to connect to Azure Cosmos DB for MongoDB using a user-assigned managed identity.
75+
76+
Since Cosmos DB doesn't natively support authentication via managed identity, in the following code sample, we use the managed identity to retrieve the connection string, and the connection is then established using that connection string.
7077
[!INCLUDE [code sample for mongo](./includes/code-cosmosmongo-me-id.md)]
7178

7279
### Connection string
7380

7481
> [!WARNING]
7582
> 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.
7683
77-
#### SpringBoot client type
84+
#### Spring Boot client type
7885

7986
| Default environment variable name | Description | Example value |
8087
|-----------------------------------|-------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|

articles/service-connector/how-to-integrate-cosmos-gremlin.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: maud-lv
55
ms.author: malev
66
ms.service: service-connector
77
ms.topic: how-to
8-
ms.date: 02/02/2024
8+
ms.date: 03/14/2025
99
---
1010

1111
# Integrate the Azure Cosmos DB for Gremlin with Service Connector
@@ -38,6 +38,9 @@ The table below shows which combinations of client types and authentication meth
3838

3939
This table indicates that all combinations of client types and authentication methods in the table are supported. All client types can use any of the authentication methods to connect to Azure Cosmos DB for Apache Gremlin using Service Connector.
4040

41+
> [!NOTE]
42+
> Cosmos DB does not natively support authentication via managed identity. Therefore, Service Connector uses the managed identity to retrieve the connection string, and the connection is subsequently established using that connection string.
43+
4144
## Default environment variable names or application properties and sample code
4245

4346
Use the connection details below to connect your compute services to Azure Cosmos DB for Apache Gremlin. For each example below, replace the placeholder texts `<Azure-Cosmos-DB-account>`, `<database>`, `<collection or graphs>`, `<username>`, `<password>`, `<resource-group-name>`, `<subscription-ID>`, `<client-ID>`,`<client-secret>`, and `<tenant-id>` with your own information. For more information about naming conventions, check the [Service Connector internals](concept-service-connector-internals.md#configuration-naming-convention) article.
@@ -57,6 +60,9 @@ Use the connection details below to connect your compute services to Azure Cosmo
5760
#### Sample code
5861

5962
Refer to the steps and code below to connect to Azure Cosmos DB for Gremlin using a system-assigned managed identity.
63+
64+
Since Cosmos DB doesn't natively support authentication via managed identity, in the following code sample, we use the managed identity to retrieve the connection string, and the connection is then established using that connection string.
65+
6066
[!INCLUDE [code sample for gremlin](./includes/code-cosmosgremlin-me-id.md)]
6167

6268
### User-assigned managed identity
@@ -70,9 +76,13 @@ Refer to the steps and code below to connect to Azure Cosmos DB for Gremlin usin
7076
| AZURE_COSMOS_PORT | Connection port | 443 |
7177
| AZURE_COSMOS_USERNAME | Your username | `/dbs/<database>/colls/<collection or graphs>` |
7278
| AZURE_CLIENTID | Your client ID | `<client_ID>` |
79+
7380
#### Sample code
7481

7582
Refer to the steps and code below to connect to Azure Cosmos DB for Gremlin using a user-assigned managed identity.
83+
84+
Since Cosmos DB doesn't natively support authentication via managed identity, in the following code sample, we use the managed identity to retrieve the connection string, and the connection is then established using that connection string.
85+
7686
[!INCLUDE [code sample for gremlin](./includes/code-cosmosgremlin-me-id.md)]
7787

7888
### Connection string

articles/service-connector/how-to-integrate-cosmos-sql.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: maud-lv
55
ms.author: malev
66
ms.service: service-connector
77
ms.topic: how-to
8-
ms.date: 02/02/2024
8+
ms.date: 03/14/2025
99
---
1010

1111
# Integrate the Azure Cosmos DB for NoSQL with Service Connector
@@ -38,13 +38,18 @@ The table below shows which combinations of client types and authentication meth
3838

3939
This table indicates that all combinations of client types and authentication methods in the table are supported. All client types can use any of the authentication methods to connect to Azure Cosmos DB for NoSQL using Service Connector.
4040

41-
## Default environment variable names or application properties and Sample code
41+
> [!NOTE]
42+
> Cosmos DB does not natively support authentication via managed identity. Therefore, Service Connector uses the managed identity to retrieve the connection string, and the connection is subsequently established using that connection string.
43+
44+
## Default environment variable names or application properties and sample code
4245

4346
Use the connection details below to connect your compute services to the Azure Cosmos DB for NoSQL. For each example below, replace the placeholder texts `<database-server>`, `<database-name>`,`<account-key>`, `<resource-group-name>`, `<subscription-ID>`, `<client-ID>`, `<SQL-server>`, `<client-secret>`, `<tenant-id>`, and `<access-key>` with your own information. For more information about naming conventions, check the [Service Connector internals](concept-service-connector-internals.md#configuration-naming-convention) article.
4447

4548
### System-assigned managed identity
4649

47-
#### SpringBoot client type
50+
Since Cosmos DB doesn't natively support authentication via managed identity, in the following code sample, we use the managed identity to retrieve the connection string, and the connection is then established using that connection string.
51+
52+
#### Spring Boot client type
4853

4954
Using a system-assigned managed identity as the authentication type is only available for Spring Cloud Azure version 4.0 or higher.
5055

@@ -69,6 +74,8 @@ Refer to the steps and code below to connect to Azure Cosmos DB for NoSQL using
6974

7075
### User-assigned managed identity
7176

77+
Since Cosmos DB doesn't natively support authentication via managed identity, in the following code sample, we use the managed identity to retrieve the connection string, and the connection is then established using that connection string.
78+
7279
#### SpringBoot client type
7380

7481
Using a user-assigned managed identity as the authentication type is only available for Spring Cloud Azure version 4.0 or higher.

articles/service-connector/how-to-integrate-cosmos-table.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: maud-lv
55
ms.author: malev
66
ms.service: service-connector
77
ms.topic: how-to
8-
ms.date: 02/02/2024
8+
ms.date: 03/14/2025
99
---
1010

1111
# Integrate the Azure Cosmos DB for Table with Service Connector
@@ -37,6 +37,9 @@ The table below shows which combinations of client types and authentication meth
3737

3838
This table indicates that all combinations of client types and authentication methods in the table are supported. All client types can use any of the authentication methods to connect to Azure Cosmos DB for Table using Service Connector.
3939

40+
> [!NOTE]
41+
> Cosmos DB does not natively support authentication via managed identity. Therefore, Service Connector uses the managed identity to retrieve the connection string, and the connection is subsequently established using that connection string.
42+
4043
## Default environment variable names or application properties and sample code
4144

4245
Use the connection details below to connect your compute services to Azure Cosmos DB for Table. For each example below, replace the placeholder texts `<account-name>`, `<table-name>`, `<account-key>`, `<resource-group-name>`, `<subscription-ID>`, `<client-ID>`, `<client-secret>`, `<tenant-id>` with your own information. For more information about naming conventions, check the [Service Connector internals](concept-service-connector-internals.md#configuration-naming-convention) article.
@@ -66,6 +69,9 @@ Refer to the steps and code below to connect to Azure Cosmos DB for Table using
6669
#### Sample code
6770

6871
Refer to the steps and code below to connect to Azure Cosmos DB for Table using a user-assigned managed identity.
72+
73+
Since Cosmos DB doesn't natively support authentication via managed identity, in the following code sample, we use the managed identity to retrieve the connection string, and the connection is then established using that connection string.
74+
6975
[!INCLUDE [code sample for cosmos table](./includes/code-cosmostable-me-id.md)]
7076

7177
#### Connection string
@@ -80,6 +86,9 @@ Refer to the steps and code below to connect to Azure Cosmos DB for Table using
8086
#### Sample code
8187

8288
Refer to the steps and code below to connect to Azure Cosmos DB for Table using a connection string.
89+
90+
Since Cosmos DB doesn't natively support authentication via managed identity, in the following code sample, we use the managed identity to retrieve the connection string, and the connection is then established using that connection string.
91+
8392
[!INCLUDE [code sample for cosmos table](./includes/code-cosmostable-secret.md)]
8493

8594
#### Service principal

0 commit comments

Comments
 (0)