fix(ci): narrow Auth.js subject and extend disposable P05 verification
This commit is contained in:
1 parent
42adaba004
commit
c27fe3d323
23 files changed
+415
-45
No files matched your search
@@ -37,6 +37,15 @@ The P02 Compose has a fixed named network `zitplane-backend-dev-internal` and lo
|
||||
Reference: `notes/P05-CI-01.md`, `docs/PHASES.md`, `.gitea/workflows/p05-ci.yml`, `tests/ci/`.
|
||||
|
||||
|
||||
## P05-CI-02 Narrow Auth.js and CI additions
|
||||
|
||||
- `users/ui/src/auth.ts` `callbacks.session`: `const subject: string = typeof token.zitadelSubject === "string" ? token.zitadelSubject : "";` explicitly narrows the JWT claim. Session still sets `id` only when subject nonempty and OIDC access-token expiry is in the future. `users/ui/src/types/next-auth.d.ts` was not changed. This addresses Run #81's `TS2345` (`user.id: {}`) without a cast or altered PKCE/state/nonce.
|
||||
- `tests/ci/account_negative.py` + Account job: anonymous identity API 401/no-store and protected route redirect; no fake logged-in account. `tests/ci/oidc_discovery.py`: issuer/origin/JWKS negative contracts plus actual disposable ready/discovery/JWKS. Tests are CI-only.
|
||||
- `tests/ci/advisory_triage.py`: parse live npm/pnpm registry JSON into advisory IDs, package, affected range, patch availability. Prior high/critical failure threshold maintained; no dependency versions changed.
|
||||
- Backend CI: after safe Docker/network preflight and startup, write one marker in **disposable Postgres database `postgres`**, restart its container, verify marker persists and ZITADEL becomes ready, then test OIDC discovery/JWKS. Always cleanup only the current CI Compose project and its volumes; failure must remain visible.
|
||||
- Corrected Alpine Git checkout from P05-CI-01 is exercised by the new run. Fixed name `zitplane-backend-dev-internal` is a known isolation limitation: existing network triggers fail-closed instead of reuse.
|
||||
- No full interactive user login callback, MFA, Admin Console user session or production TLS verification; separate future scope.
|
||||
|
||||
## Verified Gitea Run #81 and source follow-up
|
||||
|
||||
Initial dispatched commit `42b79362c13b9dbb07f85a58ad278742d91b1f5b`. Two PASS: Login V2 frozen reproducible install, production build and 1219/1219 upstream unit tests; dependency advisory gate at high/critical only (18 moderate findings outstanding). Two FAIL: Account Portal TS2345 Auth.js session callback type mismatch; Alpine backend actions/checkout fallback `Not found` because Git missing before checkout. The Docker runtime and full interactive OIDC flow **were not executed**.
|
||||
|
||||
Reference in new issue
Block a user