fix(ci): pin and diagnose private OIDC forwarder readiness
This commit is contained in:
1 parent
b78270e9d4
commit
4831165548
22 files changed
+231
-27
No files matched your search
@@ -16,5 +16,6 @@ This is the chronological **index**. Phase-specific scope/implementation evidenc
|
||||
| 2026-11-22 | P05-SEC-02 | Seven scoped parent overrides for glob/minimatch, pinned PNPM lock; one focused Gitea run | Run #88: Login security 0 findings PASS, build gate FAIL before frozen install on CI helper false-positive. Post-run regex fix unverified; [evidence](P05-SEC-02.md) |
|
||||
| 2026-11-22 | P05-SEC-02-A01 | One-run final acceptance of corrected CI parser and unchanged Login lockfile/seven overrides | **Run #89 SUCCESS** on `ff4c58e`: frozen install, standalone build and upstream 1219/1219 tests PASS; audit 0 Moderate/High/Critical; Account jobs skipped. [Evidence](P05-SEC-02-A01.md) |
|
||||
| 2026-11-22 | P05-OIDC-01 | CI-only official ZITADEL OIDC project/client/user and Chromium original Login V2/Auth.js acceptance harness with owned cleanup | **Run #90 FAILED**: 4 services healthy, no host ports; private localhost:8080 forwarder not ready, no user/client/browser created; cleanup VERIFIED PASS. [Evidence](P05-OIDC-01.md) |
|
||||
| 2026-11-22 | P05-OIDC-02 | Pin prebuilt socat image by verified digest in CI, check private proxy/Host/forwarder state, correct status-only readiness | Pre-change scoped plan and source prepared; [evidence](P05-OIDC-02.md), one Gitea run pending |
|
||||
|
||||
Rules: Append new phases or fixes; never silently rewrite a past result. Separate **implemented**, **verified**, **blocked**, and **proposed**. Never log a user secret or personal data.
|
||||
@@ -12,6 +12,7 @@
|
||||
| [P05-SEC-02.md](P05-SEC-02.md) | Exact root chain, seven PNPM parent overrides, one focused Gitea CI and closure evidence | P05-SEC-02 / Run #88 security PASS, build blocked; parser post-run patch unverified |
|
||||
| [P05-SEC-02-A01.md](P05-SEC-02-A01.md) | Single-run Login-only final frozen/build/unit/security acceptance, scope lock and evidence | P05-SEC-02-A01 / Run #89 SUCCESS, accepted |
|
||||
| [P05-OIDC-01.md](P05-OIDC-01.md) | Pre-change real browser OIDC Scope Lock, provision/redirect/session/negative tests and one CI run evidence | P05-OIDC-01 / Run #90 FAILED at forwarder readiness; cleanup PASS; acceptance BLOCKED |
|
||||
| [P05-OIDC-02.md](P05-OIDC-02.md) | Pre-change exact loopback-forwarder blocker scope, pinned image/diagnostic plan and one real Gitea acceptance run | P05-OIDC-02 / source prepared, CI pending |
|
||||
| [CHANGELOG.md](CHANGELOG.md) | Short append-only chronological phase log and links to detailed reports | DOCS-01 / active |
|
||||
|
||||
Update this manifest whenever any direct child file or directory changes. Use **actual source state**; a planned file must be labeled planned, not present.
|
||||
@@ -0,0 +1,39 @@
|
||||
# P05-OIDC-02 — Private Loopback Forwarder Remediation & Real OIDC Acceptance
|
||||
|
||||
**Date:** 2026-11-22
|
||||
**Approved baseline (Gitea main/local main):** `b78270e9d45c1764c5642024b8147885deaacde3`
|
||||
**Run #90 tested SHA:** `cbcd60e76ec909df4f9c5826adf7a3e2a899c73e`
|
||||
**Pre-edit state:** APPROVED — PRE-IMPLEMENTATION PLAN / EXACT SCOPE LOCK. This record was created BEFORE any P05-OIDC-02 source edits.
|
||||
|
||||
## Last actual CI evidence (Gitea Run #90, job #197)
|
||||
|
||||
- Official disposable PostgreSQL/ZITADEL API/official Login V2/Traefik four services became healthy under the portless Compose override; no host ports exposed: **PASS**.
|
||||
- Previous `run.sh` started an `alpine:3.21` sidecar using `sh -ec 'apk add --no-cache socat >/dev/null 2>&1; exec socat ...'`, sharing the private proxy network namespace. Start command returned container ID, but no sidecar **running/exit code/socket/proxy** diagnostics were recorded. `provision.py::wait_until_ready()` timed out on private `localhost:8080` after 70 seconds: **BLOCKED**. **There is no evidence establishing whether package install, sidecar exit, socket bind or proxy routing caused it**.
|
||||
- Provisioning did not create any project/client/human and the actual Chromium/PKCE/state/nonce/callback/protected API/negative checks did not execute: **UNVERIFIED**.
|
||||
- Mandatory `always()` cleanup step **PASS**: `ZITPLANE_BACKEND_CLEANUP_VERIFIED_PASS`; `ZITPLANE_OIDC_ALL_RESOURCES_CLEANED_PASS`. Run overall **FAILURE**. No second run performed in P05-OIDC-01.
|
||||
|
||||
## Scope Lock — exact approved writes
|
||||
|
||||
- `tests/ci/oidc_e2e/run.sh`: old runtime-installed Alpine forwarder replacement; private listener, proxy, lifecycle, safe error markers; do not publish host port.
|
||||
- `tests/ci/oidc_e2e/provision.py` **only as necessary**: ensure `/debug/ready` readiness is HTTP status-based, without JSON assumptions; preserve issuer/metadata checks, real APIs and secret isolation.
|
||||
- `tests/ci/oidc_e2e/cleanup.sh` **only if necessary**: preserve exact numeric-run owner checks and verified cleanup.
|
||||
- `.gitea/workflows/p05-oidc-acceptance.yml` **only if justified**: preserve manual-only, single job and `always()` teardown.
|
||||
- `notes/**`, `project/**`, relevant `docs/**`, associated README/MINIFEST and root navigation only if necessary.
|
||||
|
||||
**Read-only:** `core/backend/zitadel/**`, `deployment/docker/**`, `auth/ui/v2/**` original Login auth/UI/application source, `users/ui/**` Account Auth.js/UI/source, package manifests/lockfiles, production infrastructure/secrets, other tests/helpers and all unrelated files. **Preserve untracked `AI_INSTRUCTIONS.md`.**
|
||||
|
||||
No local builds/tests/dev servers/Docker, no real users/accounts or secrets, no production deployment/tags/releases. **Exactly one focused Gitea Actions acceptance cycle**, then source/security diff, evidence/docs sync, Git commit, main push and exact remote SHA verification. No repeated CI loops or false PASS.
|
||||
|
||||
## Targeted implementation plan
|
||||
|
||||
1. **Deterministic preflight:** With unchanged run-owned P02 four-service Compose healthy, use a short-lived official Python (existing CI image `python:3.12-alpine`) probe in the SAME Docker proxy network namespace to make an HTTP `GET /debug/ready` with exact `Host: localhost:8080` to **127.0.0.1:80** first. Distinguish proxy/Host routing blocker from sidecar failure. Output safe statuses only (no request/response body, URLs with query, tokens).
|
||||
2. **Version-pinned prebuilt socat:** Docker Hub `alpine/socat:1.8.1.3` is a published, versioned image with `socat` already installed. Replace `alpine:3.21 + apk add` entirely with `alpine/socat:1.8.1.3` and run `TCP-LISTEN:8080,bind=127.0.0.1,reuseaddr,fork TCP:127.0.0.1:80` with no installer, shell, host exposure, credentials or extra privileges. Record Docker image architecture/digest metadata (nonsecret) and keep image version explicit rather than `latest`.
|
||||
3. **Bounded start and fail-closed diagnostics:** Before provisioning, check `docker inspect` for exact run-labeled container, state and exit code; test local **127.0.0.1:8080** TCP socket and HTTP `/debug/ready` with `Host: localhost:8080` from a new disposable proxy-namespace probe. If not ready, report only a fixed-stage diagnostic marker and nonsecret state/exit code; **do not** dump container logs, JWTs, cookies or HTTP bodies. Do not mislabel the cause without actual observation.
|
||||
4. **Narrow provisioner readiness:** Previously `request('GET','/debug/ready')` assumed JSON, though readiness is a status-only HTTP endpoint. If proxy becomes reachable, this assumption might cause a false readiness failure. Change only this `wait_until_ready()` to check status 200 on exact local origin/Host, no body interpretation or secret emission. Leave strict JSON parsing for official project/app/user APIs intact.
|
||||
5. Keep original disposable secret volume, IAM_OWNER PAT and original Login V2/Account Portal browser flows unchanged. Retain `cleanup.sh` unless inspection demonstrates a narrow ownership bug.
|
||||
6. Record source-only contract/Scope Lock audit and docs. Commit, push and verify source SHA. Dispatch **one manual Gitea run**. Accept real OIDC only if actual project/client/user provisioning, genuine Chromium password + Auth.js PKCE/state/nonce/callback, protected session and anonymous/invalid negative tests, and `always()` teardown all succeed. A new provisioning/browser failure is an exact **BLOCKED** outcome, not a reason for a second run.
|
||||
7. Update `notes/project/docs` with actual run ID/jobs/stages, cleanup, explicit verified/deferred status and follow-up tight Scope Lock. One closure commit, push and exact remote main SHA check.
|
||||
|
||||
**Source review does NOT prove runtime compatibility.** No claim that old Alpine `apk add` was the root cause; Run #90 did not log sidecar state. Confirm only from the next run's safe observations.
|
||||
|
||||
**Expected source-level changes (pre-run):** exactly `run.sh`, `provision.py` plus narrow docs. `cleanup.sh` and workflow kept identical unless a specific justified defect is observed.
|
||||
Reference in new issue
Block a user