Files
ZitPlane/tests/ci/oidc_e2e/README.md
T

3.1 KiB

P05-OIDC-01 — disposable Gitea-only real browser OIDC verification

Not for local development, production hosts, or real identities. The new .gitea/workflows/p05-oidc-acceptance.yml manual workflow is the only approved entrypoint, and it runs on a disposable Gitea Docker runner.

The environment is a temporary zitplane-p05-{GITHUB_RUN_ID} Compose stack containing the unchanged P02 PostgreSQL/ZITADEL API/official prebuilt Login V2/Traefik. compose.owner.override.yaml adds only a first-instance ephemeral IAM_OWNER machine PAT for official API provisioning, with a short expiration; compose.portless.override.yaml clears inherited host ports. A tiny run-owned TCP loopback-forwarder exists only in the proxy Docker network namespace to preserve the official P02 localhost:8080 issuer. No host port is published.

run.sh strictly refuses an existing fixed network, project, volume, credentials file or marker. provision.py uses the official API with a read-only temporary owner PAT to create an isolated project, OIDC Web authorization-code client and a verified disposable human with a strong random password; the app/user secrets are written with mode 0600 into a separate disposable volume. Admin PAT never reaches the browser runner. browser.sh installs the unchanged Account Portal using its committed npm lock and pinned Playwright 1.58.2 in a short-lived Chromium image, and invokes browser.cjs to launch the Account Portal with next dev inside the isolated CI container only. The HTTP loopback issuer is allowed in CI development mode but not in production. Do not claim HTTPS production topology was tested.

browser.cjs performs real native browser navigation, original ZITADEL Login V2 username/password, visible OIDC authorization code + PKCE S256/state/nonce request, Auth.js callback, nonempty matching subject in GET /api/account/me, protected Account page, anonymous/invalid-callback 401 negative tests and local Account Portal logout. No fake IdP, injected session cookies, mocked tokens or bypasses. It must reject failures rather than silently skip assertions.

cleanup.sh is mandatory always(): removes only run-labeled Playwright/forwarder containers and run-labeled secret volume, then invokes the pre-existing audited tests/ci/backend_cleanup.sh for the marked Compose project (including bootstrap PAT/Postgres), and verifies no owned resources remain. Failure of cleanup makes the CI job fail; never run it on a production host.

Privacy: never log user password, owner PAT, OIDC client secret, Auth.js cookies, codes, nonce, state, request query or screenshots. Browser diagnostics contain only safe stage IDs. No credentials/recordings uploaded as CI artifacts. The actual CI run and individual pass/blocked status are recorded in notes/P05-OIDC-01.md and docs/P05-OIDC-01.md; source existence alone is not runtime acceptance.

Phase limitations: MFA/passkeys, production HTTPS issuer, deployment, full Admin Console human login and global SSO logout are outside this phase. Only a real successful browser callback + verified teardown is enough for its narrower user/password OIDC acceptance.