Files
ZitPlane/README.md
T

79 lines
16 KiB
Markdown

# ZitPlane
Compact, developer-friendly monorepo for a central identity service, a branded login frontend and an independent user self-service account portal.
## Current phase status
- **P01 Foundation:** complete, initial commit `8f54ccb`.
- **P02 ZITADEL local backend:** pinned official images, development Compose and secure local bootstrap helper. **Gitea Run #86 verified disposable four-service startup, PostgreSQL persistence and OIDC metadata/JWKS.** Admin Console **human login** and local PC startup remain unverified.
- **P03 Login V2 source:** official v4.20.4 source and matching client/proto workspace imported under `auth/ui/v2/`; original UI unchanged. Gitea Run #83 verified frozen install, production build and **1,219/1,219 unit tests**; interactive login not verified.
- **P04 Account Portal:** Next.js + ZITADEL OIDC Auth.js source, protected overview/profile/security pages and responsive foundation under `users/ui/`. Gitea Run #83 verified TypeScript/production build and anonymous API 401/redirect tests; real authenticated session still unverified.
- **P05-CI-01:** Manual Gitea Run #81 **overall FAILURE**: Login V2 build + 1219 unit tests PASS, high/critical gate PASS (18 Moderate Login findings), Account Auth.js TS2345 and Docker checkout FAIL. Details: `docs/P05-CI-01.md`.
- **P05-CI-02:** Gitea Run #83 **3 PASS / 1 FAIL**. Account Portal typecheck/build and negative identity checks PASS; Login V2 build + 1219/1219 tests PASS; High/Critical security threshold PASS (18 Moderate Login records + 1 Moderate Account package OPEN). Docker Postgres/ZITADEL API/Login healthy, but shared runner port 8080 blocked Traefik; cleanup PASS. CI-only portless override added afterward **not CI-verified**; full OIDC E2E deferred. See `docs/P05-CI-02.md`.
- **P05-CI-03:** **Gitea Run #86 SUCCESS** on `03fb589`: portless Docker Compose, four healthy/running services, PostgreSQL restart persistence, ZITADEL readiness, OIDC discovery/JWKS, negative contracts and complete CI cleanup verified. No repeated Account/Login suites. Full interactive OIDC E2E and Moderate dependency fixes remain pending. See `docs/P05-CI-03.md`.
- **P05-SEC-01:** Gitea Run #87 **3 PASS / 1 FAIL**. Account and Login patched Next.js `16.4.6` builds PASS, Login 1219/1219 upstream unit tests PASS, Account audit 0. Login OpenTelemetry patched dependencies reduced prior 18 Moderate to **2 remaining** (glob/minimatch); strict Moderate security gate correctly FAILS. Current dependency patch retained; complete security acceptance requires a separate narrow transitive remediation phase. See `docs/P05-SEC-01.md`.
- **P05-SEC-02:** Seven parent-scoped PNPM overrides resolved `glob`/`minimatch` advisories. Gitea Run #88 Login production audit **0 Moderate/High/Critical PASS**, but Login frozen install/build/units **NOT RUN** because a new CI override validator misparsed existing `>=` version ranges; post-run regex correction **not CI-verified**. Full acceptance **BLOCKED** pending a separately approved focused CI run. Account jobs intentionally skipped. See `docs/P05-SEC-02.md`.
- **P05-SEC-02-A01:** **Gitea Run #89 SUCCESS** on `ff4c58e`: corrected exact override contract PASS, pinned PNPM frozen install PASS, official Login V2 standalone build PASS, upstream Vitest **1219/1219 PASS**, Login production audit **0 Moderate/High/Critical**; Account jobs skipped. **Dependency security/build unit acceptance complete; real user OIDC/MFA E2E and production integration NOT verified**. See `docs/P05-SEC-02-A01.md`.
- **P05-OIDC-01:** Gitea **Run #90 FAILED**: disposable four-service ZITADEL stack healthy and host-portless, but private `localhost:8080` loopback forwarding was not ready. Provisioning aborted before OIDC client/human/browser creation; real callback/session **NOT verified**. Owned database/bootstrap/secret/network cleanup **PASS**. No app/auth source change or deployment. See `docs/P05-OIDC-01.md`.
- **P05-OIDC-02:** **Gitea Run #91 FAILURE**: original four backend services and no-host-port private Traefik Host routing PASS, prebuilt socat version/digest PASS; forwarder immediately **exited with code 1**, so client/user/browser/Auth.js callback NOT EXECUTED. Cleanup PASS. No application/auth/backend edits; real OIDC remains BLOCKED. See `docs/P05-OIDC-02.md`.
- **P05-OIDC-03 / A02 final:** Gitea **Run #93 COMPLETED FAILURE**, source `7b80f41`. Job #206 executed (runner queue resolved). Four backend services and private Traefik routing PASS; socat `SOCKET_BIND_ERROR`, digest-pinned Python fallback `ADDRESS_IN_USE` on private TCP `127.0.0.1:8080`. No OIDC client/human or real Chromium/Auth.js callback/session reached. Mandatory cleanup PASS. Actual 8080 listener identity still UNKNOWN; no production/secret changes. See `docs/P05-OIDC-03-A02.md`.
- **P05-OIDC-04:** Single Gitea **Run #95 FAILURE** on `79dac4f5bb76e1cee4dfaf61657c6e84268b3dfb`, job #209. Source adds private socket owner forensics and isolated loopback forwarder, but CI stopped **before these executed**: 4 healthy backend services PASS, direct private proxy Host HTTP readiness `OIDC_CI_PRIVATE_PROXY_SOCKET_OR_HTTP_BLOCKED` FAIL. Real ZITADEL client/human/Chromium/PKCE/Auth.js session NOT EXECUTED; owned cleanup PASS. Real OIDC remains BLOCKED; listener owner UNKNOWN. See `docs/P05-OIDC-04.md`.
- **P05-OIDC-04-A01:** Gitea **Run #96 SUCCESS** on `670e225db477f180ff14ffa62e6654860a166f17`, job #210. Real disposable ZITADEL project/client/verified test-human, original Login V2 Chromium password+PKCE/state/nonce/Auth.js callback, authenticated Account session/API/page, negative access, local logout and mandatory cleanup **PASS**. Proxy TCP6:8080 listener **Traefik PID1** identified; separate private Socat forwarding verified. **Production HTTPS/MFA/passkeys/custom imported Login V2/multi-app SSO/deployment remain unverified.** See [A01 acceptance](docs/P05-OIDC-04-A01.md).
- **P05-OIDC-05:** Read-only production-context forensic audit after verified Run #96 disposable **prebuilt** Login V2/Auth.js OIDC and Run #89 imported Login **build**. Custom Login image/runtime, HTTPS issuer and callback, production secrets/backup/rollback, MFA/Admin and multi-app SSO are NOT VERIFIED; no new CI or app edits. [Audit](docs/P05-OIDC-05.md).
- **P05-OIDC-06:** [Run #98](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/98) on `fcfa59e826c39b445faa1b5b26c47ce715d8c3d6` **FAILURE**: imported Login frozen/standalone build + disposable custom image **PASS**; OCI `/app/entrypoint.sh` permission denied before actual custom Login/Chromium; imported Login real OIDC **NOT EXECUTED**. Old OIDC backend and new builder/image cleanup **PASS**. Original prebuilt Run #96 OIDC PASS unchanged. Next focused CI-only entrypoint-mode RCA requires approval; no production. [Evidence](docs/P05-OIDC-06.md).
- **P05-OIDC-06-A01:** [Run #99](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/99) / job #214 on `7d6b6d0704b9e39bcb6e74257dadf0b64a19fc0f` **SUCCESS**: original imported Login entrypoint Git mode 100644, disposable copy 644→755, built image executable and actual running image match; real Chromium custom Login V2/PKCE/state/nonce/Auth.js Account session/protected API/negatives/logout PASS, both owned cleanup systems PASS. Production HTTPS/MFA/passkeys/Console/multi-app SSO remain unverified. [Accepted A01](docs/P05-OIDC-06-A01.md).
- **P05-OIDC-07:** Documentation-only [production HTTPS/issuer/ingress/secrets/recovery contract](docs/P05-OIDC-07.md) based on existing imported custom Login [Run #99](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/99) **SUCCESS**. Canonical `https://auth.vib.tools` issuer and `https://account.vib.tools` relying party are **proposed, not verified live**; production TLS, trusted proxy, emergency IAM_OWNER recovery, secrets/DB restore, image release and Console/MFA/SSO acceptance remain BLOCKED. No new CI/source/deployment changes.
- **P05-OIDC-08:** [Gitea Run #101](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/101) / job #217 tested source `2ca1b4493bd47209d0c7eabf7453feaeb1f5174a` **FAILURE**: new non-deployable synthetic Compose `config` PASS and workflow no-resource-action safety PASS, but normalized policy validator `RUNTIME_BEHAVIOR` FAIL; 25 intended negative fixtures **NOT EXECUTED**. No real containers/service startup or public DNS/SSL, production secrets/deployment. Next A01 one-file validator RCA requires separate approval. [Report](docs/P05-OIDC-08.md).
- **P05-OIDC-08-A01:** [Run #102](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/102) / Job #218 **FAILURE** on `07c91ea5bcb2037e3c7b76261e1eb106b49d223f`: static Compose config and manual no-resource-actions PASS; safe normalized diagnostics verified `command:null` and `entrypoint:null` across five services, prior RUNTIME_BEHAVIOR blocker resolved, then new `DEPLOY_DISABLED` failure; original 25 + four new runtime negative cases **NOT EXECUTED**. Existing imported custom Login Run #99 remains accepted. No production action. [A01 report](docs/P05-OIDC-08-A01.md).
- **P05-OIDC-08-A02:** [Run #103](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/103) / job #219 **FAILURE** on `45a2edb854acd98546e60a68482075bc5f742bd2`: synthetic source and normalized **five integer-zero replicas** PASS; unexpected additional normalized `deploy` keys in all five services rejected by strict `DEPLOY_DISABLED` gate, exact keys UNKNOWN; 25+4+3 invalid fixtures NOT EXECUTED, workflow safety/runner job cleanup PASS. No second run, source patch or production deployment. [Operator report](docs/P05-OIDC-08-A02.md).
- **P05-OIDC-08-A03:** [Run #104](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/104) / job #220 **FAILURE** on `7954938fcee4d11c0b27751c7cf7abdcc64cd243`: synthetic Compose static config PASS; all five normalized `deploy` mappings show integer-zero replicas and extra **empty** `resources:{}` / `placement:{}` (verified inert defaults); previous DEPLOY_DISABLED gate passed, next `SERVICE_SECRET_REFS` FAIL with exact normalized secret grant shape UNKNOWN. Original 25 + runtime 4 + replica 3 + deploy 8 negatives **NOT EXECUTED**. Manual workflow safety and runner task cleanup PASS, no production work. [A03 report](docs/P05-OIDC-08-A03.md).
- **P05-OIDC-08-A04:** [Run #105](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/105) / job #221 **SUCCESS** on `daaa8b259a519ae0290ba28936ef2279b3a9172c`: CI-only synthetic Compose static config, source five zero replicas, inert deployment metadata, canonical trusted HTTPS issuer/Account callback/h2c/header/secret reference policies PASS. Exactly **48/48** malformed config/security negative cases PASS (25 original + 4 runtime + 3 replica + 8 deploy + 8 secret grants), manual-only/no configured Docker resource lifecycle step PASS, runner-owned job cleanup PASS. Actual public HTTPS/TLS/DNS, secrets, Console/MFA/SSO/production release **NOT VERIFIED**. [A04 operator acceptance](docs/P05-OIDC-08-A04.md).
- **P05-OIDC-09:** Documentation-only production release forensic preflight on baseline `d3ee3fa4de62463c53d5213c532d097278f928c6`. Accepted [Run #105](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/105) **synthetic static security PASS (48/48 negatives)** and [Run #99](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/99) **real disposable custom Login browser OIDC SUCCESS** are preserved. No signed released Login/Account artifact, production image recipe for Account, real trusted HTTPS issuer/secret custody/DB encrypted restore/Console/MFA/multi-app SSO or controlled release acceptance is proven. Production go/no-go **BLOCKED**; no new CI or live actions. [Operator preflight](docs/P05-OIDC-09.md) and [full Scope Locks](notes/P05-OIDC-09.md).
- **P05-OIDC-10:** [Gitea Run #106](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/106) / Job #222 **COMPLETED FAILURE** on source `6ba004808ef47c8856c1a7906faaf7ee807d15a6`: provenance source/tree/base index and **12/12 negatives PASS**, PNPM frozen 1121 packages + imported Next16.4.6 standalone build PASS, temporary 0755 entrypoint and digest-pinned local Login OCI image build/probe PASS; final OCI `IMAGE_SECRET_ENV_KEY` fail-closed check **FAIL** (actual key not logged, possible `PAT`/`PATH` false positive NOT VERIFIED). Partial SPDX material attestation **NOT GENERATED**. Run-owned local builder/image/context and runner container/volumes/network cleanup PASS. No post-run source patch or CI rerun. Original custom Login real OIDC Run #99 and static security Run #105 remain accepted. [Operator report](docs/P05-OIDC-10.md).
- **P05-OIDC-10-A01:** Scope-first source-only `tests/ci/login_image/provenance.py` environment-key RCA on tested SHA `4452a61b0f5a0892399060fd7569231a564bce02`, safe PATH/PAT token boundary, finite known benign env names, sensitive/unknown/duplicate/malformed key rejection, 12 original + 14 new negative fixtures **DEFINED but NOT CI EXECUTED**. One [Gitea Run #108](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/108) / Job #230 **QUEUED**, job not started, runner online/labels/capacity UNKNOWN; therefore frozen Login/OCI image, partial SPDX/unsigned provenance and owned cleanup **NOT EXECUTED in A01**. No rerun, no post-dispatch source edit, no production. [Operator report](docs/P05-OIDC-10-A01.md), [next exact Scope Lock](notes/P05-OIDC-10-A01.md).
- **Production / Coolify:** no active production deployment is verified from this repository; live VPS/Coolify/DNS/TLS was deliberately **not inspected** in P05-OIDC-09 or P05-OIDC-10.
## Documentation and project knowledge
ZitPlane uses three **Git-tracked Markdown areas**. For every future feature, change or fix, create the plan **before editing code** and update all affected documentation in the same phase:
| Folder | Who reads it | What's inside |
| --- | --- | --- |
| [`notes/`](notes/README.md) | Developers / AI agents during work | Scope locks, pre-change plans, phase/fix logs, decisions, verification outcomes |
| [`project/`](project/README.md) | Maintainers / developers / AI agents | Real file/function map, feature/page details, architecture, modules, dependencies, change history and full source index |
| [`docs/`](docs/README.md) | End users / operators / developers | Page and button usage, onboarding, status, setup steps, troubleshooting and known limitations |
Each of these folders contains `README.md` and the requested literal `MINIFEST.md` (direct-child list, purpose, phase and status). The root [MINIFEST.md](MINIFEST.md) indexes top-level content. Rules are mandatory in [AGENTS.md](AGENTS.md). Imported official Login V2 source remains untouched.
## Responsibility map
| Path | Purpose |
| --- | --- |
| `core/backend/zitadel/` | Official ZITADEL backend integration and local helper |
| `deployment/docker/compose.backend.dev.yaml` | Loopback-only developer stack |
| `auth/ui/v2/` | Official Login V2 monorepo subset (Next.js source in `apps/login/`, matched client/proto and pnpm/Nx workspace) |
| `users/ui/` | P04 account portal source: separate Next.js app, protected pages, OIDC, server-side user API (CI pending) |
| `packages/` | Shared packages only when needed |
| `tests/` | Focused P02 contracts and P05 isolated CI smoke scripts |
| `.gitea/` | Gitea Actions manual CI verification configuration |
| `docs/` | Architecture, scopes and developer instructions |
## Local development (requires Docker Desktop Linux containers)
```powershell
py core/backend/zitadel/dev.py init
py core/backend/zitadel/dev.py config
py core/backend/zitadel/dev.py up
```
When the backend stack is actually running, the local Admin Console is expected at `http://localhost:8080/ui/console`. This is **not** a currently verified working URL. See [backend setup](core/backend/zitadel/README.md) and [developer guide](docs/DEVELOPMENT.md).
## Intended public architecture (not deployed)
- `auth.vib.tools`: eventual ZITADEL API, official Console, customized login.
- `account.vib.tools`: future custom account portal.
- Individual SaaS applications own their own billing, subscriptions and business databases.
- One Git repo, isolated containers; ZITADEL Go source remains upstream.
## Working agreements
Read [AGENTS.md](AGENTS.md), [architecture](docs/ARCHITECTURE.md), [P03 source import](docs/P03-SOURCE-IMPORT.md), [Login V2 workspace guide](auth/ui/v2/README.md), [P04 account evidence](docs/P04-ACCOUNT-PORTAL.md), [Account Portal guide](users/ui/README.md) and [phase scopes](docs/PHASES.md). Use separate, expressly approved phases; no production secrets or user data in Git.