Skip to content

Configuration

JITSudo is configured entirely through environment variables. The server and worker share a base configuration, with each adding process-specific settings.

These variables apply to both the API server and worker:

VariableDescriptionDefaultRequired
DATABASE_URLPostgreSQL connection stringYes
LOG_LEVELLog level: debug, info, warn, errorinfoNo
AWS_REGIONAWS region for SDK callsus-east-1No
OIDC_ISSUER_URLOIDC provider discovery URLNo
OIDC_CLIENT_IDOAuth2 client IDNo
OIDC_CLIENT_SECRETOAuth2 client secretNo
OIDC_REDIRECT_URICallback URL registered with IdPNo
OIDC_GROUPS_CLAIMID token claim containing group membershipsgroupsNo
OIDC_TENANT_CLAIMID token claim containing tenant UUIDtenant_idNo
JWT_SECRETHMAC-SHA256 signing secret for system JWTsYes
JWT_TTLLifetime of issued JWTs (Go duration string)1hNo
IC_INSTANCE_ARNARN of IAM Identity Center instanceNo
VariableDescriptionDefault
SERVER_PORTTCP port for HTTP server8080
VariableDescriptionDefault
WORKER_CONCURRENCYNumber of concurrent job processors5
RECONCILIATION_INTERVALHow often drift reconciliation runs (Go duration string)30s
IC_INSTANCE_ARNARN of IAM Identity Center instanceRequired

JITSudo supports two authentication methods:

  • OIDC + JWT — for web UI users. Configure OIDC_ISSUER_URL, OIDC_CLIENT_ID, and OIDC_CLIENT_SECRET. The server exchanges OIDC authorization codes for system-issued JWTs signed with JWT_SECRET.
  • API Key — for admin automation. API keys are created per-tenant via the API and passed in the X-API-Key header.

See Authentication & OIDC for detailed setup.

All API requests (except /healthz) require a X-Tenant-ID header with a valid tenant UUID. The web UI handles this automatically based on the authenticated user’s tenant claim.

See Multi-Tenancy for details.

Minimal .env for local development:

Terminal window
DATABASE_URL=postgres://jitsudo:jitsudo@localhost:5432/jitsudo?sslmode=disable
JWT_SECRET=change-me-in-production
OIDC_ISSUER_URL=http://localhost:5556/dex
OIDC_CLIENT_ID=jitsudo-local
OIDC_CLIENT_SECRET=local-secret
LOG_LEVEL=debug
SERVER_PORT=8080