Configuration reference¶
Every key of the server configuration file. Reload says whether a
SIGHUP applies a change (yes) or a restart is needed (no); see
Reload without restart.
Top level¶
| Key | Type | Default | Reload | Description |
|---|---|---|---|---|
data_dir |
path | required | no | Directory with the CA's keys, certificates and database. Keep it private (mode 700). |
ca |
object | no | The CA. | |
server |
object | no | The server. | |
profiles |
list | [] |
no | Your own certificate profiles. See Certificate profiles. |
oidc |
object | off | no | Login with an identity provider. See OIDC. |
ldap |
object | off | no | Login with Active Directory or LDAP. See LDAP. |
access |
list | [] |
yes | Who may get what after a login. See Access rules. |
acme |
object | off | partly | The ACME server. See ACME. |
scep |
object | off | no | The SCEP server. See SCEP. |
metrics |
object | off | no | Prometheus metrics. See Metrics. |
ca¶
| Key | Type | Default | Description |
|---|---|---|---|
ca.name |
string | BastionXP |
Used in the CA certificates' names: <name> Root CA, <name> Intermediate CA. Takes effect at init. |
ca.organization |
string | required | Organization (O) in the CA certificates and in every issued certificate. |
ca.key_type |
ecdsa | rsa |
ecdsa |
Algorithm of the CA keys, at init: ECDSA P-256, or RSA 3072 bits. |
ca.key_passphrase_file |
path | File with the passphrase of the server's encrypted keys. Must not be inside data_dir. See Protect the CA keys. |
|
ca.root_validity |
lifetime (y, d) |
10y |
The root's lifetime, 1 to 30 years. Used once, at init. See CA lifetimes. |
ca.intermediate_validity |
lifetime (y, d) |
3y |
The intermediate's lifetime, from 1 year up to root_validity. Used at init and at every new-intermediate. Refused under an external root. |
ca.name_constraints.dns_domains |
list of domains | DNS names allowed (each domain and every name below it; a leading dot: only below it). See Name constraints. | |
ca.name_constraints.ip_ranges |
list of CIDR | IP ranges allowed, e.g. 10.0.0.0/8. |
|
ca.name_constraints.email_domains |
list of domains | Email address domains allowed. |
Name constraints are written into the intermediate at init (or
new-intermediate). A kind of name with no list is not allowed at all once
any list is given.
server¶
| Key | Type | Default | Description |
|---|---|---|---|
server.address |
host:port |
:8443 |
Where the HTTPS server listens. |
server.names |
list | [localhost, 127.0.0.1] |
DNS names and IP addresses clients use to reach the server; they go into its own TLS certificate. |
server.url |
https://host[:port] |
The address people's browsers use to reach the server. Required for OIDC. No path. | |
server.public_address |
host:port |
A plain HTTP listener for public information only: CA certificates, CRL, OCSP. | |
server.public_url |
http(s)://host[:port] |
How others reach public_address. When set, every TLS certificate carries CRL and OCSP addresses under it. See Revocation. |
profiles¶
A list of profiles; each has these keys. See Certificate profiles for the details and examples.
| Key | Type | Default | Description |
|---|---|---|---|
name |
string | required | Lower case letters, digits and dashes; not a built-in name. |
base |
tls-server | tls-client | email | code-signing |
required | The profile it starts from. |
validity |
duration | the base's | Default lifetime, e.g. 365d, 8h, 90m. |
max_validity |
duration | the base's | The longest a request may ask for. |
subject.organizational_unit |
list | OU values written into every certificate. | |
subject.require_common_name |
bool | false |
Refuse requests without a common name. |
names.dns / .ip / .email / .wildcard |
bool | the base's | The kinds of names a certificate may contain. |
ext_key_usage |
list | the base's | Replaces the base's: server_auth, client_auth, email_protection, code_signing, time_stamping, ocsp_signing. |
key_usage |
list | digital signature (+ key encipherment for RSA) | digital_signature, key_encipherment, content_commitment, data_encipherment, key_agreement. |
policies |
list of OIDs | Certificate policy OIDs. | |
extensions |
list of {oid, critical, value_hex} |
Extra extensions, as DER in hex. | |
keys.algorithms |
list | any | ecdsa, rsa, ed25519. |
keys.min_rsa_bits |
int | 2048 | Smallest RSA key accepted. |
keys.curves |
list | any | P-256, P-384, P-521. |
ssh.extensions |
list | the base's | SSH user profiles: permit-pty, permit-port-forwarding, permit-agent-forwarding, permit-X11-forwarding, permit-user-rc, no-touch-required. Replaces the base's; [] for none. |
ssh.critical_options |
map | SSH user profiles: source-address, force-command, verify-required. |
X.509 profiles (bases tls-server, tls-client, email, code-signing)
take the X.509 keys; SSH profiles (bases ssh-user, ssh-host) take
validity, max_validity and, for user profiles, ssh. See
SSH profiles.
oidc¶
Login with an identity provider. Leave the section out to run without it. See OIDC server setup.
| Key | Type | Default | Description |
|---|---|---|---|
oidc.issuer |
URL | The provider's issuer URL. Turns OIDC on. Must be https://. |
|
oidc.client_id |
string | required with issuer |
The CA's client ID at the provider. |
oidc.client_secret_file |
path | File with the client secret (recommended). | |
oidc.client_secret |
string | The client secret inline; makes the file sensitive. Give this or client_secret_file, not both. |
|
oidc.username_claim |
string | preferred_username |
The ID token claim with the person's name. With email, only verified addresses are accepted. |
oidc.groups_claim |
string | groups |
The claim with the person's groups. |
oidc.scopes |
list | [openid, profile, email] |
Scopes asked for at the login. |
oidc.x509.cert_profile |
profile name | tls-client |
The profile of people's own TLS client certificates. Must be tls-client or based on it. |
oidc.ssh.cert_profile |
profile name | ssh-user |
The profile of people's own SSH certificates. Must be ssh-user or based on it. |
Requires server.url, and access rules.
ldap¶
Login with an Active Directory or LDAP username and password. The defaults fit Active Directory. See LDAP server setup.
| Key | Type | Default | Description |
|---|---|---|---|
ldap.url |
URL | ldaps://host[:port], or ldap:// with start_tls: true. Turns LDAP on. Plain ldap:// is refused. |
|
ldap.start_tls |
bool | false |
Use StartTLS on an ldap:// URL. Not with ldaps://. |
ldap.ca_file |
path | system roots | PEM file with the root that issued the directory's certificate. |
ldap.base_dn |
DN | required | Where people are searched. |
ldap.bind_dn |
DN | required | The CA's service account. |
ldap.bind_password_file |
path | required | File with the service account's password. |
ldap.user_filter |
filter | (&(objectClass=user)(sAMAccountName={username})) |
Finds the person; must contain {username}. |
ldap.username_attribute |
attribute | userPrincipalName |
The person's name in the rules and the logs. |
ldap.group_base_dn |
DN | base_dn |
Only groups below it count. Recommended. |
ldap.group_filter |
filter | (&(objectClass=group)(member:1.2.840.113556.1.4.1941:={user_dn})) |
The person's groups, nested ones included; must contain {user_dn}. |
ldap.x509.cert_profile |
profile name | tls-client |
As oidc.x509.cert_profile, for directory logins. |
ldap.ssh.cert_profile |
profile name | ssh-user |
As oidc.ssh.cert_profile, for directory logins. |
Requires access rules.
access¶
Who may get what after an OIDC or LDAP login. Reloadable. See Access rules.
| Key | Type | Description |
|---|---|---|
users |
list | People by name ([email protected]). |
groups |
list | Groups (names or IDs as the provider sends them; full DNs with LDAP). |
ssh_principals |
list | Login names for SSH user certificates. Placeholders: {username}, {short_username}. |
admin |
bool | May create tokens and request any certificate. |
Each rule needs users or groups, and ssh_principals or admin: true.
acme¶
The ACME server; on when allowed_domains is given. See
ACME server setup.
| Key | Type | Default | Reload | Description |
|---|---|---|---|---|
acme.allowed_domains |
list of domains | yes (turning ACME on or off: no) | Domains ACME may issue for: each, every name below it, and its wildcard. | |
acme.allowed_ip_ranges |
list of CIDR | none | yes | IP addresses ACME may issue for (RFC 8738). |
acme.challenges |
list | [http-01, dns-01, tls-alpn-01] |
yes | The challenge types offered. |
acme.dns_resolver |
host:port |
this machine's resolvers | no | The DNS server dns-01 asks. |
acme.limits.accounts_per_ip_per_hour |
int | 100 |
yes | New accounts per source address per hour; 0: no limit. |
acme.limits.orders_per_account_per_hour |
int | 300 |
yes | New orders per account per hour; 0: no limit. |
acme.x509.cert_profile |
profile name | tls-server |
no | The profile of ACME certificates. Must be tls-server or based on it. |
scep¶
The SCEP server. See SCEP server setup.
| Key | Type | Default | Description |
|---|---|---|---|
scep.enabled |
bool | false |
Turns SCEP on, at /scep. |
scep.static.challenge_file |
path | File with a shared challenge password (at least 16 characters), for MDM systems. Turns the shared challenge on. | |
scep.static.x509.cert_profile |
profile name | tls-device |
The profile of certificates from the shared challenge. Must be tls-client, tls-server, or based on either (tls-device is based on tls-client). |
scep.static.dns_domains |
list | The only DNS domains allowed with the shared challenge. Required for profiles that need a host name. | |
scep.static.email_domains |
list | The only email domains allowed with the shared challenge. | |
scep.static.max_per_hour |
int | 100 |
Enrollments with the shared challenge per hour, for the whole CA; 0: no limit. |
metrics¶
Prometheus metrics on an address of their own. See Monitoring.
| Key | Type | Default | Description |
|---|---|---|---|
metrics.address |
host:port |
off | Where to serve /metrics. Must differ from the server's addresses. |
metrics.token_file |
path | File with a bearer token Prometheus must send. Needs address. |
Environment variables¶
The server also reads these; see Environment variables:
| Variable | Meaning |
|---|---|
BXP_LOG_FORMAT |
text or json (as --log-format). |
BXP_LOG_LEVEL |
debug, info, warn, error (as --log-level). |
BXP_KEY_PASSPHRASE_FILE |
File with the server keys' passphrase. |
BXP_KEY_PASSPHRASE |
The passphrase itself (removed from the environment once read). |