docs(audit): close P05-OIDC-05 production-context readiness review
This commit is contained in:
1 parent
f91e7956f5
commit
e801318f01
20 files changed
+146
-7
No files matched your search
@@ -25,6 +25,8 @@ This is the **developer-focused implementation history**. `notes/CHANGELOG.md` i
|
||||
|
||||
| 2026-11-23 | P05-OIDC-04-A01 | Safe classified proxy readiness in `tests/ci/oidc_e2e/run.sh`; no backend/Login/Account/auth changes | Gitea [Run #96](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/96) job #210 **SUCCESS** on source `670e225db477f180ff14ffa62e6654860a166f17`: isolated real browser OIDC with protected session/negative/logout PASS, actual Traefik PID1 TCP6 8080 identified, owned cleanup PASS. See `notes/P05-OIDC-04-A01.md` |
|
||||
|
||||
| 2026-11-23 | P05-OIDC-05 | Source and evidence forensic audit, prioritized custom Login/TLS/identity/ops gaps; no runtime/source edits | `b3841d8c05d6b47ceaf1dbc5f7103b8de4f256e6`; original prebuilt Login E2E Run #96 PASS, imported Login frozen build Run #89 PASS, production NOT VERIFIED; `notes/P05-OIDC-05.md` |
|
||||
|
||||
## Required entry for each future change
|
||||
|
||||
Date, phase, approval/scope, baseline SHA, source files changed, reason/functional effect, interface/security impacts, migration/config steps, test/CI evidence, docs updated, commit SHA, verified/unverified limitations. Append one record for every approved change/fix, including documentation-only changes. Never overwrite old conclusions without noting correction.
|
||||
@@ -168,3 +168,7 @@ Manual Gitea [Run #95](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/95) jo
|
||||
## P05-OIDC-04-A01 — terminal single-run acceptance
|
||||
|
||||
Gitea [Run #96](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/96) on source `670e225db477f180ff14ffa62e6654860a166f17`, job #210 **COMPLETED SUCCESS**, all four workflow job steps SUCCESS. Four backend/portless services, private Host HTTP, socket PID1 Traefik on TCP6 8080, dedicated Socat/issuer, official ephemeral project/client/human, browser real password/PKCE/state/nonce/Auth.js/subject/protected API/page, anonymous and callback negatives, local logout and mandatory exact-owned cleanup **PASS**. `tests/ci/oidc_e2e/run.sh` alone changed in A01: bounded/no-secret classified readiness failures and conditional transient retry; retry not exercised. No workflow, auth backend, package, deployment or runner edits. The source-tested SHA is distinct from the later documentation-only commit; production integration remains outside Run #96.
|
||||
|
||||
## P05-OIDC-05 CI coverage audit — no new test
|
||||
|
||||
Gitea [Run #96](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/96) is terminal SUCCESS for disposable original-prebuilt Login V2 / ZITADEL / Account real Chromium authentication, negative tests, portal-local logout and cleanup. Run #89 separately tested upstream imported Login V2 frozen build/1219 units/registry security; Run #87 Account build/security jobs passed. No accepted workflow builds a **custom-source Login V2 image** and substitutes it into full real OIDC E2E. No production TLS/domain/MFA/Admin Console/two-app SSO pipeline is demonstrated. This docs-only audit did not dispatch or rerun anything. See `notes/P05-OIDC-05.md`.
|
||||
@@ -54,3 +54,7 @@ New manually dispatched workflow `.gitea/workflows/p05-ci.yml` defines four isol
|
||||
## P05-CI-03 verified backend runtime, not a user page
|
||||
|
||||
Gitea [Run #86](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/86) verified P02's PostgreSQL, ZITADEL API, prebuilt Login V2 and Traefik running/healthy in a disposable runner, including restart persistence, exact `http://localhost:8080` OIDC issuer discovery/JWKS, negative metadata fixtures and cleanup. This is **not** verification of a human pressing Login/Sign Up/MFA or any positive Account Portal session. Those remain **unverified** and must be documented when future phases implement isolated real-identity E2E.
|
||||
|
||||
## P05-OIDC-05 source-vs-acceptance clarification
|
||||
|
||||
Run #96 **verified** original prebuilt Login V2 password callback and Account `/signin`, protected account/session/API, anonymous+invalid-callback rejection and local logout. Imported upstream `auth/ui/v2/apps/login/src/app/(login)` has mfa, otp, passkey, u2f, register, password and IdP routes, but their production policies, enrollment/recovery/WebAuthn origin and custom image behavior were **NOT** accepted. Account `/account/security` is informational plus a policy-dependent Console link; no local factor management. Second-app SSO, admin human login, org/tenant permissions and global logout UNVERIFIED. See `notes/P05-OIDC-05.md`.
|
||||
@@ -176,3 +176,12 @@ Official Login V2 user/auth source, user Account Portal, backend Compose and pro
|
||||
**P05-OIDC-03:** `tests/ci/oidc_e2e/forwarder.py` new CI-only asyncio stdlib opaque TCP localhost relay. `tests/ci/oidc_e2e/run.sh` now first classifies existing socat startup stderr into fixed safe error classes and, on unhealthy socat, switches only once to immutable-digest official Python within the same run-owned container name/network namespace. `cleanup.sh` and `provision.py` untouched; `browser.cjs`, `users/ui/**`, `auth/ui/v2/**` and the original P02 Compose untouched.
|
||||
|
||||
**P05-OIDC-04-A01 source map update:** The *only* source change is `tests/ci/oidc_e2e/run.sh` at `670e225db477f180ff14ffa62e6654860a166f17`: its pre-forwarder direct private proxy:80 readiness block classifies safely bounded socket/HTTP error codes and limits retry to transient classes only, preserving exact Host/issuer/network/isolation. Existing pre-bind namespace socket inspector identified Traefik PID 1 TCP6:8080 in actual Gitea Run #96; the already-existing isolated Socat forwarder plus unchanged original provisioning/browser/cleanup verified full disposable real OIDC SUCCESS. See `notes/P05-OIDC-04-A01.md`.
|
||||
|
||||
## P05-OIDC-05 reviewed read-only integration map
|
||||
|
||||
- `deployment/docker/compose.backend.dev.yaml`: HTTP localhost dev backend, h2c Traefik and **prebuilt** Login V2 image; not a production manifest
|
||||
- `auth/ui/v2/apps/login/{Dockerfile,package.json}`: imported build/package inputs; Run #89 build only, not Run #96 runtime
|
||||
- `auth/ui/v2/apps/login/src/{proxy.ts,lib/server/service-url.ts}`: upstream rewrite/Host proxy logic, not a configured production ingress
|
||||
- `users/ui/src/{auth.ts,lib/env.ts,lib/identity.ts}`: Auth.js PKCE/session, HTTPS origin validation, protected session and Console link
|
||||
- `users/ui/src/{app/api/account/me/route.ts,components/account-shell.tsx}`: protected identity-only API and **local** logout
|
||||
- `.gitea/workflows/p05-oidc-acceptance.yml`, `tests/ci/oidc_e2e/browser.cjs`: disposable **prebuilt** Login V2 E2E. Entire original source/CI left unchanged. `notes/P05-OIDC-05.md` lists blockers.
|
||||
@@ -141,3 +141,7 @@ Existing `tests/ci/security_advisory_gate.py` remains the independent **live reg
|
||||
**P05-OIDC-03 narrow new functions:** `run.sh::forwarder_http_ready` makes an actual status-only HTTP probe through private `127.0.0.1:8080` to the original proxy with `Host: localhost:8080`. The socat fallback branch reads *only* its pre-credential startup stderr into an allowlisted Python error classifier, verifies run-owner label before replacement, then resolves official Python by digest. `forwarder.py::copy_bytes` relays opaque 64 KiB TCP chunks without logging payload; `forwarder.py::serve_client` connects only to localhost:80 and transparently relays both directions; `forwarder.py::main` binds IPv4 loopback :8080 and emits fixed safe errno classes. Original IAM/user/PKCE/Auth.js functions unchanged.
|
||||
|
||||
**P05-OIDC-04-A01 function audit:** The inline Python private Traefik readiness probe in `tests/ci/oidc_e2e/run.sh` now prints only enumerated socket error classes or numeric HTTP status, closes its HTTP socket and conditionally retries known transient errors (3 attempts max), before any OIDC client/user exists. On successful first attempt, control continues to the already-present safe port-8080 inode/PID inspector, private Socat, official provisioning and real browser acceptance. Run #96 verified all positive/negative browser/session/logout and cleanup gates, but **did not exercise retry or Python fallback**. No protected Account/Auth.js/Login V2 functions were changed.
|
||||
|
||||
## P05-OIDC-05 reviewed function boundaries (unchanged)
|
||||
|
||||
`users/ui/src/lib/env.ts::required,validatedUrl,oidcSettings` validates required Auth.js settings, production HTTPS origins and min-length secret; does not configure ingress. `users/ui/src/auth.ts` provider+`signIn,jwt,session` callbacks verify standard PKCE/state/nonce and fail-closed ID/expiry, but no refresh or IdP-wide logout. `users/ui/src/lib/identity.ts::requireIdentity,zitadelSelfServiceUrl` protects server identity and constructs a permission-dependent Console link. `users/ui/src/components/account-shell.tsx::portalLogout` invalidates only the portal session. Imported `auth/ui/v2/apps/login/src/proxy.ts::proxy` and `src/lib/server/service-url.ts::getServiceConfig` are source-level proxy handlers, not custom-image integration proof. Run #96 verified the existing prebuilt flow only.
|
||||
@@ -90,3 +90,7 @@ In the ONLY new Run #95, the original 4 services were healthy but the **earlier*
|
||||
Gitea [Run #96](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/96), job #210, source `670e225db477f180ff14ffa62e6654860a166f17`, confirmed the expected network split and full end-to-end identity acceptance. `run.sh` now classifies private pre-forwarder probe socket/HTTP failures with allowlisted markers and at most 3 attempts conditional on transient socket classes; **this first actual check passed** (so retries and failure classifications were not triggered). The existing pre-bind `/proc/net/tcp{,6}` inspector identified a real TCP6 LISTEN inode `6286327` at port 8080 owned by `traefik` PID 1 in the disposable proxy namespace. The separate Socat namespace (private Docker network) used its own loopback :8080 and Docker-private proxy:80 to preserve `http://localhost:8080` issuer/Host without public host ports. Both private ready and issuer discovery returned verified PASS.
|
||||
|
||||
Official ZITADEL API created disposable project/client/verified test human, isolated secrets in run-owned volumes; original Login V2 + Chromium + Auth.js completed real authorization code PKCE S256/state/nonce, password callback, subject/cookie/protected Account API/page, anonymous/tampered-callback failures and local logout. `always()` cleanup verified original backend/bootstrap/secret volumes, network and labeled containers removed. `forwarder.py` unchanged and Python fallback not needed. **Only isolated development-origin E2E is accepted**; production TLS, custom imported Login V2 wiring, MFA/passkeys, Admin Console human flow, multi-app SSO and deployment are separate.
|
||||
|
||||
## P05-OIDC-05 production-context audit boundary
|
||||
|
||||
Run #96 verified the **official prebuilt** `ghcr.io/zitadel/zitadel-login:v4.20.4` with real disposable OIDC, not the imported `auth/ui/v2/apps/login` custom image. Run #89 separately verified frozen custom source build/unit/security, not its runtime. Existing dev Compose still routes Login V2 to the original image; production HTTPS and custom image wiring are BLOCKED. Account `src/auth.ts` implements PKCE/state/nonce and expiry/subject protection, while `src/lib/env.ts` requires HTTPS origins in production; no TLS ingress, trusted-header policy, production-cookie validation, federated logout/refresh or multi-app SSO is thereby provided. Full matrix: `notes/P05-OIDC-05.md`.
|
||||
@@ -93,3 +93,7 @@ CI only: official ZITADEL v4.20.4, official Login V2 v4.20.4, PostgreSQL 17.10/T
|
||||
|
||||
|
||||
**P05-OIDC-03 CI dependency:** Keep existing pinned `alpine/socat:1.8.1.3` for a single startup/error-class observation. If not healthy, use the already-existing official `python:3.12-alpine` CI image resolved to an immutable registry SHA256 digest, running only the tracked stdlib-only `forwarder.py` (no `pip`, `apk`, extra package manifest or lockfile update). Both run solely inside the disposable proxy network namespace, bind no host port, hold no auth data and are removed by existing always-run ownership cleanup. Source preparation is not successful login proof.
|
||||
|
||||
## P05-OIDC-05 production readiness gaps
|
||||
|
||||
`deployment/docker/compose.backend.dev.yaml` is the **only** tracked backend Compose: localhost HTTP external issuer, insecure forwarded proto, dev-only volumes, fixed internal networking and official prebuilt Login. Auth.js origin validation in `users/ui/src/lib/env.ts` does not deploy TLS or sanitize Host/forwarded headers. No production Coolify/Compose, Account runtime container image, custom Login image acceptance, dedicated production secret rotation/master-key escrow, SMTP, backups/restore, certificate renewal, release/rollback/monitoring definitions were found in the tracked tree. No external production system was inspected. Official production guidance: https://zitadel.com/docs/self-hosting/manage/production and https://zitadel.com/docs/self-hosting/manage/reverseproxy/reverse_proxy .
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
**Snapshot:** 2026-11-23, P05-OIDC-04-A01 terminal Gitea [Run #96](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/96), job #210, immutable tested source `670e225db477f180ff14ffa62e6654860a166f17`: **SUCCESS**, private 8080 socket owner Traefik PID1, real disposable Chromium/Login V2/Auth.js authenticated Account session/negative/logout **PASS**, exact run-owned cleanup **PASS**. Production HTTPS/MFA/custom Login integration NOT VERIFIED. Documentation-only closure SHA is not the CI-tested source.
|
||||
|
||||
**Git-tracked paths: 759.** Untracked `AI_INSTRUCTIONS.md` and local secrets excluded.
|
||||
**Git-tracked paths: 761.** Untracked `AI_INSTRUCTIONS.md` and local secrets excluded.
|
||||
|
||||
This list reflects actual tracked Git files, not proof of authenticated OIDC. See `notes/P05-OIDC-03.md` and `project/OIDC-E2E-ARCHITECTURE.md`.
|
||||
|
||||
@@ -13,8 +13,8 @@ This list reflects actual tracked Git files, not proof of authenticated OIDC. Se
|
||||
| `auth` | 639 | Pinned official Login V2 source, unmodified |
|
||||
| `core` | 2 | Backend dev helper, unmodified |
|
||||
| `deployment` | 2 | P02 dev Compose, unmodified |
|
||||
| `docs` | 25 | User and operator docs |
|
||||
| `notes` | 17 | Phase plans and CI evidence |
|
||||
| `docs` | 26 | User and operator docs |
|
||||
| `notes` | 18 | Phase plans and CI evidence |
|
||||
| `packages` | 1 | Repository root |
|
||||
| `project` | 12 | Source, functions and architecture inventory |
|
||||
| `scripts` | 1 | Repository root |
|
||||
@@ -695,7 +695,7 @@ This list reflects actual tracked Git files, not proof of authenticated OIDC. Se
|
||||
- `deployment/README.md`
|
||||
- `deployment/docker/compose.backend.dev.yaml`
|
||||
|
||||
### docs ? 25 files
|
||||
### docs ? 26 files
|
||||
|
||||
- `docs/ARCHITECTURE.md`
|
||||
- `docs/DEVELOPMENT.md`
|
||||
@@ -714,6 +714,7 @@ This list reflects actual tracked Git files, not proof of authenticated OIDC. Se
|
||||
- `docs/P05-OIDC-03-A02.md`
|
||||
- `docs/P05-OIDC-04.md`
|
||||
- `docs/P05-OIDC-04-A01.md`
|
||||
- `docs/P05-OIDC-05.md`
|
||||
- `docs/P05-SEC-01.md`
|
||||
- `docs/P05-SEC-02-A01.md`
|
||||
- `docs/P05-SEC-02.md`
|
||||
@@ -723,7 +724,7 @@ This list reflects actual tracked Git files, not proof of authenticated OIDC. Se
|
||||
- `docs/TROUBLESHOOTING.md`
|
||||
- `docs/USER-GUIDE.md`
|
||||
|
||||
### notes ? 17 files
|
||||
### notes ? 18 files
|
||||
|
||||
- `notes/CHANGELOG.md`
|
||||
- `notes/DOCS-01.md`
|
||||
@@ -738,6 +739,7 @@ This list reflects actual tracked Git files, not proof of authenticated OIDC. Se
|
||||
- `notes/P05-OIDC-03-A02.md`
|
||||
- `notes/P05-OIDC-04.md`
|
||||
- `notes/P05-OIDC-04-A01.md`
|
||||
- `notes/P05-OIDC-05.md`
|
||||
- `notes/P05-SEC-01.md`
|
||||
- `notes/P05-SEC-02-A01.md`
|
||||
- `notes/P05-SEC-02.md`
|
||||
@@ -821,3 +823,5 @@ This list reflects actual tracked Git files, not proof of authenticated OIDC. Se
|
||||
**P05-OIDC-04 inventory update (2026-11-23):** From the prior snapshot, one tracked `notes/P05-OIDC-04.md` and one tracked `docs/P05-OIDC-04.md` were added (755 → 757), with only two existing CI source files modified. Source `79dac4f5bb76e1cee4dfaf61657c6e84268b3dfb` was the one tested in Gitea Run #95, which FAILED before socket inspector/forwarder. The final docs commit is not a newly tested source. Excluded/untracked root `AI_INSTRUCTIONS.md` remains untouched.
|
||||
|
||||
**A01 inventory verification note:** At tested source `670e225db477f180ff14ffa62e6654860a166f17`, Gitea recursive tree had 758 tracked blobs (one A01 pre-source note added to prior 757). The subsequent documentation-only addition `docs/P05-OIDC-04-A01.md` makes **759 tracked blobs**; all other A01 changes were modifications to existing allowed source/docs. No untracked root `AI_INSTRUCTIONS.md` touched or represented as Git-tracked.
|
||||
|
||||
**P05-OIDC-05 snapshot:** 759 baseline tracked paths plus scoped `notes/P05-OIDC-05.md` (committed first) and operator `docs/P05-OIDC-05.md` (this docs closure) = **761 tracked files**. All other edits are allowed documentation. No application source, tests, workflows, manifests/locks, deployment, runner or production modified. Untracked `AI_INSTRUCTIONS.md` excluded and untouched. Run #96 CI tested SHA `670e225db477f180ff14ffa62e6654860a166f17` is NOT this docs SHA.
|
||||
Reference in new issue
Block a user