HSTS header on gov.uk not recorded/honoured
Reported by
david.il...@digital.cabinet-office.gov.uk,
Mar 10 2017
|
|||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36 Steps to reproduce the problem: 1. Visit http://gov.uk 2. Watch redirects and things happen 3. Visit http://gov.uk again with the developer tools open and see that the raw HTTP request is still made What is the expected behavior? HSTS is honoured (the max-ago is 3600 seconds), so a plain HTTP request isn't made again within that period What went wrong? https://gov.uk is serving an HSTS header with a max-age of 3600 seconds. This is not being recorded by Chrome. From investigation, it's not being added to the TransportSecurity file, nor is it accessible by chrome://net-internals/#hsts If gov.uk is added manually, it works correctly. I can't find any documented reason why this isn't working (and it works in other browsers) so I assume it's a bug Did this work before? N/A Does this work in other browsers? Yes Chrome version: 56.0.2924.87 Channel: n/a OS Version: OS X 10.12.3 Flash Version: Shockwave Flash 24.0 r0
,
Mar 10 2017
We do have HSTS headers on www.gov.uk: they are working as expected. We've just added them on the raw gov.uk domain (which forwards to www.gov.uk), and it's for this domain that the header value isn't being stored/honoured. ~|⇒ curl -vv https://gov.uk 2>&1 | grep max-age < Strict-Transport-Security: max-age=3600
,
Mar 10 2017
Looks like you're right. It may be because gov.uk is a registry controlled domain (i.e., foo.gov.uk and bar.gov.uk can't share cookies, so it's kind of a magic domain, as foo.gov.com and bar.gov.com can share cookies). This may also be affecting the HSTS logic, not sure. I'll defer to the domain security policy owners.
,
Mar 10 2017
Yea, think that's the issue - while we accept the certificate, it runs afoul of a "non-unique" name check, since it's for the registry controlled domain itself, so we don't allow it to be added to the HSTS list. No idea if this behavior is desired or not.
,
Mar 10 2017
(More particularly, it ran into the IsCertStatusError check in url_request_http_job, just above where we process the Strict-Transport-Security header)
,
Mar 10 2017
Yup, comment #4 is spot on. .gov.uk is still in the PSL - https://github.com/publicsuffix/list/blob/master/public_suffix_list.dat#L6181 Moving it from the ICANN section to the PRIVATE section would permit this, for example, if the registry does indeed permit/allow/expect an A record at "http://gov.uk"
,
Mar 13 2017
@mmenke: can you explain what you mean by a "non-unique name check" in this situation? We want to understand the ramifications of moving the domain from the ICANN to the PRIVATE section in the PSL.
,
Mar 13 2017
The comment for the method to determine if a name is "unique" is: // Returns true if |hostname| contains a non-registerable or non-assignable // domain name (eg: a gTLD that has not been assigned by IANA) or an IP address // that falls in an IANA-reserved range. I don't know the motivation for the logic.
,
Mar 13 2017
@Comment 7: We can happily follow up on https://github.com/publicsuffix/list (I'm a maintainer over there, so you don't have to reexplain the issue :P) The motivation is the CA/Browser Forum's prohibition of "internal server names" and non-registerable domains. That is, you don't want a valid, publicly trusted certificate for https://webmail issued. This is because there's no way to validate "webmail" is unique and unambiguous - because it's neither an ICANN-delegated gTLD or an IANA-assigned [cc]TLD. Similarly, you don't want a misissued certificate for "*.com" to be issued (which is actually a common target for CA compromise events), because then the certificate could be valid for "google.com", "yahoo.com", "microsoft.com" all at once. So there are checks in place to ensure that the name portion indicates it is a registrable domain (e.g. operated by a registrant through agreement with a registry), that it's not for the registry itself (e.g. "http://com"), and that it's a valid TLD (e.g. not "http://webmail"). I'm surprised that navigating to https://gov.uk even works at all - I thought we (intentionally) blocked navigations to the ICANN portion of the public suffix list, but I could be misremembering. Either way, the change would go in the PSL, which provides the ability to distinguish between such cases.
,
Mar 13 2017
#9 - I reckon gov.foo is a special case in all of the countries. gov.il also works, for example. (I was always surprised by the existence of that domain as a full domain name)
,
Oct 16 2017
@rsleevi -- A gentle ping, is there any update on this issue. Thanks!
,
Oct 16 2017
Given comment #9, I expect this would be WontFix. As a workaround, I'm happy to preload gov.uk (with or without subdomains) if you want HSTS to work for that domain.
,
Nov 2 2017
As per comment #12 marking it as wont fix, please reopen or raise a new issue if this is a valid bug. Thanks! |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by mmenke@chromium.org
, Mar 10 2017