Skip to content

Certificate lifecycle

A certificate has a life. It is requested and issued, it is used, it is renewed, and in the end it expires, or it is revoked. The CAs that sign certificates have a life of their own, and they also need to be renewed and, in an emergency, revoked.

This page follows both lives from start to finish, and links to the pages with the steps.

The life of a certificate

Stage What happens Who does it
1. Request A device, server or person asks a verifier of an authority for a certificate. The client
2. Verify The verifier checks the request. If it does not pass, there is no certificate. BastionXP
3. Issue The authority's intermediate CA signs the certificate. The certificate profile decides its contents and lifetime. BastionXP
4. Use The certificate proves the identity of its owner, for example to a Wi-Fi network or a web server. The systems that trust it
5. Renew Before the certificate ends, the client gets a new one. The client, by itself
6a. Expire The certificate reaches its end date and stops being valid. Time
6b. Revoke The certificate is cancelled before its end date, for example because a key was stolen. An administrator, or the client

1 and 2. Request and verify

Every certificate starts with a verifier. The verifier decides who may get a certificate:

Verifier What it checks
ACME That the client controls the names it asks for. With device attestation, that the client is a genuine device, and that it is in your inventory.
SCEP The challenge password. SCEP does not check the inventory.
Single sign-on That a person signed in with your identity provider.
One-time token A token that an administrator created.

See Verifiers.

3. Issue

The client can ask for names and a key. The certificate profile decides the rest: the lifetime, the permitted uses, and which names are allowed. A certificate never lasts longer than the intermediate CA that signs it, whatever its profile says.

These are the lifetimes of the built-in profiles:

Kind Default lifetime At most
Server (TLS server and client) 90 days 365 days
Device (TLS client) 1 year 2 years
Person (TLS client) 8 hours 24 hours

You can write your own profiles with other lifetimes. See Certificate profiles.

4. Use

A system that receives a certificate checks that it chains to your root CA, that it has not expired, and, if it can, that it has not been revoked. For the last check it needs the CRL or OCSP addresses in the certificate. See Revocation.

In the portal, BastionXP tells you whether a device can be trusted, from its certificates. A device is Trusted when it has a valid certificate that ends in more than 30 days. It is Expiring when the end is within 30 days. See What makes a device trusted.

5. Renew

Renew a certificate before it ends. An expired certificate cannot prove anything. How a certificate renews depends on how it was issued:

How it was issued How it renews
ACME, for servers The ACME client renews it by itself. See bxp-cli acme renew or your ACME client.
ACME device attestation The device renews it by itself. See Enroll devices.
bxp-cli tls or bxp-cli ssh, for servers Run bxp-cli renew. It uses the current certificate and its key as proof, and renews when a third of the lifetime is left.
SCEP The device signs the renewal with its current certificate, so no password is needed. See bxp-cli scep renew.
A person's certificate The person signs in again.

A certificate that has already expired, or that was revoked, cannot be renewed. The client must start again from the first stage.

6a. Expire

When a certificate reaches its end date, it stops being valid. The portal shows a device without a valid certificate as Expired. The Overview page lists the devices that need attention, such as devices whose identity is about to expire, and devices that never enrolled.

6b. Revoke

Sometimes a certificate must stop being trusted before it ends. For example, its key was stolen, or the device was lost. Then you revoke it. An administrator revokes a certificate in the portal, and an ACME client can revoke the certificates that it ordered. The reason is recorded. Revocation is permanent.

Other systems learn about it from the authority's CRL and OCSP answers. Two things decide how fast this works:

  • Revocation must be on before you issue. A certificate contains the CRL and OCSP addresses only if revocation was on when it was issued. See Turn them on.
  • Clients keep the answers for a while. By default, a CRL is valid for 24 hours and an OCSP answer for 1 hour. A system that checks revocation may not see a new revocation until its copy is refreshed.

Short lifetimes and revocation

Revocation is only as good as the systems that check it. Many systems check late, or not at all. A short lifetime is the other protection: a certificate that ends in hours needs little revocation, because it expires by itself. The price is that renewal must work reliably, so that a healthy device never runs out of certificate.

Choose the lifetime in the certificate profile. Short lifetimes suit people, whose certificates are 8 hours by default. For devices, the default is 1 year. You can make it shorter, and the device renews it by itself.

The life of a CA

The CAs have a lifecycle too. If a CA ends, every certificate under it stops being trusted. So plan for the CA's end well before it comes.

CA How long it lasts What you do at its end
Root CA 10 years Replace the root CA.
Intermediate CA 3 years by default. You can choose 1, 2, 3, 5 or 10 years. Rotate it.
SSH CA keys No end date. They get a rotation date, 3 years after they were made. Rotate the authority.

Warnings

BastionXP warns you before a CA ends. It checks every CA when it starts and every 12 hours after that. It warns you when a CA has 180, 90, 30 and 7 days left, and when it has expired. Each warning goes to the log, to the audit log as a ca_expiring event, and to the portal. Alert on ca_expiring events in your SIEM. See Expiry warnings.

Rotate an intermediate CA

Rotating gives an authority a new intermediate CA, with a new key. It does not break the certificates that were already issued: they stay valid until their own end date. The old intermediate CA goes on answering CRL and OCSP requests for its own certificates until the last one has ended. Do it before the old one ends, in a maintenance window.

Replace the root CA

Replacing the root CA has one rule that you must follow: put the new root CA into every trust store before you activate it. Otherwise the systems that trust only the old root will refuse the new certificates. See Replace the root CA.

Revoke a CA, and the ARL

If the key of an intermediate CA may have been stolen, revoke the CA. Every certificate that it issued then stops being trusted.

Two lists carry revocations, and they are easy to confuse:

List What it lists Signed by Why it matters
CRL (certificate revocation list) The revoked certificates of one intermediate CA. That intermediate CA. It tells systems about a revoked server, device or user certificate.
ARL (authority revocation list) The revoked intermediate CAs of the root CA. The root CA. It tells systems that a whole intermediate CA is no longer trusted.

BastionXP publishes the ARL at a stable address on its plain HTTP port. The intermediate CA certificates that BastionXP makes name this address, so that systems that check a whole chain know where to look. If your root CA is offline, the root CA signs the ARL in your key ceremony. See Revoke a CA after a compromise.

After you revoke a CA, replace the certificates that it issued. The portal lists them, and the page explains how to replace each kind.