193 points · by Mojah · 9y ago · 210 comments
I don't know why people thought they could start using random TLD's on their own, there was always the risk they could be delegated officially.
https://www.iana.org/assignments/special-use-domain-names/sp...
For a long time, the set of non-country TLDs was mostly static, and country TLDs were always exactly two characters. The risk was always there, but it looked like it was only a theoretical risk, until recently the floodgates opened and nearly every TLD became fair game.
There's been plenty of time to fix things, but as usual, people will delay and only fix things when they break. Hence ICANN's Controlled Interruption process.
So "recently" is even more relative than that. (-:
For years, Microsoft's own guidelines suggested using .local for internal AD domains. Then one day, Apple started using it on mDNS, and Microsoft advice was suddenly "never use .local".
But renaming an AD domain is painful and in many scenarios not supported at all, and people with domains more than a few years old are regularly pointed at Microsoft's recommendations and forced to explain the situation.
And on BSD/Linux (with avahi). And on Phones. Actually, I think ONLY windows does not use this, though the mDNS implementation (bonjour) for windows uses that too.
I haven't tried it, but supposedly you could host a .local site on your laptop and access it from your phone using the same wifi network.
It stuck, annoyingly, like a misinformed fad that won’t go away.
I agree btw - .test or .local - anything else is just asking for problems
Does anyone have a solution for this?
If a company has its own internal network with its own DNS, does it still need to conform to ICANN's name assignments? I thought it doesn't...?
First, you will begin leaking internal data by means of DNS requests, server connections, maybe even internal emails - e.g. when a client attempts to connect to the intranet outside of VPN.
Second, you obviously won't be able to communicate with the new owners of that domain.
Probably better to just use real globally delegated domain names though.
ICANN can't keep names unique if people just take them.
Rewriting/expanding the statement using my words, this is what they said: "I don't know why people (developers) thought they could start using random TLDs for local/testing purposes".
Yes, Google got the TLD and controls it now. The GP isn't criticizing Google (although I still think "we bought a TLD for internal use" is worth debating), they criticize people like the blog author for using 'random' (i.e. "not meant for that purpose") TLDs in their development process.
The problem here is that Chrome works around that system, which causes pains for others.
The best practice for at least the past decade has been to either use subdomains of globally resolving domains that you own, or use one of the four testing TLDs specified in RFC 2606 that are guaranteed to never be delegated: https://tools.ietf.org/html/rfc2606
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'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's Encrypt.
However besides that...just curious: Will Chrome honor a header to disable HSTS for preloaded domains? (e.g. Strict-Transport-Security: max-age=0)? And what is going to happen if I submit my .dev site for removal from https://hstspreload.org/ ?
Also, reading the rules on hstspreload.org, I see the following statement: "Don't request inclusion unless you're sure that you can support HTTPS for your entire site and all its subdomains the long term"
Since you cannot actually guarantee that every .dev site will support HTTPS considering the fact that many developers use it on their LAN...don't you think you're breaking the rules here and possibly causing more problems than solutions?
My understanding is that HSTS carveouts are supported by Chrome but not yet other browsers. There's more standardization work to be done there. That said, you can only request entries on the HSTS list for domains that you own, and since no one (yet?) owns any .dev domain names, no one could request such changes. It goes without saying why you can only change security settings for domain names that you own.
And for the last question: Again, there are no .dev domain names. There never have been. It's never been available for registration. The recommendation for a long time has been to only use either (a) domain names that you actually own, or (b) domain names that are reserved for testing and are guaranteed never to exist a la RFC 2606. Using domain names for testing that don't yet exist but could in the future is a huge security hole that you must fix now. Do it now while the domain names still fail to resolve. Once they resolve, and you don't own them, then your security situation gets a lot worse.
It is, however, in widespread practical use.
> The recommendation for a long time has been to only use either (a) domain names that you actually own, or (b) domain names that are reserved for testing and are guaranteed never to exist a la RFC 2606
If taken to its extreme, that recommendation would mean that any kind of internal hostnames - even dotless ones - are subject to potential override unless they are tied to a public DNS entry.
I disagree that this is something that Google needs to do on my behalf. If a cybersquatter squats on <my-startup>.dev, I don't consider it broken if I can't access their squat page. If I'm overriding random domains without doing my due diligence, then I get what I deserve (and probably wanted the results anyways). If somebody is spoofing a domain as a method of cyber attacking, the domain owner should have had HSTS if they had dignificant digital assets and they would already be using a non .dev domain.
The intention when registering such a domain name would be to follow said requirements, otherwise you wouldn't be able to use the domain name for hosting websites (though you could of course still use it for other services).
I.e., could you actually use your own certificate for a .dev site or would the browser only accept Google's?
Well, many people think that current TLS is too complicated and in part that discussion led to TLS 1.3. While I'm still not entirely happy with the complexity, it is far less complex than TLS 1.2.
TLS 1.3 removes a lot of the options that 1.2 had.
More broadly, I think it's worth incurring some inconvenience for the sake of security. Go too far in the other direction and you end up like Equifax.
Forcing security at multiple levels and making HTTPS easier is the way forward.
https://tools.ietf.org/html/rfc6698
Not really an alternative to HTTP+TLS, but possibly another way of doing it depending on how it's implemented.
Since it appears that .dev is a Google internal TLD, would you consider not forcing that rule outside of Google? Effectively, we're getting all the stick and none of the carrot.
Alternately, announce your plans for .dev so as to bring some transparency to the process OR purchase maybe the .vm TLD and mark it for developer local testing in place of/addition to .localhost.
You should not be using globally delegated TLDs for local testing. See RFC 2606. I don't see how using .localhost or .test is any more of an inconvenience than using .dev. Indeed it is less of an inconvenience because it will work without DNS shenanigans.
The last round of gTLD expansion occurred in 2012 and there's still many years left until a potential future round. Additionally, .vm is not a valid gTLD because all two letter combinations are reserved for ccTLDs (countries).
And I would love to have some plans to announce. Maybe soon.
I'd be less unhappy about this if web browsers (and application updaters) understood x509 ca cert limits, so you could tell a device to trust the lan cache to impersonate Debian.org, windowsupdate.com and BBC.com - but not Gmail.com...
For example, I see that .dev has a DS record in the root. But nic.dev is not signed.
For reference your options are:
.test
.example
.invalid
.localhost
https://tools.ietf.org/html/rfc2606With only .localhost fitting the purpose of most people's usage of .dev.
Try:
dig any localhost.dog
dig any thing.localhost.dog
dig any you.want.localhost.dog
I find it useful, though its uses are admittedly limited. TTL is 30 days, but some resolvers (e.g. Google's 8.8.8.8, 8.8.4.4) dial it back to 1 day.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.
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.
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.)
One thing I'm not quite sure about is if this means we need to be using the same wildcard cert for both dev and prod? I don't suppose the cert can be considered valid by the browser if otherwise?
If that's the case, I'm wondering if there are any best practices around securely distributing valid production certificates to dev machines across a team and keeping them up-to-date with Let's Encrypt's auto renewing mechanism? Ideally in a way that's transparent to each individual developer? I'm guessing committing them directly into a repo is probably a bad idea, especially for open source projects.
https://letsencrypt.org/2017/07/06/wildcard-certificates-com...
Client support isn't super awesome from what I understand but it's much better than having an unconstrained root ('keys to the internet') on >1 client - especially if you can't go the nines to protect said key.
Distributing your private SSL certificate to everyone in the company is a bad idea.
.foo is delegated and thusly a full TLD, yes.
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.
I find .test or .intranet to be more useful for such installations, they are either designated as "cannot be a TLD" or are very very unlikely to become a TLD, respectively.
* DEV is listed on the "delegated strings" page of ICANN[0]
* `dig dev. ns +short` returns a couple of nameservers, the one of Charleston Road Registry: Google's registry.
[0]: https://newgtlds.icann.org/en/program-status/delegated-strin...
The ICANN Wiki specifically lists the .dev domain as proposed, not delegated. Which means they can also just kill it and Google won't have it.
* On https://www.icann.org/resources/agreement/dev-2014-10-16-en you can see the agreement between ICANN and Charleston Road Registry to operate the TLD for 10 years
* other pages on the wiki for TLDs that you can already register now still shows "proposed"
Or, making a tradeoff from "accuracy" to "less magical" - ".chrome-hsts"
I have heard this before, but not really seen any great arguments as to why. Sure, `localhost` should not be bound to anything other than loopback, but I don’t see the harm in remapping `whatever.localhost` to the IP address of the Vagrant box running on your local machine.
The problem is that while the loopback addresses can be mapped as a secure context, even without HTTPS, .localhost. cannot since it might not be a loopback context.
You can literally use anything else to map to your vagrant box including "whatever.i-dont-care" and "whatever.whatever".
Remapping .localhost. destroys the implicit assumption of many developers that a .localhost. means loopback and rightfully the above draft proposes to force any resolve to either fail or resolve to loopback.
* Publish mDNS records to give myself extra `.local` names, or * Get a wildcard published in the organisation's internal DNS
If you can't do either of those, _please_ use `.test` as your test TLD, as it's explicitly set aside for that purpose so you know you're never going to collide with anyone.
I wrote such a tool:
https://github.com/bertjwregeer/mdns-announce
It allows you to easily announce CNAME's in mDNS to do the sort of dev testing locally that requires alternate domains, without the possibility of leaking them outside of your own local network.
https://github.com/bertjwregeer/mdns-announce
It publishes CNAME records into mDNS for adding additional "hostnames".
I've hacked together an Apache module that tries to announce local hostnames for vhosts, but while it's good enough for me it's never been quite good enough for me to share.
That means your local development machine needs to;
- Be able to serve HTTPs
- Have self-signed certificates in place to handle that
- You'll have to click through the annoying unsecure site window every time
Such fun.
Part of HSTS is the requirement that certificate warnings become unskippable. So the above wouldn't work - you'll need an actual CA-signed certificate that is accepted by the browser, otherwise, you won't be able to access the site.
".localhost" has existed and been popular for local development for MANY years. I've no idea why somebody would use `.dev, but now that it's a registered TLD, using it locally is just asking for trouble.
Also, you can just use 127.0.0.1, 127.0.0.2, 127.0.0.3, etc.
(Well technically you can, but it would be confusing ;)
If only. Those days are long gone.
These days the majority of web-developers I see exclusively use Chrome and test in nothing else.
Google seems to be encouraging this behaviour too, with web-pages promoting people use unfinalized APIs found only in Chrome for production websites. It's the new MSIE, for sure.
From the homepage "That’s it! Your app will be up and running at http://myapp.dev/. See the user’s manual for more information."
I'm sure basecamp won't love this change and I'd guess many rails devs won't like this either.
It's a bit unnerving that the project hasn't seen an update since 2014, and has 100 open issues.
I wouldn't register any dev domains though these are supposed to be throwaways based on the project (my "serve" script takes the folder name and uses that plus .dev as a domain)
I'll just switch to .test as recommended elsewhere
We do not use .dev locally.
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.
Application software SHOULD NOT recognize test names as special, and SHOULD use test names as they would other domain names.
We have an automated setup of it for devs, but it's out of necessity rather than anything else. It's a pain to deal with.
The real issue (for me at least) is that it's far too much of a pain to run an SSL secured site locally. It can be done, but doesn'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'm sure web developers and browser vendors are trying to resolve the problem already, but it can't come soon enough in my opinion.
Sorry for top-leveling a grand-child comment, but reading between
the lines, this is the attack vector:
> And for the last question: Again, there are no .dev domain
> names. There never have been. It's never been available for
> registration. The recommendation for a long time has been to
> only use either (a) domain names that you actually own, or (b)
> domain names that are reserved for testing and are guaranteed
> never to exist a la RFC 2606. Using domain names for testing
> that don't yet exist but could in the future is a huge security
> hole that you must fix now. Do it now while the domain names
> still fail to resolve. Once they resolve, and you don't own
> 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're also concerned about
ninja-assassin-usb-stick-droppers, and all kinds of other use
cases.
What they're doing is:
1) Requiring *.dev to match PRE-LOADED HSTS certs. This allows
google to "safely" boot up a computer from scratch. Just so long
as "clone-a-computer-from-scratch.dev" matches the
public/private handshake for HSTS/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 "as secure as possibly known".
2) Forcing people to bounce "off" of invalid TLD'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 "\*.haha-now-your-company-infra-is-pwnd"
which they somehow glean is the gTLD your developers use for
local development / testing / intranet portal.
If you could spoof IBM's intranet by doing something like:
"http://www.welcome.ibm" or "https://www.welcome.ibm" (b/c the
*.ibm wasn't cert-pinned.....) then you could trivially cause
*.ibm to resolve to some sort of spoofed site to collect
passwords. Or what if they're catching `mysql -uroot -pxyz
staging.product.ibm`? Whoops.
Or... perhaps another gTLD we'll see google register is "*.go" or
maybe their internal builds of chrome already do cert-pinning on
that. (Reason is I've seen/heard they allow
'http://go/my-internal-shortlink' ... 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 "Down for Maintenance" banner is
real or fake if their DNS is controlled by somebody who really is
your enemy.There is something about how you've formatted it that requires unreasonable side-to-side scrolling.
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.
It's Google's browser forcing one of Google's own gTLDs to HTTPS. There is no masses involved. Anything else on the HSTS preload list is there at the request of the domain or gTLD owners.
> Amazon was 100% HTTP for 20 years (except the single login page) - it worked very well.
Sure it did! It also allowed any interested party to observe all your interactions with Amazon. What worked 20 years ago doesn't necessarily work today. Standards evolve, new attack vectors emerge, and people's needs for privacy or what they expect to be private changes.
Plus this isn't even the governments intervention, this is browser vendors raising the bar for online security.
https://sites.google.com/a/chromium.org/dev/Home/chromium-se...
I use .local for, well, my local network and I find that Chrome can't find them half the time (telling me that the server can't be found or that I don't have internet connection). Safari, Firefox and even command line tools find them without skipping a beat while Chrome insists that I'm offline.
I think the culprit is the internal DNS cache. If, for whatever reason it can't find the server once, then it gets stored in the cache as unreachable and needs a cache flush to fix. To add insult to injury, in previous versions of Chrome you could disable the internal DNS system, but apparently not anymore.
This is a good thing, of course. Security should be global, not dependent on what browser you happen to use.
Also, wouldn't bundling (tens of) thousands of domains start to add up, and slow down first page load for regular browser use?
I'm sure I must be missing something, because this doesn't seem very logical to me.
.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.
And specifically, the wildcard DNS entry for 127.0.53.53 is for ICANN's Controlled Interruption process. See here: https://www.icann.org/resources/pages/name-collision-ro-faqs...
(And why is Google in the TLD market at all? Google’s already far too large as company – impossible to democratically control, any further growth of Google should be immediately and forcefully stopped).