Most active commenters
  • Hizonner(6)
  • infogulch(4)
  • szszrk(3)
  • move-on-by(3)

←back to thread

315 points Bogdanp | 49 comments | | HN request time: 0.736s | source | bottom
1. mocko ◴[] No.44379696[source]
I can see how this would work on a technical level but what's the intended use case?
replies(13): >>44379710 #>>44379735 #>>44379778 #>>44379786 #>>44379885 #>>44379946 #>>44380155 #>>44380377 #>>44380579 #>>44380856 #>>44381151 #>>44381389 #>>44386646 #
2. throitallaway ◴[] No.44379710[source]
I'm guessing mostly hobbyists and one-off use cases where people don't care to associate a hostname to a project.
3. BiteCode_dev ◴[] No.44379735[source]
Static ip for self hosting at home
replies(2): >>44380087 #>>44381743 #
4. ff317 ◴[] No.44379778[source]
It might be interesting for "opportunistic" DoTLS towards authdns servers, which might listen on the DoTLS port with a cert containing a SAN that matches the public IP of the authdns server. (You can do this now with authdns server hostnames, but there could be many varied names for one public authdns IP, and this kinda ties things together more-clearly and directly).
replies(1): >>44379851 #
5. bongodongobob ◴[] No.44379786[source]
Pretty common to have appliances without DNS entries in infra is my guess, I could def make use of this at work.
replies(1): >>44380905 #
6. jeroenhd ◴[] No.44379851[source]
It might also he useful to hide the SNI in HTTPS requests. With the current status of ESNI/ECH you need some kind of proxy domain, but for small servers that only host a few sites, every domain may be identifiable (as opposed to, say, a generic Cloudflare certificate or a generic Azure certificate).
7. teaearlgraycold ◴[] No.44379885[source]
Not common, but there is the use case of vanity IPs. The cert for https://1.1.1.1 is signed for the IP as well as the domain name one.one.one.one
8. szszrk ◴[] No.44379946[source]
Sometimes you want to have valid certs while your dns is undergoing major redesign. For instance to keep your dashboards available, or to be triple sure no old automation will fail due to dns issues.

In other cases dns is just not needed at all. You might prefer simplicity, independence from dns propagation, so you will have your, say, Cockpit exposed instantly on a test env.

Only our imagination limits us here.

replies(1): >>44380116 #
9. politelemon ◴[] No.44380087[source]
The validity is just 6 days, so I'd assume it's not for long lived use cases? Or am I misunderstanding something
replies(3): >>44380113 #>>44380153 #>>44381993 #
10. ◴[] No.44380113{3}[source]
11. Hizonner ◴[] No.44380116[source]
So go to keys-are-names.

There's no reason AT ALL to bring IP addresses into the mix.

replies(2): >>44380212 #>>44382552 #
12. meepmorp ◴[] No.44380153{3}[source]
they're only for publicly accessible IP addresses, so they'd work the same as regular letsencrypt certs - get a new one when the old one expires.
13. move-on-by ◴[] No.44380155[source]
Plenty of other responses with good use cases, but I didn’t see NTS mentioned.

If you want to use NTS, but can’t get an IP cert, then you are left requiring DNS before you can get a trusted time. If DNS is down- then you can’t get the time. A common issue with DNSSEC is having the wrong time- causing validation failures. If you have DNSSEC enforced and have the wrong time- but NTS depends on DNS, then you are out of luck with no way to recover. Having IP as part of your cert allows trusted time without the DNS requirement, which can then fix your broken DNSSEC enforcement.

replies(2): >>44380608 #>>44380660 #
14. szszrk ◴[] No.44380212{3}[source]
> So go to keys-are-names.

Elaborate, please.

> There's no reason AT ALL to bring IP addresses into the mix.

Not sure what scenario you are talking about, but IPs are kind of hard to avoid. DNS is trivial to avoid - you can simply not set it up.

"bringing IPs into the mix" is literally the only possible option.

replies(2): >>44380427 #>>44383376 #
15. infogulch ◴[] No.44380377[source]
Just ESNI/ECH is a big deal.

I recall one of the main arguments against Encrypted server name indication (ESNI) is that it would only be effective for the giant https proxy services like Cloudflare, that the idea of IP certs was floated as a solution but dismissed as a pipe dream. With IP address certificates, now every server can participate in ESNI, not just the giants. If it becomes common enough for clients to assume that all web servers have an IP cert and attempt to use ESNI on every connection, it could be a boon for privacy across the internet.

replies(2): >>44380676 #>>44380748 #
16. Hizonner ◴[] No.44380427{4}[source]
>> So go to keys-are-names.

> Elaborate, please.

Identify a service directly by its crypto key. When you configure something else to connect to it, treat the IP address as a hint, not the primary identifier for what it's talking to. Standard idiom.

... and before you tell me that that's infeasible because you'd have to modify software, go do a survey of all the code out there, and see how much of it supports IP address certificates. If you're moving around the parts of some big complex system, it's pretty much guaranteed that many of those parts are going to choke if you just blindly go and stick IP addresses in https:// URLs.

And if you're fixing the software anyway, then it's not sane to "fix" it to attach identity to something you're going to want to change all the time, like an IP address. Especially if they're global addresses (which are the only ones any Let's Encrypt or any other public CA is ever going to certify) in the IPv4 space (which is the only one any "enterprise" ever seems willing to use).

replies(2): >>44380759 #>>44380991 #
17. spelunker ◴[] No.44380579[source]
Might be nice for local/development environment work. Test HTTPS without needing to set up `my-dev-env.staging.service.com` or whatever.
replies(2): >>44380641 #>>44380802 #
18. Hizonner ◴[] No.44380608[source]
How are you going to validate an X.509 certificate if you don't know the time?
replies(3): >>44381483 #>>44382891 #>>44383899 #
19. martinald ◴[] No.44380641[source]
Yes definitely.
20. codys ◴[] No.44380660[source]
this seems possible to avoid as an issue without needing IP certs by having the configuration supply both an IP and a hostname, with the hostname used for the TLS validation.
replies(1): >>44381548 #
21. duskwuff ◴[] No.44380676[source]
> If it becomes common enough for clients to assume that all web servers have an IP cert

That's never going to be a safe assumption; private and/or dynamically assigned IP addresses are always going to be a thing.

22. Hizonner ◴[] No.44380748[source]
So is this the flow?

1. Want to connect to https://www.secret.com.

2. Resolve using DNS, get 1.2.3.4

3. Connect to 1.2.3.4, validate cert

4. Send ESNI, get separate cert for www.secret.com, validate that

... and the threat you're mitigating is presumably that you don't want to disclose the name "www.secret.com" unless you're convinced you're talking to the legitimate 1.2.3.4, so that some adversary can't spoof the IP traffic to and from 1.2.3.4, and thereby learn who's making connections to www.secret.com. Is that correct?

But the DNS resolution step is still unprotected. So, two broad cases:

1. Your adversary can subvert DNS. In this case IP certificates add no value, because they can just point you to 5.6.7.8, and you'll happily disclose "www.secret.com" to them. And you have no other path to communicate any information about what keys to trust.

2. Your adversary cannot subvert DNS. But if you can rely on DNS, then you can use it as a channel for key information; you include a key to encrypt the ESNI for "www.secret.com" in a DNS record. Even if the adversary can spoof the actual IP traffic to and from 1.2.3.4, it won't do any good because it won't have the private key corresponding to that ESNI key in the DNS. And those keys are already standardized.

So what adversary is stopped by IP certificates who isn't already stopped by the ESNI key records in the DNS?

replies(3): >>44381211 #>>44381247 #>>44382298 #
23. freeone3000 ◴[] No.44380759{5}[source]
The BSD networking stack treats an IP addr as a valid hostname for hostname resolution. As such, every phone, tablet, and computer able to do TLS by hostname can do it by IP. Try it out! Self-sign an IP certificate and try it on your local net. If you put it in the trust store, it’ll validate just fine. The only barrier to adoption was CAs refusing to issue IP certificates at large.
replies(2): >>44380835 #>>44380861 #
24. cpach ◴[] No.44380802[source]
But these are public certificates. Most personal computers are behind NAT, i.e. they lack a public IP address.
25. Hizonner ◴[] No.44380835{6}[source]
Um, the BSD networking stack I'm familiar with doesn't include TLS or X.509 validation at all. The question isn't what you get from gethostbyname. It's what you get when you hand that to your X.509 validator.
26. hypeatei ◴[] No.44380856[source]
One use-case is connecting to a DoT (DNS-over-TLS) server directly rather than using a hostname. If you make a TLS connection to an IP address via OpenSSL, it will verify the IP SAN and fail if it's not there.
27. mananaysiempre ◴[] No.44380861{6}[source]
Noot quite. DNS hostnames and IP addresses are encoded differently in X.509 certs: one is the dNSName option of the GeneralName choice type in the subjectAltName extension[1], the other is the iPAddress option. (And before you ask, tagging a stringified IP address quad as a dNSName is misissuance per the CA/Browser Forum Baseline Requirements[2] and liable to get your CA kicked from certificate stores. Ambiguous encodings are dangerous.) So some explicit support from the TLS library is indeed required. But I’m indeed not aware of many apps having problems with IP address certs.

[1] https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1....

[2] https://cabforum.org/working-groups/server/baseline-requirem...

28. Hizonner ◴[] No.44380905[source]
You're not going to be able to get a cert for any address that's not both (a) global, and (b) actually reachable from the Internet.
29. szszrk ◴[] No.44380991{5}[source]
> go do a survey of all the code out there, and see how much of it supports IP address certificates.

I've been doing that for years on onprem (~60% old "enterprise/legacy" ~40% modern stuff) and never seen anything that doesn't support it. YMMV, but if all I work with supports it, I won't complain in vain.

> those parts are going to choke if you just blindly go and stick IP addresses in https:// URLs.

I did many times, seems that legacy heavens were always kind to me in this regard.

> something you're going to want to change all the time, like an IP address

That's a personal assumption as well. If your architectures change IPs all the time, OK. Ones I worked with didn't. Always had plenty of components with IPs that didn't changed in a decade or two. Even my two previous local ISPs I had gave me "dynamic public IP" and kept them for many years. For some companies changing an ip of their main firewalls/load balancers or VPN servers is unthinkable.

Even on my last project on Public Cloud, the first thing I did was to make sure public IPs won't be dynamic (will survive recreation of services) so I don't have to deal with consequences of my corporate client endpoints and proxies flushing DNS caches randomly. (don't ask me why, but even huge companies still use proxies on a large scale. Good luck with figuring out when such proxy invalidates your DNS record).

> in the IPv4 space

IPv6 is here. Your printer and light bulb will want a cert as well.

30. charcircuit ◴[] No.44381151[source]
It helps break free of ICANN's domain name system. This enables for competitors to support https without needing self signed certs.
31. tptacek ◴[] No.44381211{3}[source]
Presumably you're encrypting DNS.
32. infogulch ◴[] No.44381247{3}[source]
Sure, I agree, the next increment in privacy comes with using DoT/DoH (in fact some browsers require this to use ESNI at all). Probably throw in DNSSEC next. Having IP certs is just one more (small) step in that direction.

> you include a key to encrypt the ESNI for "www.secret.com" in a DNS record

I've never heard of this, is this a thing that exists today? (edited to remove unnecessary comment)

replies(2): >>44381387 #>>44381625 #
33. gruez ◴[] No.44381387{4}[source]
>I've never heard of this, is this a thing that exists today? Are you arguing against one small step in a series of improvements by using a nonexistent hypothetical as evidence that the small step is unnecessary?

see: https://en.wikipedia.org/wiki/Server_Name_Indication#Encrypt...

replies(1): >>44381651 #
34. Am4TIfIsER0ppos ◴[] No.44381389[source]
The intended use case is to forbid plain http so that you can't communicate with the computer in the next room without 3rd party permission.
35. move-on-by ◴[] No.44381483{3}[source]
Oh this is a good point! Looking at my DNSSEC domain (hosted by CloudFlare) on https://dnssec-debugger.verisignlabs.com - the Inception Time and Expiration Time seems to be valid for... 3.5 days? This isn't something I look at much, but I assume that is up to the implementation. The new shortlived cert is valid for 6 days. So, from a very rough look, I expect X.509 certificate is going to be less time sensitive then DNSSEC - but only by a few days. Also, very likely to depend on implementation details. This is a great point.
replies(1): >>44383968 #
36. move-on-by ◴[] No.44381548{3}[source]
Yes, that is absolutely possible, but doesn't mean that will be the default. I commented recently [0] about Ubuntu's decision to have only NTS enabled (via domain) by default on 25.10. It begs the question how system time can be set if the initial time is outside of the cert's validity time-frame. I didn't look, but perhaps Chrony would still use the local network's published NTP servers.

[0]: https://news.ycombinator.com/context?id=44318784

37. tptacek ◴[] No.44381625{4}[source]
DNSSEC is an integrity control, not a privacy control.
replies(1): >>44381680 #
38. infogulch ◴[] No.44381651{5}[source]
Thanks.

> Another Internet Draft incorporates a parameter for transmitting the ECH public keys via HTTPS and SVCB DNS record types, shortening the handshake process.[24][25]

[25]: Bootstrapping TLS Encrypted ClientHello with DNS Service Bindings | https://datatracker.ietf.org/doc/draft-ietf-tls-svcb-ech/

39. infogulch ◴[] No.44381680{5}[source]
gp proposes a scenario where an integrity breach is lifted to a privacy breach, insisting on a strict distinction doesn't seem useful in this context.
replies(1): >>44383931 #
40. remram ◴[] No.44381743[source]
You can point a name at your home IP just as easily as any other IP.
41. XorNot ◴[] No.44381993{3}[source]
Certificate validity has no bearing on availability. It just keeps revocation lists short.
42. nine_k ◴[] No.44382298{3}[source]
The point is in not showing the watching adversary any DNS names at all. You do DoH, you do the IP cert, you enter TLS before naming any names. The www.secret.com is never visible in plaintext.

Only helpful if the IP itself is not incriminating or revealing, that is, it's an IP from a large pool like Cloudflare, GCP, AWS, etc.

To my mind, it's much more interesting to verify that an address like 1.1.1.1 or 8.8.8.8 is what it purports to be, but running UDP DNS over TLS is still likely not practical, and DoH already exists, so I don't see how helpful is it here.

43. nine_k ◴[] No.44382552{3}[source]
Consider Wireguard: it works at IP level, but gives you identity by crypto key. You can live without proper DNS in a small internal network.

(This obviously lives well without the IP certs under discussion.)

44. dgl ◴[] No.44382891{3}[source]
ChromeOS has a quite interesting design to do this: https://www.chromium.org/chromium-os/chromiumos-design-docs/...

Essentially: keep some minimum values for time. Then do a single HTTPS request, ignore the validation of the certificate's date to start with, but use the Date header to later validate it against minimum / maximum. This has the advantage it's still a HTTPS request, so can't be MiTM'd and depending on implementation it can validate the time quite well (even if the device has run out of power it can have saved a recent timestamp on disk, so with regular use of the device an old certificate won't be valid, keeping the main useful property of certificates having validity periods).

I don't believe it does this, but you could do this without DNS as 8.8.8.8, etc already have IP address certificates:

    curl -sI https://1.1.1.1 | grep -i '^date:'

    curl -sI https://8.8.8.8 | grep -i '^date:'

    curl -sI https://9.9.9.9 | grep -i '^date:'
It would need a custom tool though, as curl only has --insecure, not a way to avoid just the notBefore / notAfter validation of the cert.

(This is not the only thing to use this technique, OpenBSD's ntpd has a way to contrain time based on HTTP headers: https://man.openbsd.org/ntpd.conf#CONSTRAINTS -- the default ntpd.conf ships with Quad9 configured via IP address.)

45. arianvanp ◴[] No.44383376{4}[source]
https://yggdrasil-network.github.io/

Its a mesh routing network where your identity is your public key and your ipv6 address is derived from the hash of your public key.

Works perfectly

46. CaliforniaKarl ◴[] No.44383899{3}[source]
Assuming your device gets an IP via DHCP, there is a solution that does not involve hard-coding IPs into software.

DHCP option 42 (defined in RFC 2132) can be used to specify multiple NTP server IPv4 addresses.

(There’s also DHCP option 4, but that’s used to specify the IP for the older RFC 868 time protocol.)

DHCPv6 has option 31 for SNTP (via deprecated RFC 4075), and option 56 for NTP (via RFC 5908).

So, that would probably be the best option: Get an NTP address from DHCP or DHCPv6, use that to set your clock, and then do whatever you need!

(Yes, it does require that you trust your DHCP source, and its NTP reference.)

47. dcow ◴[] No.44383931{6}[source]
I think it’s a fair aside. One doesn’t just “throw in a little DNSSEC” in a security discussion without extreme care.
48. dcow ◴[] No.44383968{4}[source]
Practically, though, you rely on hardware time until you get network time.
49. ◴[] No.44386646[source]