Do you want to put a web page on a .local address to do something cool for your household or club? Here's the list of browser features that browser vendors have decided you're just not fuckin' allowed to use. https://developer.mozilla.org/en-US/docs/Web/Security/Defenses/Secure_Contexts/features_restricted_to_secure_contexts

Some random site halfway around the world, served over https with a robo-verified certificate, is allowed, though, so take some comfort in that.

Features restricted to secure contexts - Security | MDN

This reference lists the web platform features available only in secure contexts — see Secure Contexts for a definition and more details.

MDN Web Docs

There's a discussion thread about allowing RFC 1918 addresses and their ip6 equivalents to participate in secure contexts at https://github.com/w3c/webappsec-secure-contexts/issues/60 . It is _eight years_ old without resolution.

I can't find any discussion at all on allowing the user to designate certain origins as secure contexts. Maybe that's a thing for some browsers.

Using secure-context gated features with local devices · Issue #60 · w3c/webappsec-secure-contexts

As proposed here which is continuing on from w3ctag/design-principles#75: It should be possible for people to create devices that are located on home networks that use modern browser features. One ...

GitHub
The recommendation in that thread is to run a private CA for your LAN. Anyone who has experience doing that outside of a managed (i.e., corporate) network will tell you how hilariously useless that advice is.
@owen I use acme-dns authorized subdomain certificates on my lab, this is nearly as unreasonable as running a CA for my home network. And I have run one on a corporate network.

@ryanc @owen I mean I have my own local CA with two different intermediate CAs, but I also run my own DNS.

And I need the CA to issue client certificates to VPN clients (I have a ban on password authentication, to the extent supported by the service, for anything network reachable). Once you have that infrastructure in place also issuing your own HTTPS certs is straightforward enough.

But it's certainly not something the average person wants to deal with.

@azonenberg @owen I run my own mail server, and the Wi-Fi at home, that is my limit.

@ryanc @owen I don't run my own mail, mostly because I'm on a DOCSIS pipe that (despite being a static) is probably part of a larger netblock that's on spam blacklists.

At some point maybe I'll look at getting a box in a colo or something to do that but right now I don't have time to deal with the hassle of actually making my mail be delivered.

I do want to move to a managed mail host that is anything-but-ms365 though, since my previous mail host rolled up their in house operation and turned into a 365 reseller

@ryanc @owen but like, for scale my internal BIND zone file has 177 A records in it, split across 20 subnets. This is not a small network so an internal CA is a tiny amount of management overhead compared to everything else.
@azonenberg @ryanc @owen For outgoing mail you can tunnel the connection thru a non-shitlisted IP while still terminating TLS on your side. I'm planning to add functionality to do this to mxclient. Using SOCKS proxy or pipes with ssh -W.
@ryanc @owen With DNS-PERSIST-01 it'll be easy to get real certs for your LAN-only devices.
@dalias @ryanc @owen Thems fighting words.
@dalias @ryanc @owen Only if your LAN is connected to the internet somehow.
@dalias @ryanc @owen With the right tooling, even DNS-01 isn't the worst.
@jima @ryanc @owen I just consider DNS-01 a giant weakness/violation of access controls. Automated processes should never have access to modify DNS, especially when that often (for non experts) means credentials to registrar.
@dalias @ryanc @owen I completely agree, which is why I CNAME the _acme-challenge records off to a distinct zone, which the automated process DOES have access to modify. 😀

@jima @ryanc @owen Yep, that's the right way to do it.

Prior to DNS-PERSIST-01 announcement, I had an even fancier plan in the works: delegating _acme_challenge to a public server (run as a public service) with a DS whose key is held by your device that wants certs. When you need to do the ACME dance, the device would send a DNS packet to the public service, which would cache and serve it for up to some short time limit.

I never got around to implementing it, and once DNS-PERSIST-01 was announced, I dropped the idea because it's no longer needed.

@dalias @ryanc @owen In my case, the delegated server is PowerDNS with an SQL backend, and my validation hook script just adds a row to the records table, remotely over TLS (which is itself provided by a Let's Encrypt cert 😅).
@dalias @jima @ryanc @owen Well the challenge allows to delegate to another zone/nameserver (what I do here), but it's probably not the most typical setup.
@lanodan @dalias @ryanc @owen It's always so nice to meet other DNS weirdos. 🥰
@lanodan @ryanc @owen @jima Yeah everyone just gives their webservers credentials to transfer all their domains to an attacker... 🤡

@ryanc @owen we're trying to figure this out for the local makerspace

Do not recommend

@astraluma @ryanc @owen closest I've been able to get is:

- real domain
- tailscale (headscale actually) with local tunneling
- wildcard subdomain pointing to IP on tailnet
- DNS-01 wildcard cert
- internal DNS that just lies, served on both the tailnet and LAN
- internal sites use the wildcard cert

it... works? no, it works. end result is that a random device on the LAN without tailscale can point a browser at https://whatever-the-fuck.subdomain.bleh, and it ends up talking to a real webserver over TLS. Firefox even gives it the thumbs up.

however, this is not a place of honor. no great deeds are recorded here.

@astraluma @ryanc @owen I feel shame, but at least that shame is TLS terminated.
@owen that's the network engineer version of "I'm praying for you," isn't it?
@owen lol I gave up on doing that and I run my own mailserver, so yeah I have quite a bit of tolerance for technical pain
@owen I don’t find it that bad with #stepca. It’s not exactly trivial, but it’s possible. If more things I run — or want to run — had a “step” client or #acme (and not just support for #LetsEncrypt), it would be much easier.
@jaharmi @owen And load the root cert into every device in the LAN including guests? (See mention of "club" in first post)
@owen @becomethewaifu Sir, I have experience doing that *inside* of a managed (i.e., corporate) network, and I'll +1 your "how hilariously useless that advice is" point.
@owen Is it still that bad now we have ACME?

@nik ACME issuers are a huge usability improvement for TLS on the public internet but I’m not aware of any that will issue for private networks, unless those private networks correspond to a public internet domain or service.

Which is kind of my point. Any sketchy internet site can authenticate strongly enough for your browser to let it send notifications or use a gamepad, but a server ten feet away needs a fully managed network to do the same thing.

@nik in some contexts you just plain can’t. If the Switch’s browser supports the Gamepad API, you could host a browser based game on the internet, but there’d be no way at all to host it on your LAN. The Switch doesn’t support user supplied trust roots without violating your warranty.