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
Copy file name to clipboardExpand all lines: docs/Authentication.md
+20-15Lines changed: 20 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,4 @@
1
-
Authentication
2
-
===
1
+
# Authentication
3
2
4
3
There are multiple ways of connecting to a Redis server, depending on the authentication model. The simplest
5
4
(but least secure) approach is to use the `default` user, with no authentication, and no transport security.
@@ -12,10 +11,9 @@ var muxer = await ConnectionMultiplexer.ConnectAsync("myserver"); // or myserver
12
11
This approach is often used for local transient servers - it is simple, but insecure. But from there,
13
12
we can get more complex!
14
13
15
-
TLS
16
-
===
14
+
## TLS
17
15
18
-
If your server has TLS enabled, SE.Redis can be instructed to use it. In some cases (AMR, etc), the
16
+
If your server has TLS enabled, SE.Redis can be instructed to use it. In some cases (Azure Managed Redis, etc), the
19
17
library will recognize the endpoint address, meaning: *you do not need to do anything*. To
20
18
*manually* enable TLS, the `ssl` token can be used:
21
19
@@ -44,8 +42,7 @@ Alternatively, in advanced scenarios: to provide your own custom server validati
44
42
can be used; this uses the normal [`RemoteCertificateValidationCallback`](https://learn.microsoft.com/dotnet/api/system.net.security.remotecertificatevalidationcallback)
45
43
API.
46
44
47
-
Usernames and Passwords
48
-
===
45
+
## Usernames and Passwords
49
46
50
47
Usernames and passwords can be specified with the `user` and `password` tokens, respectively:
51
48
@@ -56,15 +53,25 @@ var muxer = await ConnectionMultiplexer.ConnectAsync("myserver,ssl=true,user=myu
56
53
If no `user` is provided, the `default` user is assumed. In some cases, an authentication-token can be
57
54
used in place of a classic password.
58
55
59
-
Client certificates
60
-
===
56
+
## Managed identities
57
+
58
+
If the server is an Azure Managed Redis resource, connections can be secured using Microsoft Entra ID authentication. Use the [Microsoft.Azure.StackExchangeRedis](https://github.com/Azure/Microsoft.Azure.StackExchangeRedis) extension package to handle the authentication using tokens retrieved from Microsoft Entra. The package integrates via the ConfigurationOptions class, and can use various types of identities for token retrieval. For example with a user-assigned managed identity:
0 commit comments