Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Health Checks and Monitoring

Health Endpoint

Vouch exposes a health check endpoint:

GET /health

Response:

{"status": "healthy"}

This endpoint:

  • Returns HTTP 200 when the server is operational
  • Is accessible over HTTP (port 80) even when TLS is configured, for load balancer health checks
  • Does not require authentication

Monitoring Endpoints

EndpointMethodAuth RequiredDescription
/healthGETNoServer health status
/.well-known/openid-configurationGETNoOIDC discovery (verifies OIDC provider is functional)
/v1/credentials/ssh/caGETNoSSH CA public key (verifies SSH CA is loaded)

Log Format

Vouch uses structured logging via tracing. Set the log level with the RUST_LOG environment variable:

# Production (warnings and errors only)
RUST_LOG=warn

# Standard operation
RUST_LOG=info

# Debugging
RUST_LOG=debug

# Component-specific logging
RUST_LOG=vouch_server=debug,tower_http=info

Audit Events

All authentication and credential issuance events are logged to the database. Key events:

Event TypeDescription
enrollment_completeUser enrolled a new hardware key
login_successUser authenticated with FIDO2
login_failureFailed authentication attempt
credential_issuedSSH certificate or other credential issued
session_createdNew session established
session_revokedSession explicitly revoked
key_registeredAdditional hardware key registered
key_removedHardware key removed
scim_provisionUser provisioned via SCIM
scim_deprovisionUser de-provisioned via SCIM

Retention

Configure retention periods for audit events:

# Auth events (login, enrollment) — default 90 days
VOUCH_AUTH_EVENTS_RETENTION_DAYS=730

# OAuth usage events — default 90 days
VOUCH_OAUTH_EVENTS_RETENTION_DAYS=90

Events older than the retention period are cleaned up automatically by the background cleanup task (controlled by VOUCH_CLEANUP_INTERVAL).

Alerting Recommendations

ConditionAlert LevelDescription
/health returns non-200CriticalServer is unhealthy
Multiple failed login attemptsWarningPossible brute force
SSH CA key not loadedWarningSSH certificates won’t be issued
Database approaching capacityWarningSQLite file growth or PostgreSQL storage
Session cleanup failingWarningCheck cleanup interval and retention settings