Skip to content

Commit c8d3b3d

Browse files
Merge pull request #833 from DuendeSoftware/ka/identityserver4-templates
Introduce UI template upgrade guidance for IdentityServer migration
2 parents 6c29b71 + dda7039 commit c8d3b3d

File tree

1 file changed

+27
-7
lines changed

1 file changed

+27
-7
lines changed

src/content/docs/identityserver/upgrades/identityserver4-to-duende-identityserver-v7.mdx

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ You can determine the version of IdentityServer4 by running the `dotnet list` co
3333
</TabItem>
3434
</Tabs>
3535

36-
This command will print a list of packages you are using in your solution, along with their version.
36+
This command will print a list of packages you’re using in your solution, along with their version.
3737

3838
```bash title="Output"
3939
> IdentityServer4 3.1.4 3.1.4
@@ -45,6 +45,26 @@ Depending on the package version shown, your next steps will be different:
4545
- If you are on IdentityServer v3.x, we recommend first [upgrading to IdentityServer4 v4.x](#identityserver4-v3x-to-identityserver-v4x), and then to [Duende IdentityServer](#identityserver4-v4x-to-duende-identityserver). The configuration object model changed between the two major versions of IdentityServer4, and we recommend upgrading step-by-step.
4646
- If you are on IdentityServer v4.x, you can immediately [upgrade to Duende IdentityServer](#identityserver4-v4x-to-duende-identityserver).
4747

48+
## IdentityServer4 UI Templates
49+
50+
:::note
51+
Check your current host project's UI elements against the latest templates in **[`Duende.Templates`](/identityserver/overview/packaging.mdx)** to ensure
52+
you’re using the latest recommendations and best practices.
53+
:::
54+
55+
IdentityServer has always been a framework that championed customization and making the implementation your own,
56+
and we treat templates as a starting point in your journey to implementing an OIDC and OAuth server.
57+
58+
During the development of IdentityServer4, the UI templates saw several changes between the years of **2018** to **2021**.
59+
60+
We recommend two approaches to upgrading your UI elements of your IdentityServer host project:
61+
62+
- Start with the latest templates and port your customizations to the new templates.
63+
- Use a code comparison tool to identify the changes you need to make to your templates.
64+
65+
The first approach is the easiest, but it requires you to make changes to your project.
66+
The second approach is more involved, but it allows you to make changes to your project in a more controlled manner.
67+
4868
## IdentityServer4 v3.x to IdentityServer v4.x
4969

5070
The most straightforward upgrade path is to first update to the latest version of IdentityServer4 v4, and then continue to the latest Duende IdentityServer.
@@ -141,7 +161,7 @@ A couple of compilation errors and required changes you may encounter:
141161
+ if (context.IsNativeClient())
142162
```
143163

144-
* The name `ProcessLoginCallbackForOidc` does not exist in the current context:
164+
* The name `ProcessLoginCallbackForOidc` doesn’t exist in the current context:
145165

146166
```diff lang="csharp" title="*.cs"
147167
- ProcessLoginCallbackForOidc(result, additionalLocalClaims, localSignInProps);
@@ -387,7 +407,7 @@ Replace all `IdentityModel` namespace usages with `Duende.IdentityModel`:
387407
+ using Duende.IdentityModel;
388408
```
389409

390-
If you are using fully-qualified names in your code, those will need to be updated as well.
410+
If you’re using fully-qualified names in your code, those will need to be updated as well.
391411

392412
### Step 4: Remove AddDeveloperSigningCredential :badge[Optional]
393413

@@ -415,8 +435,8 @@ In this section, we'll look at updating the database schema based on the stores
415435

416436
- `InitiateLoginUri` is a nullable string used for Third Party Initiated Login.
417437
- `RequireDPoP` is a non-nullable boolean flag that controls if a client is required to use [DPoP](../../tokens/pop).
418-
- `DPoPValidationMode` is a non-nullable column that controls the DPoP validation mechanism. Existing clients that are not using DPoP can set its value to `0`.
419-
- `DPoPClockSkew` is a non-nullable timespan that controls how much clock skew is allowed for a particular DPoP client. Existing clients that are not using DPoP can set its value to a timespan of length ``0.
438+
- `DPoPValidationMode` is a non-nullable column that controls the DPoP validation mechanism. Existing clients that aren’t using DPoP can set its value to `0`.
439+
- `DPoPClockSkew` is a non-nullable timespan that controls how much clock skew is allowed for a particular DPoP client. Existing clients that aren’t using DPoP can set its value to a timespan of length ``0.
420440

421441
- Two new properties have been added to the `Client` model:
422442
- `Client.RequirePushedAuthorization` is a new boolean property that controls if this client requires [pushed authorization requests (PAR)](../../tokens/par). It is safe to initialize this column to `false` for existing clients, which will mean that the global PAR configuration will be used.
@@ -489,13 +509,13 @@ As a consequence, if your content root path changes, the default settings for da
489509
Between different .NET versions, this default setting has changed:
490510

491511
| Version | Default |
492-
| -------- | -------------------------------------------------------------- |
512+
|----------|----------------------------------------------------------------|
493513
| .NET 3.1 | Content root path without directory separator suffix |
494514
| .NET 5 | Content root path without directory separator suffix |
495515
| .NET 6 | Content root path (normalized with directory separator suffix) |
496516
| .NET 7+ | Content root path without directory separator suffix |
497517

498-
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.
518+
Your application name might change (and existing data protection keys may become invalid) if you’re currently targeting .NET 6 and don’t have the application name set explicitly.
499519

500520
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).
501521

0 commit comments

Comments
 (0)