TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Chrome to force .dev domains to HTTPS via preloaded HSTS

193 pointsby Mojahover 7 years ago

20 comments

noinsightover 7 years ago
.test is an official IANA reserved special-use domain name that will never be delegated out. Use it. Problem solved.<p>I don&#x27;t know why people thought they could start using random TLD&#x27;s on their own, there was always the risk they could be delegated officially.<p><a href="https:&#x2F;&#x2F;www.iana.org&#x2F;assignments&#x2F;special-use-domain-names&#x2F;special-use-domain-names.xhtml" rel="nofollow">https:&#x2F;&#x2F;www.iana.org&#x2F;assignments&#x2F;special-use-domain-names&#x2F;sp...</a>
评论 #15269758 未加载
评论 #15268935 未加载
评论 #15269033 未加载
评论 #15270493 未加载
评论 #15271309 未加载
评论 #15275471 未加载
评论 #15269865 未加载
评论 #15269913 未加载
评论 #15268942 未加载
CydeWeysover 7 years ago
Hey everyone. I&#x27;m the Tech Lead of Google Registry and I&#x27;m the one behind this (and likely future) additions to the HSTS preload list. I might be able to answer some questions people have.<p>But to pre-emptively answer the most likely question: We see HTTPS everywhere as being fundamental to improving security of the Web. Ideally all websites everywhere would use HTTPS, but there&#x27;s decades of inertia of that not being the case. HSTS is one tool to help nudge things towards an HTTPS everywhere future, which has really only become possible in the last few years thanks to the likes of Let&#x27;s Encrypt.
评论 #15269774 未加载
评论 #15269680 未加载
评论 #15269648 未加载
评论 #15270708 未加载
评论 #15269892 未加载
评论 #15270570 未加载
hartrorover 7 years ago
Use .localhost pointing at 127.0.0.1 for local development. It is reserved for this purpose and obvious to everyone unlike .test.<p>For reference your options are:<p><pre><code> .test .example .invalid .localhost </code></pre> <a href="https:&#x2F;&#x2F;tools.ietf.org&#x2F;html&#x2F;rfc2606" rel="nofollow">https:&#x2F;&#x2F;tools.ietf.org&#x2F;html&#x2F;rfc2606</a><p>With only .localhost fitting the purpose of most people&#x27;s usage of .dev.
评论 #15269572 未加载
评论 #15269224 未加载
hannobover 7 years ago
Just commented over at Matthias&#x27; blog, I&#x27;ll just copy-paste it here:<p>First of all I think this is generally a good move. If people use random TLDs for testing then that’s just bad practice and should be considered broken anyway.<p>But second I think using local host names should be considered a bad practice anyway, whether it’s reserved names like .test or arbitrary ones like .dev. The reason is that you can’t get valid certificates for such domains. This has caused countless instances where people disable certificate validation for test code and then ship that code in production. Alternatively you can have a local CA and ship their root on your test systems, but that’s messy and complicated.<p>Instead best practice IMHO is to have domains like bla.testing.example.com (where example.com is one of your normal domains) and get valid certificates for it. (In the case where you don’t want to expose your local hostnames you can also use bla-testing.example.com and get a wildcard cert for *.example.com. Although ultimately I’d say you just shouldn’t consider hostnames to be a secret.)
评论 #15269143 未加载
评论 #15268993 未加载
评论 #15269023 未加载
评论 #15269526 未加载
评论 #15269639 未加载
评论 #15269169 未加载
captainmuonover 7 years ago
They should do the opposite. There should be a .insecure domain where browsers accept HTTP or HTTPS with wrong or no certs, and pretend it is HTTPS with all consequences (e.g. loading of HTTPS third party resources). I wouldn&#x27;t put it on the open net, but rather let people set it up internally for testing.
tscs37over 7 years ago
Just as a note; .dev is not <i>yet</i> an official TLD, it&#x27;s on the status &quot;proposed&quot; which means that google is basically the highest priority on the waiting list.<p>.foo is delegated and thusly a full TLD, yes.<p>On the other hand, you should not be using .localhost if the target is not running on your loopback interface, resolving localhost to anything but loopback is considered harmful.<p>I find .test or .intranet to be more useful for such installations, they are either designated as &quot;cannot be a TLD&quot; or are very very unlikely to become a TLD, respectively.
评论 #15268821 未加载
评论 #15268820 未加载
评论 #15268819 未加载
andrewaylettover 7 years ago
For my development needs, I try to either:<p>* Publish mDNS records to give myself extra `.local` names, or * Get a wildcard published in the organisation&#x27;s internal DNS<p>If you can&#x27;t do either of those, _please_ use `.test` as your test TLD, as it&#x27;s explicitly set aside for that purpose so you know you&#x27;re never going to collide with anyone.<p><a href="https:&#x2F;&#x2F;tools.ietf.org&#x2F;html&#x2F;rfc2606#page-2" rel="nofollow">https:&#x2F;&#x2F;tools.ietf.org&#x2F;html&#x2F;rfc2606#page-2</a>
评论 #15268831 未加载
评论 #15270119 未加载
xg15over 7 years ago
The article mentions as workaround:<p><i>That means your local development machine needs to;<p>- Be able to serve HTTPs<p>- Have self-signed certificates in place to handle that<p>- You&#x27;ll have to click through the annoying unsecure site window every time<p>Such fun.</i><p>Part of HSTS is the requirement that certificate warnings become unskippable. So the above wouldn&#x27;t work - you&#x27;ll need an actual CA-signed certificate that is accepted by the browser, otherwise, you won&#x27;t be able to access the site.
评论 #15270568 未加载
评论 #15270950 未加载
hobarreraover 7 years ago
This is perfect and great. I&#x27;d love to see gradually (yes, GRADUALLY, without breaking anything!) all TLDs do this.<p>&quot;.localhost&quot; has existed and been popular for local development for MANY years. I&#x27;ve no idea why somebody would use `.dev, but now that it&#x27;s a registered TLD, using it locally is just asking for trouble.<p>Also, you can just use 127.0.0.1, 127.0.0.2, 127.0.0.3, etc.
评论 #15270372 未加载
Kiptersover 7 years ago
Another option is not using Chrome as the main dev browser. Firefox replaces it just fine.
评论 #15268973 未加载
评论 #15268952 未加载
0x0over 7 years ago
With all the hacks that people have put in place for using .dev locally, who in their right mind would want to even register and use a .dev domain? :P
评论 #15268940 未加载
评论 #15269389 未加载
ComputerGuruover 7 years ago
I’ve never used .dev - but going back five or six years we set up a .dev sub domain of our domain and use that exclusively for development.<p>dev.ourdomain.net is a web-accessible server on our local network, configured as the dns server for that sub domain and is our internal CA trusted to issue the certs we use for development.
donatjover 7 years ago
We have always used local.{site}.com as a sub domain rather than tld. Makes CORS rules simpler, and we actually have a real dns record pointing to 127.0.0.1 so we don&#x27;t have to bother with HOSTS
noway421over 7 years ago
With .test thrown around a lot, would there be any complementary support from browser vendors for that TLD to be specifically a development tld? localhost is recognised to be one by chrome for example, that&#x27;s the only domain where html5 geo api works without https, and &quot;your passwords are transferred via plain text&quot; is not displayed. In order to help shift to .test google might alter it&#x27;s heuristics to recognise .test as a common tld used for development.
评论 #15268961 未加载
bpicoloover 7 years ago
The main issue here is how much of a PITA it is to work with HTTPS locally (totally true that .dev is the wrong thing to use for dev boxes here). Self signing certs and forcing &#x2F;etc&#x2F;resolver&#x2F; configs is only half of it. Then you run into trouble with mobile emulators, proxying, etcetc.<p>We have an automated setup of it for devs, but it&#x27;s out of necessity rather than anything else. It&#x27;s a pain to deal with.
onion2kover 7 years ago
I don&#x27;t really see this as a problem. In fact, I wish Chrome would do that for <i>every</i> gTLD, but obviously that&#x27;s not going to happen any time soon. Secure by default would be great.<p>The real issue (for me at least) is that it&#x27;s far too much of a pain to run an SSL secured site locally. It can be done, but doesn&#x27;t work well across teams given you need to register your certificates locally. Being able to serve a site from a Vagrant box or a Docker container over https in a way that a browser will accept (or even just pretend to accept) would be immensely helpful. I&#x27;m sure web developers and browser vendors are trying to resolve the problem already, but it can&#x27;t come soon enough in my opinion.
评论 #15268999 未加载
apatheticonionover 7 years ago
*.localhost is a cool idea, would be cool if it allowed self-signed certificates as valid, or even have the browser do some magic and pretended it had an ssl certificate.
ramses0over 7 years ago
<p><pre><code> Sorry for top-leveling a grand-child comment, but reading between the lines, this is the attack vector: &gt; And for the last question: Again, there are no .dev domain &gt; names. There never have been. It&#x27;s never been available for &gt; registration. The recommendation for a long time has been to &gt; only use either (a) domain names that you actually own, or (b) &gt; domain names that are reserved for testing and are guaranteed &gt; never to exist a la RFC 2606. Using domain names for testing &gt; that don&#x27;t yet exist but could in the future is a huge security &gt; hole that you must fix now. Do it now while the domain names &gt; still fail to resolve. Once they resolve, and you don&#x27;t own &gt; them, then your security situation gets a lot worse. Google is concerned with nation-state attacks. This means they have to assume ninja-assassin-scuba-divers have tapped all their cables underground. They&#x27;re also concerned about ninja-assassin-usb-stick-droppers, and all kinds of other use cases. What they&#x27;re doing is: 1) Requiring *.dev to match PRE-LOADED HSTS certs. This allows google to &quot;safely&quot; boot up a computer from scratch. Just so long as &quot;clone-a-computer-from-scratch.dev&quot; matches the public&#x2F;private handshake for HSTS&#x2F;HTTPS then google knows that no MITM, no nation state DNS takeover, etc. is possible. So long as the VERY FIRST CONTACT WITH THE INTERNET is a *.dev domain, then that computer can be &quot;as secure as possibly known&quot;. 2) Forcing people to bounce &quot;off&quot; of invalid TLD&#x27;s as a network administration method. Remember, google is concerned about nation states. Remember wanna-cry? How it was disabled by some random researcher registering xyz-abc-123.com? That attack costs $15. Now imagine a nation-state, intentionally registering a gTLD of &quot;\*.haha-now-your-company-infra-is-pwnd&quot; which they somehow glean is the gTLD your developers use for local development &#x2F; testing &#x2F; intranet portal. If you could spoof IBM&#x27;s intranet by doing something like: &quot;http:&#x2F;&#x2F;www.welcome.ibm&quot; or &quot;https:&#x2F;&#x2F;www.welcome.ibm&quot; (b&#x2F;c the *.ibm wasn&#x27;t cert-pinned.....) then you could trivially cause *.ibm to resolve to some sort of spoofed site to collect passwords. Or what if they&#x27;re catching `mysql -uroot -pxyz staging.product.ibm`? Whoops. Or... perhaps another gTLD we&#x27;ll see google register is &quot;*.go&quot; or maybe their internal builds of chrome already do cert-pinning on that. (Reason is I&#x27;ve seen&#x2F;heard they allow &#x27;http:&#x2F;&#x2F;go&#x2F;my-internal-shortlink&#x27; ... I know that other tech companies have had similar setups). Same attack vector. You control the DNS, you control ALL responses. And when somebody types www.microsoft.com, it may be _impossible_ to know if that &quot;Down for Maintenance&quot; banner is real or fake if their DNS is controlled by somebody who really is your enemy.</code></pre>
评论 #15270397 未加载
frikover 7 years ago
I test with HTTP, locally.<p>This forcing of opinionated things goes on my nerves. How about develop the browser, and let the mass decide what they use. Amazon was 100% HTTP for 20 years (except the single login page) - it worked very well.
评论 #15269017 未加载
评论 #15269012 未加载
评论 #15269292 未加载
评论 #15269003 未加载
评论 #15269024 未加载
评论 #15268950 未加载
kuschkuover 7 years ago
The most annoying part here is that Google isn’t even using .dev as public TLD – they purely use it for internal testing, and all registered .dev domains resolve to 127.x.x.x addresses.<p>.dev should have been entirely reserved, or made available publicly. Registering a TLD just for your own internal testing, and forcing everyone to switch away, is the most user unfriendly move you can do.
评论 #15269507 未加载