Skip to content

Commit b11f4cd

Browse files
authored
Merge pull request #292919 from LHL407/integrate-azure-cache-for-redis-with-service-connector
[AQ] edit pass: Integrate Azure Cache for Redis with Service Connector
2 parents 5938694 + 29ffe10 commit b11f4cd

File tree

3 files changed

+85
-70
lines changed

3 files changed

+85
-70
lines changed
Lines changed: 49 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
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.
44
author: maud-lv
55
ms.author: malev
66
ms.service: service-connector
@@ -10,21 +10,21 @@ ms.date: 02/02/2024
1010

1111
# Integrate Azure Cache for Redis with Service Connector
1212

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+
You can connect Azure Cache for Redis to other cloud services by using Service Connector. This article outlines supported authentication methods and clients, and provides sample code. It also reveals default environment variable names and values (or Spring Boot configuration) you get when you create the service connection.
1414

1515
## Supported compute services
1616

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:
1818

1919
- Azure App Service
2020
- Azure Container Apps
2121
- Azure Functions
2222
- Azure Kubernetes Service (AKS)
2323
- Azure Spring Apps
2424

25-
## Supported Authentication types and client types
25+
## Supported authentication and client types
2626

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+
The following table shows which combinations of authentication methods and clients are supported for connecting your compute service to Azure Cache for Redis by using Service Connector. "Yes" means that the combination is supported. "No" means that it isn't supported.
2828

2929
| Client type | System-assigned managed identity | User-assigned managed identity | Secret / connection string | Service principal |
3030
|--------------------|----------------------------------|--------------------------------|----------------------------|-------------------|
@@ -36,114 +36,115 @@ The table below shows which combinations of authentication methods and clients a
3636
| Python | Yes | Yes | Yes | Yes |
3737
| None | Yes | Yes | Yes | Yes |
3838

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+
All client types, except for Go and Java - Spring Boot, can use any of the authentication methods referenced in the table to connect to Azure Cache for Redis by using Service Connector. The only supported authentication methods for Go and Java - Spring Boot are secret / connection string or service principal.
4040

4141
## Default environment variable names or application properties and sample code
4242

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. To learn more about naming conventions, check the [Service Connector internals](concept-service-connector-internals.md#configuration-naming-convention) article.
4444

4545
### System-assigned managed identity
4646

4747
| Default environment variable name | Description | Sample value |
4848
| ---------------------------------------- | --------------------- | -------------------------------------------------- |
49-
| AZURE_REDIS_HOST | Redis Endpoint | `<RedisName>.redis.cache.windows.net` |
49+
| `AZURE_REDIS_HOST` | Redis endpoint | `<RedisName>.redis.cache.windows.net` |
5050

5151
#### Sample code
5252

53-
Refer to the steps and code below to connect to Redis using a system-assigned managed identity.
53+
The following steps and code show you how to use a system-assigned managed identity to connect to Redis.
54+
5455
[!INCLUDE [code sample for redis](./includes/code-redis-me-id.md)]
5556

5657
### User-assigned managed identity
5758

5859
| Default environment variable name | Description | Sample value |
5960
| ---------------------------------------- | --------------------- | -------------------------------------------------- |
60-
| AZURE_REDIS_HOST | Redis Endpoint | `<RedisName>.redis.cache.windows.net` |
61-
| AZURE_REDIS_CLIENTID | managed identity client ID | `<client-ID>` |
61+
| `AZURE_REDIS_HOST` | Redis endpoint | `<RedisName>.redis.cache.windows.net` |
62+
| `AZURE_REDIS_CLIENTID` | Managed-identity client ID | `<client-ID>` |
6263

6364
#### Sample code
6465

65-
Refer to the steps and code below to connect to Redis using a user-assigned managed identity.
66+
The following steps and code show you how to use a user-assigned managed identity to connect to Redis.
67+
6668
[!INCLUDE [code sample for Redis](./includes/code-redis-me-id.md)]
6769

68-
### Connection String
70+
### Connection string
6971

7072
> [!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.
73+
> 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 aren't present in other flows. You should use this flow only when more secure flows, such as managed identities, aren't viable.
7274
73-
#### [.NET](#tab/dotnet)
75+
#### [.NET](#tab/dotnet)
7476

7577
| Default environment variable name | Description | Example value |
7678
| --------------------------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------- |
77-
| AZURE_REDIS_CONNECTIONSTRING | StackExchange. Redis connection string | `<redis-server-name>.redis.cache.windows.net:6380,password=<redis-key>,ssl=True,defaultDatabase=0` |
79+
| `AZURE_REDIS_CONNECTIONSTRING` | `StackExchange.Redis` connection string | `<redis-server-name>.redis.cache.windows.net:6380,password=<redis-key>,ssl=True,defaultDatabase=0` |
7880

79-
#### [Java](#tab/java)
81+
#### [Java](#tab/java)
8082

8183
| Default environment variable name | Description | Example value |
8284
| --------------------------------- | ----------------------- | ---------------------------------------------------------------------------- |
83-
| AZURE_REDIS_CONNECTIONSTRING | Jedis connection string | `rediss://:<redis-key>@<redis-server-name>.redis.cache.windows.net:6380/0` |
85+
| `AZURE_REDIS_CONNECTIONSTRING` | Jedis connection string | `rediss://:<redis-key>@<redis-server-name>.redis.cache.windows.net:6380/0` |
8486

85-
#### [SpringBoot](#tab/springBoot)
87+
#### [Spring Boot](#tab/springBoot)
8688

8789
| Application properties | Description | Example value |
8890
| ---------------------- | -------------- | ----------------------------------------------- |
89-
| spring.redis.host | Redis host | `<redis-server-name>.redis.cache.windows.net` |
90-
| spring.redis.port | Redis port | `6380` |
91-
| spring.redis.database | Redis database | `0` |
92-
| spring.redis.password | Redis key | `<redis-key>` |
93-
| spring.redis.ssl | SSL setting | `true` |
91+
| `spring.redis.host` | Redis host | `<redis-server-name>.redis.cache.windows.net` |
92+
| `spring.redis.port` | Redis port | `6380` |
93+
| `spring.redis.database` | Redis database | `0` |
94+
| `spring.redis.password` | Redis key | `<redis-key>` |
95+
| `spring.redis.ssl` | SSL setting | `true` |
9496

95-
#### [Python](#tab/python)
97+
#### [Python](#tab/python)
9698

9799
| Default environment variable name | Description | Example value |
98100
|-----------------------------------|----------------------------|----------------------------------------------------------------------------|
99-
| AZURE_REDIS_CONNECTIONSTRING | redis-py connection string | `rediss://:<redis-key>@<redis-server-name>.redis.cache.windows.net:6380/0` |
101+
| `AZURE_REDIS_CONNECTIONSTRING` | `redis-py` connection string | `rediss://:<redis-key>@<redis-server-name>.redis.cache.windows.net:6380/0` |
100102

101-
#### [Go](#tab/go)
103+
#### [Go](#tab/go)
102104

103105
| Default environment variable name | Description | Example value |
104106
|-----------------------------------|----------------------------|----------------------------------------------------------------------------|
105-
| AZURE_REDIS_CONNECTIONSTRING | redis-py connection string | `rediss://:<redis-key>@<redis-server-name>.redis.cache.windows.net:6380/0` |
107+
| `AZURE_REDIS_CONNECTIONSTRING` | `redis-py` connection string | `rediss://:<redis-key>@<redis-server-name>.redis.cache.windows.net:6380/0` |
106108

107-
#### [NodeJS](#tab/nodejs)
109+
#### [Node.js](#tab/nodejs)
108110

109111
| Default environment variable name | Description | Example value |
110112
| --------------------------------- | ---------------------------- | ---------------------------------------------------------------------------- |
111-
| AZURE_REDIS_CONNECTIONSTRING | node-redis connection string | `rediss://:<redis-key>@<redis-server-name>.redis.cache.windows.net:6380/0` |
113+
| `AZURE_REDIS_CONNECTIONSTRING` | `node-redis` connection string | `rediss://:<redis-key>@<redis-server-name>.redis.cache.windows.net:6380/0` |
112114

113115
#### [Other](#tab/none)
114116

115117
| Default environment variable name | Description | Example value |
116118
| --------------------------------- | -------------- | ----------------------------------------------- |
117-
| AZURE_REDIS_HOST | Redis host | `<redis-server-name>.redis.cache.windows.net` |
118-
| AZURE_REDIS_PORT | Redis port | `6380` |
119-
| AZURE_REDIS_DATABASE | Redis database | `0` |
120-
| AZURE_REDIS_PASSWORD | Redis key | `<redis-key>` |
121-
| AZURE_REDIS_SSL | SSL setting | `true` |
119+
| `AZURE_REDIS_HOST` | Redis host | `<redis-server-name>.redis.cache.windows.net` |
120+
| `AZURE_REDIS_PORT` | Redis port | `6380` |
121+
| `AZURE_REDIS_DATABASE` | Redis database | `0` |
122+
| `AZURE_REDIS_PASSWORD` | Redis key | `<redis-key>` |
123+
| `AZURE_REDIS_SSL` | SSL setting | `true` |
122124

123125
---
124126

125127
#### Sample code
126128

127-
Refer to the steps and code below to connect to Azure Cache for Redis using a connection string.
129+
The following steps and code show you how to use a connection string to connect to Azure Cache for Redis.
130+
128131
[!INCLUDE [code for redis](./includes/code-redis-secret.md)]
129132

130-
### Service Principal
133+
### Service principal
131134

132135
| Default environment variable name | Description | Sample value |
133136
| ---------------------------------------- | --------------------- | -------------------------------------------------- |
134-
| AZURE_REDIS_HOST | Redis Endpoint | `<RedisName>.redis.cache.windows.net` |
135-
| AZURE_REDIS_CLIENTID | client ID of service principal | `<client-ID>` |
136-
| AZURE_REDIS_CLIENTSECRET | secret of the service principal | `<client-secret>` |
137-
| AZURE_REDIS_TENANTID | tenant ID of the service principal | `<tenant-id>` |
137+
| `AZURE_REDIS_HOST` | Redis endpoint | `<RedisName>.redis.cache.windows.net` |
138+
| `AZURE_REDIS_CLIENTID` | Client ID of the service principal | `<client-ID>` |
139+
| `AZURE_REDIS_CLIENTSECRET` | Secret of the service principal | `<client-secret>` |
140+
| `AZURE_REDIS_TENANTID` | Tenant ID of the service principal | `<tenant-id>` |
138141

139142
#### Sample code
140143

141-
Refer to the steps and code below to connect to Redis using a Service Principal.
142-
[!INCLUDE [code sample for Redis](./includes/code-redis-me-id.md)]
144+
The following steps and code show you how to use a service principal to connect to Redis.
143145

144-
## Next steps
146+
[!INCLUDE [code sample for Redis](./includes/code-redis-me-id.md)]
145147

146-
Follow the tutorials listed below to learn more about Service Connector.
148+
## Related content
147149

148-
> [!div class="nextstepaction"]
149-
> [Learn about Service Connector concepts](./concept-service-connector-internals.md)
150+
* [Learn about Service Connector concepts](./concept-service-connector-internals.md)

0 commit comments

Comments
 (0)