Skip to content

Commit f7c0864

Browse files
authored
Merge pull request #284729 from flang-msft/fxl---passwordless-updates
Fxl---passwordless updates
2 parents 428fc56 + 52a253d commit f7c0864

11 files changed

+65
-16
lines changed

articles/azure-cache-for-redis/cache-web-app-aspnet-core-howto.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,18 @@ Deployment instructions are in the README.md.
4949

5050
## Create a cache
5151

52-
[!INCLUDE [redis-cache-create](~/reusable-content/ce-skilling/azure/includes/azure-cache-for-redis/includes/redis-cache-create.md)]
52+
[!INCLUDE [redis-cache-create](~/reusable-content/ce-skilling/azure/includes/azure-cache-for-redis/includes/redis-cache-create-entra-id.md)]
5353

54-
[!INCLUDE [redis-cache-access-keys](includes/redis-cache-access-keys.md)]
54+
[!INCLUDE [redis-cache-passwordless](includes/redis-cache-passwordless.md)]
5555

56-
Make a note of the **HOST NAME** and the **Primary** access key. You use these values later to construct the *CacheConnection* secret.
56+
[!INCLUDE [redis-access-policy](includes/redis-access-policy.md)]
5757

58-
## Add a local secret for the connection string
58+
## Add a local secret for the host name
5959

60-
In your command window, execute the following command to store a new secret named *CacheConnection*, after replacing the placeholders, including angle brackets, for your cache name and primary access key:
60+
In your command window, execute the following command to store a new secret named *RedisHostName*, after replacing the placeholders, including angle brackets, for your cache name and primary access key:
6161

6262
```dos
63-
dotnet user-secrets set CacheConnection "<cache name>.redis.cache.windows.net,abortConnect=false,ssl=true,allowAdmin=true,password=<primary-access-key>"
63+
dotnet user-secrets set RedisHostName "<cache-name>.redis.cache.windows.net"
6464
```
6565

6666
## Connect to the cache with RedisConnection
@@ -71,10 +71,11 @@ The `RedisConnection` class manages the connection to your cache. The connection
7171
_redisConnection = await _redisConnectionFactory;
7272
```
7373

74-
In `RedisConnection.cs`, you see the `StackExchange.Redis` namespace is added to the code. This is needed for the `RedisConnection` class.
74+
The `RedisConnection.cs` class includes the `StackExchange.Redis` and `Azure.Identity` namespaces at the top of the file to include essential types to connect to Azure Cache for Redis.
7575

7676
```csharp
7777
using StackExchange.Redis;
78+
using Azure.Identity;
7879
```
7980

8081
The `RedisConnection` code ensures that there's always a healthy connection to the cache by managing the `ConnectionMultiplexer` instance from `StackExchange.Redis`. The `RedisConnection` class recreates the connection when a connection is lost and unable to reconnect automatically.

articles/azure-cache-for-redis/includes/cache-delete-resource-group.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
---
2-
title: "include file"
3-
description: "include file"
42
author: flang-msft
53

64
ms.service: azure-cache-redis
75
ms.topic: "include"
8-
ms.date: 08/10/2023
6+
ms.date: 08/16/2024
97
ms.author: franlanglois
10-
ms.custom: "include file"
8+
ms.topic: include
119
---
1210

1311
## Clean up resources

articles/azure-cache-for-redis/includes/cache-entra-access.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
---
2+
author: flang-msft
3+
24
ms.service: azure-cache-redis
35
ms.topic: include
4-
ms.date: 07/08/2024
6+
ms.date: 08/16/2024
57
ms.author: franlanglois
6-
author: flang-msft
8+
ms.topic: include
79
---
810

911
### Enable Microsoft Entra ID authentication on your cache
67.7 KB
Loading
34.8 KB
Loading
67.7 KB
Loading
34.8 KB
Loading
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
author: flang-msft
3+
4+
ms.service: cache
5+
ms.topic: include
6+
ms.date: 08/16/2024
7+
ms.author: franlanglois
8+
ms.topic: include
9+
---
10+
11+
## Add the Redis access policy
12+
13+
You need to assign a data access policy to the identity that accesses Azure Cache for Redis. For this example, you assign a data access policy to the same Microsoft Entra ID account you use to log into the Azure CLI or Visual Studio.
14+
15+
1. Select **Settings** Resource menu on the cache and select the **Data Access Configuration**.
16+
17+
1. On the **Data Access Configuration** page, select **Add > New Redis User** from the top navigation.
18+
19+
:::image type="content" source="media/redis-access-policy/assign-access-policy.png" alt-text="Screenshot showing the data access configuration screen.":::
20+
21+
1. On the **New Redis User** page, select the **Data Contributor** policy, and select **Next: Redis Users**.
22+
23+
1. Choose **+ Select Member** to open the flyout menu. Search for your user account and select it from the results.
24+
25+
:::image type="content" source="media/redis-access-policy/select-user.png" alt-text="Screenshot showing the Redis user tab in the working pane with select member highlighted with a red box.":::
26+
27+
1. Select **Review + assign** to assign the policy to the selected user.

articles/azure-cache-for-redis/includes/redis-cache-access-keys.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
---
2+
author: flang-msft
3+
24
ms.service: azure-cache-redis
35
ms.topic: include
4-
ms.date: 07/03/2024
6+
ms.date: 08/16/2024
57
ms.author: franlanglois
6-
author: flang-msft
8+
ms.topic: include
79
---
810

911
### Retrieve host name, ports, and access keys from the Azure portal
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
author: flang-msft
3+
4+
ms.service: cache
5+
ms.topic: include
6+
ms.date: 08/16/2024
7+
ms.author: franlanglois
8+
ms.topic: include
9+
---
10+
11+
### Retrieve the host name from the Azure portal
12+
13+
The cache client needs the host name and port for the cache to connect to your Azure Cache for Redis server. Some clients might refer to these items by slightly different names. You can get the host name and ports from the [Azure portal](https://portal.azure.com).
14+
15+
- Select **Overview** from the Resource menu. The host name is of the form `<DNS-name>.redis.cache.windows.net`.
16+
17+
:::image type="content" source="media/redis-cache-access-keys/redis-cache-hostname-ports.png" alt-text="Screenshot showing Azure Cache for Redis properties with a red box around the host name.":::

0 commit comments

Comments
 (0)