-
Notifications
You must be signed in to change notification settings - Fork 137
Description
SameSite cookies are already supported by Chrome and Firefox, but at the moment not enabled by default. When enabled (tested with Chrome 76 beta), the SAML authentication breaks. Namely, when the IdP uses the SAML HTTP-POST binding to send the SAML Response back to the SATOSA backend and SameSite cookies are enabled, the SATOSA cookie will not be included in the POST request and SATOSA will fail.
This is not an immediate problem, but it will become a problem when/if browsers turn on SameSite cookies by default.
Code Version
master
Expected Behavior
When SATOSA creates the state cookie, it should have SameSite set to None
Current Behavior
There is no support for SameSite. The change for SATOSA is trivial, but the problem is that the python http library also has to support SameSite cookies. SameSite cookie support has been added to the python 3.8 branch
Possible Solution
Wait for python 3.8 and then add support for SameSite cookies in state.py. In the meantime, for SATOSA deployments that are behind an HTTP reverse proxy, the problem can be mitigated by setting the cookie parameters in the HTTP reverse proxy.
For nginx the following directive does the trick:
proxy_cookie_path ~(/*) "$1; SameSite=None";
Steps to Reproduce
- Download Chrome 76 beta
- Go to chrome://flags
- Enable "SameSite by default cookies"
- Clear all cookies
- Use SATOSA to authenticate to a SAML IdP (The domain of the IdP has to be different from the domain of the SATOSA instance)