Skip to content

Audit Log

All connections, authentication failures, and commands are logged to {data_dir}/audit.log as JSON (one object per line).

Format

json
{"time":"2026-03-04T12:00:00Z","level":"INFO","msg":"connect","user":"alice","remote":"1.2.3.4:54321","key":"SHA256:abc..."}
{"time":"2026-03-04T12:00:01Z","level":"INFO","msg":"command","user":"alice","remote":"1.2.3.4:54321","op":"get","path":"account/github","result":"ok"}
{"time":"2026-03-04T12:00:02Z","level":"WARN","msg":"auth_denied","user":"mallory","remote":"5.6.7.8:9999","reason":"non-Ed25519 key type ssh-rsa"}
{"time":"2026-03-04T12:00:03Z","level":"ERROR","msg":"command","user":"bob","remote":"10.0.0.1:9999","op":"get","path":"missing/secret","result":"error","err":"file does not exist"}

Event types

In addition to connection, authentication, and command events, the following operations produce dedicated audit entries:

EventDescription
registrationUser registered with an invite code
vault_getSecret read from a vault
vault_setSecret written to a vault
vault_delSecret deleted from a vault
vault_createVault created
vault_inviteUser invited to a vault
vault_acceptUser accepted a vault invitation
vault_promoteMember promoted to admin
vault_demoteAdmin demoted to member
vault_revokeUser revoked from a vault
vault_destroyVault destroyed

Vault operations that are denied (e.g. a non-member attempting to read a vault secret) are logged as vault_<op>_denied at WARN level with a reason field.

Example:

json
{"time":"2026-03-04T12:00:05Z","level":"INFO","msg":"registration","user":"bob","remote":"10.0.0.1:9999","key":"SHA256:xxx","invite_code":"kh_abc123"}
{"time":"2026-03-04T12:00:06Z","level":"INFO","msg":"vault_create","actor":"alice","remote":"1.2.3.4:54321","vault":"team"}
{"time":"2026-03-04T12:00:07Z","level":"INFO","msg":"vault_invite","actor":"alice","remote":"1.2.3.4:54321","vault":"team","target":"bob"}
{"time":"2026-03-04T12:00:08Z","level":"INFO","msg":"vault_del","actor":"alice","remote":"1.2.3.4:54321","vault":"team"}
{"time":"2026-03-04T12:00:09Z","level":"WARN","msg":"vault_get_denied","actor":"mallory","remote":"5.6.7.8:9999","vault":"team","reason":"not a member"}

Log levels

LevelEvents
INFOConnections, successful commands, vault operations
WARNAuthentication denials, vault access denials
ERRORFailed commands

The log is append-only and survives server restarts.