This is a preview release of IdentityServer 8.1. It builds on Duende Storage 2.0.0-preview.7.
User Management and Spaces are now part of IdentityServer and ship in the Duende.IdentityServer package. There are no new Duende.UserManagement or Duende.Spaces packages.
The NuGet Packages for User Management and Spaces will be deprecated and should no longer be used.
Upgrading from an earlier preview
- Run the Storage migration. Duende Storage 2.0.0-preview.7 adds schema version 3, which adds foreign keys to the links between stored entities. Migrate every storage instance before you deploy, with the Duende CLI (
duende storage migrate) or in code withIStorageInstanceSchema.MigrateAsync. The migration first deletes links whose entity no longer exists. See the Duende Storage 2.0.0-preview.7 release notes. - Re-create stored API resources, clients and SAML service providers. If you store API resources, clients or SAML service providers in Duende Storage, their scopes are now stored as links to the API scopes and identity resources, not as names. Those saved by an earlier preview read back with no scopes. Save them again with their scopes, or re-create them.
- Remove the User Management and Spaces packages. Remove your references to
Duende.UserManagement,Duende.UserManagement.IdentityServer8andDuende.Spaces. The types are inDuende.IdentityServernow, with the same namespaces and names. CallAddUserManagement()andAddSpaces()on the IdentityServer builder. - Entity Framework server-side sessions. The
ServerSideSessionstable gets aVersioncolumn. Generate and apply a migration before you deploy. Without it, every session read and delete fails.
Security fixes
This preview includes the fixes for the advisories published with IdentityServer 8.0.11:
- GHSA-mv65-jhg4-3qh6: mTLS client authentication can be bypassed with a self-signed certificate that matches the expected subject name.
- GHSA-4xw7-58r7-8h6h: Signing in with server-side sessions reuses an existing session key, which allows session fixation.
- GHSA-qqfr-626g-64rp: A DPoP proof key confusion allows leaked DPoP refresh and access tokens to be used.
- GHSA-wcc6-7mjx-g6j5: Incorrectly formatted SAML messages can cause a denial of service.
- GHSA-hmrv-xfgm-wgh2: The SAML service provider doesn't validate bearer SubjectConfirmationData.
- GHSA-478v-p4g7-f7g4: id_token_hint isn't validated thoroughly enough.
- GHSA-6xhh-5qhq-m9vf: The SAML service provider ends a session when it receives a logout request from a different identity provider.
- GHSA-hhqg-4hp5-4v5h: The SAML service provider accepts a changed RelayState in signed HTTP-Redirect messages.
The upgrade notes in the IdentityServer 8.0.11 release notes apply to this preview too: mTLS, introspection, end session, server-side sessions, DPoP, SAML XML limits, SAML logout with an external login callback, and SAML logout with SameSite.
Breaking changes
- Server-side session store.
IServerSideSessionStore.UpdateSessionAsyncnow returnsTask<bool>, and saves a session only while the version it was read at is still the stored version. Custom stores and decorators must return the result and do this check. Code that calls it should check the result:falsemeans the save didn't happen. - Fixed
IssuerUriwith Spaces. A host that registers Spaces and setsIdentityServerOptions.IssuerUrifails at startup, because every space would get the same issuer. SetSpacesOptions.AllowSharedIssuerUrito use one issuer on purpose. - Lowercase space paths and match patterns. A space path resolves only when the prefix and the space segment are lowercase; other spellings get a 404.
SpacesOptions.SpacePathPrefixmust be lowercase.ISpaceAdminaccepts only lowercase ASCII match patterns. - Dynamic provider options with Spaces. With Spaces, the host fails at startup when the options cache for a dynamic provider type isn't space-aware, for example when you registered your own
IOptionsMonitorCache<T>for it. - Scopes in the Admin API. Client and SAML service provider
AllowedScopes, and API resource scopes, must name existing scopes, and match them exactly, including case. A client can't listoffline_access; useAllowOfflineAccess. API scope and identity resource names must be unique across both kinds. An API scope or identity resource that is still in use can't be deleted. - Client validation in the Admin API. Client URIs are validated on create and update, and adding or removing a client secret validates the whole client. The storage client store validates the clients it returns, like the other client stores.
What's changed
Spaces
- In-memory operational stores keep each space's data separate.
- Deleting a space purges its data in every storage instance, and pool IDs of purged spaces aren't reused automatically.
- SCIM authenticates tokens per space by default. New options
ReadAuthorizationPolicyNameandWriteAuthorizationPolicyNamelet you set separate read and write policies. - With signing keys shared by every space,
UseIdentityServer()logs a warning. - Idle cached dynamic provider state is released per space, and extended properties survive the Spaces cache.
Storage
- Signing-key creation and background jobs (outbox processing, storage purge and server-side session cleanup) are coordinated across nodes when you use Duende Storage.
- Renaming an API scope or identity resource is reflected everywhere it's used.
User Management
- SCIM is no longer experimental. You no longer need to suppress the
duende_experimentaldiagnostic. - OTP email recipient addresses are masked in logs.
Fixes
- Concurrent updates to a server-side session no longer silently overwrite each other.
- Replacing a server-side session only revokes grants of clients whose lifetime is coordinated with the user session.
- Redirect scripts accept only HTTP and HTTPS destinations.
- Paging back before the first page of server-side sessions works.
- Stopping an IdentityServer host synchronously from a thread with a single-threaded synchronization context no longer hangs.
Full Changelog: is-8.1.0-preview.6...is-8.1.0-preview.7