What does HackerNews think of cfssl?

CFSSL: Cloudflare's PKI and TLS toolkit

Language: Go

I've been using cfssl[1] to generate a root certificate + a localhost certificate and then trusting the root.

[1]: https://github.com/cloudflare/cfssl

There's been a ton of discussion on what constitutes "Trust" in the modern web world of late, but very little of it seems to have borne fruit. One minor advance Kubernetes formally adopting a proposal for a trust anchor[1][2]; Which is to say, a set of CAs that are equivalent.

Someone mentioned earlier that "At least we all agree that they're PEM and DER Formatted", to which someone mentioned that Java had it's own world, and ugh... That's a whole thing. Java has moved backwards in recent years; Their old Keystore format was useful for a single context, in that you could say "Here's the keystore for communicating with Google, it's got a list of public keys to trust and list of private keys that we are"; And that more or less worked with the tooling. The move to PKCS#12 moves to one unified bag with all your private and public keys mixed in and you have to specify which are which, which is theoretically better but in practice represents a configuration nightmare over just specifying separate files with the trusted CAs, our public keys, and our private keys. You still can't deliver a single PKCS12 file to all of your servers as a whole, because SafeBags aren't; They're DES encrypted, which is to say: Not at all[3], but at least it's clear that they aren't.

The right answer is basically what Cloudflare[4] and then Google Cloud[5] tried to do and failed: Create a single file-format for "Public Key and accompanying Private Key", and make it easy to extract the public key from many of those to form a list of CAs.

[1] https://github.com/kubernetes/enhancements/pull/3258 [2] https://spiffe.io/docs/latest/spiffe-about/spiffe-concepts/ [3] The actual Java recommendation is to use a single well-know DES key for all PKCS12 operations, which obviates all of the stated and even best-case-steelman arguments for why Java made this change, to the point that anyone defending the decision should probably not be trusted and the proposers were more likely malicious than stupid. That's a rant for a different post. [4] https://github.com/cloudflare/cfssl [5] https://cloud.google.com/docs/authentication/application-def...

cfssl is what I use, usually a root + intermedia ca, and leaf certs, works really well with cert manager in kubernetes.

https://github.com/cloudflare/cfssl

Here's some words Red Hat folks wrote[0] about Keylime[1][2], "open source scalable trust system harnessing TPM Technology,"[3] written in python and rust, originally created within MIT Lincoln Labs.[4] It leverages TMP 1.2 and 2.0[5] and also involves/includes/references code from Intel[6] and Cloudflare[7].

[0] https://next.redhat.com/2019/06/25/keylime-using-tpm-to-secu...

[1] https://keylime.dev/

[2] https://www.youtube.com/watch?v=Qhr_aVBCZPw

[3] https://github.com/keylime/keylime

[4] https://www.ll.mit.edu/news/laboratory-staff-develop-new-cyb...

[5] https://github.com/tpm2-software

[6] https://www.intel.com/content/www/us/en/architecture-and-tec...

[7] https://github.com/cloudflare/cfssl

check out Cloudflares CFSSL https://github.com/cloudflare/cfssl to manage the CA side, its API, and its OCSP

then check out Netflix Lemur for issuing and tracking certs automatically. https://github.com/Netflix/lemur

It sounds like using Let’s Encrypt makes sense for your use case since people are accessing these appliances via a web browser, but for “normal internal servers” the right answer is almost definitely to use your own internal PKI, not to use wildcard certs.

See:

https://github.com/cloudflare/cfssl

https://github.com/hashicorp/vault

https://github.com/smallstep/certificates

The disadvantages are:

it’s less secure — you’re trusting (many) third parties with your security and relying on the security of DNS

it’s less flexible — you can’t sign certificates with internal names (e.g., *.cluster.local) and certs must be for 90 days, etc

it’s kind of hacky — you have to work around rate limits and whatnot because Let’s Encrypt wasn’t designed for this use case

The advantage is it’s easier. But that’s arguable. What the article describes isn’t easy. Using something like cfssl (https://github.com/cloudflare/cfssl) or vault (https://github.com/hashicorp/vault) or step certificates (https://github.com/smallstep/certificates) (which I work on) is probably easier and definitely better for internal services.

You might also like cloudflare's cfssl toolsuite: https://github.com/cloudflare/cfssl

I've reduced most of my cert-generating to just a one-liner and a JSON metadata file. For example: https://twitter.com/shazow/status/582262725683777536

In a similar vein there is also CloudFlare's cfssl[0]. I'm curious to hear what people think about the differences.

0 - https://github.com/cloudflare/cfssl