Skip to content

Open sourceApache 2.0Self-hosted

BastionXP CA

The free, open-source edition of BastionXP, licensed under the Apache License 2.0: a certificate authority you run yourself. One binary creates the CA, runs the server that signs TLS and SSH certificates, and requests certificates on the machines that need them.

Get started Install GitHub

$ bxp init --config bastionxp-ca.yaml
$ bxp serve --config bastionxp-ca.yaml

# on any machine
$ bxp trust --ca-url https://ca:8443 --fingerprint …
$ bxp tls --token … --name web.example.com
$ bxp ssh --token … --key ~/.ssh/id_ed25519.pub

You are reading the open-source documentation

This site covers BastionXP CA, the open-source edition, which you download, run and operate yourself. BastionXP Enterprise, the commercial platform, offered as a cloud service or self-hosted, adds hardware-attested device certificates, MDM integration (Jamf, Fleet), SCIM user and group provisioning and role-based access control. It has its own documentation: BastionXP Enterprise.

Where to start

  • Quick start


    A working CA, a TLS certificate and an SSH certificate in ten minutes.

  • Concepts


    The PKI hierarchy, verifiers, the certificate lifecycle and the security model.

  • Server


    Initialize the CA, run the server, configure it, keep it healthy.

  • Client


    Trust the CA, then get, renew and use certificates.

  • Authentication & Protocols


    Choose how requesters prove they may have a certificate.

  • Reference


    Every command, configuration key, API endpoint, metric and log message.

What BastionXP CA does

  • Creates a complete CA with one command: a root certificate, an intermediate certificate, an SSH user CA key and an SSH host CA key.
  • Issues short-lived certificates, renewed automatically. Five kinds are built in, plus profiles of your own (S/MIME, code signing, longer-lived certificates, ...). A certificate that expires tomorrow needs no revocation to stop working.
  • Checks who is asking before it signs. BastionXP CA calls these checks verifiers:

    Verifier For Section
    One-time token servers, scripts, people: works for everything One-time tokens
    OIDC login people: Entra ID, Okta, Google, Keycloak, AD FS, ... OIDC single sign-on
    LDAP login people, where Active Directory has no identity provider Active Directory / LDAP
    ACME servers, fully automatic: certbot, acme.sh, lego, Caddy, cert-manager ACME
    SCEP phones, managed laptops (MDM), routers, printers SCEP
    Renewal proof renewing a certificate with the certificate itself Renew certificates
  • Keeps a list of every certificate it issued, revokes certificates, and publishes the revocations with a CRL and OCSP.

  • Runs anywhere: a single static binary, a container image, or a systemd service. Its state is a directory with the keys and one SQLite file.

The built-in certificate profiles

Profile For Default lifetime Maximum
tls-server web servers, APIs, databases 24 hours 30 days
tls-client users and services (mutual TLS) 24 hours 30 days
tls-device managed devices enrolling over SCEP 30 days 90 days
ssh-user people logging in to servers 16 hours 24 hours
ssh-host SSH servers 30 days 90 days

See Certificate profiles to define your own.

How it fits together

Requesters (server or laptop, ACME clients, devices, TLS clients) each talk to bxp serve on the CA machine, which keeps its keys and database in data_dir and asks the identity provider over OIDC or LDAP Requesters (server or laptop, ACME clients, devices, TLS clients) each talk to bxp serve on the CA machine, which keeps its keys and database in data_dir and asks the identity provider over OIDC or LDAP

Standards

BastionXP CA speaks standard protocols, so the tools you already have work with it: X.509 certificates (RFC 5280), OpenSSH certificates, ACME (RFC 8555, with IP identifiers from RFC 8738 and tls-alpn-01 from RFC 8737), SCEP (RFC 8894), CRLs and OCSP (RFC 6960), and OpenID Connect. See Standards for the details.

License

BastionXP CA is open source under the Apache License 2.0. See License.