Merged
Conversation
Praveen2112
approved these changes
Feb 21, 2024
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
Praveen2112
reviewed
Feb 21, 2024
Member
Praveen2112
left a comment
There was a problem hiding this comment.
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
Praveen2112
approved these changes
Feb 22, 2024
Member
Praveen2112
left a comment
There was a problem hiding this comment.
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
Outdated
Show resolved
Hide resolved
core/trino-main/src/test/java/io/trino/server/ui/TestMultipartUiCookie.java
Outdated
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
Contributor
Author
|
Just reworded last commit message. |
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.
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