**Baseline:** commit `40af500` with documentation phase DOCS-01 in progress. This is an **exact first-party role map** plus pointers to the complete upstream source inventory. See [SOURCE-INVENTORY.md](SOURCE-INVENTORY.md) for the individual paths of **all Git-tracked files**, including the imported upstream.
Upstream import: official ZITADEL `v4.20.4` / Git `384bb9ec96b501ad39dc232ee2061a40fe180bbd`. Imported files are intentionally byte-for-byte identical except two excluded upstream environment files. **No source edit was performed in P03.** See `docs/P03-SOURCE-IMPORT.md`.
| `.gitea/workflows/p05-ci.yml` | Manual Gitea Actions workflow with Account, Login, dependency security and disposable backend jobs |
| `.gitea/README.md`, `.gitea/MINIFEST.md`, `.gitea/workflows/README.md`, `.gitea/workflows/MINIFEST.md` | Ownership, controls and file register for new CI configuration |
`packages/README.md`: intentionally empty shared-package placeholder, not the upstream `auth/ui/v2/packages/`.
`users/ui/public/`: currently no public assets registered. `project/` and `docs/` files are indexed by their own `MINIFEST.md`.
## Exact-file maintenance workflow
For any approved update:
1. Find target in this map, then open the actual source file and verify current behavior.
2. Record before/after and Scope Lock in `notes/`.
3. Change only approved files. Update relevant function/feature and user docs in the same phase.
4. Add change record to `project/CHANGELOG.md` and sync `MINIFEST.md` / source inventory if structure changes.
5. Do not rewrite or claim knowledge of every upstream function without examining it. Imported source internals stay officially sourced until audited for an approved edit.
| `users/ui/package.json` and `users/ui/package-lock.json` | Account Portal direct Next.js 16.4.6 security pin and npm v3 metadata-only lock |
| `auth/ui/v2/apps/login/package.json` | Official Login V2 dependency **declaration only**: Next.js/ESLint plugin and coordinated OpenTelemetry SDK/auto instrumentation; original app/auth source untouched |
| `auth/ui/v2/pnpm-lock.yaml` | Reproducible PNPM v10.30.3 resolution with pruned unreachable snapshots from former large upstream workspace |
| `.gitea/workflows/p05-security-acceptance.yml` | Manual four-job CI: independent Account/Login frozen builds and Account/Login production advisory gates |
| `tests/ci/security_advisory_gate.py` | Rejects malformed npm/pnpm JSON or any Moderate/High/Critical audit record; never suppresses or changes packages |
| `project/DEPENDENCY-SECURITY.md` | Detailed GHSA/group/parent/versions/patch/risk and CI disposition |
| `notes/P05-SEC-01.md`, `docs/P05-SEC-01.md` | Pre-change plan, source patch provenance, actual run results and operator guidance |
**Read-only:**`auth/ui/v2/pnpm-workspace.yaml`, all `users/ui/src/**`, original Login V2 components/logic, backend/Compose and unrelated monorepo packages.
| `auth/ui/v2/pnpm-lock.yaml` | Pinned PNPM v10.30.3 lock metadata, patched transitive versions, original four importers |
| `.gitea/workflows/p05-security-acceptance.yml` | Optional `login_only=true` manual dispatch, no Account rerun; Login install/build/unit and independent production strict security audit |
| `tests/ci/transitive_override_contract.py` | CI checks only seven exact parent overrides; old affected package versions absent; parents resolve patched version |
| `notes/P05-SEC-02.md`, `docs/P05-SEC-02.md` | Pre-edit parent-chain evidence, exact patch and actual run outcome |
Official Login V2 user/auth source, user Account Portal, backend Compose and production infrastructure remain unmodified.
## P05-OIDC-01 — disposable real OIDC acceptance source map
`.gitea/workflows/p05-oidc-acceptance.yml`: one manual Gitea isolated Docker job and mandatory `always()` cleanup. `tests/ci/oidc_e2e/compose.owner.override.yaml`: only ephemeral IAM_OWNER PAT bootstrap; original P02 Compose untouched. `tests/ci/oidc_e2e/run.sh`: ownership preflight, portless backend startup, private loopback routing and original-app browser harness. `tests/ci/oidc_e2e/provision.py`: official ZITADEL API client/project/verified human creation and 0600 temporary secret fixture. `tests/ci/oidc_e2e/browser.sh`: CI-only pinned Playwright/Account npm dependencies. `tests/ci/oidc_e2e/browser.cjs`: actual Chromium Auth.js/OIDC/password/callback/session and fail-closed checks. `tests/ci/oidc_e2e/cleanup.sh`: owned-only containers, volume, bootstrap/database data cleanup. New directory `README.md` and `MINIFEST.md` document all modules. Detailed boundaries: `project/OIDC-E2E-ARCHITECTURE.md`; actual test outcomes pending Gitea.
**P05-OIDC-02 updated CI functions only:**`tests/ci/oidc_e2e/run.sh` stage between four-service readiness and provisioning now explicitly validates proxy Host/HTTP status, pulls version-pinned prebuilt socat, checks its entrypoint/immutable image digest and checks the private 8080 listener plus sidecar running/exit state. `tests/ci/oidc_e2e/provision.py::wait_until_ready()` checks HTTP 200 without JSON decoding. `cleanup.sh`, browser scripts and all application/backend/auth source remain read-only.
**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`.
-`.gitea/workflows/p05-custom-login-acceptance.yml`: manual imported Login image+browser acceptance and dual owned cleanup
-`deployment/docker/compose.login-ci.override.yaml`: CI-only `zitadel-login.image` replacement, never publish a host port
-`tests/ci/login_image/{build.sh,cleanup.sh,README.md,MINIFEST.md}`: private run-labeled builder and local image packaging, owner-verified teardown and mandatory folder manifest
-`tests/ci/oidc_e2e/run.sh`: exact numeric-run-tagged opt-in Compose overlay and actual running image-ID check; no change to non-opt-in path. Run #98 halted before that check. Original Login/Auth.js/provision/browser/cleanup code unchanged.
-`auth/ui/v2/apps/login/scripts/entrypoint.sh`: unchanged original imported shell blob, Git mode `100644`; execution must be repaired **only in isolated CI temporary build context**.
-`auth/ui/v2/apps/login/Dockerfile`: untouched upstream Dockerfile, direct `ENTRYPOINT ["/app/entrypoint.sh","node","apps/login/server.js"]` and `USER nextjs`.
-`tests/ci/login_image/build.sh`: only A01 source edit; numeric stat/shebang/no-symlink and temporary copy `644→755` fix; `docker run --network none --entrypoint /bin/sh` checks built image `test -x` under its default user.
-`tests/ci/login_image/cleanup.sh`: unchanged exact-labeled image/builder/context cleanup; PASS Run #99.
-`tests/ci/oidc_e2e/run.sh`, `provision.py`, `browser.cjs`, `cleanup.sh`: unchanged A01 accepted opt-in imported custom image and original confidential OIDC browser flow; PASS Run #99.
-`deployment/docker/compose.login-ci.override.yaml`: unchanged temporary Login image replacement only, no public ports.
Source-tested SHA `7d6b6d0704b9e39bcb6e74257dadf0b64a19fc0f`; documentation closure SHA separate. See `notes/P05-OIDC-06-A01.md`.
## P05-OIDC-07 — read-only production config evidence map (no source edit)
-`deployment/docker/compose.backend.dev.yaml`: ZITADEL `EXTERNALDOMAIN=localhost`, `EXTERNALSECURE=false`, `TLS_ENABLED=false`, dev loopback `127.0.0.1:8080:80`, private API h2c and Login routing; root users and mounted Docker socket require independent production hardening. **Never promote to prod**.
-`auth/ui/v2/apps/login/{Dockerfile,next.config.mjs,src/proxy.ts,src/lib/server/service-url.ts,src/lib/server/custom-headers.ts}`: non-root upstream image, compiled basePath, CSP/HSTS/server-action origins, forwarded public Host handling; `src/proxy.ts` uses wildcard CORS on proxied paths, requiring an explicit production ingress/CORS review. Read-only.
-`users/ui/src/{auth.ts,lib/env.ts,lib/identity.ts,components/account-shell.tsx}`, `users/ui/next.config.ts`, `.env.example`: production HTTPS origin validator, Auth.js PKCE/state/nonce/session expiry, trusted Host toggle, protected profile, Console link and **portal-local** logout. No actual public ingress or global logout. Read-only.
-`core/backend/zitadel/dev.py`: development `.env` generator/admin bootstrap and local container runner, not production key rotation/secrets/backup.
-`tests/ci/oidc_e2e/**`, `tests/ci/login_image/**` and manual Gitea workflows: Run #99**disposable HTTP localhost custom Login real OIDC** only, not public HTTPS/cert/production recovery. All paths strictly read-only in this phase. Full contract `notes/P05-OIDC-07.md`.
## P05-OIDC-08 — new static-only CI contract files (non-deployable)
-`deployment/production-contract/{README.md,MINIFEST.md,compose.ci.yaml,routing-policy.json}`: proposed `auth.vib.tools` canonical HTTPS issuer, separate `account.vib.tools` RP + exact Auth.js callback, Login V2/Console/API h2c routes/strict Host forwarded-header and symbolic secret refs. Five `synthetic.invalid` images, zero replicas, internal network, no published ports/build/bind volumes. **Not an actual production Compose or ingress implementation.**
-`tests/ci/production_contract/{README.md,MINIFEST.md,validate.py}`: stdlib JSON-based strict static policy/normalized Compose checker and **25 in-memory targeted negative fixture functions** plus workflow allowlist checker. No new files beyond required folder docs.
-`.gitea/workflows/p05-production-contract-dry-run.yml`: manually triggered; only Compose `config`, Python static validation, `always()` safety proof; no service creation.
-`notes/P05-OIDC-08.md`, `docs/P05-OIDC-08.md`: exact baseline/Scope Lock, Run #101 terminal failure and separately approved next RCA. No source files in `auth/**`, `users/**`, `core/**`, existing Compose, old workflows/tests/manifests/locks or runner changed.
Run #101 source `2ca1b4493bd47209d0c7eabf7453feaeb1f5174a`: Compose parse PASS, normalized `RUNTIME_BEHAVIOR` FAIL; 25 negative fixtures NOT EXECUTED. Preserve exact historical results, no post-CI source repatch.
## P05-OIDC-08-A01 — exact source boundary and evidence
- **Only source changed:** `tests/ci/production_contract/validate.py`. Added allowlisted normalized runtime field/type-only RCA diagnostics and permitted inert null command/entrypoint and null/empty configs; original 25 negatives unchanged, four new executable-field negatives. No new source file or fixture.
- **Strictly unchanged:** `deployment/production-contract/compose.ci.yaml` and `routing-policy.json`, `.gitea/workflows/p05-production-contract-dry-run.yml`, all other existing CI/deployment files, imported `auth/**`, Account `users/**`, backend `core/**`, packages and runner.
- **New docs:** `notes/P05-OIDC-08-A01.md` pre-source Scope Lock and full [Run #102](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/102) evidence; `docs/P05-OIDC-08-A01.md` operator acceptance. This is **NOT** a working production config or proof of actual HTTPS.
- Next A02 proposal: validator-only zero-replica normalization safe-shape RCA/strict check and one separate CI run. No source patch after terminal FAIL.
- **Strict read-only:** `deployment/production-contract/compose.ci.yaml` and `routing-policy.json`, existing `.gitea/workflows/p05-production-contract-dry-run.yml`, all other tests and Login/Auth.js/backend, lockfiles, runner and infrastructure.
- **CI Run #103 terminal:** Compose config and five original-zero fixture declarations PASS; five normalized `replicas` int zero PASS; **five unexpected extra deploy fields PRESENT**, exact name unknown; `DEPLOY_DISABLED` rejection FAIL; all 32 negative fixture cases NOT EXECUTED. Existing `notes/P05-OIDC-08-A02.md`, `docs/P05-OIDC-08-A02.md` record honest security-blocking result.
- Next source edit only with separately approved `P05-OIDC-08-A03`; no post-dispatch patch in this phase.
- **Read-only preserved**: `deployment/production-contract/{compose.ci.yaml,routing-policy.json}`, prior manual `.gitea/workflows/p05-production-contract-dry-run.yml`, all `auth/**`, `users/**`, `core/**`, other tests, package files/locks/runner/production.
- **Phase evidence and user guide**: `notes/P05-OIDC-08-A03.md`, `docs/P05-OIDC-08-A03.md` plus synchronized notes/project/docs and associated README/MINIFEST. Source five zero replicas, normalized empty resources/placement defaults VERIFIABLE; **full static contract NOT accepted** due `SERVICE_SECRET_REFS`. All 40 invalid fixtures source present but NOT EXECUTED.
- **Next proposed A04** only validator service-secret-grant safe-shape RCA under separate approval. No post-run A03 source fix.
## P05-OIDC-08-A04 — source-only normalizer acceptance and exact changed-file map
- **Single modified source:** `tests/ci/production_contract/validate.py`, source-tested SHA `daaa8b259a519ae0290ba28936ef2279b3a9172c`; new bounded symbolic service grant source/target/permissions classification, exact required set+duplicate rejection, 8 security-negative in-memory cases, one canonical mount positive case.
- **Preserved read-only:** `deployment/production-contract/compose.ci.yaml` Git blob `930c0b0fbfb518555436acd6f0b4bb3bdd421937`, `deployment/production-contract/routing-policy.json`, `.gitea/workflows/p05-production-contract-dry-run.yml`, `auth/**`, `users/**`, `core/**`, all other tests and package locks; no production/runner edits.
- **Documentation:** new `notes/P05-OIDC-08-A04.md` scope-first forensic acceptance and `docs/P05-OIDC-08-A04.md` operator guide, synchronized relevant notes/project/docs/README/MINIFEST and tracked inventory.
- **Accepted static evidence:** [Run #105](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/105) / Job #221**SUCCESS**, all positive static OIDC/routing/host/secret/internal/no-runtime checks and **48/48 security-negative cases** PASS, manual-only check PASS, runner temporary job resource cleanup PASS. **Live production is not accepted**. Proposed next P05-OIDC-09 production release preflight is doc-only under separate approval.
- Dev-only backend + Traefik: `deployment/docker/compose.backend.dev.yaml`, local initializer `core/backend/zitadel/dev.py`; no production Go source/vendor artifact, persistent production release or DNS logic.
- Imported Login: `auth/ui/v2/apps/login/{Dockerfile,package.json,scripts/entrypoint.sh}`, locked `auth/ui/v2/{pnpm-lock.yaml,package.json}`, temporary CI `tests/ci/login_image/{build.sh,cleanup.sh}`. Dockerfile `FROM node:24-alpine` is tag-based; disposable builder `node:22-bookworm`; Run #99 corrected copied entrypoint 644→755 only in temporary image context; no signed registry artifact.
- Account: `users/ui/{package.json,package-lock.json,next.config.ts,src/auth.ts,src/lib/{env.ts,identity.ts}}`; `output:standalone`, origin HTTPS guard, provider PKCE/state/nonce, protected user identity; no tracked Account `Dockerfile` or production release workflow.