A private ACME certificate authority can give every internal service and host a short-lived certificate without a ticket, but only if the CA itself is built and run as a tier zero system. step-ca is Smallstep's open source online CA: it issues X.509 certificates for TLS and mTLS and SSH certificates for users and hosts, and it speaks ACME (RFC 8555) so the same clients used with public CAs can request internal certificates. This guide covers how to deploy step-ca securely: root and intermediate key protection, choosing and restricting provisioners, certificate lifetimes and renewal, SSH certificates, database and high availability, and logging. It is written for platform, PKI and infrastructure engineers. For the wider design of an internal PKI, see the Private CA Design and Operations Guide; for the ACME protocol itself, see the ACME and Automated Certificate Management Guide.
This is an independent guide from NHI Mgmt Group, based on Smallstep's public documentation as of November 2026. It is not sponsored or reviewed by Smallstep. Product features change, so confirm settings against Smallstep's current documentation.
Key takeaways
- Keep the root offline. Smallstep's production guidance says the root key is not needed for daily operation and should be stored offline, in at least two copies in separate locations, with the intermediate key in an HSM or KMS doing the routine signing.
- Every provisioner is a door into the CA. step-ca authenticates requests through provisioners (JWK, OIDC, X5C, ACME, SCEP, K8sSA, AWS, GCP, Azure and others); remove the ones you do not use and restrict the rest with issuance policy.
- ACME issues to anyone who passes a challenge. The docs warn that ACME provisioners issue to any client that completes a challenge by default, so pair them with an authority policy that limits names to your internal domains.
- Short lifetimes replace revocation. step-ca's leaf default is 24 hours and its default revocation is passive (a revoked certificate cannot be renewed), so automated renewal at about two thirds of the lifetime is a hard requirement.
- Use a shared SQL database for more than one instance. The default Badger database is not for multiple instances; production HA uses MySQL or PostgreSQL with synchronised configuration.
What step-ca provides
step-ca is an online intermediate CA with an HTTPS API. Clients authenticate to a provisioner, the CA checks the request against its claims and policy, then signs. It is designed for short-lived certificates, which is why its revocation model is different from a traditional enterprise CA such as AD CS (see the AD CS Security Guide for that model).
| Capability | What it does | Typical consumers |
|---|---|---|
| X.509 issuance | Signs TLS server, client and mTLS certificates from an online intermediate | Internal web services, service meshes, databases, proxies |
| ACME server | Exposes an RFC 8555 directory per ACME provisioner at https://<ca-host>/acme/<provisioner-name>/directory | Standard ACME clients, reverse proxies, Kubernetes cert-manager |
| SSH CA | Signs SSH user and host certificates when enableSSHCA is set (default false) | Engineers, bastions, fleet hosts |
| Cloud and platform identity | Issues certificates against AWS instance identity documents, GCP and Azure identity tokens, or Kubernetes service account tokens | Workloads that already hold a platform identity |
| Issuance policy | Allow and deny rules for DNS, IP, email, URI and CN names, and for SSH principals | The PKI owner, to cap what any provisioner can mint |
Smallstep's documented defaults are worth knowing before you change anything: 24 hour leaf validity, a root with 10 year validity and path length 1, an intermediate with path length 0, ECDSA P-256 keys, one-time JWT tokens with a 5 minute lifespan, and TLS 1.2 to 1.3 on the CA's own listener. Each certificate issued is a machine credential: treat it within your machine identity programme, not as a networking detail.
Architecture and root key protection
The root signs the intermediate once; the intermediate signs every leaf. That split is the most important security decision in the deployment.
- Generate the root on an HSM or air-gapped device. Smallstep recommends exactly this. Keep at least two copies offline in separate locations, and consider Shamir's Secret Sharing to split the root password among trusted parties. Follow a witnessed ceremony as described in the Private CA Design and Operations Guide.
- Put the intermediate key in a cloud HSM or KMS. The intermediate is online by design, so its key should be non-exportable. See the HSM Deployment and Operations Guide.
- Change the intermediate password after initialisation with
step crypto change-pass, and pass it to the service with--password-file, not on the command line. - Keep secrets out of environment variables. The docs note that systemd exposes unit environments over D-Bus and
docker inspectreveals container environments. - Run as a dedicated user. Create a
stepsystem user that alone can read the configuration, keys and password file. To bind port 443 without root, grantCAP_NET_BIND_SERVICEwithsetcap. Smallstep's sample systemd unit runs asUser=stepwithNoNewPrivileges=yes,ProtectSystem=full,ProtectHome=true,MemoryDenyWriteExecute=trueandSystemCallFilter=@system-service(systemd 245 or later). - Constrain names at the authority. Set
authority.policy.x509.allow.dnsto your internal suffixes and leaveallowWildcardNamesfalse unless you need wildcards. An allow rule for one name type denies the other types, so addiporurirules explicitly if you need them. - Do not expose the CA to the internet. If remote clients must reach it, put only the needed endpoints (for example
/1.0/signor renew) behind a reverse proxy, and consider federation instead.
Distribute the root certificate to relying parties through device management or configuration management, never by asking users to accept it. The Certificate trust stores and root CA management guide covers that step.
Provisioners including ACME
A provisioner defines who may ask for a certificate and how they prove it. The choice should follow the identity the requester already holds.
| Provisioner | Authenticates with | Use it for | Main risk to control |
|---|---|---|---|
| JWK (default type) | Short-lived JWT signed by the provisioner key | Automation that can hold a provisioner password, one-off issuance | Provisioner password becomes a powerful secret; delete the default JWK provisioner if unused |
| OIDC | Identity provider login (for example Google, Okta, Microsoft Entra ID) | User certificates, SSH user certificates | Restrict allowed domains or groups and admin emails |
| X5C | An existing certificate chaining to a configured root | Devices or services with a manufacturer or bootstrap certificate | Trusting a root that also signs things you do not control |
| ACME | RFC 8555 challenges (http-01, dns-01, tls-alpn-01; device-attest-01 when enabled) | Servers and proxies with standard ACME clients | Issues to any client that passes a challenge |
| SCEP | SCEP challenge | Network equipment and MDM enrolment | No challenge secret by default; legacy encryption default (DES-CBC) |
| K8sSA | Kubernetes service account token | Pods and in-cluster workloads | Over-broad service account token access |
| AWS, GCP, Azure | Instance identity documents or identity tokens | Cloud VMs | All accounts or projects are valid if none are listed; custom SANs allowed unless disableCustomSANs is set |
| SSHPOP | An existing SSH certificate | Renewing, rekeying or revoking SSH host certificates | Long-lived hosts that never rekey |
Hardening the ACME provisioner
- Limit names: apply the authority policy above. In self-hosted step-ca, policy applies at authority level; per-provisioner and per-ACME-account policy is described for Smallstep's hosted product.
- Choose challenges deliberately: set
challengesto only those you use. http-01 checks a value under/.well-known/acme-challengeon port 80, so anyone who can serve content on that name can pass it; dns-01 moves the trust to whoever can write TXT records, which makes DNS API credentials as sensitive as the CA. See the ACME vs EST vs SCEP comparison for protocol choice. - Use unguessable provisioner names where the directory is reachable from wider networks, as the production guidance suggests.
- Device attestation needs scoping: enabling
device-attest-01with theappleorstepformats creates trust in Apple or Yubico CAs; the docs warn it may issue for any such device unless policy restricts it to yours. - Account binding: as of November 2026 the ACME basics page describes External Account Binding as available in Smallstep's commercial CA software. In open source step-ca, rely on network reachability and name policy.
- Concurrency: use an ephemeral account key per order or serialise orders on one account, as the docs recommend for HA deployments.
Kubernetes users typically point cert-manager at the step-ca ACME directory; secure that side with the cert-manager security guide.
Short-lived certificates and renewal
step-ca's model is that certificates expire before revocation matters. The revocation docs explain that revoking a certificate stops the CA renewing it, and the certificate stays valid until it expires, so lifetime is the exposure window.
| Certificate type | Documented default or guidance | Configured where |
|---|---|---|
| X.509 leaf | 24 hours default; default maximum 24 hours | claims: minTLSCertDuration, maxTLSCertDuration, defaultTLSCertDuration |
| User certificates | Production guidance: about a day or less | Provisioner or authority claims |
| Host and service account certificates | Production guidance: one month or less | Provisioner or authority claims |
| SSH host certificates | Expire in a month by default | SSH host duration claims |
| Root CA | 10 years | Set at step ca init |
| Renewal | disableRenewal false and allowRenewalAfterExpiry false by default | Claims |
- Renew at two thirds: Smallstep recommends automated renewal at roughly two thirds of the lifetime.
step ca renewauthenticates with the existing key over mTLS; expired certificates are not renewed, so a host that is down past expiry must re-enrol through its provisioner. - Proxies: pass
--mtls=falsetostep ca renewwhen a reverse proxy terminates TLS. - Active revocation when needed: enable the built-in CRL (
"crl": {"enabled": true}with anidpURL), served on theinsecureAddressat/1.0/crl, and addcrlDistributionPointsto the intermediate and leaf templates. The docs warn this adds a dependency and handshake latency. Background on CRL and OCSP is in the Certificate Revocation Guide.
Decision guidance: keep passive revocation for workloads that renew daily. Turn on CRLs when certificates live longer than your tolerance for a stolen key (for example month-long host certificates), or when relying parties already check CRLs. Small teams with a single instance can run 24 hour leaves from day one; large estates often stage lifetimes down (30 days, then 7, then 1) as renewal automation proves itself.
SSH certificates
With enableSSHCA set, step-ca holds SSH user and host signing keys. Hosts trust user certificates through TrustedUserCAKeys in sshd_config, and clients trust host certificates through an @cert-authority line in known_hosts, which removes trust-on-first-use prompts. The protocol background is in the SSH Protocol and Certificate Authority Guide.
- User certificates through OIDC: engineers log in to the identity provider and receive a certificate valid for hours, so offboarding in the IdP ends SSH access at the next expiry.
- Always set principals: the docs state that if the list of principals is empty, sshd will allow authentication as anyone on the host. Map principals to role accounts and use
policy.ssh.user.allowto cap them. - Write both policy halves: if user rules exist without host rules (or the reverse), the type without rules is always denied, so define
policy.ssh.host.allowwith yourdnsandipranges at the same time. - Renew host certificates: Smallstep shows a weekly scheduled
step ssh renew --forcefor host certificates, with SSHPOP authenticating the renewal.
Moving from static keys is covered in SSH Keys vs SSH Certificates.
Operating and monitoring
Database and high availability
- Single instance: the default Badger database is fine; back up its directory with the configuration.
- Several instances: the docs say not to use Badger for multiple instances. Use
"db": {"type": "postgresql"}or"mysql"with TLS in the DSN (for examplesslmodeortls=true), enable remote provisioner management so instances share provisioner configuration, and keepca.jsonidentical across nodes (changes take effect after SIGHUP or restart). - Kubernetes: Smallstep documents horizontal scaling with its Helm chart. Keep the intermediate key in KMS so pods never hold it on disk.
Logging and audit
Set the logger format to json (the default is text) and ship the service log to your SIEM. Combine it with the database record of issued certificates, host audit logs for the step user and configuration change history. Treat CA administrators as privileged users under the Privileged Access Management Guide.
| Signal | Why it matters |
|---|---|
| Issuance by provisioner, per hour | A spike from one provisioner can mean a stolen provisioner credential or a runaway client |
| Names refused by policy | Requests for names outside your suffixes show misconfiguration or probing |
Changes to ca.json, provisioners or templates | Any change alters who can get what; route through change control |
| Renewal failures and certificates near expiry | With 24 hour leaves, a broken renewer becomes an outage within a day |
| Access to key, password file and KMS key | Direct evidence of attempts on the signing key (ATT&CK T1552.004 Private Keys, T1649 Steal or Forge Authentication Certificates) |
Metrics: share of internal certificates issued through step-ca versus manual; median leaf lifetime; renewal success rate; number of active provisioners with a named owner; certificates issued outside policy (target zero); time to rotate the intermediate in a drill.
Common failure patterns
- Leaving the default JWK provisioner and its password in place on a production CA.
- An ACME provisioner with no authority policy, reachable from user networks.
- Copying sample durations into production without checking they suit the renewal tooling.
- Empty SSH principals lists, granting login as any user.
- Running several instances on local Badger databases that drift apart.
- Template edits that pass untrusted
.Insecurevalues; the docs advise restricting templates and applyingtoJsonto data.
Framework mapping
| Control area | NIST SP 800-53 Rev 5 | NIST CSF 2.0 |
|---|---|---|
| Root and intermediate key protection | SC-12 Cryptographic Key Establishment and Management | PR.DS-02 |
| Certificate issuance and trust | SC-17 Public Key Infrastructure Certificates | PR.AA-02 |
| Certificate and SSH credential lifecycle | IA-5 Authenticator Management | PR.AA-02 |
| CA administrator roles | AC-5 Separation of Duties | PR.AA-02 |
| Issuance and change logging | AU-2 Event Logging | PR.PS-04 |
Practitioner checklist
- Root generated on an HSM or air-gapped device, two offline copies, password split among custodians.
- Intermediate key in a KMS or HSM; password changed after init and supplied by file.
- CA runs as the
stepuser under a hardened systemd unit, not as root. - Default JWK provisioner removed or given its own password; every provisioner has an owner.
- Authority policy restricts X.509 names to internal suffixes, wildcards off, SSH user and host rules both set.
- ACME challenges limited to those in use; DNS API credentials for dns-01 treated as CA-grade secrets.
- Leaf lifetimes set deliberately, renewal automated at two thirds, CRL enabled where lifetimes are long.
- PostgreSQL or MySQL with TLS for any multi-instance deployment; configuration kept in version control.
- JSON logs in the SIEM with alerts on issuance spikes, policy refusals and configuration changes.
- Intermediate rotation and root restore rehearsed at least once a year.
Standards and references
- Smallstep: Production considerations when running a certificate authority server
- Smallstep: Configuring step-ca provisioners
- Smallstep: Configuring step-ca
- Smallstep: Certificate issuance policies
- Smallstep: Basic certificate authority operations
- Smallstep: ACME basics
- Smallstep: Revocation
- IETF: RFC 8555 Automatic Certificate Management Environment (ACME)
Related NHI Mgmt Group resources: Private CA Design and Operations Guide, ACME and Automated Certificate Management Guide, Enterprise PKI Design and CA Hierarchy Guide, mTLS Guide, SSH Key Management Guide.