Certificate authorities¶
One BastionXP can run many certificate authorities. Each authority has its own intermediate CA, its own SSH CA keys, its own verifiers and its own settings. This lets you keep different groups apart. For example, you can have one authority for servers, one for employees' laptops and one for contractors:
Every certificate shows which authority issued it. The issuer of the certificate is the authority's intermediate CA, whose common name is <authority name> Intermediate CA.
Clients name an authority by its ID. For example, bxp-cli trust --authority employees trusts the authority with the ID employees. All the addresses of an authority start with https://<domain>/authorities/<authority ID>/.
You create and manage authorities in the web portal, in Authority Manager. BastionXP keeps them in its database. They are not in the configuration file.
The root CA¶
The root CA signs the intermediate CA of every authority. You must create it before you create the first authority. You create it once.
To create it, open Authority Manager. The Root CAs section is at the top of the page. On the card ECDSA root CA, choose Create ECDSA root CA, and confirm with Create.
There are two kinds of root CA. Most setups need only the ECDSA one:
| Root CA | Needed by |
|---|---|
| ECDSA root CA (P-256) | Authorities that issue ECDSA certificates. This is the default. |
| RSA root CA | Authorities that issue RSA certificates. You can create it only when Allow RSA keys is turned on in the organization settings. |
After the root CA is created, its card shows:
- the subject of the root CA, which is
CN=BastionXP Root CA, - how long it is valid. A root CA is valid for 10 years,
- where its key is kept, and
- its SHA-256 fingerprint. Clients need the fingerprint to trust the CA with
bxp-cli trust. Copy it with the button next to it.
Download certificate saves the root CA's certificate.
If you try to create an authority before its root CA exists, BastionXP refuses, and says that you must create the root CA first.
Where the root CA's key is kept depends on your key protection settings. The text above the cards tells you where, before you create the root CA:
| Your key protection | Where the root CA's key is kept |
|---|---|
| None (the default) | In BastionXP's database, encrypted with the key-encryption key (KEK). |
| An HSM or a cloud KMS | Inside the HSM or the KMS. It never leaves it. |
To replace a root CA, for example before it ends, see Replace the root CA.
Import a root CA from a key ceremony¶
Some organizations make their root CA in a key ceremony, and keep its key offline in their own HSM. BastionXP never sees that key. You give BastionXP only the root CA's certificate. This is called an offline root CA.
This option is available on self-hosted installations, where your organization owns the HSM or cloud KMS. Use it only if your organization already has such a root CA. If you have none, create the root CA as described above.
Before you start, have the root CA's certificate ready as a PEM file. The certificate must meet these conditions:
- It is one certificate, not a chain.
- It is self-signed, and it is a CA certificate.
- Its key type matches the card: ECDSA for the ECDSA root CA, and RSA for the RSA root CA.
- It is valid now.
Never give BastionXP the private key. The form refuses text that contains a private key.
- In Authority Manager, open the Root CAs section. On the card of a root CA that does not exist yet, choose Import from a key ceremony.
-
Paste the certificate into Root CA certificate (PEM). You can also choose Choose a file, and select the PEM file.
-
Choose Import.
The form tells you at once if the text is empty, is a private key, is not a PEM certificate, or holds more than one certificate. BastionXP also checks the certificate again when you choose Import, and shows the reason if it refuses.
When the import succeeds, the card shows the root CA. Its Key line says Offline, from your key ceremony, and it has no Replace button.
Authorities under an offline root CA¶
BastionXP cannot sign with an offline root CA. So it cannot make the intermediate CA of a new authority. You make the intermediate CA in your key ceremony, and you give it to BastionXP when you add the authority.
Before you add the authority, prepare these two things:
- The intermediate CA's key, created in your HSM or cloud KMS. BastionXP must be set up to use that HSM or cloud KMS, because it signs certificates with the key there.
- The intermediate CA's certificate, signed by the offline root CA, as a PEM file.
Then choose Add authority. When the root CA for the chosen key type is offline, the form changes. The Intermediate CA lifetime field is hidden, because the certificate already has its lifetime. Two fields appear in its place:
| Field | What it means |
|---|---|
| Key ID in your KMS | The identifier of the intermediate CA's key in your HSM or cloud KMS. |
| Intermediate CA certificate (PEM) | The intermediate CA's certificate, signed by the offline root CA. Paste it, or choose its file. |
BastionXP refuses the authority if the key is not found in your HSM or KMS, or if the certificate does not match the key or was not signed by the offline root CA. The reason is shown in the form.
Create an authority¶
In Authority Manager, choose Add authority, at the top right or at the end of the list of authorities. Fill in the form:
| Field | What it means |
|---|---|
| Name | A name for people. It is also the start of the intermediate CA's common name. |
| Select authority type | Choose Certificate Authority. |
| Authority ID | A short ID, made from the name. You cannot change it. It is used in addresses, and clients give it to bxp-cli trust --authority. |
| RSA certificates (default: ECDSA) | Tick it to issue RSA certificates instead of ECDSA ones. The authority then needs the RSA root CA. |
| Enable OCSP responder | Turns on the OCSP responder. See Revocation. |
| Intermediate CA lifetime | How long the intermediate CA's certificate is valid: 1, 2, 3 (the default), 5 or 10 years. It never outlives the root CA. See CA lifetimes. This field is not shown when the root CA is offline. |
| Enable CRL distribution | Turns on the certificate revocation list. See Revocation. |
| Issue SSH certificates (SSH CA) | Tick it to give the authority SSH user and host CA keys, so that it can issue SSH certificates. You can only choose this now, when you create the authority. |
| Allow one-time tokens and SSO login | Adds the verifier for one-time tokens. One-time tokens need it, and so does the SSO login. It is ticked by default. |
Choose Add authority.
A dedicated authority for SSH
We recommend a separate authority for SSH certificates. Create one authority with Issue SSH certificates ticked, and use other authorities for TLS certificates.
This keeps the SSH side and the TLS side apart. The SSH authority has its own SSH user and host CA keys, its own verifiers and roles, and its own certificate lifetimes. You can rotate or delete either side without touching the other.
An authority gets its SSH CA only when it is created, with Issue SSH certificates ticked. BastionXP cannot add it to an existing authority later. To issue SSH certificates later, create a new authority for them.
The page of an authority¶
Choose an authority's name to open its page. All the settings of the authority are here.
The page has these parts:
| Part | What it is for |
|---|---|
| Root certificate, Intermediate certificate | Buttons at the top. They download the CA certificates of the authority. Give the root certificate to the systems that must trust the authority. |
| Verifiers | How the authority checks who asks for a certificate. See Verifiers. |
| Settings | The name and the behavior of the authority. See below. |
| Revocation status | The addresses of the OCSP responder and the CRL, with buttons to copy them. See Revocation. |
| ACME account credentials | Creates a credential for a client that uses External Account Binding. See ACME EAB. |
| Rotate the intermediate certificate | Gives the authority a new intermediate CA. See Rotate an intermediate CA. |
| Intermediate CAs | The current intermediate CA, and the ones that a rotation replaced. |
| Revoke and replace | For an emergency, when a CA's key may be stolen. See Revoke a CA after a compromise. |
Settings¶
Change the settings, and choose Save settings.
| Setting | What it means |
|---|---|
| Name | The name of the authority, for people. |
| Organizational unit (OU) | A department name, such as Engineering. BastionXP writes it into the CA certificate and into every certificate that the authority issues. The organization (O) is the name from your organization settings, and is the same for every authority. |
| Intermediate CA lifetime | The lifetime of the next intermediate CA, which BastionXP makes at the next rotation. It never outlives the root CA. |
| CA rotation grace period (hours) | After a rotation, how long the old SSH CA keys stay trusted. See Rotate an intermediate CA. |
| Issue SSH certificates (SSH CA) | Shows whether the authority has an SSH CA. Its key type is set when the authority is created. Do not turn this on for an authority that was created without it. The authority has no SSH CA keys then, and the portal shows a problem. |
| OCSP responder, OCSP response validity | Turns on the OCSP responder, and sets how long each answer is valid, for example 4h. Empty means 1 hour. |
| CRL distribution, CRL validity | Turns on the CRL, and sets how long each list is valid, for example 24h. Empty means 24 hours. |
| Authority rate limit | A limit on how many certificate requests the whole authority accepts. See Rate limits. |
BastionXP checks the settings when you save them. If a setting is wrong, it tells you which one, and it saves nothing. If someone else changed the authority at the same time, BastionXP tells you, and saves nothing. Reload the page, and make your change again.
Saving a change restarts the authority, so that it uses the new settings. This takes a moment. It does not affect the certificates that were already issued.
Verifiers¶
A verifier checks who or what is asking for a certificate. The authority issues a certificate only after one of its verifiers has accepted the request. An authority with no verifier issues no certificates.
The Verifiers section of the authority's page shows one card for each kind of verifier. A card shows whether the verifier is set up. Choose Set up to add it, and Edit to change it.
There are four kinds of verifier:
| Verifier | What it checks | Who uses it |
|---|---|---|
| One-time tokens | A one-time token that an administrator creates in the portal. | bxp-cli tls --token and bxp-cli ssh --token |
| Single sign-on | A sign-in with your company's identity provider. | bxp-cli tls and bxp-cli ssh without a token |
| ACME | That the client controls the names it asks for. With device attestation, that the client is a genuine device. | bxp-cli acme, certbot and other ACME clients, and devices managed by an MDM |
| SCEP | A SCEP challenge password, and that the device is in the inventory. | bxp-cli scep, device management systems and network devices |
The one-time tokens verifier
One-time tokens need this verifier. The sign-in with single sign-on needs it too, because the sign-in ends with a short-lived token that this verifier signs.
When you create an authority, Allow one-time tokens and SSO login adds it.
Every verifier has these settings:
| Setting | What it means |
|---|---|
| Name | For an ACME or a SCEP verifier, the name is part of the verifier's address. You cannot change it after you save the verifier. For the single sign-on verifier, you choose the identity provider instead. |
| Certificate profiles | The certificate profiles that decide what the certificates of this verifier contain. If you choose none, BastionXP uses the built-in profiles. |
| Name policy (JSON) | Which names this verifier may issue certificates for. See ACME Verifier. Empty means no policy. |
| Verifier rate limit | A limit on how many requests this verifier accepts. See Rate limits. |
Single sign-on¶
The single sign-on verifier lets the people of your organization get certificates after they sign in with your identity provider. Choose Set up on the Single sign-on card, and fill in:
| Field | What it means |
|---|---|
| OIDC provider | Microsoft, Google, Okta or Keycloak. |
| Client ID, Client secret | The client ID and secret that your identity provider gave you for BastionXP. |
| Tenant ID | Your Microsoft Entra ID tenant. Only for Microsoft. |
| Issuer | Your identity provider's issuer URL. Only for Okta and Keycloak. |
Register BastionXP with your identity provider using this redirect (callback) URL, with the authority's ID in it:
There is no slash at the end. See OIDC SSO for TLS certificates and OIDC SSO for SSH certificates.
This verifier is for the people who get certificates. It is not the sign-in of the portal's administrators. For that, see Single sign-on for the portal.
ACME¶
An ACME verifier has these extra fields:
| Field | What it means |
|---|---|
| Challenges | The ways clients may prove their names: http-01, dns-01, tls-alpn-01 and device-attest-01. |
| External account binding | When on, a client can create an ACME account only with External Account Binding credentials. |
| DNS server for dns-01 checks | The DNS server that BastionXP asks to check dns-01 records, as host:port. If you leave it empty, BastionXP uses the system's DNS resolver. |
| Website URL, Terms of service URL | Your website and your terms of service. ACME clients can show them. |
After you save the verifier, the dialog shows the ACME server directory URL, which you give to ACME clients. It is:
See ACME Verifier.
SCEP¶
A SCEP verifier has these extra fields:
| Field | What it means |
|---|---|
| Challenge mode | static means every device uses the same challenge password. dynamic means each device gets its own password, which you create with Create token and the purpose SCEP-DYNAMIC-CHALLENGE. |
| Static challenge secret | The shared password. Only for the static mode. |
| External registration authority | Turn it on when another server, such as your device management system, acts as the SCEP registration authority. BastionXP then only signs the certificates. |
After you save the verifier, the dialog shows the SCEP enrollment URL:
See SCEP for how a device enrolls with bxp-cli scep.
If an authority cannot issue certificates¶
Sometimes an authority exists, but it cannot issue certificates. For example, an expired SCEP certificate can cause it, or a problem with the HSM or cloud KMS that holds its key.
BastionXP tells you about it in two places:
- In Authority Manager, the authority's card shows This authority cannot issue certificates, with the reason.
- When BastionXP starts, it writes a warning to its log. You can read it with
sudo journalctl -u bastionxp.
Follow the reason in the message. If the message says that the intermediate CA is missing, or that the authority has an SSH CA but no SSH keys, create a new authority in Authority Manager, and delete the broken one.
Delete an authority¶
To delete an authority, choose the three dots on its card in Authority Manager, and then Delete. The authority stops issuing certificates.
The certificates that the authority issued stay valid until they expire, unless you revoke them first. After the authority's keys are destroyed, clients can no longer check the revocation status of these certificates.
What happens to the keys depends on where they are kept. See Key protection and Delete and restore an authority.





