<div dir="ltr">Hi Nick,<div><br></div><div>I summarized the effects in this <a href="http://lists.openid.net/pipermail/openid-specs-ab/Week-of-Mon-20190527/007341.html">thread</a>.</div><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">S pozdravem,<br><b>Filip Skokan</b></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 3 Jul 2019 at 19:56, Nick Roy via Openid-specs-ab <<a href="mailto:openid-specs-ab@lists.openid.net">openid-specs-ab@lists.openid.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Sorry for the cross-post. Is anyone talking to Google about this issue? Any concerns about it affecting OpenID Connect?<br>
<br>
Thanks,<br>
<br>
Nick<br>
<br>
Forwarded message:<br>
<br>
> From: Pieter van der Meulen <<a href="mailto:pieter.vandermeulen@surfnet.nl" target="_blank">pieter.vandermeulen@surfnet.nl</a>><br>
> To: <a href="mailto:refeds@lists.refeds.org" target="_blank">refeds@lists.refeds.org</a><br>
> Subject: [refeds] New chrome SameSite policy for session cookies affecting the SAML HTTP-POST binding<br>
> Date: Wed, 26 Jun 2019 12:39:44 +0000<br>
><br>
> Hi all,<br>
><br>
> Chrome announced plans [1] to change how cookies work that for several common SP implementations will break SAML authentication using the SAML2int profile. The change in Chrome involves changing the default of the "SameSite" cookie attribute to "Lax" as explained in [2] and [3]. Because the "SameSite" cookie attribute is a recent addition, most web applications do not set this attribute and thus use the default. Changing the default to "Lax" means that Chrome will not send the cookies that it previously received when the HTTP Request is a cross-site HTTP POST. Such a cross-site HTTP POST is exactly what happens when an IdP uses the SAML HTTP-POST binding so send a SAML Response to a SP. This means that a SP that requires a (session) cookie when receiving the SAML Response on it'a ACS Location using the HTTP-POST binding will break.<br>
><br>
> A similar issue exists in OpenID Connect for RPs that use the form_post response mode and that require a (session) cookie. These are typically RPs using Microsoft OpenID Connect libraries. Other OpenID Connect implementations use HTTP GET exclusively, which is allowed cross-domain by "SameSite=Lax".<br>
><br>
> We have been discussing this internally at SURFnet and several people from the closed fog list contributed to the discussions. Because this could affect many SPs, and would require changes at those SPs, we concluded that this deserves wider attention, hence this post.<br>
><br>
> How to test whether a SP is affected?<br>
> 1. Download the Chrome 76 beta (<a href="https://www.google.com/chrome/beta/" rel="noreferrer" target="_blank">https://www.google.com/chrome/beta/</a>)<br>
> 2. Open "chrome://flags/" and set the experimental "SameSite by default cookies" flag to "Enabled".<br>
> 3. Login to the SP you want to test.<br>
> 4. (optional) share the results<br>
><br>
> The obvious fix is adding a "SameSite=None" attribute to the Set-cookie HTTP header in the HTTP Response. This reenables the old cookie behaviour in Chrome and should not affect other browsers. Unfortunately "SameSite=None" currently breaks Safari browsers [4], complicating rolling out this fix now.<br>
><br>
> You can add the SameSite attribute from the web application itself, or on the web server or load balancer:<br>
> - Apache 2: Header always edit Set-Cookie (.*) "$1; SameSite=None"<br>
> - Nginx: proxy_cookie_path ~(/*) "/$1; SameSite=None";<br>
> - HAProxy: rspirep ^(set-cookie:.*)  \1;\ SameSite=None<br>
><br>
> Another, more involved, fix is not relying on cookies for the SAML HTTP-POST binding by:<br>
> - setting the session ID in the ID element of the AuthnRequest, or<br>
> - setting the session ID in the RelayState parameter<br>
><br>
> An (incomplete) list of SP software that is affected:<br>
> - SimpleSAMLphp<br>
> - Shibboleth, depending on the configuration<br>
> - SATOSA [5]<br>
><br>
> Notes:<br>
> - If you use cookie based load balancing, your LB cookie is affected as well<br>
> - Setting the SameSite attribute is supported since PHP 7.3.0 [6]<br>
><br>
> Kind regards,<br>
><br>
> Pieter.<br>
><br>
><br>
> [1] <a href="https://blog.chromium.org/2019/05/improving-privacy-and-security-on-web.html" rel="noreferrer" target="_blank">https://blog.chromium.org/2019/05/improving-privacy-and-security-on-web.html</a><br>
> [2] <a href="https://web.dev/samesite-cookies-explained/" rel="noreferrer" target="_blank">https://web.dev/samesite-cookies-explained/</a><br>
> [3] <a href="https://tools.ietf.org/html/draft-west-cookie-incrementalism-00" rel="noreferrer" target="_blank">https://tools.ietf.org/html/draft-west-cookie-incrementalism-00</a><br>
> [4] <a href="https://bugs.webkit.org/show_bug.cgi?id=198181" rel="noreferrer" target="_blank">https://bugs.webkit.org/show_bug.cgi?id=198181</a><br>
> [5] <a href="https://github.com/IdentityPython/SATOSA/issues/245" rel="noreferrer" target="_blank">https://github.com/IdentityPython/SATOSA/issues/245</a><br>
> [6] <a href="https://www.php.net/manual/en/session.configuration.php" rel="noreferrer" target="_blank">https://www.php.net/manual/en/session.configuration.php</a><br>
><br>
> --<br>
> Pieter van der Meulen (<a href="mailto:Pieter.vanderMeulen@surfnet.nl" target="_blank">Pieter.vanderMeulen@surfnet.nl</a>)<br>
> SURFnet (Trust & Security) - <a href="http://www.surfnet.nl" rel="noreferrer" target="_blank">www.surfnet.nl</a><br>
_______________________________________________<br>
Openid-specs-ab mailing list<br>
<a href="mailto:Openid-specs-ab@lists.openid.net" target="_blank">Openid-specs-ab@lists.openid.net</a><br>
<a href="http://lists.openid.net/mailman/listinfo/openid-specs-ab" rel="noreferrer" target="_blank">http://lists.openid.net/mailman/listinfo/openid-specs-ab</a><br>
</blockquote></div>