Skip to content

Commit 7bb900e

Browse files
authored
Merge pull request #697 from DuendeSoftware/mb/various
Various updates
2 parents 865883f + 97f56bc commit 7bb900e

8 files changed

Lines changed: 59 additions & 72 deletions

File tree

src/content/docs/identitymodel-oidcclient/samples.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ show how to use a OidcClient with a variety of platforms and UI tools, including
2020
- [Windows Console Applications](https://github.com/IdentityModel/IdentityModel.OidcClient.Samples/tree/main/HttpSysConsoleClient) (relies on an HttpListener - a wrapper around the windows HTTP.sys driver)
2121
- [Windows Console Applications using custom uri schemes](https://github.com/IdentityModel/IdentityModel.OidcClient.Samples/tree/main/WindowsConsoleSystemBrowser)
2222

23-
All samples use a demo instance of Duende.IdentityServer (https://demo.duendesoftware.com)
24-
as their OIDC Provider. You can see its source code
25-
[here](https://github.com/DuendeSoftware/demo.duendesoftware.com).
23+
All samples use a [demo instance of Duende IdentityServer](https://demo.duendesoftware.com)
24+
as their OIDC Provider. You can see its [source code on GitHub](https://github.com/DuendeSoftware/demo.duendesoftware.com).
2625

2726
You can log in with *alice/alice* or *bob/bob*
2827

src/content/docs/identityserver/apis/aspnetcore/confirmation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,5 +166,5 @@ so you can supply the cache implementation of your choice. See the
166166
for more details on setting up distributed caches, along with many examples, including Redis, CosmosDB, and
167167
Sql Server.
168168

169-
A full sample using the default in memory caching is available
170-
[here](https://github.com/DuendeSoftware/Samples/tree/main/IdentityServer/v7/DPoP).
169+
A full sample [using the default in memory caching](https://github.com/DuendeSoftware/Samples/tree/main/IdentityServer/v7/DPoP)
170+
is available on GitHub.

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

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,15 @@ redirect_from:
1414
Added in Duende IdentityServer 6.3
1515
:::
1616

17-
The Configuration API is a collection of endpoints that allow for management and
18-
configuration of an IdentityServer implementation. The Configuration API can be
19-
hosted either separately or within the IdentityServer implementation, and is
20-
distributed through the separate [Duende.IdentityServer.Configuration NuGet
21-
package](https://www.nuget.org/packages/Duende.IdentityServer.Configuration).
17+
The Configuration API is a collection of endpoints that allow for management and configuration of an IdentityServer
18+
implementation. The Configuration API can be hosted either separately or within the IdentityServer implementation, and is
19+
distributed through the separate [Duende.IdentityServer.Configuration NuGet package](https://www.nuget.org/packages/Duende.IdentityServer.Configuration).
2220

23-
In this initial release, the Configuration API supports the [Dynamic Client
24-
Registration](/identityserver/configuration/dcr/) protocol.
21+
In this initial release, the Configuration API supports the [Dynamic Client Registration](/identityserver/configuration/dcr/) protocol.
2522

26-
The Configuration API is part of the
27-
[IdentityServer](https://duendesoftware.com/products/identityserver)
28-
Business Edition or higher. The same [license](https://duendesoftware.com/products/identityserver#pricing)
23+
The Configuration API is part of the [IdentityServer](https://duendesoftware.com/products/identityserver) Business Edition or higher. The same [license](https://duendesoftware.com/products/identityserver#pricing)
2924
and [special offers](https://duendesoftware.com/specialoffers) apply.
3025

31-
The Configuration API source code is available [on
32-
GitHub](https://github.com/DuendeSoftware/products/tree/main/identity-server/src/Configuration).
26+
The Configuration API source code is available [on GitHub](https://github.com/DuendeSoftware/products/tree/main/identity-server/src/Configuration).
3327

3428
Samples of the Configuration API are available [here](/identityserver/samples/configuration/).

src/content/docs/identityserver/tokens/client-authentication.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Duende IdentityServer has built-in support for various client credential types a
3131
All information in this section also applies to [API secrets](/identityserver/reference/models/api-resource/) for introspection.
3232
:::
3333

34-
**We recommend using asymmetric client credentials like the [*private key jwt*](#private-key-jwts) or [*Mutual TLS*](#mutual-tls-client-certificates) authentication method over shared secrets.**
34+
**We recommend using asymmetric client credentials like the [*private key JWT*](#private-key-jwts) or [*Mutual TLS (mTLS)*](#mutual-tls-client-certificates) authentication method over shared secrets.**
3535

3636
### Assigning Secrets
3737

@@ -60,7 +60,7 @@ client.ClientSecrets = new[] { primary, secondary };
6060
### Secret Parsing
6161
During request processing, the secret must be somehow extracted from the incoming request. The various specs describe a couple of options, e.g. as part of the authorization header or the body payload.
6262

63-
It is the job of implementations of the [ISecretParser](/identityserver/reference/models/secrets#duendeidentityservervalidationisecretparser) interface to accomplish this. You can add secret parsers by calling the `AddSecretParser()` service provider extension method.
63+
It is the job of implementations of the [`ISecretParser`](/identityserver/reference/models/secrets#duendeidentityservervalidationisecretparser) interface to accomplish this. You can add secret parsers by calling the `AddSecretParser()` service provider extension method.
6464

6565
The following secret parsers are part of Duende IdentityServer:
6666

@@ -86,7 +86,7 @@ The following secret parsers are part of Duende IdentityServer:
8686

8787

8888
### Secret Validation
89-
It is the job of implementations of the [ISecretValidator](/identityserver/reference/models/secrets.md#duendeidentityservermodelparsedsecret) interface to validate the extracted credentials.
89+
It is the job of implementations of the [`ISecretValidator`](/identityserver/reference/models/secrets.md#duendeidentityservermodelparsedsecret) interface to validate the extracted credentials.
9090

9191
You can add secret validators by calling the `AddSecretValidator()` service provider extension method.
9292

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ While the `authorize` endpoint can be used for some special cases, you typically
2525
The following token types are supported.
2626

2727
### Identity Token
28-
During user authentication, your IdentityServer collects data about the user, e.g. authentication method, authentication time, some protocol information and a unique identifier for the user that was authenticated, to communicate back to the client application “what happened at the token service”.
28+
During user authentication, your IdentityServer collects data about the user, e.g. authentication method, authentication time, some protocol information, and a unique identifier for the user that was authenticated.
29+
This data is used to communicate back to the client application “what happened at the token service”.
2930

30-
This data must be sent in a format that is both tamper proof and that allows the client to authenticate the issuer. In OIDC this format is JSON – and the way to add the above security properties to a JSON object is by wrapping it in a JWT (along with JWS, JWA and JWK) – hence the name identity `token`.
31+
This data must be sent in a format that is both tamperproof and allows the client to authenticate the issuer. In OIDC this format is JSON. The way to add the above security properties to a JSON object is by wrapping it in a JWT (along with JWS, JWA, and JWK) – hence the name identity *token*.
3132

3233
The data includes token lifetime information (`exp`, `iat`, `nbf`), the authentication method (`amr`) and time (`auth_time`), the authentication source (`idp`), the session ID (`sid`) and information about the user (`sub` and `name`).
3334

src/content/docs/identityserver/ui/server-side-sessions/index.md

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@ Added in Duende IdentityServer 6.1
1515

1616
When a user logs in interactively, their authentication session is managed by the ASP.NET Core authentication system,
1717
and more specifically the cookie authentication handler.
18-
IdentityServer uses
19-
the [state in the cookie](/identityserver/ui/login/session#well-known-claims-issued-from-the-login-page) to track the
20-
user's subject and session identifiers (i.e. the `sub` and `sid` claims), and the list of clients the user has logged
21-
into (which is used at logout time for [OIDC logout notification](/identityserver/ui/logout/notification)).
18+
IdentityServer uses the [state in the cookie](/identityserver/ui/login/session#well-known-claims-issued-from-the-login-page) to track the user's subject and session identifiers (i.e. the `sub` and `sid` claims),
19+
and the list of clients the user has logged into (which is used at logout time for [OIDC logout notification](/identityserver/ui/logout/notification)).
2220

2321
By default, this cookie is self-contained which means it contains all the state needed to track a user's session.
2422
While this does allow for a stateless server for session management, cookie size could be a problem, and it makes it
@@ -31,18 +29,15 @@ This implementation is specifically designed for IdentityServer to allow for mor
3129
querying for active sessions based on subject id or session id, and revoking artifacts from protocol workflows as part
3230
of that session.
3331

34-
Support for Server Side Sessions is included in [IdentityServer](https://duendesoftware.com/products/identityserver)
35-
Business Edition or higher.
32+
Support for Server Side Sessions is included in [IdentityServer](https://duendesoftware.com/products/identityserver) Business Edition or higher.
3633

3734
## Session Management
3835

3936
With the addition and use of server-side sessions, more interesting architectural features are possible:
4037

4138
* the ability to query and [manage sessions](/identityserver/ui/server-side-sessions/session-management/) from outside the browser that a user is logged into.
42-
* the ability to detect [session expiration](/identityserver/ui/server-side-sessions/session-expiration/) and perform cleanup both in IdentityServer and
43-
in the client.
44-
* the ability to centralize and monitor session activity in order to achieve a
45-
system-wide [inactivity timeout](/identityserver/ui/server-side-sessions/inactivity-timeout/).
39+
* the ability to detect [session expiration](/identityserver/ui/server-side-sessions/session-expiration/) and perform cleanup both in IdentityServer and in the client.
40+
* the ability to centralize and monitor session activity to achieve a system-wide [inactivity timeout](/identityserver/ui/server-side-sessions/inactivity-timeout/).
4641

4742
### Enabling Server-side Sessions
4843

@@ -56,9 +51,8 @@ builder.Services.AddIdentityServer()
5651
```
5752

5853
By default, the store for the server-side sessions will just be kept in-memory.
59-
For production scenarios you will want to configure a durable store either by using
60-
our [EntityFramework Core implementation](/identityserver/data/ef#operational-store), or you
61-
can [implement the store yourself](/identityserver/reference/stores/server-side-sessions/).
54+
For production scenarios you will want to configure a durable store either by using our [EntityFramework Core implementation](/identityserver/data/ef#operational-store),
55+
or you can [implement the store yourself](/identityserver/reference/stores/server-side-sessions/).
6256

6357
:::note
6458
Order is important in the ASP.NET Core service provider.
@@ -69,26 +63,21 @@ has been registered.
6963
### Data Stored Server-side
7064

7165
The data stored for the user session is the data contained in the ASP.NET Core `AuthenticationTicket` class. This
72-
includes
73-
all claims and the `AuthenticationProperties.Items` collection. The `Items` can be used to store any custom (string)
66+
includes all claims and the `AuthenticationProperties.Items` collection. The `Items` can be used to store any custom (string)
7467
data. The `AuthenticationProperties` is included in the call to `SignInAsync` that establishes the user session in the
7568
UI code.
7669

77-
This data will be serialized and protected using ASP.NET
78-
Core's [data protection](/identityserver/deployment#data-protection-keys) feature to protect any user PII from being
79-
directly readable in the data store.
80-
To allow querying some of the values from the user's session are extracted and used as indices in the store. These
81-
values are the user's:
70+
This data will be serialized and protected using ASP.NET Core's [data protection](/identityserver/deployment#data-protection-keys) feature to protect any user PII from being
71+
directly readable in the data store. To allow querying, values from the user's session are extracted and used as indices in the store.
72+
These values are the user's:
8273

8374
* subject identifier (the `sub` claim value)
8475
* session identifier (the `sid` claim value)
8576
* display name (an optional and configurable claim value)
8677

8778
If you would like to query this data based on a user's display name, then the claim type used is configurable with the
88-
`ServerSideSessions.UserDisplayNameClaimType` property on
89-
the [IdentityServerOptions](/identityserver/reference/options#authentication).
90-
This claim must be included in the claims when the
91-
user's [authentication session is established](/identityserver/ui/login/session).
79+
`ServerSideSessions.UserDisplayNameClaimType` property on the [`IdentityServerOptions`](/identityserver/reference/options#authentication).
80+
This claim must be included in the claims when the user's [authentication session is established](/identityserver/ui/login/session).
9281

9382
For example:
9483

@@ -101,9 +90,13 @@ builder.Services.AddIdentityServer(options => {
10190

10291
### IServerSideSessionStore
10392

104-
The [`IServerSideSessionStore`](/identityserver/reference/stores/server-side-sessions) is the abstraction for storing
105-
the server-side session.
93+
The [`IServerSideSessionStore`](/identityserver/reference/stores/server-side-sessions) is the abstraction for storing the server-side session.
10694

107-
A EntityFramework Core implementation is already provided as part of
108-
our [operational store](/identityserver/data/ef#operational-store), but you can implement
95+
An EntityFramework Core implementation is already provided as part of our [operational store](/identityserver/data/ef#operational-store), but you can implement
10996
the [interface](/identityserver/reference/stores/server-side-sessions/) yourself for other backing implementations.
97+
98+
:::caution[Prefer `GetSessionsAsync` over `QuerySessionsAsync`]
99+
When listing sessions, prefer `GetSessionsAsync` over `QuerySessionsAsync`.
100+
The `QuerySessionsAsync` method performs a full-text search and may be slower to retrieve a list of sessions than `GetSessionsAsync`.
101+
Use `QuerySessionsAsync` only when more advanced filtering is required for the solution you are building.
102+
:::

src/content/docs/identityserver/ui/server-side-sessions/session-management.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ For example:
4242

4343
```cs
4444
var userSessions = await _sessionManagementService.QuerySessionsAsync(new SessionQuery
45-
{
46-
CountRequested = 10,
47-
SubjectId = "12345",
48-
DisplayName = "Bob",
49-
});
45+
{
46+
CountRequested = 10,
47+
SubjectId = "12345",
48+
DisplayName = "Bob",
49+
});
5050
```
5151

5252
The results returned contains the matching users' session data, and paging information (depending on if the store and backing database supports certain features such as total count and current page number).
@@ -56,24 +56,24 @@ This paging information contains a `ResultsToken` and allows subsequent requests
5656
```cs
5757
// this requests the first page
5858
var userSessions = await _sessionManagementService.QuerySessionsAsync(new SessionQuery
59-
{
60-
CountRequested = 10,
61-
});
59+
{
60+
CountRequested = 10,
61+
});
6262

6363
// this requests the next page relative to the previous results
6464
userSessions = await _sessionManagementService.QuerySessionsAsync(new SessionQuery
65-
{
66-
ResultsToken = userSessions.ResultsToken,
67-
CountRequested = 10,
68-
});
65+
{
66+
ResultsToken = userSessions.ResultsToken,
67+
CountRequested = 10,
68+
});
6969

7070
// this requests the prior page relative to the previous results
7171
userSessions = await _sessionManagementService.QuerySessionsAsync(new SessionQuery
72-
{
73-
ResultsToken = userSessions.ResultsToken,
74-
RequestPriorResults = true,
75-
CountRequested = 10,
76-
});
72+
{
73+
ResultsToken = userSessions.ResultsToken,
74+
RequestPriorResults = true,
75+
CountRequested = 10,
76+
});
7777
```
7878

7979

src/content/docs/identityserver/upgrades/identityserver4-v3-to-duende-identityserver-v6.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@ redirect_from:
1313
---
1414

1515
This upgrade guide covers upgrading from IdentityServer4 v3.1.x to Duende IdentityServer v6.
16-
This upgrade is a complex one because the configuration object model had some non-trivial changes from IdentityServer4 v3 to IdentityServer4 v4.
16+
This upgrade is more complex because the configuration object model had some non-trivial changes from IdentityServer4 v3 to IdentityServer4 v4.
1717

1818
In short, in IdentityServer4 v3 there was a parent-child relationship between the ApiResources and the ApiScopes.
1919
Then in IdentityServer4 v4 the ApiScopes was promoted to be its own top-level configuration.
2020
This meant that the child collection under the ApiResources was renamed to ApiResourcesScopes and it contained a reference to the new top-level ApiScopes.
2121

2222
If you were using a database for this configuration, then this means that configuration changed from a parent-child, to two top-level tables with a join table between them (to put it loosely). The new ApiResourcesScopes table was created to act as that join table.
2323

24-
Also, all the prior tables that were associated with the ApiResources were prefixed with "Api" and that prefix became "ApiResource" to better indicate the association.
24+
Also, all the prior tables associated with the `ApiResources` were prefixed with "Api" and that prefix became "ApiResource" to better indicate the association.
2525
Then any new tables associated with the new top-level ApiScopes have the "ApiScope" prefix to indicate that association.
2626

27-
In order to properly update the database, the easiest approach is to first update to the latest of IdentityServer4 v4.
28-
Once that's complete, then it's very simple to move to Duende IdentityServer v5.
27+
To properly update the database, the easiest approach is to first update to the latest of IdentityServer4 v4.
28+
Once that's complete, then it's straightforward to move to Duende IdentityServer v5.
2929

3030
There is a sample project for this migration exercise. It is located [here](https://github.com/DuendeSoftware/UpgradeSample-IdentityServer4-v3).
3131

@@ -50,7 +50,7 @@ If you're using any of the other IdentityServer4 packages, such as `IdentityServ
5050

5151
If you are using a [database](/identityserver/data) for your configuration and operational data, then there is a bit of work.
5252
The reason is that for this type of schema restructuring EntityFramework Core's migrations can lose existing data.
53-
To handle this, the conversation from the old schema to the new will be performed by custom SQL.
53+
To handle this, custom SQL will perform the conversation from the old schema to the new.
5454
This is only needed for the configuration database, not the operational one so normal migrations will suffice for the operational database.
5555

5656
First for the operational database, we can apply EF Core migrations.

0 commit comments

Comments
 (0)