-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
oauth2: fix Max-Age attribute of Set-Cookie response header #26715
oauth2: fix Max-Age attribute of Set-Cookie response header #26715
Conversation
Signed-off-by: Gustavo Gabriel Moyano <gustavo.g.moyano@gmail.com>
Signed-off-by: Gustavo Gabriel Moyano <gustavo.g.moyano@gmail.com>
Signed-off-by: Gustavo Gabriel Moyano <gustavo.g.moyano@gmail.com>
Hi @ggmoy, welcome and thank you for your contribution. We will try to review your Pull Request as quickly as possible. In the meantime, please take a look at the contribution guidelines if you have not done so already. |
Signed-off-by: Gustavo Gabriel Moyano <gustavo.g.moyano@gmail.com>
Signed-off-by: Gustavo Gabriel Moyano <gustavo.g.moyano@gmail.com>
Signed-off-by: Gustavo Gabriel Moyano <gustavo.g.moyano@gmail.com>
Looks like the original intention was to use the Here is an example of using a runtime guard: #26326 /wait-any |
Signed-off-by: Gustavo Gabriel Moyano <gustavo.g.moyano@gmail.com>
@ggmoy |
wait! - i just saw this is against is this an issue only on 1.25- - otherwise lets fix on |
Signed-off-by: Gustavo Gabriel Moyano <gustavo.g.moyano@gmail.com>
No, it is not only on |
yeah, if you could, that would be great |
@phlax, I created a new one from main. Could you have a look, please? |
Commit Message: oauth2: fix Max-Age attribute of Set-Cookie response header
Additional Description: The
Max-Age
attribute ofSet-Cookie
response header indicates the number of seconds until the cookie expires. Currently, we are assigning a value representing Seconds Since the Epoch to theMax-Age
attribute. This is not correct and causes cookies to expire in ~53 years.This PR updates the code to use the
expires_in
value received from the OAuth server response to set theMax-Age
attribute.Risk Level:
Testing: Adding unit tests for the fixed code and for the new runtime guard introduced by this PR
Docs Changes:
Release Notes:
Platform Specific Features:
Runtime guard: Adding
envoy.reloadable_features.oauth_use_standard_max_age_value
runtime guard[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]