PKI
ScaiVault ships a full X.509 PKI: you can run an internal Certificate Authority, integrate ACME providers (Let's Encrypt and friends) for public certificates, sign external CSRs, and manage a trust store — all through the same API and audit trail as regular secrets.
What's in it#
- Internal CAs. Root and intermediate CAs generated and signed by ScaiVault.
- Issued certificates. Server certs, client certs, mTLS pairs — issued from an internal CA against a role.
- CSR workflow. Submit a CSR, get it reviewed/approved, sign it. Useful when the requester can't generate keys inside ScaiVault.
- ACME. Let's Encrypt, ZeroSSL, BuyPass, Google, or any RFC 8555 endpoint. ScaiVault acts as the ACME client.
- Trust anchors. External CA certificates you want your stack to trust.
- CRLs. Automatic certificate revocation list generation.
All of this is under /v1/pki/, scoped to the tenant.
The pieces in a hierarchy#
When to use which#
| You need | Use |
|---|---|
| mTLS between internal services | Internal CA, issue against a role |
| TLS for a public hostname | ACME |
| Sign a cert request from a vendor or external party | CSR workflow |
| Trust a third-party CA in your clients | Trust anchor |
| Revoke a cert and publish the CRL | Revoke + generate CRL |
Mixing is fine. Most deployments end up with both an internal CA (for service-to-service mTLS) and ACME (for public ingress).
Internal CA#
Create a root CA:
1 2 3 4 5 6 7 8 9 10 11 | |
Then an intermediate signed by the root:
1 2 3 4 5 6 7 8 9 10 | |
Roots should stay offline in practice — generate one, export the certificate, put the CA backup in cold storage, and issue from an intermediate. ScaiVault supports root-CA export via GET /v1/pki/ca/{id}/certificate.
PKI roles#
A role constrains what kind of certificates an issuer can mint: which domain names, which key types, what maximum TTL. Roles exist so you can grant "issue mTLS certs for services under *.svc.cluster.local" without granting "issue any cert for any name".
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | |
Issue a cert against the role:
1 2 3 4 5 6 7 8 9 | |
Response:
1 2 3 4 5 6 7 | |
The private key is returned once. Store it yourself; ScaiVault does not keep plaintext private keys for issued certs by default (you can opt in via role config).
CSR workflow#
When the requester controls key generation — typical for IoT devices, air-gapped systems, vendors — they submit a CSR and you sign it.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | |
Rejected CSRs (POST /csr/{id}/reject) are recorded with a reason for audit.
ACME#
Let's Encrypt, ZeroSSL, BuyPass, Google — anything speaking RFC 8555. ScaiVault is the ACME client; you operate the CA's ACME endpoint indirectly by asking ScaiVault to handle an order.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | |
Challenge types:
http-01— ScaiVault serves the challenge token from.well-known/acme-challenge/...on port 80. You point your ACME-target traffic through ScaiVault.dns-01— ScaiVault writes a TXT record via a configured DNS provider (Route 53, Cloudflare, Google, and others — see DNS providers list). Works for wildcards and for hosts not reachable on port 80.tls-alpn-01— ScaiVault responds on port 443 with a special ALPN. Useful when port 80 is closed.
Auto-renew defaults to on. ScaiVault re-runs the ACME flow ~30 days before expiration, writes the new certificate as a new version of the same managed object, and fires certificate.renewed.
Revocation#
1 2 3 4 5 6 7 | |
Reasons follow RFC 5280: unspecified, key_compromise, ca_compromise, affiliation_changed, superseded, cessation_of_operation, certificate_hold, privilege_withdrawn, aa_compromise.
CRLs and OCSP#
Every internal CA has a CRL that ScaiVault regenerates automatically (default: every hour). Fetch it:
1 | |
Force an immediate regeneration: POST /v1/pki/ca/{ca_id}/crl.
OCSP responders for each CA are available at /v1/pki/ocsp/{ca_id}.
Trust anchors#
External CA certs you want to trust — e.g., a vendor's CA for validating their mTLS connections.
1 2 3 4 5 6 7 | |
Trust anchors are used by POST /v1/pki/certificates/validate to verify chains against your trust store.
What's next#
- PKI Certificates Guide — internal CA workflows.
- ACME Guide — public cert issuance.
- PKI Reference — all endpoints.