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: src/content/docs/identitymodel-oidcclient/samples.md
+2-3Lines changed: 2 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,9 +20,8 @@ show how to use a OidcClient with a variety of platforms and UI tools, including
20
20
-[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)
21
21
-[Windows Console Applications using custom uri schemes](https://github.com/IdentityModel/IdentityModel.OidcClient.Samples/tree/main/WindowsConsoleSystemBrowser)
22
22
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
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).
22
20
23
-
In this initial release, the Configuration API supports the [Dynamic Client
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)
29
24
and [special offers](https://duendesoftware.com/specialoffers) apply.
30
25
31
-
The Configuration API source code is available [on
Copy file name to clipboardExpand all lines: src/content/docs/identityserver/tokens/client-authentication.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ Duende IdentityServer has built-in support for various client credential types a
31
31
All information in this section also applies to [API secrets](/identityserver/reference/models/api-resource/) for introspection.
32
32
:::
33
33
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.**
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.
62
62
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.
64
64
65
65
The following secret parsers are part of Duende IdentityServer:
66
66
@@ -86,7 +86,7 @@ The following secret parsers are part of Duende IdentityServer:
86
86
87
87
88
88
### 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.
90
90
91
91
You can add secret validators by calling the `AddSecretValidator()` service provider extension method.
Copy file name to clipboardExpand all lines: src/content/docs/identityserver/tokens/index.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,9 +25,10 @@ While the `authorize` endpoint can be used for some special cases, you typically
25
25
The following token types are supported.
26
26
27
27
### 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”.
29
30
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*.
31
32
32
33
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`).
Copy file name to clipboardExpand all lines: src/content/docs/identityserver/ui/server-side-sessions/index.md
+21-28Lines changed: 21 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,10 +15,8 @@ Added in Duende IdentityServer 6.1
15
15
16
16
When a user logs in interactively, their authentication session is managed by the ASP.NET Core authentication system,
17
17
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)).
22
20
23
21
By default, this cookie is self-contained which means it contains all the state needed to track a user's session.
24
22
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
31
29
querying for active sessions based on subject id or session id, and revoking artifacts from protocol workflows as part
32
30
of that session.
33
31
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.
36
33
37
34
## Session Management
38
35
39
36
With the addition and use of server-side sessions, more interesting architectural features are possible:
40
37
41
38
* 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
* 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/).
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/).
62
56
63
57
:::note
64
58
Order is important in the ASP.NET Core service provider.
@@ -69,26 +63,21 @@ has been registered.
69
63
### Data Stored Server-side
70
64
71
65
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)
74
67
data. The `AuthenticationProperties` is included in the call to `SignInAsync` that establishes the user session in the
75
68
UI code.
76
69
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:
82
73
83
74
* subject identifier (the `sub` claim value)
84
75
* session identifier (the `sid` claim value)
85
76
* display name (an optional and configurable claim value)
86
77
87
78
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).
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.
106
94
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
109
96
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.
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
Copy file name to clipboardExpand all lines: src/content/docs/identityserver/upgrades/identityserver4-v3-to-duende-identityserver-v6.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,19 +13,19 @@ redirect_from:
13
13
---
14
14
15
15
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.
17
17
18
18
In short, in IdentityServer4 v3 there was a parent-child relationship between the ApiResources and the ApiScopes.
19
19
Then in IdentityServer4 v4 the ApiScopes was promoted to be its own top-level configuration.
20
20
This meant that the child collection under the ApiResources was renamed to ApiResourcesScopes and it contained a reference to the new top-level ApiScopes.
21
21
22
22
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.
23
23
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.
25
25
Then any new tables associated with the new top-level ApiScopes have the "ApiScope" prefix to indicate that association.
26
26
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.
29
29
30
30
There is a sample project for this migration exercise. It is located [here](https://github.com/DuendeSoftware/UpgradeSample-IdentityServer4-v3).
31
31
@@ -50,7 +50,7 @@ If you're using any of the other IdentityServer4 packages, such as `IdentityServ
50
50
51
51
If you are using a [database](/identityserver/data) for your configuration and operational data, then there is a bit of work.
52
52
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.
54
54
This is only needed for the configuration database, not the operational one so normal migrations will suffice for the operational database.
55
55
56
56
First for the operational database, we can apply EF Core migrations.
0 commit comments