Repository navigation
Conversation
This commit aims to handle 1. Logging for large size cookies 2. Split large cookies in multiple smaller parts Signed-off-by: Anurag Aggarwal <[email protected]>
Signed-off-by: Anurag Aggarwal <[email protected]>
ee9ab6c to
cae23c4
Compare
Signed-off-by: Anurag Aggarwal <[email protected]>
cae23c4 to
f9c1225
Compare
Signed-off-by: Anurag Aggarwal <[email protected]>
| } | ||
|
|
||
| void OAuth2Filter::setSplitCookie(Http::ResponseHeaderMap& headers, const std::string& key, | ||
| const std::string& data, size_t maxChunkSize = 4000) const { |
There was a problem hiding this comment.
setting default to 4000 should be in the function declaration I think. Rather, should we make it configuration option?
There was a problem hiding this comment.
Most modern browsers have 4096 as the limit, 4000 should suffice all cases. If we choose to take this utility function out to Http::Utility then probably we should have the configuration option, wdyt?
Signed-off-by: Anurag Aggarwal <[email protected]>
Signed-off-by: Anurag Aggarwal <[email protected]>
Signed-off-by: Anurag Aggarwal <[email protected]>
Signed-off-by: Anurag Aggarwal <[email protected]>
Signed-off-by: Anurag Aggarwal <[email protected]>
Signed-off-by: Anurag Aggarwal <[email protected]>
Signed-off-by: Anurag Aggarwal <[email protected]>
|
gentle ping @derekargueta @mattklein123 (maintainers) for review |
|
/assign @mattklein123 |
|
#28867 might inadvertently address this problem as well by producing shorter bearer tokens, so I'm thinking we try to get that merged in first and see if this additional complexity is even needed. |
|
thanks @derekargueta for mentioning the issue. IIUC from the PR, I think this may still be an issue with |
|
Will wait to hear from @derekargueta to see if we should move forward with this PR or not. /wait-any |
|
This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
|
This pull request has been automatically closed because it has not had activity in the last 37 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
|
The problem is still relevant. Our token contain a lot of groups. I tried to use latest envoy image (dev) with options but it didn't help me. |
@spodobetsd revived cookie chunking in #43135 |
|
/reopen |
Commit Message: oauth2 filter: handle setting large sized cookies for response tokens
Additional Description: if
forward_bearer_tokenis set to true, the user expects to use the token in further flows. If cookie size is greater than 4096, most modern browsers will reject it. Thus in this PR, we split the cookie in chunks of size 4000, and later recombine them during readRisk Level: Low
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
Fixes #27875
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]