Repository navigation
Revoke the session's authorizations at end-session - #3199
Merged
Merged
Conversation
This was referenced Nov 16, 2026
Member
Author
|
Second review, at b70c300: one more fix round before this can merge. Verified clean: the approach, To change, because each lets another site revoke a signed-in user's tokens with one unconfirmed GET, where
|
Member
Author
|
Third review, at 184f70e: the removals are clean; one small round remains.
|
pournasserian
added a commit
that referenced
this pull request
Nov 16, 2026
…3216) Brings `main` at f8ff094 into `feature/a1`, as a merge commit, so that the feature branch is tested with what `main` gained since the last sync: - #3210: a take of the row lock that loses the first insert of a name rolls back before it reads the row (the `Templates` failure of #3200). - #3208: the delivery cache tests deliver the grant's eviction before the shared-store reads (#3201). - #3199: a confirmed logout revokes the authorizations of the session it ends (#3198). One conflict, in the "Multi-instance as built" paragraph of `docs/planning/backend-technical-spec.md`: `main`'s text is taken, and the feature branch's own change to the paragraph on the commands in the reference host is kept. With #3199 in, `docs/decisions/0007-admin-sign-in-flow.md` says what a logout ends: an unconfirmed one leaves the server's session and its tokens; a confirmed one ends the session and revokes every authorization issued in it; a sign-in from before #3198 and a third-party client's consent are not ended. ## Dependencies None. Part of #3152.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3198
A logout cleared only the sign-in cookie, so a refresh token issued in that session could still be redeemed until it expired. A test reproduced this: after a confirmed logout the token endpoint still answered 200.
With this change:
.fcms.server_session), which its renewals keep. The same user signing in again on the login page over a live cookie keeps it.fcms_server_sessionin the authorization's properties, so no migration). The identity token carries the id assid.UserSessions.EndAsyncrevokes every valid authorization of the user marked with the session, with its tokens. The refresh tokens are refused at once. The access tokens are refused from the next request on, since the bearer scheme checks the token and authorization entries on every request.Where a session's authorizations now end:
sid, whichever clients of the pool signed in through that session.What ends the cookie alone and revokes nothing:
prompt=login,max_age,AbsoluteSessionLifetimeand a second factor the user's role now requires, at the authorize endpoint, whose request carries nothing secret, and the SSO provider's remote sign-out, which nothing authenticates. These are open in A re-authentication asked for at the authorize endpoint ends the sign-in cookie on a cross-site request #3203, The SSO provider's remote sign-out is not authenticated, so another site can end a user's sign-in #3204 and Tokens outlive the absolute session lifetime: the session start is the time of the authorize request #3205. A refresh token withoutamr=mfais still refused by the token endpoint once the role requires two-factor.sidgoes to the logout page, which asks. This covers an identity token of the same user from another session, another device or an earlier sign-in, a third-party client's token (a consent belongs to no session), and one from a sign-in before this change.id_token_hintgoes to the confirmation page as before, and nothing is revoked until the confirmed POST with its antiforgery token.client_idnames, and thepost_logout_redirect_uriit asks for is registered for that client. Any other hint goes to the logout page.A browser logout therefore ends every client without a consent step that signed in through that browser, whatever
offline_accessit holds. A client that must outlive a browser logout is registered withRequireConsent. The specification and the release notes say this.The response is unchanged, so it does not show whether a session existed. Sign-outs write no activity row, and the revocation adds none (#3207).
FluentCMS.Testingbuilds its cookies throughCmsSignInManager.MarkSignIn, the same path as the product.Dependencies: none. The check of a hint's signature uses
Microsoft.IdentityModel.JsonWebTokens, which OpenIddict already brings./connect/logoutfor a session, a refresh token issued under that session's authorization is refused, in a testfeature/a1, not onmain; it is updated there after this merges)