Skip to content

Commit 5028963

Browse files
committed
Add Cosmos DB APIs auth info
1 parent 9315fd6 commit 5028963

File tree

6 files changed

+483
-10
lines changed

6 files changed

+483
-10
lines changed
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
---
2+
title: Integrate the Azure Cosmos DB Cassandra API with Service Connector
3+
description: Integrate the Azure Cosmos DB Cassandra 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+
| PHP | ![yes icon](./media/green-check.png) | | | |
36+
| 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) |
37+
38+
### [Azure Container Apps](#tab/container-apps)
39+
40+
| Client type | System-assigned managed identity | User-assigned managed identity | Secret / connection string | Service principal |
41+
|--------------------|--------------------------------------|--------------------------------------|--------------------------------------|--------------------------------------|
42+
| .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) |
43+
| 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) |
44+
| 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) |
45+
| Java - Spring Boot | | | ![yes icon](./media/green-check.png) | |
46+
| 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) |
47+
| PHP | ![yes icon](./media/green-check.png) | | | |
48+
| 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) |
49+
50+
### [Azure Spring Apps](#tab/spring-apps)
51+
52+
| Client type | System-assigned managed identity | User-assigned managed identity | Secret / connection string | Service principal |
53+
|--------------------|--------------------------------------|--------------------------------|--------------------------------------|--------------------------------------|
54+
| .NET | ![yes icon](./media/green-check.png) | | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) |
55+
| Go | ![yes icon](./media/green-check.png) | | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) |
56+
| Java | ![yes icon](./media/green-check.png) | | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) |
57+
| Java - Spring Boot | | | ![yes icon](./media/green-check.png) | |
58+
| Node.js | ![yes icon](./media/green-check.png) | | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) |
59+
| PHP | ![yes icon](./media/green-check.png) | | | |
60+
| Python | ![yes icon](./media/green-check.png) | | ![yes icon](./media/green-check.png) | ![yes icon](./media/green-check.png) |
61+
62+
---
63+
64+
## Default environment variable names or application properties
65+
66+
Use the connection details below to connect your compute services to the Cosmos DB Cassandra API. For each example below, replace the placeholder texts `<database-server>`, `keyspace`, `<username>`, `<password>`, `<resource-group-name>`, `<subscription-ID>`, `<client-ID>`,`<client-secret>`, `<tenant-id>`, and `<Azure-region>` with your own information.
67+
68+
### Azure App Service and Azure Container Apps
69+
70+
#### Secret / Connection string
71+
72+
| Default environment variable name | Description | Example value |
73+
|-----------------------------------|-----------------------------|------------------------------------------------|
74+
| AZURE_COSMOS_CONTACTPOINT | Cassandra API contact point | `<database-server>.cassandra.cosmos.azure.com` |
75+
| AZURE_COSMOS_PORT | Cassandra connection port | 10350 |
76+
| AZURE_COSMOS_KEYSPACE | Cassandra keyspace | `<keyspace>` |
77+
| AZURE_COSMOS_USERNAME | Cassandra username | `<username>` |
78+
| AZURE_COSMOS_PASSWORD | Cassandra password | `<password>` |
79+
80+
#### System-assigned managed identity
81+
82+
| Default environment variable name | Description | Example value |
83+
|-----------------------------------|--------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
84+
| 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/<database-server>/listConnectionStrings?api-version=2021-04-15` |
85+
| AZURE_COSMOS_SCOPE | Your managed identity scope | `https://management.azure.com/.default` |
86+
| AZURE_COSMOS_RESOURCEENDPOINT | Your resource endpoint | `https://<database-server>.documents.azure.com:443/` |
87+
| AZURE_COSMOS_CONTACTPOINT | Cassandra API contact point | `<database-server>.cassandra.cosmos.azure.com` |
88+
| AZURE_COSMOS_PORT | Cassandra connection port | 10350 |
89+
| AZURE_COSMOS_KEYSPACE | Cassandra keyspace | `<keyspace>` |
90+
| AZURE_COSMOS_USERNAME | Cassandra username | `<username>` |
91+
92+
#### User-assigned managed identity
93+
94+
| Default environment variable name | Description | Example value |
95+
|-----------------------------------|--------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
96+
| 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/<database-server>/listConnectionStrings?api-version=2021-04-15` |
97+
| AZURE_COSMOS_SCOPE | Your managed identity scope | `https://management.azure.com/.default` |
98+
| AZURE_COSMOS_RESOURCEENDPOINT | Your resource endpoint | `https://<database-server>.documents.azure.com:443/` |
99+
| AZURE_COSMOS_CONTACTPOINT | Cassandra API contact point | `<database-server>.cassandra.cosmos.azure.com` |
100+
| AZURE_COSMOS_PORT | Cassandra connection port | 10350 |
101+
| AZURE_COSMOS_KEYSPACE | Cassandra keyspace | `<keyspace>` |
102+
| AZURE_COSMOS_USERNAME | Cassandra username | `<username>` |
103+
| AZURE_COSMOS_CLIENTID | Your client secret ID | `<client-ID>` |
104+
105+
#### Service principal
106+
107+
| Default environment variable name | Description | Example value |
108+
|-----------------------------------|--------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
109+
| 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/<database-server>/listConnectionStrings?api-version=2021-04-15` |
110+
| AZURE_COSMOS_SCOPE | Your managed identity scope | `https://management.azure.com/.default` |
111+
| AZURE_COSMOS_RESOURCEENDPOINT | Your resource endpoint | `https://<database-server>.documents.azure.com:443/` |
112+
| AZURE_COSMOS_CONTACTPOINT | Cassandra API contact point | `<database-server>.cassandra.cosmos.azure.com` |
113+
| AZURE_COSMOS_PORT | Cassandra connection port | 10350 |
114+
| AZURE_COSMOS_KEYSPACE | Cassandra keyspace | `<keyspace>` |
115+
| AZURE_COSMOS_USERNAME | Cassandra username | `<username>` |
116+
| AZURE_COSMOS_CLIENTID | Your client secret ID | `<client-ID>` |
117+
| AZURE_COSMOS_CLIENTSECRET | Your client secret | `<client-secret>` |
118+
| AZURE_COSMOS_TENANTID | Your tenant ID | `<tenant-ID>` |
119+
120+
### Azure Spring Apps
121+
122+
| Default environment variable name | Description | Example value |
123+
|----------------------------------------|-----------------------------|------------------------------------------------|
124+
| spring.data.cassandra.contact_points | Cassandra API contact point | `<database-server>.cassandra.cosmos.azure.com` |
125+
| spring.data.cassandra.port | Cassandra connection port | 10350 |
126+
| spring.data.cassandra.keyspace_name | Cassandra keyspace | `<keyspace>` |
127+
| spring.data.cassandra.username | Cassandra username | `<username>` |
128+
| spring.data.cassandra.password | Cassandra password | `<password>` |
129+
| spring.data.cassandra.local_datacenter | Azure Region | `<Azure-region>` |
130+
| spring.data.cassandra.ssl | SSL status | true |
131+
132+
## Next steps
133+
134+
Follow the tutorials listed below to learn more about Service Connector.
135+
136+
> [!div class="nextstepaction"]
137+
> [Learn about Service Connector concepts](./concept-service-connector-internals.md)

0 commit comments

Comments
 (0)