ibexharness
DocsBlogReleasesRoadmap
GitHub
ibexharness

Documentation

Security overviewAuthenticationTenant isolationSecrets and keys
Security›Secrets and keys
Security

Secrets and keys

Secret environment variables, allowed storage locations, and rotation policy.

Secrets — database passwords, JWT signing keys, LLM provider API keys, and Redis credentials — must never appear in git, logs, or client bundles. This page lists Phase 1 secret variables and the rotation expectations that apply in production.

Never commit secrets

Use untracked .env files locally and a secrets manager (Vault, cloud Secrets Manager, Kubernetes External Secrets) in staging and production. CI runs gitleaks on every pull request.

Allowed secret locations

EnvironmentStorage
Local developmentUntracked .env per service; copy from .env.example placeholders
Staging / productionVault, cloud secrets manager, or K8s External Secrets
Forbidden everywhereGit commits, Helm values in repo, docs, test fixtures, stdout logs

Dashboard rule: only NEXT_PUBLIC_* variables are safe in browser bundles. Never prefix secrets with NEXT_PUBLIC_.

Phase 1 secret variables

Database

ParameterTypeDescription
POSTGRES_DSNRequiredconnection string
Full Postgres DSN for auth service (postgres://...).
POSTGRES_MIGRATE_DSNconnection string
Go migrate runner DSN; derived from POSTGRES_DSN when unset.
POSTGRES_PASSWORDstring
Used only when building DSN from host/port/user parts.

Redis (proxy)

ParameterTypeDescription
REDIS_URLurl
e.g. redis://:password@host:6379/0. Empty disables rate limiting (Noop limiter).

LLM providers (proxy, live mode)

ParameterTypeDescription
OPENAI_API_KEYRequiredstring
Required when IBEX_LLM_MODE=live and using OpenAI.
ANTHROPIC_API_KEYRequiredstring
Required when IBEX_LLM_MODE=live and using Anthropic.
IBEX_LLM_MODEenum
Set mock for local dev without provider keys.
Default: live

JWT signing (auth, Phase 2 dashboard)

ParameterTypeDescription
JWT_PRIVATE_KEY_PEMRequiredPEM
RS256 signing key — auth service only; never expose to proxy or clients.
JWT_PUBLIC_KEYS_PEMPEM
Verification keyset for services that validate dashboard JWTs.
JWT_KEY_ID_CURRENTRequiredstring
kid header for active signing key; required for rotation.
OIDC_CLIENT_SECRETstring
Enterprise SSO client secret when OIDC_ENABLED=true.

Token hashing (auth)

Argon2id parameters are configured via IBEX_ARGON2_MEMORY_KIB, IBEX_ARGON2_TIME, and IBEX_ARGON2_PARALLELISM per ADR-0010. PAT wire values are hashed before storage; plaintext is returned once at creation and never logged.

Rotation policy

1

Service-to-service tokens

Rotate every 24 hours with a 1-hour overlap window so in-flight requests still validate.

2

JWT signing keys

Rotate every 90 days. Maintain a keyset (JWT_PUBLIC_KEYS_PEM) so verifiers accept the previous key during JWT_KEYSET_GRACE_SECONDS.

3

Database credentials

Rotate every 30 days when using dynamic secrets; update DSN in secrets manager before revoking old creds.

4

LLM provider keys

Customer-managed for BYOK; update via API without downtime when orgs rotate keys.

Cryptographic standards

Use caseAlgorithm
Password and PAT hashingArgon2id
Dashboard JWTRS256
Symmetric encryptionAES-256-GCM
Content hashingSHA-256

Forbidden: MD5, SHA-1, custom crypto, home-grown JWT verification, storing encryption keys next to ciphertext.

Logging and observability

Safe logging

Log token prefixes (first 8 characters) at most. Never log raw bearer tokens, password hashes, DSN passwords, or full provider API keys.

Structured JSON logs include request_id and trace_id when OTel is initialized. IBEX_LOG_LEVEL=DEBUG may expose sensitive details — disable broadly in production.

Startup validation

Services fail fast at startup when required secrets are missing or when production detects unsafe dev defaults (e.g. IBEX_ENV=production with mock auth). Prefer a crash at boot over running with invalid configuration.

Related

  • Environment variables (deployment)
  • ADR-0010: Cryptography policy
  • Authentication

Was this page helpful?

Edit on GitHub

Last updated on

PreviousTenant isolationNextDocker Compose (dev)

On this page

  • Allowed secret locations
  • Phase 1 secret variables
  • Database
  • Redis (proxy)
  • LLM providers (proxy, live mode)
  • JWT signing (auth, Phase 2 dashboard)
  • Token hashing (auth)
  • Rotation policy
  • Cryptographic standards
  • Logging and observability
  • Startup validation
  • Related
0%