8.5 KiB
P05-OIDC-03 — Forwarder Startup Diagnosis & Real OIDC Acceptance
Date: 2026-11-23 (Asia/Dhaka)
User-approved exact baseline: 5f542a6aa376d06ba2c1fd3d46835baae9b8654e
Previous tested SHA: 4831165548feabc2c0a0d39d25c40e0d1bc23bb2, Gitea Run #91.
Pre-edit plan status: APPROVED / EXACT SCOPE LOCK / no P05-OIDC-03 source edit at time of this record.
Run #91 evidence and actual unknown
- One focused Gitea run #91, job #198, overall FAILURE.
- Disposable PostgreSQL, ZITADEL API, official Login V2 and Traefik 4/4 healthy PASS; zero published host ports PASS.
- Private Traefik:80 Host
localhost:8080HTTP 200 PASS;alpine/socat:1.8.1.3tag,socatentrypoint and pulled sha256 image digest PASS. - Forwarding sidecar immediately
exited,ExitCode=1before forwarded :8080 check FAIL. Its stderr was not captured. Exact cause UNKNOWN; could be socat CLI/address parser, bind/socket, image runtime or another error. Do not claim bind failure or any specific errno without observing it. - Official project/client/human provisioning, Chromium original Login V2 password, Auth.js PKCE/state/nonce/code callback, authenticated subject/pages, negative tests and logout NOT EXECUTED. They were not proven in Runs #90/#91.
always()owned cleanupZITPLANE_BACKEND_CLEANUP_VERIFIED_PASSandZITPLANE_OIDC_ALL_RESOURCES_CLEANED_PASSPASS, no CI-owned resources persisted.
Scope Lock — exact approved writes
tests/ci/oidc_e2e/run.shfor narrowly scoped forwarding lifecycle, secret-free socat stderr classification, explicit private proxy/Host/sockets, and optionally switching to a vetted immutable official Python TCP forwarder if socat exits or fails health.- New
tests/ci/oidc_e2e/forwarder.pyonly because Run #91 has proved the pinned socat container process exits code 1 despite healthy underlying proxy routing. The implementation must bind IPv4127.0.0.1:8080only and relay bytes to namespace-local127.0.0.1:80; no auth changes, external requests, secret/cookie/HTTP-body printing or host port publication. Use the officialpython:3.12-alpineimage resolved to immutable repo digest at CI runtime (already used by the existing isolated provisioner), and copy only this script into the run-labeled sidecar. tests/ci/oidc_e2e/provision.pyandcleanup.shonly if an exact new defect is reproduced. Existing run-owned cleanup and official API security must be preserved.notes/**,project/**, relevantdocs/**, associatedREADME.md/MINIFEST.mdand root navigation if needed.
STRICT read-only: core/backend/zitadel/**, deployment/docker/**, auth/ui/v2/**, users/ui/**, existing tests/ci/oidc_e2e/browser.cjs and browser.sh, package manifests/locks, unrelated tests or production configs and any secrets. Preserve unrelated untracked AI_INSTRUCTIONS.md. No local builds/tests/dev servers/Docker, real users, deployment, tags or releases.
Implementation plan BEFORE changes
- Preserve upstream app/auth/Compose and manual existing Gitea workflow unchanged. Inspect Run #91 and read-only source to establish actual prerequisite: original proxy Host route works, socat process exited with code 1; stderr unknown.
- Within the single next Gitea cycle, start one run-labeled socat container with the exact current options and image/digest, check Docker process state and probe private HTTP 200. If exited or unhealthy, collect only allowlisted error classes from its startup stderr (e.g. address-in-use, permission, invalid-address/option, binary/runtime) without printing raw logs; record safe state/exit and classifier marker. Remove this run-labeled diagnostic container, then at most one deterministic fallback to the official version/digest-resolved
python:3.12-alpinestdlib TCP forwarder, using the exact same owned container name/label/network namespace; this is not a second Gitea run. If socat works, keep it. No mock IdP or network relaxation. - New
forwarder.pyimplements bounded async transparent bidirectional TCP relay, exclusive IPv4 loopback bind and fixed secret-free log markers. Start in run-owned proxy namespace, verify container running and private forwarded/debug/readyHTTP 200 with exact Host before creating the CI secret volume or calling official API. Sidecar stderr diagnostic must never include request or credential contents. - Continue existing untouched
provision.py, original Account Portal/Chromium browser scripts andalways()strict run-labeled cleanup. No changes to source auth, TLS or security gates. Real authenticated OIDC cannot PASS without actual official user/client and browser callback/session/negative checks. - Complete one focused source/security/manifest/Git diff audit, document
notes/project/docs, Git commit, push Gitea main and verify exact remote source SHA. - Dispatch ONE manual
p05-oidc-acceptance.ymlGitea CI run. Record actual run/job IDs, tested SHA, forwarder classification, provisioning, browser/negative and cleanup stage markers and terminal status. If a new blocker appears, record BLOCKED/NOT EXECUTED for downstream phases, no repeated CI loop or false PASS. - Final documentation-only closure diff audit, commit, main push and exact remote/local SHA verification. Automatically supply remaining work, next exact Scope Lock, compact plan and ready-to-copy approval command.
Technical design and safety
- On socat failure, use one safe diagnostic classifier, not raw
docker logs. The socat diagnostic runs before any test user/client/secrets are created; stdout shows only enumerated class and numeric exit code. Unknown logs are classifiedUNCLASSIFIEDwithout their contents. - Python fallback runs image
python:3.12-alpineselected and verified byRepoDigests, then invoked aspython -u /tmp/forwarder.py; nopip, apt/apk install or unpinnedlatest. Original proxy namespace isolation, no published ports and run-owned label/teardown remain mandatory. - The fallback does NOT intercept, generate, inspect or log HTTP requests/cookies/auth codes: it is an opaque byte relay to Traefik localhost. Bind only 127.0.0.1:8080. Its server launch errors are classified safely by errno/stage; the browser and official API remain untouched.
- Authentication and cleanup gates remain fail-closed and unmodified. No CI success assumption before real completion.
Acceptance: proxy/forwarder readiness + official disposable client/human + real original Login V2 password/PKCE/state/nonce/Auth.js callback + actual protected identity/negative/logout + always verified owned cleanup + no unauthorized source changes. MFA/passkeys, production HTTPS and full Admin Console user flow remain outside this phase.
Execution-status snapshot — single Gitea Run #93, 2026-11-23 Asia/Dhaka
Dispatched exactly once: Gitea Run #93, one workflow_dispatch on main, requested at 2026-11-22T18:08:45Z. Test candidate SHA 7b80f411b2981e2274d171c12596301ed757b768. Intended single job #206, Disposable ZITADEL Client User Browser OIDC and Cleanup.
Last queried run status in this phase: queued (no job start timestamp, no steps, no conclusion). This is NOT A TERMINAL CI RESULT. No Docker preflight, socat error classification, Python fallback, OIDC project/client/user provisioning, browser callback, negative session checks or always() cleanup has executed in Run #93 yet. Do not claim any step PASS, FAIL or cleanup for Run #93. There was no second dispatch, rerun, cancellation, extra source patch, local build/test, live account or production deployment.
Acceptance verdict at snapshot: PENDING RUNNER EXECUTION / NOT VERIFIED, not SUCCESS or failure of the proposed fix. Run #91 remains the last terminal evidence, socat process exited 1 and owned cleanup PASS. The newly committed source needs the eventual Run #93 terminal job + cleanup evidence, not a new Gitea run. If Run #93 remains unstarted, runner scheduling/availability must be inspected read-only; do not guess an outage. If it completes later, verify the real job logs, tested SHA, whether socat error class/fallback/private HTTP 200 and actual client/user/browser/negative/cleanup gates executed before declaring acceptance.
No repeated CI loops: This phase dispatched one run only. Any follow-up is a read-only verification of the existing Run #93 and documentation sync, not a second workflow dispatch. The pending result-only documentation commit does not alter tested application/CI source.