test(ci): add disposable real ZITADEL browser OIDC acceptance

This commit is contained in:
Vib Tools committed 2026-11-22 09:16:53 -08:00
1 parent f423c69654
commit cbcd60e76e
32 files changed
+875 -22

No files matched your search

+8
View File
@@ -119,3 +119,11 @@ Existing `tests/ci/security_advisory_gate.py` remains the independent **live reg
**P05-SEC-02 post-run correction:** `overridden(data)` in `tests/ci/transitive_override_contract.py` originally matched every `>`, incorrectly interpreting `axios@>=...`, `brace-expansion@>=...` and `esbuild@>=...` existing PNPM version constraints as new parent-child override selectors. The matching expression now restricts the suffix to `>glob` or `>minimatch` only, preserving the seven exact patch-parent check without changing registry audit logic. Run #88 predates the fix; this parser has **not yet passed CI**. Auth/session flows untouched.
## P05-OIDC-01 — CI-only real browser identity helper functions
- `tests/ci/oidc_e2e/provision.py::request()` restricts official management/user API requests to fixed localhost and returns **bounded** JSON, without printing token/secret/error-body values; `wait_until_ready()` and `main()` verify issuer discovery and use ephemeral IAM_OWNER bootstrap to create real disposable project, OIDC client and verified human. The resulting secrets file is written only to a CI Docker volume with mode 0600.
- `tests/ci/oidc_e2e/browser.cjs::fixture()` checks fixture integrity; `waitForPortal()` checks the CI-only Account dev server; `assertAuthorization()` validates genuine browser authorization params (S256 PKCE, state, nonce, client and exact redirect); `verifyAnonymous()` asserts unauthenticated API 401/no-store and protected-page redirect; `verifyInvalidCallback()` asserts tampered state/code cannot establish a session; `main()` uses original Login V2 username/password, waits for a *real* Auth.js callback, verifies created user ID, cookie, protected page and local logout.
- `run.sh` owns startup and preflight; `cleanup.sh` owns exact run-labeled teardown and failure if anything remains. These are not user-facing endpoints and must never run against shared/production Docker.
- `users/ui/src/auth.ts`, Account/API source and all upstream Login V2 runtime functions remain unchanged.