docs(oidc): record custom Login entrypoint RCA in developer architecture maps

This commit is contained in:
victorsteele428 committed 2026-11-23 10:47:14 +00:00
1 parent e5778ead56
commit 54a6c163f7
5 files changed
+30

No files matched your search

+4
View File
@@ -176,3 +176,7 @@ Gitea [Run #96](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/96) is termin
## P05-OIDC-06 — manual workflow and cleanup
New `.gitea/workflows/p05-custom-login-acceptance.yml` on a Docker-capable runner builds unchanged imported Login source in an isolated Node22/bookworm run-labeled builder, packages standalone output with existing upstream Dockerfile into `zitplane-login-ci:$GITHUB_RUN_ID` and opts into a single Compose image-only overlay. `tests/ci/oidc_e2e/run.sh` is unchanged in default mode; its opt-in would check the running image ID after four-service readiness. Run #98 built the local image, then failed before that identity assertion at OCI entrypoint permission denied. Both cleanup scripts under `always()` PASS. No reruns and no registry publish.
## P05-OIDC-06-A01 — terminal single-run custom source acceptance
Source SHA `7d6b6d0704b9e39bcb6e74257dadf0b64a19fc0f` changed only the `tests/ci/login_image/build.sh` temporary copied entrypoint mode gate. Existing `.gitea/workflows/p05-custom-login-acceptance.yml`, CI Compose overlay, `tests/ci/oidc_e2e/run.sh`, Chromium/provision/cleanup and upstream sources unchanged in A01. Exactly one manual [Run #99](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/99) / job #214 **COMPLETED SUCCESS**, all 5 job steps success. Frozen PNPM/NX/Next standalone build, copy `644→755`, final image default-user executable test, custom image ID matching actual container, private issuer/forwarder/4 services, official disposable credentials, full Chromium Login V2 Auth.js/negative/logout and both cleanups PASS. No runner workflow or production change. Optional Python fallback and diagnostic negative branches NOT EXECUTED; real HTTPS/domain/MFA/SSO are outside CI scope.
+10
View File
@@ -192,3 +192,13 @@ Official Login V2 user/auth source, user Account Portal, backend Compose and pro
- `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.
## P05-OIDC-06-A01 — exact source/function integration map
- `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`.
+6
View File
@@ -151,3 +151,9 @@ Existing `tests/ci/security_advisory_gate.py` remains the independent **live reg
`tests/ci/login_image/build.sh`: rejects preexisting run-owned names, copies source to disposable builder, verifies frozen PNPM and standalone output, creates a local Docker image from an unchanged Dockerfile with run-id label and immutable local image ID. It did **not** assert executable mode of the copied `entrypoint.sh`; OCI startup subsequently failed with permission denied.
`tests/ci/login_image/cleanup.sh`: exact-run builder/image/context ownership checks and removal; Run #98 `ZITPLANE_CUSTOM_LOGIN_ALL_BUILD_RESOURCES_CLEANED_PASS`. Existing `tests/ci/oidc_e2e/cleanup.sh` and backend cleanup separately passed. `tests/ci/oidc_e2e/run.sh::dc` adds only a validated opt-in fourth CI Compose file; actual custom login identity gate was NOT EXECUTED.
## P05-OIDC-06-A01 — bounded CI helper behavior (no auth changes)
`tests/ci/login_image/build.sh` now validates `$context/.next/standalone/entrypoint.sh` is a regular file and not a symlink, checks first bytes `#!` without printing content, records sanitized numeric `mode UID:GID`, accepts either already-executable `755` or the established source-copy `644` and applies `chmod 0755` **only to the latter temporary copy**. Rejects all unexpected file types/modes and then requires `-x` + exactly `755`. After unchanged Dockerfile build, a no-network/no-secrets `docker run --entrypoint /bin/sh` with default image `nextjs` user validates `/app/entrypoint.sh` is regular, non-symlink, `755`, executable and has a shebang, printing only a fixed PASS marker. Original Git source and Dockerfile untouched.
Run #99 confirmed input `644 UID:GID 0:0`, copied output/image executable and actual custom runtime/Chromium OIDC acceptance, negative and local logout success. Existing run-owned cleanup checks PASS. No provision/browser/Auth.js method changed.
+6
View File
@@ -98,3 +98,9 @@ Run #96 verified the **official prebuilt** `ghcr.io/zitadel/zitadel-login:v4.20.
## P05-OIDC-06 — custom image attempt (not authenticated)
Run #98 on source `fcfa59e826c39b445faa1b5b26c47ce715d8c3d6` built an imported Login V2 standalone artifact and temporary local Docker image successfully. The custom Login service never started: OCI `exec: "/app/entrypoint.sh": permission denied`; no custom login health, issuer, project/client/test-human, Chromium PKCE/Auth.js/negative/logout steps executed. Old Run #96 **official prebuilt** authenticated OIDC remains valid. Both original OIDC resource and new builder/image/context cleanup PASS. Exact file mode was not inspected; entrypoint execute bit is a hypothesis, not established RCA. No production deployment.
## P05-OIDC-06-A01 — verified imported source-built Login V2 real OIDC
The imported upstream `auth/ui/v2/apps/login/scripts/entrypoint.sh` is tracked as Git mode `100644` with unchanged blob `2da2aca45348afeb7480323e02cf98902d479db3`. Its actual standalone build-context copy was **mode `644`, UID:GID `0:0`**, explaining Run #98's OCI direct-execution denial. A01 edits **only** the CI `tests/ci/login_image/build.sh`: verify copied regular file/no symlink/shebang/mode/owner, `chmod 0755` the run-owned temporary copy and verify the resulting image `/app/entrypoint.sh` is executable as the Dockerfile's default `nextjs` user without network/credentials/entrypoint execution. Upstream source/Dockerfile unchanged.
[Gitea Run #99](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/99), Job #214, exact tested source `7d6b6d0704b9e39bcb6e74257dadf0b64a19fc0f`, **SUCCESS**: local image `zitplane-login-ci:99` ID `sha256:42fba458e25d3186c504ae4532fece489986a18ab5fdcf97e87b052c4866207f`; actual running `zitadel-login` matched image ID; 4 healthy private services, direct Host/issuer, official project/client/test-human, genuine Chromium custom Login V2 password+PKCE/state/nonce/Auth.js callback, protected Account session/API/page, negative checks and logout PASS. Original backend and new image/builder exact-owned cleanup PASS. Separate original-prebuilt Run #96 accepted independently. Production HTTPS/Console/MFA/passkeys/two-app SSO NOT TESTED. See `notes/P05-OIDC-06-A01.md`.
+4
View File
@@ -101,3 +101,7 @@ CI only: official ZITADEL v4.20.4, official Login V2 v4.20.4, PostgreSQL 17.10/T
## P05-OIDC-06 temporary image build
`tests/ci/login_image/build.sh` copies `auth/ui/v2/` to a run-owned Node22/bookworm builder, executes pinned PNPM 10.30.3 frozen install and Nx/Next standalone with `NEXT_PUBLIC_BASE_PATH=/ui/v2/login`, and creates a temporary build context from **only** standalone output and unchanged upstream Dockerfile. Run #98 build passed and recorded local image ID; actual service startup failed before Login health. No current security audit, production image-signing/digest lock or registry push is claimed. The helper must investigate temporary artifact executable permission in a separately approved phase; preserve imported source.
## P05-OIDC-06-A01 — build artifact and deployment boundary
[Gitea Run #99](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/99) built the unchanged imported Login v4.20.4 PNPM workspace and source-built **temporary local image** using the original Dockerfile; source Git entrypoint `100644` was repaired only in an ephemeral copied CI artifact to `755`. The image ran healthy with original Login V2 confidential bootstrap and real disposable OIDC test credentials, then was destroyed. No registry image publication/digest-locked production release, SBOM/refresh security audit, public HTTPS issuer/domain/DNS/ingress, external secure cookies, production secrets/key escrow/SMTP/Postgres backup+restore, monitoring or rollback is implied by this acceptance. The last production-context audit remains `notes/P05-OIDC-05.md`; next proposed `P05-OIDC-07` is read-only production HTTPS/ingress/security/secret/recovery contract design.