Skip to content

Commit 9758a55

Browse files
authored
Merge pull request #211875 from maud-lv/ml-sc-cosmosdb
Add Cosmos DB APIs auth info
2 parents b226736 + 6649a0a commit 9758a55

File tree

6 files changed

+482
-16
lines changed

6 files changed

+482
-16
lines changed
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
---
2+
title: Integrate the Azure Cosmos DB Cassandra API with Service Connector
3+
description: Integrate the Azure Cosmos DB Cassandra API into your application with Service Connector
4+
author: maud-lv
5+
ms.author: malev
6+
ms.service: service-connector
7+
ms.topic: how-to
8+
ms.date: 09/19/2022
9+
ms.custom: event-tier1-build-2022
10+
---
11+
12+
# Integrate the Azure Cosmos DB API for Cassandra with Service Connector
13+
14+
This page shows the supported authentication types and client types for the Azure Cosmos DB Cassandra API using Service Connector. You might still be able to connect to the Azure Cosmos DB API for Cassandra in other programming languages without using Service Connector. This page also shows default environment variable names and values (or Spring Boot configuration) you get when you create the service connection. You can learn more about [Service Connector environment variable naming convention](concept-service-connector-internals.md).
15+
16+
## Supported compute services
17+
18+
- Azure App Service
19+
- Azure Container Apps
20+
- Azure Spring Apps
21+
22+
## Supported authentication types and client types
23+
24+
Supported authentication and clients for App Service, Container Apps and Azure Spring Apps:
25+
26+
### [Azure App Service](#tab/app-service)
27+
28+
| Client type | System-assigned managed identity | User-assigned managed identity | Secret / connection string | Service principal |
29+
|--------------------|--------------------------------------|--------------------------------------|--------------------------------------|--------------------------------------|
30+
| .NET | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) |
31+
| Go | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) |
32+
| Java | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) |
33+
| Java - Spring Boot | | | ![yes icon](./media/green-check.png) | |
34+
| Node.js | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) |
35+
| Python | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) |
36+
37+
### [Azure Container Apps](#tab/container-apps)
38+
39+
| Client type | System-assigned managed identity | User-assigned managed identity | Secret / connection string | Service principal |
40+
|--------------------|--------------------------------------|--------------------------------------|--------------------------------------|--------------------------------------|
41+
| .NET | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) |
42+
| Go | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) |
43+
| Java | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) |
44+
| Java - Spring Boot | | | ![yes icon](./media/green-check.png) | |
45+
| Node.js | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) |
46+
| Python | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) |
47+
48+
### [Azure Spring Apps](#tab/spring-apps)
49+
50+
| Client type | System-assigned managed identity | User-assigned managed identity | Secret / connection string | Service principal |
51+
|--------------------|--------------------------------------|--------------------------------|--------------------------------------|--------------------------------------|
52+
| .NET | ![yes icon](./media/green-check.png) | | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) |
53+
| Go | ![yes icon](./media/green-check.png) | | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) |
54+
| Java | ![yes icon](./media/green-check.png) | | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) |
55+
| Java - Spring Boot | | | ![yes icon](./media/green-check.png) | |
56+
| Node.js | ![yes icon](./media/green-check.png) | | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) |
57+
| Python | ![yes icon](./media/green-check.png) | | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) |
58+
59+
---
60+
61+
## Default environment variable names or application properties
62+
63+
Use the connection details below to connect your compute services to the Cosmos DB Cassandra API. For each example below, replace the placeholder texts `<Azure-Cosmos-DB-account>`, `keyspace`, `<username>`, `<password>`, `<resource-group-name>`, `<subscription-ID>`, `<client-ID>`,`<client-secret>`, `<tenant-id>`, and `<Azure-region>` with your own information.
64+
65+
### Azure App Service and Azure Container Apps
66+
67+
#### Secret / Connection string
68+
69+
| Default environment variable name | Description | Example value |
70+
|-----------------------------------|-----------------------------|------------------------------------------------|
71+
| AZURE_COSMOS_CONTACTPOINT | Cassandra API contact point | `<Azure-Cosmos-DB-account>.cassandra.cosmos.azure.com` |
72+
| AZURE_COSMOS_PORT | Cassandra connection port | 10350 |
73+
| AZURE_COSMOS_KEYSPACE | Cassandra keyspace | `<keyspace>` |
74+
| AZURE_COSMOS_USERNAME | Cassandra username | `<username>` |
75+
| AZURE_COSMOS_PASSWORD | Cassandra password | `<password>` |
76+
77+
#### System-assigned managed identity
78+
79+
| Default environment variable name | Description | Example value |
80+
|-----------------------------------|--------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
81+
| AZURE_COSMOS_LISTKEYURL | The URL to get the connection string | `https://management.azure.com/subscriptions/<subscription-ID>/resourceGroups/<resource-group-name>/providers/Microsoft.DocumentDB/databaseAccounts/<Azure-Cosmos-DB-account>/listKeys?api-version=2021-04-15` |
82+
| AZURE_COSMOS_SCOPE | Your managed identity scope | `https://management.azure.com/.default` |
83+
| AZURE_COSMOS_RESOURCEENDPOINT | Your resource endpoint | `https://<Azure-Cosmos-DB-account>.documents.azure.com:443/` |
84+
| AZURE_COSMOS_CONTACTPOINT | Cassandra API contact point | `<Azure-Cosmos-DB-account>.cassandra.cosmos.azure.com` |
85+
| AZURE_COSMOS_PORT | Cassandra connection port | 10350 |
86+
| AZURE_COSMOS_KEYSPACE | Cassandra keyspace | `<keyspace>` |
87+
| AZURE_COSMOS_USERNAME | Cassandra username | `<username>` |
88+
89+
#### User-assigned managed identity
90+
91+
| Default environment variable name | Description | Example value |
92+
|-----------------------------------|--------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
93+
| AZURE_COSMOS_LISTKEYURL | The URL to get the connection string | `https://management.azure.com/subscriptions/<subscription-ID>/resourceGroups/<resource-group-name>/providers/Microsoft.DocumentDB/databaseAccounts/<Azure-Cosmos-DB-account>/listKeys?api-version=2021-04-15` |
94+
| AZURE_COSMOS_SCOPE | Your managed identity scope | `https://management.azure.com/.default` |
95+
| AZURE_COSMOS_RESOURCEENDPOINT | Your resource endpoint | `https://<Azure-Cosmos-DB-account>.documents.azure.com:443/` |
96+
| AZURE_COSMOS_CONTACTPOINT | Cassandra API contact point | `<Azure-Cosmos-DB-account>.cassandra.cosmos.azure.com` |
97+
| AZURE_COSMOS_PORT | Cassandra connection port | 10350 |
98+
| AZURE_COSMOS_KEYSPACE | Cassandra keyspace | `<keyspace>` |
99+
| AZURE_COSMOS_USERNAME | Cassandra username | `<username>` |
100+
| AZURE_COSMOS_CLIENTID | Your client ID | `<client-ID>` |
101+
102+
#### Service principal
103+
104+
| Default environment variable name | Description | Example value |
105+
|-----------------------------------|--------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
106+
| AZURE_COSMOS_LISTKEYURL | The URL to get the connection string | `https://management.azure.com/subscriptions/<subscription-ID>/resourceGroups/<resource-group-name>/providers/Microsoft.DocumentDB/databaseAccounts/<Azure-Cosmos-DB-account>/listKeys?api-version=2021-04-15` |
107+
| AZURE_COSMOS_SCOPE | Your managed identity scope | `https://management.azure.com/.default` |
108+
| AZURE_COSMOS_RESOURCEENDPOINT | Your resource endpoint | `https://<Azure-Cosmos-DB-account>.documents.azure.com:443/` |
109+
| AZURE_COSMOS_CONTACTPOINT | Cassandra API contact point | `<Azure-Cosmos-DB-account>.cassandra.cosmos.azure.com` |
110+
| AZURE_COSMOS_PORT | Cassandra connection port | 10350 |
111+
| AZURE_COSMOS_KEYSPACE | Cassandra keyspace | `<keyspace>` |
112+
| AZURE_COSMOS_USERNAME | Cassandra username | `<username>` |
113+
| AZURE_COSMOS_CLIENTID | Your client ID | `<client-ID>` |
114+
| AZURE_COSMOS_CLIENTSECRET | Your client secret | `<client-secret>` |
115+
| AZURE_COSMOS_TENANTID | Your tenant ID | `<tenant-ID>` |
116+
117+
### Azure Spring Apps
118+
119+
| Default environment variable name | Description | Example value |
120+
|----------------------------------------|-----------------------------|--------------------------------------------------------|
121+
| spring.data.cassandra.contact_points | Cassandra API contact point | `<Azure-Cosmos-DB-account>.cassandra.cosmos.azure.com` |
122+
| spring.data.cassandra.port | Cassandra connection port | 10350 |
123+
| spring.data.cassandra.keyspace_name | Cassandra keyspace | `<keyspace>` |
124+
| spring.data.cassandra.username | Cassandra username | `<username>` |
125+
| spring.data.cassandra.password | Cassandra password | `<password>` |
126+
| spring.data.cassandra.local_datacenter | Azure Region | `<Azure-region>` |
127+
| spring.data.cassandra.ssl | SSL status | true |
128+
129+
## Next steps
130+
131+
Follow the tutorials listed below to learn more about Service Connector.
132+
133+
> [!div class="nextstepaction"]
134+
> [Learn about Service Connector concepts](./concept-service-connector-internals.md)

0 commit comments

Comments
 (0)