Skip to content

Configuration

TapPass is configured via environment variables with the TAPPASS_ prefix.

VariableDescription
TAPPASS_PRODUCTION=1Enable production hardening
TAPPASS_ADMIN_API_KEYAdmin API key (starts with tp_)
TAPPASS_JWT_SECRETJWT signing secret (48+ chars)
TAPPASS_VAULT_KEYAES-256 key for credential encryption
DATABASE_URLPostgreSQL connection string
VariableDefaultDescription
TAPPASS_PORT9620Server port
TAPPASS_KV_URL(memory)Redis URL for multi-worker state
TAPPASS_OPA_URLhttp://localhost:8181OPA sidecar URL
TAPPASS_LLM_JUDGE_MODEL(none)LLM model for classification judge
TAPPASS_CORS_ORIGINS(none)Allowed CORS origins
TAPPASS_EU_DATA_RESIDENCYfalseRestrict to EU model providers
OPENAI_API_KEY(none)For LLM judge and gateway

When TAPPASS_PRODUCTION=1:

  • Refuses to start without JWT_SECRET and ADMIN_API_KEY
  • Hides OpenAPI docs (/docs, /openapi.json)
  • Enforces HSTS, CSP, X-Frame-Options
  • Strips the Server header
ModeConfigUse case
MemoryNothing neededDevelopment, CI
PostgreSQLDATABASE_URL=postgresql:/...Self-hosted production
SupabaseSUPABASE_URL + SUPABASE_KEYManaged production
EndpointTypePurpose
/health/liveLivenessProcess alive check (no dependency checks)
/health/readyReadinessChecks DB, OPA, Redis: returns 503 if not ready
/health/startupStartupChecks DB, OPA, Presidio model loaded: returns 503 until ready
/healthLegacySame as readiness (backward compatible)
/health/detailedDiagnosticFull system status (requires auth)
VariableDefaultDescription
OTEL_EXPORTER_OTLP_ENDPOINT(disabled)OTLP collector endpoint (e.g. http://otel-collector:4317)
OTEL_TRACES_CONSOLEfalsePrint spans to stdout (local debugging)

When enabled, every pipeline execution creates a parent span tappass.pipeline with child spans per step. Incoming traceparent headers are propagated for end-to-end distributed tracing.

VariableDefaultDescription
TAPPASS_FAIL_MODEfail_closedfail_closed, fail_open_cached, or fail_open_logged
TAPPASS_CACHE_TTL300Seconds cached responses are valid in degraded mode
TAPPASS_MAX_OFFLINE_REQUESTS100Max calls allowed in degraded mode (0 = unlimited)
TAPPASS_LOCAL_AUDIT_PATH.tappass_audit_buffer.jsonlLocal audit buffer for degraded calls
TAPPASS_CIRCUIT_FAILURE_THRESHOLD3Consecutive failures before circuit opens
TAPPASS_CIRCUIT_RECOVERY_TIMEOUT30Seconds before circuit transitions to half-open
VariableDescription
TAPPASS_SSO_PROVIDERgoogle, azure, okta
TAPPASS_SSO_CLIENT_IDOIDC client ID
TAPPASS_SSO_CLIENT_SECRETOIDC client secret
TAPPASS_SAML_ENABLEDEnable SAML 2.0

See the SSO guide for full configuration.