You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: Integrate Azure Cache for Redis and Azure Cache Redis Enterprise with Service Connector
3
-
description: Integrate Azure Cache for Redis and Azure Cache Redis Enterprise into your application with Service Connector
2
+
title: Integrate Azure Cache for Redis with Service Connector
3
+
description: Learn how to integrate Azure Cache for Redis and Azure Cache for Redis Enterprise into your application with Service Connector.
4
4
author: maud-lv
5
5
ms.author: malev
6
6
ms.service: service-connector
@@ -10,21 +10,21 @@ ms.date: 02/02/2024
10
10
11
11
# Integrate Azure Cache for Redis with Service Connector
12
12
13
-
This page shows supported authentication methods and clients, and shows sample code you can use to connect Azure Cache for Redis to other cloud services using Service Connector. You might still be able to connect to Azure Cache for Redis 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.
13
+
Learn about the supported authentication methods and clientsyou can use with Service Connectorto connect Azure Cache for Redis to other cloud services, and get sample code. Plus, find out about the default environment variable names and values (or Spring Boot configuration) you get when you create the service connection. (Note that you might still be able to connect to Azure Cache for Redis in other programming languages without using Service Connector.)
14
14
15
15
## Supported compute services
16
16
17
-
Service Connector can be used to connect the following compute services to Azure Cache for Redis:
17
+
You can use Service Connector to connect the following compute services to Azure Cache for Redis:
18
18
19
19
- Azure App Service
20
20
- Azure Container Apps
21
21
- Azure Functions
22
22
- Azure Kubernetes Service (AKS)
23
23
- Azure Spring Apps
24
24
25
-
## Supported Authentication types and client types
25
+
## Supported authentication and client types
26
26
27
-
The table below shows which combinations of authentication methods and clients are supported for connecting your compute service to Azure Cache for Redis using Service Connector. A “Yes” indicates that the combination is supported, while a “No” indicates that it is not supported.
27
+
Find out which combinations of authentication methods and clients are supported for connecting your compute service to Azure Cache for Redis using Service Connector in the following table. "Yes" means that the combination is supported, while "No" means that it's not supported.
28
28
29
29
| Client type | System-assigned managed identity | User-assigned managed identity | Secret / connection string | Service principal |
@@ -36,114 +36,115 @@ The table below shows which combinations of authentication methods and clients a
36
36
| Python | Yes | Yes | Yes | Yes |
37
37
| None | Yes | Yes | Yes | Yes |
38
38
39
-
This table indicates that the only supported authentication method for all client types in the table is the Secret / connection string method. Other authentication methods are not supported for any of the client types to connect to Azure Cache for Redis using Service Connector.
39
+
This table shows that the only supported authentication method for the listed client types is secret / connection string. No other authentication methods are supported for the listed client types to connect to Azure Cache for Redis using Service Connector.
40
40
41
41
## Default environment variable names or application properties and sample code
42
42
43
-
Use the environment variable names and application properties listed below to connect compute services to Redis Server. For each example below, replace the placeholder texts `<redis-server-name>`, and `<redis-key>` with your own Redis server name and key. For more information about naming conventions, check the [Service Connector internals](concept-service-connector-internals.md#configuration-naming-convention) article.
43
+
Use the following environment variable names and application properties to connect compute services to your Redis server. For each example, replace the placeholders `<redis-server-name>`, and `<redis-key>` with your own Redis server name and key. Check the [Service Connector internals](concept-service-connector-internals.md#configuration-naming-convention) article to learn more about naming conventions.
44
44
45
45
### System-assigned managed identity
46
46
47
47
| Default environment variable name | Description | Sample value |
|`AZURE_REDIS_CLIENTID`|Managed-identity client ID |`<client-ID>`|
62
62
63
63
#### Sample code
64
64
65
-
Refer to the steps and code below to connect to Redis using a user-assigned managed identity.
65
+
The following steps and code show you how to use a user-assigned managed identity to connect to Redis.
66
66
[!INCLUDE [code sample for Redis](./includes/code-redis-me-id.md)]
67
67
68
-
### Connection String
68
+
### Connection string
69
69
70
70
> [!WARNING]
71
-
> 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.
71
+
> We recommend that you use the most secure authentication flow available. The authentication flow described here 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 more secure flows, such as managed identities, aren't viable.
72
72
73
-
#### [.NET](#tab/dotnet)
73
+
#### [.NET](#tab/dotnet)
74
74
75
75
| Default environment variable name | Description | Example value |
// DefaultAzureCredential defaultAzureCredential = new DefaultAzureCredentialBuilder().workloadIdentityClientId(clientId).build();
76
76
@@ -203,13 +203,13 @@ ms.author: xiaofanzhou
203
203
re_authentication()
204
204
```
205
205
206
-
#### [NodeJS](#tab/nodejs)
206
+
#### [Node.js](#tab/nodejs)
207
207
208
208
1. Install dependencies.
209
209
```bash
210
210
npm install redis @azure/identity
211
211
```
212
-
1. Add the authentication logic with environment variables set by Service Connector. For more information, see (Azure Cache for Redis: Microsoft Entra ID with node-redis client library)[https://aka.ms/redis/aad/sample-code/js-noderedis].
212
+
1. Add the authentication logic with environment variables set by Service Connector. For more information, see [Azure Cache for Redis: Microsoft Entra ID with node-redis client library](https://aka.ms/redis/aad/sample-code/js-noderedis).
213
213
214
214
```javascript
215
215
import { createClient } from "redis";
@@ -275,4 +275,4 @@ ms.author: xiaofanzhou
275
275
276
276
### [Other](#tab/none)
277
277
278
-
For other languages, you can use the Azure Identity client library and connection information that Service Connector sets to the environment variables to connect to Azure Cache for Redis.
278
+
For other languages, you can use the Azure Identity client library (and connection information that Service Connector sets to the environment variables) to connect to Azure Cache for Redis.
Copy file name to clipboardExpand all lines: articles/service-connector/includes/code-redis-secret.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ ms.author: wchi
23
23
24
24
#### [Java](#tab/java)
25
25
26
-
1. Add the following dependency in your *pom.xml* file:
26
+
1. Add the following dependency in your `pom.xml` file:
27
27
```xml
28
28
<dependency>
29
29
<groupId>redis.clients</groupId>
@@ -49,7 +49,7 @@ ms.author: wchi
49
49
50
50
#### [SpringBoot](#tab/springBoot)
51
51
52
-
Refer to [Use Azure Redis Cache in Spring](/azure/developer/java/spring-framework/configure-spring-boot-initializer-java-app-with-redis-cache) to set up your Spring application. The configuration properties are added to Spring Apps by Service Connector.
52
+
Refer to [Use Azure Redis Cache in Spring](/azure/developer/java/spring-framework/configure-spring-boot-initializer-java-app-with-redis-cache) to set up your Spring application. Service Connector adds the configuration properties to Spring Apps.
53
53
54
54
#### [Python](#tab/python)
55
55
@@ -91,7 +91,7 @@ Refer to [Use Azure Redis Cache in Spring](/azure/developer/java/spring-framewor
0 commit comments