Past employers: Mesosphere, Capital One, CoreOS, Red Hat, among others
Exposed to Kubernetes in early 2015 and working with it full-time since late 2015
Currently a Solutions Engineer for (we're hiring!)
Issuer: C = US, ST = Oregon, L = Portland, O = Kubernetes, OU = CA, CN = Kubernetes
Validity
Not Before: Nov 16 18:11:00 2019 GMT
Not After : Nov 15 18:11:00 2020 GMT
Subject: C = US, ST = Oregon, L = Portland, O = Kubernetes, OU = Kubernetes The Hard Way, CN = kubernetes
Subject Public Key Info:
[...]
X509v3 Extended Key Usage:
TLS Web Server Authentication, TLS Web Client Authentication
X509v3 Basic Constraints: critical
CA:FALSE
[...]
X509v3 Subject Alternative Name:
DNS:localhost, DNS:kubernetes, DNS:kubernetes.default, DNS:kubernetes.default.svc, DNS:kubernetes.default.svc.cluster, DNS:kubernetes.svc.cluster.local, IP Address:10.3.0.1, IP Address:127.0.0.1
To have a CA issue a certificate, the subject generates a Certificate Signing Request with the first two items signed by its private key (to prove it possesses that keypair)
In its most basic version, it is:
X509v3 extensions:
X509v3 Key Usage: critical
Certificate Sign, CRL Sign
X509v3 Basic Constraints: critical
CA:TRUE
Certificate authorities typically use their root certificates only to issue intermediate certificates that are in turn used to issue end (leaf) certs.
Image: padlocked chainYou might be already and just don't know it -- many products include a CA to bootstrap themselves when certificates aren't provided; some even provide user access to issue certificates with an API. (Find out, because compromised or overly-exposed CAs are a game-over scenario.)
If you aren't, you may want (or need) to be under the following circumstances:
Generate a CA and use it to create proper leaf certificates: +10 points
Accept a user CA and key and use those to create leaf certs: +10 points
Handle certificate rotation (including CA) with minimal fuss: +20 points
Accept a user-supplied CA and set of leaf certificates and use them directly: +30 points
Bonuses:A lot of the problems people have with "TLS" are actually issues with the way running code implements abstractions on top of it:
People say the web of trust is too complicated to implement, then end up either reimplementing those exact concepts (but badly, with lots of caveats) OR simply punting and saying "you can't do that"
TLS trust requires a chain of signatures back to a trusted root to consider a certificate secure. If the root CA is not in the trust store, or there is an intermediate certificate that is untrusted or not provided to build the chain, the end certificate will be considered insecure.
Hostnames and IPs configured in the certificate are checked against the name/IP requested, and hostnames against the Canonical Name and SubjectAlternativeName (and there's some special handling around comparing those to each other).
IPs listed as names must match exactly - no IP wildcards.
Current time is checked against the beginning and ending time all certificates in the trust chain are valid for (set when the cert is issued).
Key pinning/certificate pinning: the client tracks and compares certificate info it saw the last time it made this request to the result this time -- changes are interpreted as an attack
Low-security configurations like self-signed leaf certs or use of weak algorithms like SHA-1 are often disallowed (and clients are getting stricter about this all the time)
Most commonly:
Client verification takes place on most control plane transactions
Usually this is set up using the same CA root, etc. as the server configuration, but this is not always true and there are reasons you might not want it to be
...those are why you're even bothering with all this, right?
Easy if you're centrally logging -- but even if you're not:
kubectl logs
for things running as Kubernetes pods
journalctl
for control plane components running as systemd services
openssl
is your Swiss Army knife when it comes to all things SSL/TLS
openssl x509 -noout -text -in [certificate file]
decodes a cert file and dumps it to stdout
openssl s_client -connect host:port -showcerts
connects live to an SSL endpoint and dumps cert blobs and info
The current X.509 standard: RFC5280 (note updates in header)
OWASP article on pinning
EFF article about detecting vendors installing "trusted" certificates to intercept and alter secure traffic
How to run a CA with OpenSSL
Kubernetes the Hard Way
Connor Gilbert's talk earlier today
Tomorrow's talk from Duffie Cooley and Nicholas Lane