Documentation
¶
Overview ¶
Command hello-server serves one mutually authenticated JSON endpoint and reports who called it.
It is the same binary under both mTLS profiles: -profile pki reads callers from a standard CA's client certificates, -profile spiffe from X509-SVIDs. Everything below the flag parsing is profile-blind, which is the point — purser hands back a *tls.Config and an authenticator, and a server does not need to know which idiom verified the peer.
Two listeners, deliberately:
- -addr serves the mutually authenticated API. A peer that cannot present an acceptable certificate never reaches a handler.
- -admin-addr serves /healthz in plaintext, on a separate port, for Kubernetes probes. A kubelet has no client certificate, so a probe against the mTLS port could only ever fail — and lowering the mTLS port's requirements to let it through would open the API to anyone who can reach the port. Bind it to the pod, not the network.