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
@@ -454,14 +454,66 @@ When upgrading, consider how those applications will handle an upgraded token se
454
454
- If you can restart all client apps and APIs that depend on your current signing key, you can remove the old signing key and start to use automatic key management. A restart reloads the discovery document and the new signing key.
455
455
- If you can not restart client apps and APIs, check the [manual and automatic key rotation topics](../../fundamentals/key-management#manual-key-rotation) to learn how to announce new signing key material while still supporting the old signing key for a period of time.
456
456
457
-
### Step 7: Validate Your Deployment
457
+
### Step 7: Verify Data Protection Configuration :badge[Optional]
458
+
459
+
Duende IdentityServer depends on [ASP.NET Data Protection](/identityserver/deployment.md#aspnet-core-data-protection) to encrypt and sign data using keys managed by ASP.NET.
460
+
461
+
As part of your migration, verify the application name is set in your Data Protection configuration:
462
+
463
+
```csharp title="Program.cs" {4}
464
+
builder.Services.AddDataProtection()
465
+
.PersistKeysTo...()
466
+
.ProtectKeysWith...()
467
+
.SetApplicationName("IdentityServerXYZ");
468
+
```
469
+
470
+
If an application name is set, you can skip this section.
471
+
472
+
Data Protection keys are isolated by application name, to prevent multiple applications from sharing encryption keys.
473
+
474
+
If no application name is configured, ASP.NET Data Protection uses the content root path of the IdentityServer host as the application name.
475
+
As a consequence, if your content root path changes, the default settings for data protection will prevent you from using your old data protection keys.
476
+
477
+
Between different .NET versions, this default setting has changed:
Your application name might change (and existing data protection keys may become invalid) if you are currently targeting .NET 6 and do not have the application name set explicitly.
487
+
488
+
To prevent this from happening, you can explicitly set the application name to the content root path without the directory separator character, as [documented on Microsoft Learn](https://learn.microsoft.com/en-us/aspnet/core/security/data-protection/configuration/overview?view=aspnetcore-6.0#setapplicationname).
489
+
490
+
:::tip[Getting the current application name]
491
+
In your current (pre-upgraded) IdentityServer version, you can query the application name used and set it explicitly in your upgraded deployment:
0 commit comments