5

I am trying to test fixes to a single sign-on process that is affected by Chrome's pending changes to the SameSite cookie attribute (see SameSite Updates).

I can enable these two features in chrome://flags to ensure that chrome exhibits the new behaviour:

SameSiteByDefaultCookies
CookiesWithoutSameSiteMustBeSecure

The above link also mentions this additional feature that I also need to set for my tests, to ensure my single sign-on process will continue to work for chrome 81+:

SameSiteDefaultChecksMethodRigorously 

However, that feature isn't present in the chrome://flags page. The link suggests I can enable it with a command line option:

--enable-features=SameSiteDefaultChecksMethodRigorously

But without the feature showing in chrome://flags it's hard to say whether that feature (a) exists, and (b) has been set.

I also tried setting the other two features from the command line:

--enable-features=SameSiteByDefaultCookies,CookiesWithoutSameSiteMustBeSecure

Again, it's hard to say whether this has worked as the features still appear as 'Default' in chrome://flags.

From chrome://version I can see the full command line, and that my option has been placed before the --flag-switches-begin option. So I tried again with this command line:

--flag-switches-begin --enable-features=SameSiteByDefaultCookies,CookiesWithoutSameSiteMustBeSecure --flag-switches-end

chrome://version now shows the command line as:

--flag-switches-begin --enable-features=SameSiteByDefaultCookies,CookiesWithoutSameSiteMustBeSecure --flag-switches-end --flag-switches-begin --flag-switches-end --enable-audio-service-sandbox

I.e. something is adding a second pair of --flag-switches-begin --flag-switches-end. And the features remain set to 'Default' in chrome://flags.

chrome://version

80.0.3987.42 (Official Build) beta (64-bit) (cohort: Beta)
Revision    fef3617f1566dc6972bc613792b56edb25311554-refs/branch-heads/3987@{#436}

Any ideas?

Thanks.

redcalx
  • 8,177
  • 4
  • 56
  • 105
  • 1
    Chrome/Chromium will add `--flag-switches-begin --flag-switches-end`. If you run Chrome normally w/o adding any flags, those switches will still be passed, which you can see in `chrome://version` page. AFAIK, if the switches are present in that page then those features have been enabled. – Asesh Jan 14 '20 at 03:45

1 Answers1

7

--flag-switches-begin and --flag-switches-end should not be manually added from the command line. They are automatically generated based on the settings in chrome://flags.

You want

--enable-features=SameSiteByDefaultCookies,CookiesWithoutSameSiteMustBeSecure,SameSiteDefaultChecksMethodRigorously
Soham Dasgupta
  • 5,061
  • 24
  • 79
  • 125
chlily
  • 2,637
  • 1
  • 8
  • 9
  • This doesn't seem to work anymore from the command line. C:\PROGRA~2\Google\Chrome\Application\chrome.exe --enable-features=SameSiteByDefaultCookies It opens chrome, but the flag is not enabled. Did chrome deprecate that switch? – Matthew Oct 21 '20 at 19:15