fix(ci): pin and diagnose private OIDC forwarder readiness

This commit is contained in:
victorsteele428 committed 2026-11-22 17:45:36 +00:00
1 parent b78270e9d4
commit 4831165548
22 files changed
+231 -27

No files matched your search

+3
View File
@@ -33,3 +33,6 @@ Future feature additions need an evidence-backed status update here, an exact de
**P05-OIDC-01 terminal status:** Gitea Run #90 (`cbcd60e`) is **overall FAILURE**: disposable backend 4/4 healthy and portless PASS, but private localhost:8080 forwarder unready, blocking all OIDC project/client/human and real browser callback/session/negative tests. **Nothing authenticated was verified.** `always()` cleanup succeeded and verified no owned containers/volumes/network/credentials remained. Future P05-OIDC-02 needed; production/MFA remains untested.
**P05-OIDC-02 source prepared:** CI-only prebuilt/digest-pinned socat, isolated proxy/Host and forwarded HTTP readiness gates, and strict status-only provisioner readiness have been added after the Run #90 blocker. **Full browser/OIDC acceptance is still UNVERIFIED until one new terminal Gitea CI**. Backend and previous Login build/unit/security PASS are not real authenticated session proof.
+1
View File
@@ -14,6 +14,7 @@ Every file listed below is a direct child of `docs/`. Add/remove rows whenever t
| [P05-SEC-02.md](P05-SEC-02.md) | Seven scoped PNPM parent overrides, patched lock and manual Login-only security CI evidence | P05-SEC-02 / Run #88 partial: security zero, build unverified |
| [P05-SEC-02-A01.md](P05-SEC-02-A01.md) | Gitea-only Login V2 full frozen-install/build/units/zero-advisory acceptance and status | P05-SEC-02-A01 / Run #89 SUCCESS |
| [P05-OIDC-01.md](P05-OIDC-01.md) | How isolated real OIDC Login V2 browser/session checks work; real CI status/limitations | P05-OIDC-01 / Run #90 BLOCKED before provisioning; cleanup PASS |
| [P05-OIDC-02.md](P05-OIDC-02.md) | CI-only pinned prebuilt forwarder, safe private localhost readiness diagnostics and actual real-OIDC acceptance evidence | P05-OIDC-02 / source prepared, CI pending |
| [SETUP-GUIDE.md](SETUP-GUIDE.md) | Operator/developer prerequisites, configs, activation and safety | DOCS-01 / active; runtime pending |
| [FEATURES-STATUS.md](FEATURES-STATUS.md) | Exact implemented/unavailable/unverified feature matrix | DOCS-01 / active |
| [TROUBLESHOOTING.md](TROUBLESHOOTING.md) | Known blockers and safe diagnosis based on source status | DOCS-01 / active |
+3
View File
@@ -33,3 +33,6 @@ Authorize and dispatch the **one** manual workflow under Gitea [ZitPlane Actions
**Safety verified:** `always()` step #3 succeeded: `ZITPLANE_BACKEND_CLEANUP_VERIFIED_PASS` and `ZITPLANE_OIDC_ALL_RESOURCES_CLEANED_PASS`, removing only owned database/bootstrap/containers/credentials/volumes/network. No production deployment, real accounts or host ports used.
**Next:** The precise reason the forwarder failed is **not yet known** because package installation/logs were suppressed. A separately approved P05-OIDC-02 should instrument the *CI-only* sidecar's safe health/exit diagnostics and use a pinned prebuilt forwarding image, then repeat **one** isolated Gitea browser/provisioning acceptance. No Login/Auth.js source edit, IAM bypass, production HTTP or claims of verified browser authentication. Full job IDs, evidence and Scope Lock: `notes/P05-OIDC-01.md`.
**Follow-up:** P05-OIDC-02 is the approved, CI-only private forwarder diagnostics/prebuilt-image and status-only readiness remediation; see [P05-OIDC-02.md](P05-OIDC-02.md). Until the new Gitea CI actually executes real client/user/Chromium/callback stages successfully, this historical Run #90 failure remains unchanged.
+24
View File
@@ -0,0 +1,24 @@
# P05-OIDC-02 — Private Loopback Forwarder & Real OIDC Acceptance
**Date:** 2026-11-22
**Baseline:** `b78270e9d45c1764c5642024b8147885deaacde3`
**Gitea Run #90:** overall **FAILURE** on `cbcd60e76ec909df4f9c5826adf7a3e2a899c73e`: four disposable services healthy, no host ports; private loopback localhost:8080 not ready; no client/user/browser test executed. **Owned cleanup PASS.**
**P05-OIDC-02 status:** narrow CI-only source remediation implemented; **actual new Gitea run pending**. No claim of fixed runtime or authenticated OIDC prior to terminal evidence.
## Source changes
The existing manual Gitea workflow `.gitea/workflows/p05-oidc-acceptance.yml` is reused; original backend, P02 developer Compose, official Login V2 application, Account Portal Auth.js/source, and all manifests/lockfiles stay unchanged.
In `tests/ci/oidc_e2e/run.sh` only, the runner now distinguishes:
1. **Private proxy/Host readiness**: a disposable Python container sharing Traefik's isolated network namespace makes `GET /debug/ready` on `127.0.0.1:80` with the exact `Host: localhost:8080`; HTTP 200 required before the forwarder.
2. **Verified prebuilt forwarding binary**: Docker Hub versioned `alpine/socat:1.8.1.3` (preinstalled `socat`; no runtime `apk add`). The CI runner verifies the `socat` entrypoint, resolves the pulled version to its immutable registry `sha256` image digest and starts the run-owned sidecar **by digest**; no `latest` image. This image is published by the `alpine/socat` project; see [Docker Hub repository](https://hub.docker.com/r/alpine/socat), [exact versioned tags](https://hub.docker.com/r/alpine/socat/tags).
3. **Private forwarder readiness and failure evidence**: the sidecar shares only the CI proxy network namespace and binds **127.0.0.1:8080**, forwarding to namespace-local Traefik:80. The runner checks exact labeled Docker sidecar state/exit code and makes a bounded no-secret `/debug/ready` HTTP 200 probe on forwarded port 8080 using `Host: localhost:8080`. A failed probe stops **before** provisioning and prints only safe stage/status, not token/cookie/query/sensitive HTTP bodies.
4. **Provisioner status-only readiness**: `tests/ci/oidc_e2e/provision.py::wait_until_ready()` checks HTTP 200 from the private issuer. It no longer attempts to parse the readiness body as JSON. Actual official API project/client/human creation continues to parse validated JSON and must not bypass authentication.
5. **Cleanup**: unchanged existing `tests/ci/oidc_e2e/cleanup.sh` still enforces numeric Gitea run ownership, exact sidecar/secret labels, backend Compose cleanup, and complete absence verification. No host published ports.
## How acceptance is determined
The single already-approved manual Gitea workflow `p05-oidc-acceptance.yml` must prove private proxy/forwarder readiness **and then** actual official client/user provisioning, original Login V2 Chromium password flow, genuine Auth.js authorization-code PKCE/state/nonce callback, protected Account session and API user ID, anonymous and invalid callback rejection, local sign-out, and successful mandatory owned cleanup.
If any check is blocked, document exact job/run/stage and **do not claim PASS for unexecuted steps**. One Gitea cycle only; no repeat or local tests. No screenshots, real accounts, private secrets, production deployment, MFA/passkey or production HTTPS acceptance. Detailed plan/evidence: `notes/P05-OIDC-02.md`. Developer design: `project/OIDC-E2E-ARCHITECTURE.md`.
+6
View File
@@ -76,6 +76,12 @@ Implement one explicitly approved phase at a time. Keep out-of-scope files, exis
- Pre-change plan `notes/P05-OIDC-01.md` documents official IAM_OWNER bootstrap PAT (not the Login-client PAT), disposable project/real OIDC Web client and human, original Login V2 Chromium password flow, Auth.js PKCE/state/nonce, positive Account API/session and anonymous/invalid negatives, and mandatory run-owned secret/Compose cleanup. No public host ports. Existing HTTP localhost issuer requires development **only in the disposable CI container**, not a production TLS acceptance.
- One manual Gitea Actions CI cycle; **no local app installs/builds/tests/dev servers or production deployment**, no fake login/session or identity bypass. Exact real job results required for PASS. `docs/P05-OIDC-01.md`, `project/OIDC-E2E-ARCHITECTURE.md`.
## P05-OIDC-02 — Private Loopback Forwarder Remediation & Real Browser OIDC Acceptance (APPROVED 2026-11-22)
- Baseline `b78270e9d45c1764c5642024b8147885deaacde3`. Run #90 tested `cbcd60e`, four backend services healthy and host portless, but CI-only localhost:8080 sidecar not ready; project/client/user/browser tests **NOT RUN**; owned teardown **PASS**. Root cause not established by previous logs.
- Exact Write Scope: `tests/ci/oidc_e2e/run.sh`, justified `provision.py` and optional `cleanup.sh`, optional `.gitea/workflows/p05-oidc-acceptance.yml`, `notes/**`, `project/**`, relevant `docs/**`, associated README/MINIFEST only if required. Original backend/dev Compose, Login V2, Account Portal, manifests/locks, production and unrelated files READ-ONLY. Preserve untracked `AI_INSTRUCTIONS.md`.
- Pre-change `notes/P05-OIDC-02.md`: before provisioning probe private 127.0.0.1:80 proxy/Host HTTP 200; replace runtime `apk add` with published versioned `alpine/socat:1.8.1.3`, verify preinstalled entrypoint + digest and run by immutable digest; inspect sidecar state/exit and require private forwarded 127.0.0.1:8080 HTTP 200; fix only the provisioner's status-only readiness without touching official API/secret checks. Existing owned-only cleanup unmodified.
- **Exactly ONE manual Gitea CI run** to verify real disposable project/client/human + original Login V2 Chromium → Auth.js PKCE/state/nonce/callback/session/negative checks + mandatory owned cleanup. No local app tests, no production, no unsafe logging or guessed PASS. Actual result must be documented. Operator guide `docs/P05-OIDC-02.md`.
## P05 - Full Integration (proposed, NOT approved)
Shared design system, production-safe Compose topology and verified Login/Account OIDC wiring. No live deployment; separate approval.
+1 -1
View File
@@ -26,4 +26,4 @@
Full update policy is in root [AGENTS.md](../AGENTS.md). A list of available docs is in [MINIFEST.md](MINIFEST.md).
For the P05-OIDC-01 isolated real-user/Chromium login callback acceptance harness, actual CI outcome and safety boundaries see [P05-OIDC-01.md](P05-OIDC-01.md). For Gitea Run #89 final Login frozen build/unit/zero-advisory acceptance see [P05-SEC-02-A01.md](P05-SEC-02-A01.md). For Run #88 historical blocker and corrected helper see [P05-SEC-02.md](P05-SEC-02.md). For Gitea Run #87 findings see [P05-SEC-01.md](P05-SEC-01.md). For backend-only isolated runtime verification see [P05-CI-03.md](P05-CI-03.md); for initial full workflow and its limitations see [P05-CI-01.md](P05-CI-01.md). A green backend discovery smoke is not an authenticated user-login result.
For the current P05-OIDC-02 private loopback forwarding acceptance and actual Gitea evidence see [P05-OIDC-02.md](P05-OIDC-02.md). For the previous Run #90 blocker and cleanup see [P05-OIDC-01.md](P05-OIDC-01.md). For Gitea Run #89 final Login frozen build/unit/zero-advisory acceptance see [P05-SEC-02-A01.md](P05-SEC-02-A01.md). For Run #88 historical blocker and corrected helper see [P05-SEC-02.md](P05-SEC-02.md). For Gitea Run #87 findings see [P05-SEC-01.md](P05-SEC-01.md). For backend-only isolated runtime verification see [P05-CI-03.md](P05-CI-03.md); for initial full workflow and its limitations see [P05-CI-01.md](P05-CI-01.md). A green backend discovery smoke is not an authenticated user-login result.
+3
View File
@@ -108,3 +108,6 @@ In Gitea `vibtools/ZitPlane` → Actions → **ZitPlane P05-OIDC-01 Disposable R
**P05-OIDC-01 actual Gitea evidence:** [Run #90](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/90) started the original ZITADEL/PostgreSQL/Login V2/Traefik stack healthy without publishing host ports, but could not establish private `localhost:8080` forwarding. Official OIDC project/client/user setup and real browser callback **did not execute**; overall CI FAILED. Mandatory owned-only resource cleanup **PASSED**. The run did not impact production or user accounts. A separately scoped P05-OIDC-02 CI network-forwarder acceptance is needed before claiming interactive OIDC works.
**P05-OIDC-02 procedure:** Reuse the existing manual `ZitPlane P05-OIDC-01 Disposable Real Browser Acceptance` Gitea workflow (file `.gitea/workflows/p05-oidc-acceptance.yml`) with the newly patched CI-only forwarder. A good run first validates private proxy Host routing, prebuilt `alpine/socat:1.8.1.3` image digest and forwarded localhost:8080 HTTP 200, then provisions disposable OIDC client/user and tests a real Chromium/Account Portal callback before always-run cleanup. No host ports, no real credentials, no local tests. Actual PASS/BLOCKED will be recorded in `docs/P05-OIDC-02.md` and `notes/P05-OIDC-02.md`.
+3
View File
@@ -60,3 +60,6 @@ The new manual Gitea `p05-oidc-acceptance.yml` is **not a production deployment*
## P05-OIDC-01 Run #90 — private loopback forwarder NOT ready
Job #197 in [Run #90](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/90) failed after four healthy backend services. The CI-only forwarding sidecar never made `localhost:8080` reachable within the 70-second provisioner wait. The sidecar suppresses its `apk add socat` startup diagnostics, so its **exact failure cause is not confirmed**. **Do not** disable issuer checks, expose port 8080, reuse an IAM_LOGIN_CLIENT token as admin or modify protected Auth.js/Login V2 source. The proper next step is a separately approved narrow CI-only forwarder diagnostics/pinning fix, followed by one isolated run. `always()` cleanup **PASS**; no CI-owned Docker resources remained. No real client/user/browser OIDC assertions ran.
**P05-OIDC-02 diagnostic separation:** If private Traefik:80 returns a non-200 status with `Host: localhost:8080`, the **proxy/Host route** gate fails before launching the sidecar. If the pinned prebuilt socat container exits or is not running, the CI job records a nonsecret container state and exit code. If the process stays running but localhost:8080 HTTP 200 fails, only the HTTP status or fixed socket marker is printed. None of these is a real login/MFA issue until client/user/browser stages execute. Do not enable host ports, disable PKCE or print secret URLs; require successful owned cleanup on every run. Actual evidence: `notes/P05-OIDC-02.md`.