mirror of
https://github.com/lldap/lldap.git
synced 2026-04-25 08:15:52 +03:00
[GH-ISSUE #721] Bug: Web interface logout does not invalidate token #260
Labels
No labels
backend
blocked
bug
cleanup
dependencies
docker
documentation
duplicate
enhancement
enhancement
frontend
github_actions
good first issue
help wanted
help wanted
integration
invalid
ldap
pull-request
question
rust
rust
tests
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/lldap-lldap#260
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Zepmann on GitHub (Oct 30, 2023).
Original GitHub issue: https://github.com/lldap/lldap/issues/721
Situation:
An admin is logged in into lldap's web interface. The admin logs out.
Expected behavior:
All credentials generated to support the session are invalidated. The admin is completely logged out.
Actual behavior:
The refresh token is invalidated, but the token remains valid and can still be used to perform admin actions.
Additional notes:
The token should be invalidated even if only the refresh token is offered in a cookie. Both the refresh token and token are part of the same session. If the session is logged out using only a refresh token (i.e. no token in a cookie), the token associated with the session should still be invalidated.
Proof of concept code:
@nitnelave commented on GitHub (Oct 30, 2023):
Yep, I can reproduce the bug. However, looking at the code it seems to do the right thing, the bug is not obvious. I'll have a deeper look.
Note that in case of multi-instance deployment, it's possible to be logged out from one instance but not (immediately) logged out from others; this is a flaw in the current design that should be fixed by an additional round-trip to the DB for valid tokens. But this is a separate issue.
@nitnelave commented on GitHub (Oct 30, 2023):
Thanks for the report and the reproduction script! I had a fancy blacklist scheme, but forgot to actually populate the DB when issuing a JWT...