Skip to content

Server configuration

The CA is configured with one YAML file, usually /etc/bastionxp-ca/bastionxp-ca.yaml. The CA-side commands read it with --config <file> (default bastionxp-ca.yaml in the current directory).

Clients need no configuration file

The client commands (trust, tls, ssh, acme, scep, renew) never read this file. They are configured with flags, environment variables and what bxp trust saved. See Client configuration.

Structure

data_dir: /var/lib/bastionxp-ca     # required

ca:        { ... }            # the CA's identity, key type, name constraints, key passphrase
server:    { ... }            # addresses and names
profiles:  [ ... ]            # your own certificate profiles
oidc:      { ... }            # login with an identity provider      (optional)
ldap:      { ... }            # login with Active Directory / LDAP    (optional)
access:    [ ... ]            # who may get what, after a login       (with oidc or ldap)
acme:      { ... }            # the ACME server                       (optional)
scep:      { ... }            # the SCEP server                       (optional)
metrics:   { ... }            # Prometheus metrics                    (optional)
Section Documented in
data_dir, ca, server, metrics Configuration reference
profiles Certificate profiles
ca.name_constraints Name constraints
ca.key_passphrase_file Protect the CA keys
oidc OIDC server setup
ldap LDAP server setup
access Access rules
acme ACME server setup
scep SCEP server setup

Every key with its type, default and meaning is in the Configuration reference. A complete, commented file is in the Annotated example.

How the file is read

  • Strict. An unknown key, a wrong type or an invalid value is an error, with a message that names the key and shows the expected form. BastionXP CA never guesses.
  • Checked as a whole. Settings that depend on each other are checked together: for example oidc needs server.url, access needs oidc or ldap, and scep.static needs scep.enabled.
  • Defaults are filled in for everything optional; see the reference.
  • Secrets stay out of it. Settings that are secrets point to files (*_file), so the configuration file itself holds no secret. Keep those files readable by the CA's user only.

Check a file without starting the server:

bxp doctor --config /etc/bastionxp-ca/bastionxp-ca.yaml

Durations

Profile lifetimes accept d for days besides Go's units: 365d, 8h, 90m. The CA lifetimes (ca.root_validity, ca.intermediate_validity) take years or days: 10y, 1095d.

Changing the configuration

Some settings take effect with a reload (SIGHUP), the rest need a restart. See Reload without restart.