Skip to content

Commit f13af09

Browse files
authored
Merge pull request #920 from DuendeSoftware/wca/data-prot-redis
Added PersistKeysToStackExchangeRedis as an option plus a giant warning
2 parents 07d284e + 881fa9f commit f13af09

File tree

1 file changed

+8
-2
lines changed
  • src/content/docs/identityserver/deployment

1 file changed

+8
-2
lines changed

src/content/docs/identityserver/deployment/index.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ A typical IdentityServer implementation should include data protection configura
110110
builder.Services.AddDataProtection()
111111
// Choose an extension method for key persistence, such as
112112
// PersistKeysToFileSystem, PersistKeysToDbContext,
113-
// PersistKeysToAzureBlobStorage, or PersistKeysToAWSSystemsManager
113+
// PersistKeysToAzureBlobStorage, PersistKeysToAWSSystemsManager, or
114+
// PersistKeysToStackExchangeRedis
114115
.PersistKeysToFoo()
115116
// Choose an extension method for key protection, such as
116117
// ProtectKeysWithCertificate, ProtectKeysWithAzureKeyVault
@@ -120,6 +121,12 @@ builder.Services.AddDataProtection()
120121
.SetApplicationName("IdentityServer");
121122
```
122123

124+
:::danger[Ensure Redis data is persisted]
125+
If you are using Redis to store data protection keys using `PersistKeysToStackExchangeRedis`, ensure that your Redis
126+
service is configured to persist data to a database backup or append-only file. Otherwise, when your Redis instance reboots,
127+
you will lose all data protection keys, causing all data protected with those keys to no longer be readable.
128+
:::
129+
123130
### Data Protection Keys and IdentityServer's Signing Keys
124131

125132
ASP.NET's data protection keys are sometimes confused with IdentityServer's signing keys, but the two are completely
@@ -196,7 +203,6 @@ Duende IdentityServer's features that rely on data protection include
196203

197204
## IdentityServer Data Stores
198205

199-
200206
IdentityServer itself is stateless and does not require server affinity - but there is data that needs to be shared between in multi-instance deployments.
201207

202208
### Configuration Data

0 commit comments

Comments
 (0)