Live data from Hacker News

Running one’s own root Certificate Authority in 2023

wejn.org

41–50 of 164 posts

Re: Running one’s own root Certificate Authority in 2023

#41

I really like step[1] and step-ca[2] for this, it's a lot less fiddly than having to drive OpenSSL directly. 1. https://github.com/smallstep/cli 2. https://github.com/smallstep/certificates

And they support ACME. I've been running a smallstep CA off of a Nitrokey HSM 2[1] w/ PKCS #11 for my homelab for a few years now

1. https://shop.nitrokey.com/shop/product/nkhs2-nitrokey-hsm-2-...

Re: Running one’s own root Certificate Authority in 2023

#42
post #9

Earlier quoted context omitted.

The one thing you can’t do with Let’s Encrypt is generate a certificate with a CN of localhost which, since browsers are getting really picky about mixed HTTP/HTTPS content, is a real issue with local development using certain web features.

You also can't generate a cert for a double wildcard, like mydomain . com . * . * Or an entire domain, although I'm unsure if that is possible with your own CA as well

You can generate the certificate but browsers don't like multiple wildcards. Any application following the rules set out by RFC 6125 should reject multiple wildcards as far as I can tell.

Some browsers (notably Firefox) used to support multiple wildcards, but then again it also trusted domain certificates signed by other domain certificates for years, so that's not much to go by. These days, I don't think a single browser will accept ..foo.bar.

Re: Running one’s own root Certificate Authority in 2023

#43
“Cultural” technical issues are so frustrating to me. A certificate is fundamentally just a type of credential, like a password, but for historical reasons they’re treated like getting citizenship papers. There’s always this ceremony even in scenarios where it makes zero sense — such as internal-use certificates used for a gRPC API server behind a load balancer.

Why - for the love of God why - can’t I just obtain a cert like this directly out of a secret store such as an Azure Key Vault!?

These things are already full hardware security modules (HSMs) with all of the capabilities required to run just about anything short of a public Root CA and maybe even that too.

But no.

NO!

Script it yourself. Make a root cert, “upload” it, make a cert, sign it, upload it, link it, renew it, re-configure it, and on and on. Oh… you wanted a CRL too? A 1kb file? Ha-ha! No. Make it and host it yourself!!

It’s absurd.

So many services depend on a simple CA->cert setup: VPNs, API auth, load balancer back-ends, clusters, etc…

But my mark my words: no cloud will have a trivial turnkey solution this decade.

This is because running a CA is culturally accepted to be a hard problem. It is! If you’re DigiCert. It isn’t if you’re building a three-server internal use cluster. But the problem is hard, you see? That accepted fact! Everyone knows it! Ceremony is required. We can’t just hand your sever a 1kb credential file! That would be… unconventional!

It’s just not the way things are done, so stop asking.

Re: Running one’s own root Certificate Authority in 2023

#44

I eventually need to publish an article about how to run an HSM backed root CA on the cheap with m of n auth. Using nitrokey and some glue scripts you can get the cost below $500. If anyone is interested, let me know.

Please do

Re: Running one’s own root Certificate Authority in 2023

#45
post #40

Earlier quoted context omitted.

The one thing you can’t do with Let’s Encrypt is generate a certificate with a CN of localhost which, since browsers are getting really picky about mixed HTTP/HTTPS content, is a real issue with local development using certain web features.

Why not register a domain, get a cert for it, and point it at 127.0.0.1? Then nothing can complain.

The other advantage of running your own PKI is you can intercept and decrypt arbitrary traffic on the network.

Re: Running one’s own root Certificate Authority in 2023

#46
post #29
post #11

This is not really an Apple thing, it's an industry trend (and a good one IMO). Apple's generally applying the same criteria Chrome is: https://chromium.googlesource.com/chromium/src/+/HEAD/net/do...

Seems Chrome is specifically making an exception for custom root CAs though: > This will only apply to TLS server certificates from CAs that are trusted in a default installation of Google Chrome, commonly known as “publicly trusted CAs”, and will not apply to locally-operated CAs that have been manually configured.

Looking into it further, that's actually Apple's policy as well.

Re: Running one’s own root Certificate Authority in 2023

#47

“Cultural” technical issues are so frustrating to me. A certificate is fundamentally just a type of credential, like a password, but for historical reasons they’re treated like getting citizenship papers. There’s always this ceremony even in scenarios where it makes zero sense — such as internal-use certificates used for a gRPC API server behind a load balancer. Why - for the love of God why - can’t I just obtain a c…

This is a decent rant, and I mostly share your frustration.

But At least GCP and AWS have certificate authority products which essentially do work the way you want them to:

https://cloud.google.com/certificate-authority-service https://aws.amazon.com/private-ca/

Azure may well have one too, I just don't use their service.

Re: Running one’s own root Certificate Authority in 2023

#48

“Cultural” technical issues are so frustrating to me. A certificate is fundamentally just a type of credential, like a password, but for historical reasons they’re treated like getting citizenship papers. There’s always this ceremony even in scenarios where it makes zero sense — such as internal-use certificates used for a gRPC API server behind a load balancer. Why - for the love of God why - can’t I just obtain a c…

This is a decent rant, and I mostly share your frustration. But At least GCP and AWS have certificate authority products which essentially do work the way you want them to: https://cloud.google.com/certificate-authority-service https://aws.amazon.com/private-ca/ Azure may well have one too, I just don't use their service.

Azure will let you tap into a HSM too
Post reply on HN