Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jwt Token Invalidated at logout so that some endpoints cannot be accessed with previous jwt token #21998

Closed
wants to merge 2 commits into from

Conversation

sug-ghosh
Copy link

Description

When a user logged off from the UI, a malicious user can send request with the existing cookie of the user. The admin UI still authenticate as a valid user.

Mainly in endpoint, https://trino-host:8080/ui/api/query , https://trino-host:8080/ui/api/cluster , https://trino-host:8080/ui/api/stats the malicious user can see the query details.
Even thought jwt Token is bind with Cookie and the the token Expiry time can be set as short-lived token. Still if an user logged off before that, it still an issue as malicious user can see the query details by hitting https://trino-host:8080/ui/api/query .

Fixes #21783

Additional context and related issues

Release notes

( ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text:

# Section
* Fix some things. ({issue}`issuenumber`)

@cla-bot cla-bot bot added the cla-signed label May 16, 2024
@sug-ghosh
Copy link
Author

cc @dain @lukasz-walkiewicz

Copy link

This pull request has gone a while without any activity. Tagging the Trino developer relations team: @bitsondatadev @colebow @mosabua

@github-actions github-actions bot added the stale label Jun 19, 2024
Copy link

Closing this pull request, as it has been stale for six weeks. Feel free to re-open at any time.

@github-actions github-actions bot closed this Jul 11, 2024
@sug-ghosh sug-ghosh reopened this Jul 22, 2024
@github-actions github-actions bot removed the stale label Jul 22, 2024
@mosabua mosabua added the stale-ignore Use this label on PRs that should be ignored by the stale bot so they are not flagged or closed. label Jul 22, 2024
@mosabua
Copy link
Member

mosabua commented Jul 22, 2024

I added the stale-ignore label since there is interest to proceed.

@dain
Copy link
Member

dain commented Jul 22, 2024

I don't think this ia a good approach. I think the best we can do is to delete the cookie when they log out, but it is a timed login at the core. If you need immediate invalidation, I suggest you use oauth with an IdP that supports that.

@mosabua
Copy link
Member

mosabua commented Jul 22, 2024

Given the concerns raised by @dain I am closing this issue. If you want to implement to delete the cookie in Trino as mentioned please send a new PR and link to this one.

@mosabua mosabua closed this Jul 22, 2024
@mosabua mosabua removed the stale-ignore Use this label on PRs that should be ignored by the stale bot so they are not flagged or closed. label Jul 22, 2024
@sug-ghosh
Copy link
Author

okay, I will raise a new PR @mosabua @dain , thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Admin UI can be accessed with the Authorization Bearer Jwt Token even after Logoff
3 participants