-
Feature Request
-
Resolution: Done
-
Major
-
2.0.26.Final
-
None
Initial SameSite Cookie support was implemented by UNDERTOW-1024 2 year ago. It was based on https://tools.ietf.org/html/draft-ietf-httpbis-cookie-same-site-00.
Though the specification is still draft, as per https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-03#section-4.1, some part has been updated. For example:
- A new "None" attribute is added in addition to "Strict" and "Lax".
- A bare SameSite attribute is not supported. SameSite attribute needs to be set with "Strict", "Lax" or "None".
I would like to propose the following update for SameSite Cookie support:
- Define 3 SameSiteMode ("Strict", "Lax" and "None") as enum in io.undertow.server.handlers.Cookie
- Implement getSameSiteMode() and setSameSiteMode() in io.undertow.servlet.spec.ServletCookieAdaptor. Servlet API has not yet supported SameSite Cookie, but this can enable SameSite flag to the Servlet Cookie through the Undertow API
- Add SameSiteCookieHandler which can set the SameSite flag on all cookies or the cookie which matches specified name.
In addition, as per the articles https://web.dev/samesite-cookie-recipes/ and https://www.chromium.org/updates/same-site/incompatible-clients which was written just after raising this JIRA, there are some user agents are known to be not compatible with SameSite=None attribute. So, I would like to add a utility class that can detect such incompatible clients and can be used not to send SameSite=None cookie for such clients.
- is cloned by
-
JBEAP-19579 (7.3.z) [RH-SSO] Provide support for SameSite cookie None
- Closed
-
JBEAP-19580 (7.2.z) [RH-SSO] UNDERTOW-1600 - Provide support for SameSite cookie None
- Closed
- is related to
-
WFLY-13003 Support the SameSite cookie attribute
- Closed
-
UNDERTOW-1702 SameSiteCookieHandler can throw NPE if request doesn't contain user-agent header
- Resolved
-
UNDERTOW-1685 Slight test extension for SameSite cookie support
- Resolved
- relates to
-
JBEAP-21322 [GSS](7.3.z) 7.3 Update 6 patch breaks samesite-cookie in Undertow
- Closed
- links to