Cookies not being sent on Post
Reported by
jcand...@wgmsl.com,
Oct 6 2017
|
|||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 Steps to reproduce the problem: I'm implementing SSO using Okta and github.com/Sustainsys/Saml2 with a aspnetcore 2 website. 1. Sustainsys library starts the challenge by responding with a 303, a location and setcookie headers. 2. Browser gets this cookie, stores it and does the redirect to Okta endpoint. 3. User logs in and Okta post back to the endpoint "Saml2/Acs" which should carry the cookies that are already stored (I double checked this). Post contains form data to validate against the cookie. Form data is fine, but cookies are not there, 0 cookies, even if i create a testing cookie, with a simple name-value, it does not get posted to the server. I guess Okta has a form with my server's saml2 endpoint as the action. So the question here is, a form posting to a different origin should carry the cookies for such origin? I think it should. And that's why it works in all other non blink based browsers. Maybe my scenario does have certain condition that makes this fail. What is the expected behavior? Cookies should be sent to the server What went wrong? Cookies are not being sent. Did this work before? N/A Does this work in other browsers? Yes Chrome version: 61.0.3163.100 Channel: stable OS Version: 10.0 Flash Version: What can I do meanwhile?
,
Oct 16 2017
Having the same issue as jcandreu. To reproduce, quite a bit of work is necessary, but if you're willing to go through with it, you should be able to reproduce the issue, @susanjuniab.
First of all, you will need Visual Studio 2017, the free community edition will do.
Step 3: Unzip the source you downloaded.
Step 4: Open Samples/SampleAspNetCore2ApplicationNETFramework/Startup.cs and change the following line of code:
From this:
new IdentityProvider(
new EntityId("http://localhost:52071/Metadata"), options.SPOptions)
{
LoadMetadata = true
});
To this:
new IdentityProvider(
new EntityId(http://stubidp.kentor.se/Metadata"), options.SPOptions)
{
LoadMetadata = true
});
Or any other SAML2 supporting Identity provider.
Then open the SampleAspNetCore2ApplicationNETFramework.csproj in Visual Studio if you have not already done so and run it. You can then access https://localhost:44342 with chrome. Navigate to login, choose Saml2, you will be redirected to the Identity Provider which will just use Sample Data. Just hit Login there again and an exception will occur if you're using Chrome. This won't happen in Microsoft Edge, for example, making me think it's a chrome issue.
Regard,
Eric
,
Oct 16 2017
Thanks for posting the reproduction steps. I today I was planning to do so. (Owe you a beer). I have a small question. Does this fails only with Kentor libraries? I'm almost 100% it's a chrome issue, since it works in other browsers. But this is not small thing. I'm not quite sure what's the core problem here. Are you having the same problem as me? first post does not have the cookies set? I'm not familiar with chrome source code, but if cookies work (because they do) but there is a case where they don't, it must be related to the temp redirect that happens when the Identity Provider redirects the user back to the website.
,
Oct 16 2017
Thank you for providing more feedback. Adding requester "susanjuniab@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Oct 16 2017
I too believe it is a chrome issue, as far as I could trace it Sustainsys.Saml2 is doing what it is supposed to do. However, I think the reason this has come to light is the AspNetCore 2.0 implementation. Either .net Core 2.0 functionality is different enough from full framework (since I haven't heard of that issue with the "old" Kentor on netfx 4.61 so that this fails in Google Chrome, or Sustainsys' implementation has changed with the switch to .net core. Either way, it works just fine in multiple browsers, so it's likely chrome having a complicated bug.
,
Oct 21 2017
It's normal SameSite cookies behavior due to the new defaults in ASP.NET Core 2, not a problem with Chrome. https://github.com/Sustainsys/Saml2/pull/822
,
Oct 23 2017
Issue can be closed since Sustainsys Saml2 library now changed SameSite to SameSiteMode.None. Thanks to all.
,
Oct 24 2017
As per comment #7, closing this issue. |
|||
►
Sign in to add a comment |
|||
Comment 1 by susanjuniab@chromium.org
, Oct 11 2017Labels: Needs-Triage-M61 Needs-Feedback