product-is
product-is copied to clipboard
Document how to support legacy user agents for SameSiteCookieValve
Due to a bug on iOS12 [1], SameSite=None
property set from the SameSiteCookieValve is misinterpreted on certain devices.
Versions of Safari and embedded browsers on MacOS 10.14 and all browsers on iOS 12. These versions will
erroneously treat cookies marked with `SameSite=None` as if they were marked `SameSite=Strict`. This bug
has been fixed on newer versions of iOS and MacOS.
The SameSiteCookieValve should avoid setting SameSite=None
for a given set of browsers to avoid breaking authentication flows for these legacy browsers. An improvement [2] was done for the SameSiteCookieValve to allow configuring a regex to detect these browsers by their user-agent via the below-provided configuration.
[catalina.valves.valve.properties]
className="org.wso2.carbon.tomcat.ext.valves.SameSiteCookieValve"
legacyUserAgentRegex = "^.*OS 12.*$"
'legacyUserAgentRegex' should be added with a suitable regex pattern to support the legacy user agents.
This improvement needs to be captured in the IS doc space for IS 5.10.0, 5.11.0 and latest.
[1] https://bugs.webkit.org/show_bug.cgi?id=198181 [2] https://github.com/wso2/carbon-kernel/pull/2898
this issue is dependent on https://github.com/wso2/product-is/issues/10489#issuecomment-763292102 and https://github.com/wso2/product-is/issues/10489#issuecomment-763294205
Please refer to https://github.com/wso2/product-is/issues/10910#issuecomment-786478559 before adding this into 5.12.0 doc space.
Refer comments in https://github.com/wso2/product-is/issues/10489