gemstone-nexus · Phase 6
DOC — Auth0 Provisioning (Phase 0 → production closeout)
Metadata
| id | doc_id | title | category | source_path | summary | content_hash | indexed_at |
|---|---|---|---|---|---|---|---|
| 7 | DOC-AUTH0-PROVISIONING | DOC — Auth0 Provisioning (Phase 0 → production closeout) | reference | DevResources/docs/DOC-Auth0-Provisioning.md | On punchlist (`DOC07-Punchlist.md` § Deferred). No live Auth0 credentials exist in AWS Secrets Manager or on the T4 host. Stack remains bootable with placeholders. **Phases 0–5 and production prep continue without a live tenant**; `/healthz` already allows `auth0.configured: false`. | b98d20f1e7b6a778541bbc7bcb2d2a6473da069b | 2026-07-22 18:33:18 |
Content
# DOC — Auth0 Provisioning (Phase 0 → production closeout) **Status (2026-07-21):** **DEFERRED — non-blocking for engineering.** On punchlist (`DOC07-Punchlist.md` § Deferred). No live Auth0 credentials exist in AWS Secrets Manager or on the T4 host. Stack remains bootable with placeholders. **Phases 0–5 and production prep continue without a live tenant**; `/healthz` already allows `auth0.configured: false`. **Audience:** Practitioner standing up Auth0 for GemStone on the T4 EC2 / local Golden clone. **Companion:** `DIDYMUS-PLAYBOOK.md` §9 (same steps), `DOC-Deploy-Pipeline.md`, `.env.example`, punchlist Auth0 row. ## Verification snapshot (automatable — done) | Check | Result | |-------|--------| | `DATARIGHT_DEV_SECRETS` (us-east-1 / us-east-2) | **No** `AUTH0_*` / `VITE_AUTH0_*` keys (21 keys total; `AUTH_TOKEN_SECRET` is unrelated) | | Sibling secrets (`Labs4You*`, `RusticRavinesSecrets`, `SagePeak_Dev_Secrets`) | **No** Auth0 keys | | EC2 `/home/dr/AppDev/gemstone-nexus/.env` | Keys declared; **all credential values empty**; `AUTH0_ENABLED=false` | | `GET https://18.116.188.14/healthz` → `checks.auth0` | `configured: false`, detail `AUTH0_DOMAIN/AUDIENCE placeholders — tenant TBD` | Wiring and Management API automation are **not possible** until Mark creates a tenant and stores secrets. ## Exact human actions (Mark) ### 1. Create Auth0 tenant + app + API 1. Sign up / log in at [https://auth0.com](https://auth0.com) (free or paid tenant is fine for closeout). 2. Create a **Regular Web Application** (name e.g. `GemStone Nexus`). 3. Create an **API** with Identifier/Audience, e.g. `https://gemstone.dataright.net/api` (this string becomes `AUTH0_AUDIENCE`). 4. Note from the Application settings: - Domain → `AUTH0_DOMAIN` / `VITE_AUTH0_DOMAIN` (e.g. `your-tenant.us.auth0.com`) - Client ID → `AUTH0_CLIENT_ID` / `VITE_AUTH0_CLIENT_ID` - Client Secret → `AUTH0_CLIENT_SECRET` 5. Set Application URIs (adjust if public URL differs): - Allowed Callback URLs: `https://18.116.188.14/app/callback`, `https://gemstone.dataright.net/app/callback`, `http://localhost:5173/app/callback` - Allowed Logout URLs: `https://18.116.188.14/`, `https://gemstone.dataright.net/`, `http://localhost:5173/` - Allowed Web Origins: same origins as above (no path) ### 2. Social connections + roles 1. Enable **Universal Login**. 2. Enable social connections: **Google**, **Facebook**, **LinkedIn** (developer consoles + Auth0 connection setup). 3. Define Auth0 roles (DOC03 §7): `SuperAdmin`, `Org Admin`, `Practitioner`, `GemStone Agent`. 4. (Optional) Auth0 Organizations → map to `orgs.auth0_org_id` + Postgres RLS GUC `app.current_org_id`. ### 3. Store secrets (required before agent can wire EC2) Update AWS Secrets Manager secret **`DATARIGHT_DEV_SECRETS`** (region **us-east-1**; mirror to us-east-2 if that copy is kept in sync) with these **exact key names** (string values, no placeholders): ```text AUTH0_DOMAIN AUTH0_AUDIENCE AUTH0_CLIENT_ID AUTH0_CLIENT_SECRET AUTH0_ISSUER # usually https://<AUTH0_DOMAIN>/ AUTH0_ENABLED # true VITE_AUTH0_DOMAIN VITE_AUTH0_CLIENT_ID ``` **Do not** commit these to git. Host `.env` is filled from Secrets Manager / deploy scripts. ### 4. Reply in chat when ready Tell the agent: **“Auth0 secrets are in DATARIGHT_DEV_SECRETS”** (no need to paste values). Next agent turn will: pull keys → write EC2 `.env` → recreate `api` (+ rebuild `web` for Vite args) → verify `/healthz` `auth0.configured: true` → optional token smoke. ## Why placeholders are intentional until then `/healthz` reports `auth0.configured: false` when `AUTH0_DOMAIN` / `AUTH0_AUDIENCE` are empty. That is **not** a Phase 0 failure and **does not block** Atlas, pen-test prep, BABA checklist, store assembly, device-UAT docs, or load-test prep: compose and required deps (Postgres, Redis, ledger) stay green while the tenant is provisioned out-of-band. User decision 2026-07-21: place Auth0 on the punchlist and move on. ## Login UI note HorizonORBIT login layout lives in **HorizonCRM** (not cloned here). Until that repo is available, `/app/login` remains a DataRightTailwind-compatible stub pointing at Auth0 once configured. ## Related env keys See `.env.example` / `DevResources/project.env.example` for `AUTH0_*` and `VITE_AUTH0_*`. Leave blank until the tenant exists.