11 KiB
P05-OIDC-04-A01 — Direct Private Proxy Readiness RCA & Real OIDC Acceptance
Date: 2026-11-23 (Asia/Dhaka)
Approved immutable baseline: 443dfcf5d1ecb6f6f5c04cada32aafa17d7d823e
Previous tested source: 79dac4f5bb76e1cee4dfaf61657c6e84268b3dfb
Previous evidence: Gitea Run #95, job #209, terminal failure. Docker/config and four backend health PASS; direct private Traefik readiness emitted OIDC_CI_PRIVATE_PROXY_SOCKET_OR_HTTP_BLOCKED; 8080 socket forensic probe, forwarder and official authenticated user/browser flow NOT EXECUTED; owned-only mandatory cleanup PASS.
PRE-SOURCE-CHANGE EXACT Scope Lock
This scope note MUST be committed before any A01 source change.
- Source WRITE:
tests/ci/oidc_e2e/run.shonly; at most one new tightly focusedtests/ci/oidc_e2e/diagnostic helper if technically necessary. - Documentation WRITE:
notes/**, relevantproject/**anddocs/**, associated README/MINIFEST/navigation as strictly required. - STRICT READ-ONLY:
tests/ci/oidc_e2e/forwarder.py, every other existingtests/ci/**file,.gitea/workflows/**,core/backend/zitadel/**,deployment/docker/**,auth/ui/v2/**,users/ui/**, original Account/Auth.js, package manifests and lockfiles, runner configuration, production/secrets, and unrelated paths. - Preserve existing untracked root
AI_INSTRUCTIONS.md. No local application build, test or server; no real human, production deployment, tag, release, workflow modification or privileged/public port. - ONE approved manual disposable Gitea CI run after focused source/security diff audit; no additional dispatch or rerun, and mandatory original
always()owned-only cleanup. Source-test SHA must be distinguished from later docs-only SHA.
Focused read-only RCA before edits
The direct pre-forwarder probe in run.sh currently executes python:3.12-alpine in --network container:$proxy_id, issues GET /debug/ready to private 127.0.0.1:80 with exact Host: localhost:8080, and maps every OSError and http.client.HTTPException to the single OIDC_CI_PRIVATE_PROXY_SOCKET_OR_HTTP_BLOCKED marker. It already distinguishes a returned non-200 HTTP status numerically, but not connection refusal, network timeout, reset, permission, protocol failure or which exception occurred. Therefore Run #95 establishes a failed direct private readiness check but not an exact listener/port root cause, actual 8080 owner, failed Docker network or authentication defect. Four healthy services do not prove this exact network-namespace HTTP route; prior Run #93 did pass the same direct route, so intermittency is possible but not established. Avoid claiming any specific culprit.
Locked minimal change and verification plan
- Replace only this bounded pre-forwarder probe with explicit, secret-safe exception categories (CONNECTION_REFUSED, TIMEOUT, CONNECTION_RESET, NETWORK_UNREACHABLE, PERMISSION_DENIED, SOCKET_OTHER, HTTP_PROTOCOL_ERROR); print only enumerated class or integer HTTP status, never exception text, URL, response body, secrets, tokens, cookies, argv/env or raw logs. Close the HTTP connection in all branches.
- Permit at most a short, strictly bounded retry only after a first classified transient socket failure, never on explicit HTTP non-200, permission, unknown or protocol failure. Preserve a deterministic single success/failure marker and exact Host/issuer, same isolated network, unchanged user/client/auth flows and existing ownership/cleanup.
- Audit the exact diff: only
tests/ci/oidc_e2e/run.sh; validate bounded control flow, no logging sensitive values, no public ports or auth weakening; Gitea main source commit and verify exact SHA. No local app run/test/build. - Dispatch one authorized existing
p05-oidc-acceptance.ymlworkflow onmainand confirm immutable tested SHA. Record verified Run/Job, all gate-level PASS/FAIL/NOT EXECUTED, pre-bind socket attribution if actually reached, forwarder, issuer, official client/user creation, Chromium/Login V2/PKCE/state/nonce/Auth.js session/API/negative/logout, mandatory exact-owned cleanup. - Final documentation-only update in
notes/**,project/**,docs/**and manifests/navigation, a focused git diff/safety/inventory audit, documentation commit and exact remote main SHA verification. No second run even if the first fails. Supply next narrow exact scope and copyable approval text based on actual evidence.
Initial A01 acceptance: NOT EXECUTED. Real authenticated OIDC remains BLOCKED pending the one new real terminal Gitea result.
Run #96 / Job #210 — VERIFIED terminal acceptance (A01)
Source preparation: Scope Lock first committed as 53b258d57146fe70745faa1879b3ab44aa57b4d7; exactly one source file, tests/ci/oidc_e2e/run.sh, changed in tested source commit 670e225db477f180ff14ffa62e6654860a166f17. The focused diff introduced allowlisted direct private socket/HTTP classification and at most 3 attempts only after recognized transient socket failures; unchanged exact Host: localhost:8080, isolated ports/network, issuer, original Auth.js/Login V2 and owned-only cleanup. The retry and negative error-class branches were not exercised because the first private proxy probe PASSED. No source, workflow or runner re-edits after dispatch.
Single authorized Gitea run: Run #96 / Job #210; event workflow_dispatch, source SHA 670e225db477f180ff14ffa62e6654860a166f17 on main. Started 2026-11-22T20:13:22Z; completed 2026-11-22T20:17:40Z. Both Gitea run and job completed / success; every job step (#0 Git, #1 checkout, #2 disposable OIDC acceptance, #3 always() cleanup) success.
| Required CI gate | Actual status / exact log marker |
|---|---|
| Runner pickup, Git installation, exact source checkout | PASS — Job #210, SHA 670e225db477f180ff14ffa62e6654860a166f17 |
| Docker/Compose preflight | PASS — ZITPLANE_OIDC_DOCKER_PREFLIGHT_PASS |
| Portless Compose + run-owned IAM_OWNER config | PASS — ZITPLANE_OIDC_NO_PUBLISHED_PORT_AND_OWNER_CONFIG_PASS |
| Four healthy official backend services | PASS — ZITPLANE_OIDC_FOUR_SERVICES_READY_PASS |
| Direct private Traefik:80 HTTP 200 with exact Host | PASS — ZITPLANE_OIDC_PRIVATE_PROXY_HOST_ROUTE_PASS |
| Proxy netns port-8080 socket/PID attribution before forwarder | PASS — OIDC_CI_PROXY_PORT8080_LISTENER=TCP6 INODE=6286327 PID=1 COMM=traefik; ZITPLANE_OIDC_PROXY_PREBIND_SOCKET_FORENSICS_PASS |
| Socat immutable image digest | PASS — ZITPLANE_OIDC_PINNED_FORWARDER_DIGEST_VERIFIED_PASS |
| Separate private Socat forwarder and exact Host forwarded HTTP 200 | PASS — ZITPLANE_OIDC_SOCAT_FORWARDER_READY_PASS; ZITPLANE_OIDC_PRIVATE_LOOPBACK_FORWARDER_READY_PASS |
| Python forwarder fallback | NOT EXECUTED / NOT REQUIRED — socat ready; no fallback |
| Private issuer and discovery | PASS — ZITPLANE_OIDC_LOCAL_ORIGIN_READY_PASS, ZITPLANE_OIDC_ISSUER_DISCOVERY_PASS |
| Official disposable ZITADEL project | PASS — ZITPLANE_OIDC_PROJECT_CREATED_PASS |
| Official real OIDC client/app creation | PASS — ZITPLANE_OIDC_REAL_CLIENT_CREATED_PASS |
| Disposable verified test human | PASS — ZITPLANE_OIDC_REAL_TEST_HUMAN_CREATED_PASS |
| Test-credential isolation and provisioning | PASS — ZITPLANE_OIDC_TEST_CREDENTIALS_ISOLATED_PASS, ZITPLANE_OIDC_DISPOSABLE_PROVISIONING_PASS |
| Disposable Account portal dependencies + server readiness | PASS — ZITPLANE_OIDC_DISPOSABLE_ACCOUNT_DEPENDENCIES_READY_PASS, ZITPLANE_OIDC_DISPOSABLE_ACCOUNT_HTTP_READY_PASS |
| Anonymous API/protected-page rejection | PASS — ZITPLANE_OIDC_ANONYMOUS_API_AND_PAGE_REJECTED_PASS |
| Tampered/invalid callback rejection | PASS — ZITPLANE_OIDC_INVALID_CALLBACK_FAIL_CLOSED_PASS |
| Real Chromium authorization code, PKCE S256, state, nonce | PASS — ZITPLANE_OIDC_REAL_AUTHORIZE_PKCE_STATE_NONCE_PASS |
| Original Login V2 username/password, real code/Auth.js callback | PASS — ZITPLANE_OIDC_REAL_PASSWORD_AND_CALLBACK_PASS |
| Authenticated subject/session, HttpOnly cookie, protected API/page | PASS — ZITPLANE_OIDC_REAL_SESSION_PROTECTED_PAGE_AND_API_PASS |
| Portal-local logout and API session revocation | PASS — ZITPLANE_OIDC_PORTAL_LOGOUT_SESSION_REVOKED_PASS |
| Real browser run completion | PASS — ZITPLANE_OIDC_REAL_BROWSER_COMPLETE_PASS, ZITPLANE_OIDC_REAL_BROWSER_ACCEPTANCE_PASS |
| Mandatory run-owned database/bootstrap/secrets/containers/volumes/network cleanup | PASS — ZITPLANE_BACKEND_CLEANUP_VERIFIED_PASS, ZITPLANE_OIDC_ALL_RESOURCES_CLEANED_PASS |
| Overall isolated real authenticated OIDC E2E | PASS — Gitea Run #96 / Job #210 terminal SUCCESS |
Evidence-grounded root cause and safety boundary
The actual pre-bind TCP6 LISTEN socket belonged to traefik PID 1, inode 6286327, inside the disposable proxy namespace. This directly explains why attempts to bind private 8080 in that same namespace were conflicting in earlier runs; the separately isolated forwarder namespace is now verified with a real successful issuer and browser flow. The precise Traefik feature/configuration responsible for exposing 8080 was not independently attributed and must not be guessed. Source-only classifications for refused/timeout/etc were NOT runtime exercised because the first readiness attempt passed; this is not a separate diagnostic-class negative-test PASS.
All IAM_OWNER PAT, client secret, generated password and test-human state belonged only to disposable CI volumes and backend, not to a real human or production environment. Run #96 cleanup markers confirm owned resources removed. No public host ports, auth bypass, original backend/Login/Auth.js edits, local application builds/tests, production deployment, tags, releases, reruns or duplicate CI dispatch.
A01 close-out and proposed next Scope Lock
P05-OIDC-04-A01 isolated real browser OIDC acceptance: COMPLETE / PASS. Documentation-only closure commit is not a new tested source SHA. Production HTTPS, custom imported Login V2 source integration, full Admin Console interactive login, MFA/passkeys, multi-app SSO, production storage/deployment and real-user operation remain outside this acceptance and NOT VERIFIED.
Next proposal, pending new approval: P05-OIDC-05 — Production-Context Integration Readiness Forensic Audit (read-only): baseline = final A01 documentation SHA; WRITE only notes/P05-OIDC-05.md, relevant project/**, docs/**, associated README/MINIFEST if required. READ-ONLY all tests/**, .gitea/workflows/**, core/**, deployment/**, auth/**, users/**, package manifests/locks, runners, secrets and production infra. Inspect current documented source configuration, original-vs-imported Login V2 wiring, HTTPS/OIDC callback and domain/security policy, MFA/passkey and SSO coverage; distinguish verified disposable CI from untested production. Deliver a prioritized minimal separate future phase Scope Lock; no source edit, new CI, login to real accounts, local build, deployment, tag or release without another approval.