Repository navigation
Replies: 6 comments 1 reply
|
Short answer: yes, "logout revokes the whole SID lineage" is a useful invariant — but it is not what Two mechanisms are being conflated:
Minimal model preserving concurrency tolerance:
Weaknesses I'd expect reviewers to raise, against your Q2:
(Also worth adopting the cheat sheet's session-logging guidance keyed by lineage id — it makes the invariant testable.) |
|
Thanks for the detailed feedback! Just to clarify, I'm not proposing to remove or shorten the grace period. The distinction between renewal overlap and lineage revocation is precisely what motivated this discussion. The stable logical session with rotating SID aliases is also the core of my proposed design. I particularly appreciate your additional points about generation limits, tombstone lifetime, and failure handling. Those are useful considerations for a concrete implementation. Thanks again for taking the time to review it! |
|
Glad the distinction landed — agreed that the grace window is not the bug; the missing link is that an alias minted during the window must inherit the lineage's revocation state. If it helps, the invariant I would test is:
The one design choice I would still call out: whether the lineage is per-client or per-user. Per-user makes "logout revokes the lineage" log out every device; per-client keeps it honest, with remember-me and refresh-token families as a separate lineage. The OAuth 2.0 Security BCP's refresh-token family reuse detection is the closest well-specified analogue. Happy to sketch the state table if that is useful. |
|
Two things the tombstone model still needs to pin down, both unrelated to revocation itself: what an alias is allowed to see, and what the client can prove. 1. Logout is not always a destroy. The README says 2. The boundary should be per (authentication, audience), not per cookie. One cookie here holds several audiences with per-audience logout, so a cookie-level boundary means logging out of app X also revokes app Y. That is subject-wide revocation in disguise. 3. The alias needs a state model. 4. Revocation has to be closed under the derivation graph, and the defaults are fail-open. 5. Better: stop treating the identifier as a bearer token. The library has a weak version already, 6. Cheat-sheet delta. The Session Management Cheat Sheet has no occurrence of "lineage", "alias" or "stale", so this is uncovered. Under "Session ID Life Cycle" I would suggest three sentences:
Your two questions. Both yes. I would phrase Q1 as "revocation is closed under the derivation graph" rather than "logout revokes the lineage", because that graph has more edges than SID rotation (audiences, remember-me, refresh tokens) and the closure property survives a redesign of the cookie format. For Q2 the shape is right, and the two things missing from the list are the state semantics (view or fork) and the boundary (per authentication and audience, not per cookie). AI assistance disclosure: AI tools were used to check the cited library documentation, cheat-sheet text and RFC references. The analysis, the points and the wording are my own. |
|
Do you think this is resolved in this PR #2893? |
Uh oh!
There was an error while loading. Please reload this page.
Hi everyone,
I've recently been investigating session rotation and logout semantics in
lua-resty-session, used bylua-resty-openidcand Apache APISIX.During controlled tests, I observed an interesting behavior related to session ID renewal and revocation:
stale_ttlgrace period, the attacker uses A and obtains a new authenticated session C.The maintainers confirmed that this behavior is consistent with the library's design. I'm not presenting it as a vulnerability or disputing that assessment.
However, it raises a broader security design question: should rotating session identifiers derived from the same authenticated session share a common revocation boundary?
I've written a short design discussion proposing a stable logical session referenced by rotating SIDs, where logout revokes the entire session lineage without affecting independently established logins.
Design discussion:
https://github.com/GioeleB00/session-lineage-revocation/blob/main/Session_ID_Rotation_and_Revocation_Design_Discussion.md
I'd particularly appreciate the community's perspective on two questions:
I'm especially interested in critical feedback, alternative designs, and perspectives from engineers who have worked on session management systems.
AI assistance disclosure: AI tools were used to assist with drafting and refining the written presentation. The technical design, proposed security invariant, and underlying engineering decisions are my own. I take full responsibility for the proposal, its technical accuracy, and its contents.
Thanks for your time!
Gioele Botta
All reactions