-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Support multi-part UI cookies #20787
Conversation
core/trino-main/src/main/java/io/trino/server/ui/OAuthIdTokenCookie.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/test/java/io/trino/server/ui/TestOAuthIdTokenCookie.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/test/java/io/trino/server/ui/TestOAuthIdTokenCookie.java
Outdated
Show resolved
Hide resolved
4db6391
to
0d3c8f5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question on extending this to other cookies created/used by Trino as well.
core/trino-main/src/main/java/io/trino/server/ui/OAuthIdTokenCookie.java
Show resolved
Hide resolved
ee89027
to
1a37953
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a security expert, I would like to see @dain or @lukasz-walkiewicz review as well.
core/trino-main/src/test/java/io/trino/server/ui/TestMultipartUiCookie.java
Show resolved
Hide resolved
core/trino-main/src/test/java/io/trino/server/ui/TestMultipartUiCookie.java
Show resolved
Hide resolved
1a37953
to
dd5a49a
Compare
core/trino-main/src/main/java/io/trino/server/ui/OAuthIdTokenCookie.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/server/ui/OAuthIdTokenCookie.java
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/server/ui/MultipartUiCookie.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/server/ui/MultipartUiCookie.java
Outdated
Show resolved
Hide resolved
dd5a49a
to
ecc1e61
Compare
When cookie name+value length exceeds 4096 bytes, it is silently rejected by most of the browsers per https://datatracker.ietf.org/doc/html/rfc6265#section-6.1. Since we don't control access & refresh token lengths and encryption scheme, we need to split value and set/remove multiple cookies in such cases.
ecc1e61
to
fba3819
Compare
Just reworded last commit message. |
If cookie value exceeds 4096 bytes (which is a limit for most of the browsers) it will be splitted into multiple cookies and then imploded on read.
Release notes:
Fix UI authentication for large authentication tokens