Global OIDC Setup

The Coderaft platform uses one OIDC identity provider for every product. The config lives in Coderaft Vault under platform/identity/oidc and is read at boot by every product (WolfGuard, Ravenscan, RedFox Bastion, MantisStrike, FalconOne) over mTLS.

Configure once, applies to all products. Set OIDC in the Setup Wizard (step: setup-identity) or in Settings → Platform → Identity. Every product picks it up at its next restart — no per-product OIDC config required.

Why global OIDC

Earlier releases required per-product OIDC configuration: each product had its own setup step with its own issuer/client_id/client_secret fields. This caused drift between products, doubled the surface for misconfiguration, and made OIDC rotation a multi-step manual process across every container.

Global OIDC stores the provider config exactly once in Coderaft Vault. Every product reads it at boot via mTLS — no duplication, single rotation point, consistent identity across the whole suite.

OIDC config in Coderaft Vault

Secret name: platform/identity/oidc

Vault secret — platform/identity/oidc
{
  "issuer":        "https://login.microsoftonline.com/{tenant}/v2.0",
  "client_id":     "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "client_secret": "…",
  "redirect_url":  "https://coderaft.example.com/api/dashboard/auth/callback"
}
client_secret is never returned by the Vault GET endpoint. Only the PUT endpoint (dashboard-api → Vault write) accepts it.

Per-product boot priority chain

Status (2026-06-21). Coderaft Vault Phase 0 is deployed: the secret store, the typed platform/identity/oidc endpoint, and per-product mTLS certificates are all in place. Wiring the Vault fallback into each product backend is the active workstream — see Vault Phase 1 in the roadmap. Until then, products read OIDC from environment variables only; the Vault and DB fallback steps below describe the target architecture.

Every product follows the same boot pattern. Environment variables take precedence (for CI/CD or break-glass), then Vault, then the legacy database fallback. Below is the chain for RedFox Bastion — WolfGuard, Ravenscan, MantisStrike, and FalconOne follow the same shape with their own env-var prefixes and Vault SAN.

Generic product boot sequence (RedFox shown)
product-api startup:
  1. config.FromEnv()
     reads <PRODUCT>_OIDC_ISSUER / _CLIENT_ID / _CLIENT_SECRET
     → if all set, DONE (SetupMode = false)

  2. vault.NewPlatformClient(log)
     reads CODERAFT_VAULT_CLIENT_CERT + CODERAFT_VAULT_CLIENT_KEY
     builds mTLS https.Agent (cert SAN: <product>.coderaft.local)

  3. vaultClient.GetPlatformOIDC(ctx)
     POST coderaft-vault:8200 /v1/secret/get {"name":"platform/identity/oidc"}
     → cfg.ApplyVaultFallback(...)
     → if OIDC now complete: SetupMode = false

  4. setupStore.LoadConfig(ctx)   [DB fallback — legacy wizard data]
     → cfg.ApplyDBFallback(...)

  5. if cfg.SetupMode → degraded mode (no OIDC / no sessions)
     else → full start (signer, OIDC, cipher, …)

Vault client certificates (one per product)

Each product gets a dedicated mTLS client certificate at install time from the vault-init-certs container. The certificate's SAN identifies the product (e.g. redfox.coderaft.local, wolfguard.coderaft.local) and its ACL grants:

  • read:platform/identity/oidc — shared OIDC config
  • read:<product>_* — product-scoped secrets

Certs and keys are mounted into each product container via Docker Compose and referenced by CODERAFT_VAULT_CLIENT_CERT / CODERAFT_VAULT_CLIENT_KEY environment variables.

Rotation today is manual. The installer issues certs with a 3650-day validity. Automatic renewal before expiration is on the roadmap — until then, re-run vault-init-certs and restart the affected product containers to rotate. Add this to your operational calendar.

Configure OIDC — Setup Wizard

  1. Once the platform is deployed, open the dashboard
  2. The Setup Wizard advances to the setup-identity step
  3. Enter: Issuer URL, Client ID, Client Secret, and Redirect URL
  4. Click Save & continue — the config is written to Vault over mTLS
  5. Every product reads the config at its next boot

Reconfigure OIDC on existing installs

Navigate to Settings → Platform → Identity (OIDC). The current issuer and client_id are pre-populated. Re-enter the client_secret to save changes (by design — Vault GET never exposes secrets).

After saving, restart the affected product containers to pick up the new config:

Apply OIDC change to all products
docker compose restart wolfguard-api ravenscan-api redfox-api

Recovery plan — Vault unreachable or cert expired

OIDC is critical: if Vault is unreachable, mTLS certs are expired, or the Vault secret store is corrupted, products fall back to env vars and ultimately to SetupMode (no operator login). Follow this triage to restore identity:

  1. Vault container down — check docker compose ps coderaft-vault. Restart with docker compose up -d coderaft-vault. Products auto-reconnect on their next restart.
  2. mTLS client cert expired — symptom: product logs show x509: certificate has expired. Re-run docker compose up vault-init-certs to reissue certs, then docker compose restart the affected product.
  3. Vault data lost / corrupted — restore the Vault volume from your backup (see backup runbook). If no backup, re-run the Setup Wizard setup-identity step to repopulate platform/identity/oidc from scratch.
  4. Emergency break-glass (no Vault) — set <PRODUCT>_OIDC_* env vars directly in docker-compose.override.yml. This bypasses Vault entirely (cf. Env-var override below). Use only until Vault is restored — env vars cannot be rotated centrally.
  5. All else fails — products start in SetupMode. The dashboard remains reachable for diagnostics; SSH/RDP sessions, scans, and audits are disabled until OIDC is restored.

Env-var override (advanced)

Priority 1 — environment variables — take precedence over Vault for every product. Use this for CI/CD or air-gapped deployments where Vault is unavailable:

Env-var override (takes precedence over Vault)
# docker-compose.override.yml — example for RedFox
services:
  redfox-api:
    environment:
      REDFOX_OIDC_ISSUER: "https://login.microsoftonline.com/{tenant}/v2.0"
      REDFOX_OIDC_CLIENT_ID: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
      REDFOX_OIDC_CLIENT_SECRET: "…"  # use a secret manager in prod

# WolfGuard uses WOLFGUARD_OIDC_*, Ravenscan uses RAVENSCAN_OIDC_*, …
Do not set OIDC env vars in production if Vault is available — they bypass the Vault ACL and prevent rotation from working. Env vars are for emergency break-glass only.

Next steps