Identity Architecture
All Coderaft products share a single OIDC identity provider for operator authentication. The configuration is stored exactly once — in Coderaft Vault — and consumed at boot by each product container.
Two distinct OIDC contexts
| Context | What it is | Where configured |
|---|---|---|
| Platform OIDC | Operator login to the Coderaft dashboard | Coderaft Vault — platform/identity/oidc |
| WolfGuard Graph App | Coderaft scanning a client's Entra ID tenant | WolfGuard Setup Wizard (azure_tenant_id, azure_client_id) |
Setup flow
Setup Wizard → step: setup-identity
→ POST /api/dashboard/identity/configure
→ dashboard-api → vault-client-platform.js
→ PUT /v1/platform/identity/oidc (mTLS)
→ Coderaft Vault (AES-256-GCM + age-wrapped DEK)
Boot priority chain
Each product reads the OIDC config at startup using this priority chain:
Environment variables
REDFOX_OIDC_ISSUER / PLATFORM_OIDC_ISSUER — Fastest — no network call
Coderaft Vault
GET /v1/platform/identity/oidc (mTLS) — Source of truth
setup_config DB
Legacy wizard data (backward compat) — Fallback only
SetupMode
Products start degraded — no sessions — All previous failed
Secret schema
Secret name: platform/identity/oidc — stored as AES-256-GCM encrypted JSON:
{
"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 GET endpoint. Only the PUT endpoint (dashboard-api → Vault) accepts it.
mTLS certificates per product
| Container | Cert SAN | ACL |
|---|---|---|
| dashboard-api | dashboard-api.coderaft.local | Full admin |
| redfox-api | redfox.coderaft.local | read:platform/identity/oidc, read:redfox_* |
| entraguard-api | entraguard.coderaft.local | read:platform/identity/oidc, read:entraguard_* |
| ravenscan | ravenscan.coderaft.local | read:platform/identity/oidc, read:ravenscan_* |
Certs are generated by the vault-init-certs container on first docker compose up. Lifetime: 90 days. Rotation: re-run vault-init-certs, then restart products.
Dashboard API endpoints
| Method | Path | Description |
|---|---|---|
| POST | /api/dashboard/identity/configure | Write OIDC config to Vault (setup or admin) |
| GET | /api/dashboard/identity/status | Check if configured (no secret returned) |
| POST | /api/dashboard/identity/test | Test OIDC discovery endpoint reachability |
Reconfiguring OIDC on existing setups
Navigate to Settings → Platform → Identity (OIDC) in the dashboard. The current issuer and client_id are pre-populated. The client_secret must always be re-entered to save changes (the Vault GET endpoint never returns it).
| Role | Capability |
|---|---|
| Any authenticated user | View current issuer / client_id (read-only) |
| global_admin | Edit and save configuration |
Next steps
- → Coderaft Vault — secret store architecture
- → Global OIDC Setup — configure once, applied to every product
- → Security Architecture