Logging¶
The server logs to standard error, as text, or as one JSON object per line for Elastic, Loki, Splunk and the like:
| Flag | Variable | Values | Default |
|---|---|---|---|
--log-format |
BXP_LOG_FORMAT |
text, json |
text |
--log-level |
BXP_LOG_LEVEL |
debug, info, warn, error |
info |
Under systemd the log goes to the journal:
journalctl -u bastionxp-ca -o cat
journalctl -u bastionxp-ca -o cat --since today | grep 'certificate issued'
The audit trail¶
These messages are the audit trail. Their text and field names stay the same between versions, so alerts and searches can rely on them.
| Message | When | Main fields |
|---|---|---|
certificate issued |
Every certificate, by any road | profile, serial, the names, not_after, verifier, subject, created_by, token_id, remote |
certificate renewed |
A renewal, over the API or SCEP | old_serial, serial, the names, verifier (renewal or scep_renewal) |
SCEP certificate sent again |
A device fetched its certificate with GetCert | serial, common_name |
certificate revoked |
A revocation, also one made with bxp revoke (the server notices it within seconds) |
kind, serial, subject, names, reason, revoked_at |
certificate revoked over ACME |
An ACME client revoked; certificate revoked follows as for any revocation |
serial, reason, signed_by (account or certificate key), acme_account |
token created |
A token handed out after an OIDC or LDAP login | created_by, groups, admin, profile, names, token_id, expires |
login failed, login refused: no rule for this person, login refused: too many failures |
Logins that did not succeed | provider, login, remote |
token refused, token used twice, request refused, renewal refused |
Requests that were refused | error, token_id, remote |
ACME account created, ACME account key changed, ACME account deactivated, ACME order refused, ACME challenge failed |
ACME | acme_account, names |
configuration reloaded, server started |
The server itself; server started has the root fingerprint |
Tokens made on the CA machine with bxp token are not in the server's
log: the command prints them, and nothing more. Each certificate issued
line names the token it used (token_id).
Example¶
A certificate issued line (shortened: the real line also has
ip_addresses, email_addresses, protocol and created_by):
time=2026-11-15T09:43:03Z level=INFO msg="certificate issued" profile=tls-server serial=5aeb9bcb562c6366da208947855600572f621fe1 common_name=web.example.com dns_names=[web.example.com] not_after=2027-02-13T09:43:03Z verifier=token subject=web.example.com token_id=279813fe6d0e452e029bfd70b533dea2 remote=10.0.0.21:51234
{"time":"2026-11-15T09:43:03Z","level":"INFO","msg":"certificate issued","profile":"tls-server","serial":"5aeb9bcb562c6366da208947855600572f621fe1","common_name":"web.example.com","dns_names":["web.example.com"],"not_after":"2027-02-13T09:43:03Z","verifier":"token","subject":"web.example.com","token_id":"279813fe6d0e452e029bfd70b533dea2","remote":"10.0.0.21:51234"}
Following an SSH login back to its certificate¶
An SSH certificate's key ID is <subject>-<token ID>. The SSH server logs
the key ID at each login; search the CA's log for that token ID to find
the certificate issued line, and who the token was created for.
sshd: Accepted publickey for deploy from 10.0.0.9 ... ID [email protected] (serial 1467...)
Secrets never logged¶
Passwords, tokens, keys and client secrets are never written to the log.