π Internal TLS and mTLS
Your own servers and services need certificates too: the internal web apps, the APIs that call each other, the databases, the message brokers. A public CA can't issue for names that only exist inside your network, and a self-signed certificate per service means every client has to trust every service one by one.
With CryptOS, each service gets a certificate from your own issuing CA. Clients trust one root, and everything that chains to it is trusted. The same CA can also issue client certificates, so two services can prove who they are to each other (mutual TLS, or mTLS).
An intermediate or issuing node issues server and client certificates from a CSR, under a profile you define. You send the CSR with cryptosctl ca issue-leaf or through the FleetOS Manager. The node records every certificate, revokes on request, and serves a CRL and OCSP.
An issuing node can serve ACME (http-01) and EST, so clients enrol and renew on their own. Both are off by default; switching one on is a config change that takes effect at the next reboot. See the overview. This page covers requesting and renewing by hand.
What you set up onceβ
Everything the certificate carries, apart from its subject and public key, comes from a profile in the issuing node's machine config. A server profile and a client profile look like this:
pki:
revocation_base_url: http://pki.example.org
profiles:
- name: leaf-server
key_alg: ECDSA-P384
validity_days: 90
key_usage: [digital_signature]
ext_key_usage: [server_auth]
allow_request_sans: true
- name: leaf-client
key_alg: ECDSA-P384
validity_days: 30
key_usage: [digital_signature]
ext_key_usage: [client_auth]
allow_request_sans: true
ext_key_usageis what makes a certificate a server certificate (server_auth), a client certificate (client_auth), or both.allow_request_sans: truelets you name the host with--dnswhen you issue. Without it, the certificate carries only the SANs listed in the profile'ssansfield, and SANs in the CSR are always ignored.revocation_base_urlmakes every certificate point at the node's CRL (/crl), OCSP responder (/ocsp) and CA certificate (/ca.cer).
Apply the config with cryptosctl config apply -f machine.yaml. A change to profiles alone takes effect straight away, with no reboot. Setting or changing revocation_base_url needs a reboot, and the apply says so with requires_reboot=true. The certificate profiles guide lists every field.
When revocation_base_url is set, the node checks that the URL resolves and that its own /crl, /ocsp and /ca.cer answer there. While that check fails, every issuance fails with revocation preflight failing for configured revocation_base_url; issuance blocked. Fix DNS or the network first. allow_unverified_revocation_url overrides the check, but every certificate issued while it is set carries the unchecked pointer for life.
Issuing a server certificateβ
cryptosctl runs on Linux and macOS. openssl works the same on every system.
The node refuses a CSR for any other key. Many tools default to RSA 2048 or ECDSA P-256, and the node answers those with subject RSA key must be at least 3072 bits or subject ECDSA key must be on P-384.
-
On the server, make a key and a CSR. The key stays on the server.
openssl req -new -newkey ec -pkeyopt ec_paramgen_curve:P-384 -nodes \-keyout web01.key -subj "/CN=web01.example.org" -out web01.csr -
From your workstation, have the issuing node sign it under the server profile, naming the host:
cryptosctl --endpoint pki-issuing.example.org:443 ca issue-leaf \--csr web01.csr --profile leaf-server --dns web01.example.org > web01.pemExpected outputNothing on screen: the certificate goes into
web01.pemas PEM. If the requested validity runs past the issuing CA's own expiry, the node shortens it andcryptosctlprints a line on stderr such asWARNING: requested validity ends 2046-09-22; capped to issuer notAfter 2041-09-21. The certificate is still issued. -
Check what you got:
openssl x509 -in web01.pem -noout -textExpected outputAmong the extensions, look for the name you asked for and the server usage:
X509v3 Subject Alternative Name:DNS:web01.example.orgX509v3 Extended Key Usage:TLS Web Server AuthenticationWith
revocation_base_urlset you also seeX509v3 CRL Distribution PointsandAuthority Information Accesspointing at your base URL. If the SAN is missing, the profile does not setallow_request_sansor the--dnsflag was left off. -
Install
web01.pemandweb01.keyon the server, along with the issuing CA's certificate as the chain. The CA certificate is served at<revocation_base_url>/ca.cer, andcryptosctl ca get-issued --serial <hex>prints the certificate with its whole chain up to the root.
Issuing a client certificate for mTLSβ
A client certificate is issued the same way, under the client profile. Name the identity the server will check:
cryptosctl --endpoint pki-issuing.example.org:443 ca issue-leaf \
--csr billing-api.csr --profile leaf-client --dns billing-api.example.org > billing-api.pem
On the server side, trust the CryptOS root (or the issuing CA) for client certificates and require one. Every TLS stack names this differently, but the idea is the same: the server accepts only clients whose certificate chains to your CA.
Keeping track, and revokingβ
The node keeps every certificate it issues:
cryptosctl ca list-issuedlists them.cryptosctl ca get-issued --serial <hex>prints one with its chain and its status:valid,revokedorexpired.cryptosctl ca revoke --serial <hex> --reason <code>revokes one. The reason is an RFC 5280 code, and0means unspecified.
A revoked certificate stays on the CRL, and OCSP answers "revoked" for it from then on. There is no way to un-revoke it. Issue a replacement before you revoke a certificate that a service is still using.
See issued certificates for the full commands and output.
Renewingβ
This release has no automatic renewal. Before a certificate expires, make a fresh CSR and issue again. With 90-day certificates that is a calendar job.
Relatedβ
- Chain of trust explains why clients need only the root.
- Active Directory domain controllers covers LDAPS and KDC certificates, including
certreqon Server Core. - Kubernetes workloads covers certificates for pods and ingress.