Skip to content

Commit 850537e

Browse files
authored
Merge pull request #264650 from flang-msft/fxl---entra-preview-changes
Fxl---entra preview changes
2 parents f850c61 + afa45cc commit 850537e

File tree

12 files changed

+95
-96
lines changed

12 files changed

+95
-96
lines changed

articles/azure-cache-for-redis/TOC.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,10 @@
131131

132132
- name: Authentication and authorization
133133
items:
134-
- name: Role-based access control
135-
href: cache-configure-role-based-access-control.md
136134
- name: Microsoft Entra ID for authentication
137135
href: cache-azure-active-directory-for-authentication.md
136+
- name: Role-based access control
137+
href: cache-configure-role-based-access-control.md
138138
- name: Managed identity for storage accounts
139139
href: cache-managed-identity.md
140140

articles/azure-cache-for-redis/cache-azure-active-directory-for-authentication.md

Lines changed: 39 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,21 @@ author: flang-msft
77
ms.custom: references_regions
88
ms.service: cache
99
ms.topic: conceptual
10-
ms.date: 06/23/2023
10+
ms.date: 02/07/2024
1111
ms.author: franlanglois
1212

1313
---
1414

15-
# Use Microsoft Entra ID for cache authentication
15+
# Use Microsoft Entra ID (preview) for cache authentication
1616

1717
Azure Cache for Redis offers two methods to authenticate to your cache instance:
1818

19-
- [access key](cache-configure.md#access-keys)
19+
- [Access keys](cache-configure.md#access-keys)
20+
- [Microsoft Entra ID (preview)](cache-configure.md#preview-microsoft-entra-authentication)
2021

21-
- [Microsoft Entra token](/azure/active-directory/develop/access-tokens)
22+
Although access key authentication is simple, it comes with a set of challenges around security and password management. For contrast, in this article, you learn how to use a Microsoft Entra token for cache authentication.
2223

23-
Although access key authentication is simple, it comes with a set of challenges around security and password management. In this article, you learn how to use a Microsoft Entra token for cache authentication.
24-
25-
Azure Cache for Redis offers a password-free authentication mechanism by integrating with [Microsoft Entra ID](/azure/active-directory/fundamentals/active-directory-whatis). This integration also includes [role-based access control](/azure/role-based-access-control/) functionality provided through [access control lists (ACLs)](https://redis.io/docs/management/security/acl/) supported in open source Redis.
24+
Azure Cache for Redis offers a password-free authentication mechanism by integrating with [Microsoft Entra ID (preview)](/azure/active-directory/fundamentals/active-directory-whatis). This integration also includes [role-based access control](/azure/role-based-access-control/) functionality provided through [access control lists (ACLs)](https://redis.io/docs/management/security/acl/) supported in open source Redis.
2625

2726
To use the ACL integration, your client application must assume the identity of a Microsoft Entra entity, like service principal or managed identity, and connect to your cache. In this article, you learn how to use your service principal or managed identity to connect to your cache, and how to grant your connection predefined permissions based on the Microsoft Entra artifact being used for the connection.
2827

@@ -34,77 +33,74 @@ To use the ACL integration, your client application must assume the identity of
3433

3534
## Prerequisites and limitations
3635

37-
- To enable Microsoft Entra token-based authentication for your Azure Cache for Redis instance, at least one Redis user must be configured under the **Data Access Policy** setting in the Resource menu.
38-
- Microsoft Entra ID-based authentication is supported for SSL connections and TLS 1.2 only.
39-
- Microsoft Entra ID-based authentication isn't supported on Azure Cache for Redis instances that run Redis version 4.
36+
- Microsoft Entra ID-based authentication is supported for SSL connections and TLS 1.2 or higher.
4037
- Microsoft Entra ID-based authentication isn't supported on Azure Cache for Redis instances that [depend on Cloud Services](./cache-faq.yml#caches-with-a-dependency-on-cloud-services--classic).
4138
- Microsoft Entra ID based authentication isn't supported in the Enterprise tiers of Azure Cache for Redis Enterprise.
4239
- Some Redis commands are blocked. For a full list of blocked commands, see [Redis commands not supported in Azure Cache for Redis](cache-configure.md#redis-commands-not-supported-in-azure-cache-for-redis).
4340

4441
> [!IMPORTANT]
45-
> Once a connection is established using Microsoft Entra token, client applications must periodically refresh Microsoft Entra token before expiry, and send an `AUTH` command to Redis server to avoid disruption of connections. For more information, see [Configure your Redis client to use Microsoft Entra ID](#configure-your-redis-client-to-use-azure-active-directory).
46-
47-
<a name='enable-azure-ad-token-based-authentication-on-your-cache'></a>
42+
> Once a connection is established using Microsoft Entra token, client applications must periodically refresh Microsoft Entra token before expiry, and send an `AUTH` command to Redis server to avoid disruption of connections. For more information, see [Configure your Redis client to use Microsoft Entra ID](#configure-your-redis-client-to-use-microsoft-entra-id).
4843
49-
## Enable Microsoft Entra token based authentication on your cache
44+
## Enable Microsoft Entra ID authentication on your cache
5045

5146
1. In the Azure portal, select the Azure Cache for Redis instance where you'd like to configure Microsoft Entra token-based authentication.
5247

53-
1. Select **(PREVIEW) Data Access Configuration** from the Resource menu.
48+
1. Select **Authentication** from the Resource menu.
5449

55-
1. Select "**Add**" and choose **New Redis User**.
50+
1. In the working pane, select **(PREVIEW) Enable Microsoft Entra Authentication**.
5651

57-
1. On the **Access Policy** tab, select one the available policies in the table: **Owner**, **Contributor**, or **Reader**. Then, select the **Next:Redis Users**.
52+
1. Select **Enable Microsoft Entra Authentication**, and enter the name of a valid user. The user you enter is automatically assigned _Data Owner Access Policy_ by default when you select **Save**. You can also enter a managed identity or service principal to connect to your cache instance.
5853

59-
:::image type="content" source="media/cache-azure-active-directory-for-authentication/cache-new-redis-user.png" alt-text="Screenshot showing the available Access Policies.":::
54+
:::image type="content" source="media/cache-azure-active-directory-for-authentication/cache-enable-microsoft-entra.png" alt-text="Screenshot showing authentication selected in the resource menu and the enable Microsoft Entra authentication checked.":::
6055

61-
1. Choose either the **User or service principal** or **Managed Identity** to determine how you want to use for authenticate to your Azure Cache for Redis instance.
56+
1. A popup dialog box displays asking if you want to update your configuration, and informing you that it takes several minutes. Select **Yes.**
6257

63-
1. Then, select **Select members** and select **Select**. Then, select **Next : Review + Design**.
64-
:::image type="content" source="media/cache-azure-active-directory-for-authentication/cache-select-members.png" alt-text="Screenshot showing members to add as New Redis Users.":::
58+
> [!IMPORTANT]
59+
> Once the enable operation is complete, the nodes in your cache instance reboots to load the new configuration. We recommend performing this operation during your maintenance window or outside your peak business hours. The operation can take up to 30 minutes.
60+
61+
## Using data access configuration with your cache
62+
63+
If you would like to use a custom access policy instead of Redis Data Owner, go to the **Data Access Configuration** on the Resource menu. For more information, see [Configure a custom data access policy for your application](cache-configure-role-based-access-control.md#configure-a-custom-data-access-policy-for-your-application).
64+
65+
1. In the Azure portal, select the Azure Cache for Redis instance where you'd like to add to the Data Access Configuration.
66+
67+
1. Select **(PREVIEW) Data Access Configuration** from the Resource menu.
6568

66-
1. From the Resource menu, select **Advanced settings**.
69+
1. Select **Add** and choose **New Redis User**.
6770

68-
1. Check the box labeled **(PREVIEW) Enable Microsoft Entra Authorization** and select **OK**. Then, select **Save**.
71+
1. On the **Access Policy** tab, select one the available policies in the table: **Data Owner**, **Data Contributor**, or **Data Reader**. Then, select the **Next:Redis Users**.
6972

70-
:::image type="content" source="media/cache-azure-active-directory-for-authentication/cache-azure-ad-access-authorization.png" alt-text="Screenshot of Microsoft Entra ID access authorization.":::
73+
:::image type="content" source="media/cache-azure-active-directory-for-authentication/cache-new-redis-user.png" alt-text="Screenshot showing the available Access Policies.":::
74+
75+
1. Choose either the **User or service principal** or **Managed Identity** to determine how to assign access to your Azure Cache for Redis instance. If you select **User or service principal**,and you want to add a _user_, you must first [enable Microsoft Entra Authentication](#enable-microsoft-entra-id-authentication-on-your-cache).
76+
77+
1. Then, select **Select members** and select **Select**. Then, select **Next : Review + Assign**.
78+
:::image type="content" source="media/cache-azure-active-directory-for-authentication/cache-select-members.png" alt-text="Screenshot showing members to add as New Redis Users.":::
7179

7280
1. A dialog box displays a popup notifying you that upgrading is permanent and might cause a brief connection blip. Select **Yes.**
7381

7482
> [!IMPORTANT]
7583
> Once the enable operation is complete, the nodes in your cache instance reboots to load the new configuration. We recommend performing this operation during your maintenance window or outside your peak business hours. The operation can take up to 30 minutes.
7684
77-
<a name='configure-your-redis-client-to-use-azure-active-directory'></a>
78-
7985
## Configure your Redis client to use Microsoft Entra ID
8086

81-
Because most Azure Cache for Redis clients assume that a password/access key is used for authentication, you likely need to update your client workflow to support authentication using Microsoft Entra ID. In this section, you learn how to configure your client applications to connect to Azure Cache for Redis using a Microsoft Entra token.
82-
83-
:::image type="content" source="media/cache-azure-active-directory-for-authentication/azure-ad-token.png" alt-text="Architecture diagram showing the flow of a token from Microsoft Entra ID to a customer application to a cache.":::
87+
Because most Azure Cache for Redis clients assume that a password and access key are used for authentication, you likely need to update your client workflow to support authentication using Microsoft Entra ID. In this section, you learn how to configure your client applications to connect to Azure Cache for Redis using a Microsoft Entra token.
8488

85-
<a name='azure-ad-client-workflow'></a>
89+
<!-- :::image type="content" source="media/cache-azure-active-directory-for-authentication/azure-ad-token.png" alt-text="Architecture diagram showing the flow of a token from Microsoft Entra ID to a customer application to a cache."::: -->
8690

8791
### Microsoft Entra Client Workflow
8892

89-
1. Configure your client application to acquire a Microsoft Entra token for scope `https://redis.azure.com/.default` or `acca5fbb-b7e4-4009-81f1-37e38fd66d78/.default` using the [Microsoft Authentication Library (MSAL)](/azure/active-directory/develop/msal-overview).
90-
91-
<!-- (ADD code snippet) -->
93+
1. Configure your client application to acquire a Microsoft Entra token for scope, `https://redis.azure.com/.default` or `acca5fbb-b7e4-4009-81f1-37e38fd66d78/.default`, using the [Microsoft Authentication Library (MSAL)](/azure/active-directory/develop/msal-overview).
9294

9395
1. Update your Redis connection logic to use following `UserName` and `Password`:
9496

95-
- `UserName` = Object ID of your managed identity or service principal
96-
97-
- `Password` = Microsoft Entra token that you acquired using MSAL
98-
99-
<!-- (ADD code snippet) -->
97+
`UserName` = Object ID of your managed identity or service principal
98+
`Password` = Microsoft Entra token that you acquired using MSAL
10099

101100
1. Ensure that your client executes a Redis [AUTH command](https://redis.io/commands/auth/) automatically before your Microsoft Entra token expires using:
102101

103-
- `UserName` = Object ID of your managed identity or service principal
104-
105-
- `Password` = Microsoft Entra token refreshed periodically
106-
107-
<!-- (ADD code snippet) -->
102+
`UserName` = Object ID of your managed identity or service principal
103+
`Password` = Microsoft Entra token refreshed periodically
108104

109105
### Client library support
110106

@@ -124,8 +120,6 @@ The following table includes links to code samples, which demonstrate how to con
124120
| ioredis | Node.js | [ioredis code sample](https://aka.ms/redis/aad/sample-code/js-ioredis) |
125121
| node-redis | Node.js | [node-redis code sample](https://aka.ms/redis/aad/sample-code/js-noderedis) |
126122

127-
<a name='best-practices-for-azure-ad-authentication'></a>
128-
129123
### Best practices for Microsoft Entra authentication
130124

131125
- Configure private links or firewall rules to protect your cache from a Denial of Service attack.

articles/azure-cache-for-redis/cache-configure-role-based-access-control.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ The following list contains some examples of permission strings for various scen
9494

9595
- Allow application to execute only _read_ commands
9696

97-
Permissions string: `+@read *`
97+
Permissions string: `+@read ~*`
9898

9999
- Allow application to execute _read_ command category and set command on keys with prefix `Az`.
100100

@@ -116,22 +116,22 @@ The following list contains some examples of permission strings for various scen
116116

117117
1. [Configure Permissions](#permissions-for-your-data-access-policy) as per your requirements.
118118

119-
1. From the Resource menu, select **Advanced settings**.
119+
1. To add a user to the access policy using Microsoft Entra ID, you must first enable Microsoft Entra ID by selecting **Authentication** from the Resource menu.
120120

121-
1. If not checked already, Check the box labeled **(PREVIEW) Enable Microsoft Entra Authorization** and select **OK**. Then, select **Save**.
121+
1. Select **(PREVIEW) Enable Microsoft Entra Authentication** as the tab in the working pane.
122122

123-
:::image type="content" source="media/cache-azure-active-directory-for-authentication/cache-azure-ad-access-authorization.png" alt-text="Screenshot of Microsoft Entra ID access authorization.":::
123+
1. If not checked already, check the box labeled **(PREVIEW) Enable Microsoft Entra Authentication** and select **OK**. Then, select **Save**.
124124

125-
1. A dialog box displays a popup notifying you that upgrading is permanent and might cause a brief connection blip. Select **Yes.**
125+
:::image type="content" source="media/cache-azure-active-directory-for-authentication/cache-enable-microsoft-entra.png" alt-text="Screenshot of Microsoft Entra ID access authorization.":::
126+
127+
1. A popup dialog box displays asking if you want to update your configuration, and informing you that it takes several minutes. Select **Yes.**
126128

127129
> [!IMPORTANT]
128130
> Once the enable operation is complete, the nodes in your cache instance reboots to load the new configuration. We recommend performing this operation during your maintenance window or outside your peak business hours. The operation can take up to 30 minutes.
129131
130-
<a name='configure-your-redis-client-to-use-azure-active-directory'></a>
131-
132132
## Configure your Redis client to use Microsoft Entra ID
133133

134-
Now that you have configured Redis User and Data access policy for configuring role based access control, you need to update your client workflow to support authenticating using a specific user/password. To learn how to configure you client application to connect to your cache instance as a specific Redis User, see [Configure your Redis client to use Azure AD.](cache-azure-active-directory-for-authentication.md#configure-your-redis-client-to-use-azure-active-directory)
134+
Now that you have configured Redis User and Data access policy for configuring role based access control, you need to update your client workflow to support authenticating using a specific user/password. To learn how to configure your client application to connect to your cache instance as a specific Redis User, see [Configure your Redis client to use Microsoft Entra ID](cache-azure-active-directory-for-authentication.md#configure-your-redis-client-to-use-microsoft-entra-id).
135135

136136
## Next steps
137137

0 commit comments

Comments
 (0)