docs(oidc): record Run 104 empty deploy metadata RCA and new normalized secret-grant blocker

This commit is contained in:
victorsteele428 committed 2026-11-23 16:15:33 +00:00
1 parent 7954938fce
commit a3cc1cce30
2 files changed
+76 -1

No files matched your search

+51 -1
View File
@@ -26,4 +26,54 @@
**Production boundaries:** This is synthetic CI-only validation; **not real HTTPS, live DNS, deployed Login/Console, secrets/backup recovery, MFA/passkey or multi-app SSO acceptance**. No production work is authorized.
**Initial status:** Scope Lock committed FIRST. Actual normalized extra `deploy` keys/types remain UNKNOWN pending single CI diagnostics; no source change or CI dispatch yet.
## Terminal single-run evidence and A03 acceptance verdict — 2026-11-23
**Scope-first note commit:** `756f3e134affcf908c3cce800cd177d78c192c78`. **Only modified source:** `tests/ci/production_contract/validate.py`; no `deployment/**`, `auth/**`, `users/**`, `core/**`, existing workflow, package lock, runner or production edit. Exact pre-dispatch tested source SHA `7954938fcee4d11c0b27751c7cf7abdcc64cd243`. One focused source/security/diff audit PASS: the 25 original, 4 runtime, 3 replica and 8 added deploy negative fixtures are present as source definitions; **CI execution had not yet occurred when audited**.
**One and only manual CI dispatch:** [Gitea Run #104](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/104) / Job #220, `completed/failure`, checkout at immutable source `7954938fcee4d11c0b27751c7cf7abdcc64cd243`, 2026-11-23T16:12:50Z–16:13:09Z. Step #0 install toolchain **PASS**; #1 checkout **PASS**; #2 Compose config + validator **FAIL**; #3 `always()` static manual-only/no-resource-actions check **PASS**. **No rerun, no post-run code patch**.
| Gate | Actual outcome / log marker |
| --- | --- |
| `docker compose -f deployment/production-contract/compose.ci.yaml config --quiet` | **PASS** — `ZITPLANE_P08_COMPOSE_STATIC_CONFIG_PASS` |
| Pinned unchanged fixture bytes and original five zero-replica declarations | **PASS** — `ZITPLANE_P08_SOURCE_ALL_FIVE_REPLICAS_ZERO_PASS`; immutable Git blob `930c0b0fbfb518555436acd6f0b4bb3bdd421937` read-only |
| Five normalized `command: null` / `entrypoint: null` defaults | **VERIFIED** — ten allowlisted `*_COMMAND_NULL` / `*_ENTRYPOINT_NULL` markers |
| Five normalized deploy mappings and integer `replicas: 0` | **VERIFIED** — `ZITPLANE_P08_NORMALIZED_DEPLOY_*_OBJECT` and `*_REPLICAS_INT_ZERO` |
| Extra normalized deploy fields | **EXACT RCA VERIFIED:** `resources: {}` and `placement: {}` on **each of five** synthetic services; `*_KNOWN_RESOURCES_EMPTY_OBJECT` + `*_KNOWN_PLACEMENT_EMPTY_OBJECT`. No `*_UNKNOWN_KEY_PRESENT` marker in recorded result |
| Previous A02 `DEPLOY_DISABLED` acceptance blocker | **RESOLVED for at least the checked service execution path:** validator progressed past this guard and failed at the **later service-secret-ref check**. Do not claim all five service paths completed. |
| Service secret-reference normalization/policy | **FAIL** — `ZITPLANE_P08_FAIL_CLOSED_SERVICE_SECRET_REFS` |
| Exact secret grant field/list entry/source-target mismatch | **UNKNOWN**; `service_secret_refs()` checks entry shape and `target == source` when represented as dict; actual normalized grants were not printed or classified. Do **not** assume a particular mismatch or reveal paths/credential values |
| Full positive issuer/callback, Login V2/Console/API h2c, Host/forwarded, secret/private-network aggregate success markers | **NOT REACHED** (early failure; individual policy sections may have executed without aggregate success markers) |
| Original 25 synthetic invalid fixtures | **NOT EXECUTED** |
| Four nonempty runtime override fixtures | **NOT EXECUTED** |
| Three malicious replica fixtures | **NOT EXECUTED** |
| Eight dangerous extra-deploy metadata fixtures | **NOT EXECUTED** |
| Inert metadata positive synthetic fixture | **NOT EXECUTED** |
| Static manual-only/no Docker lifecycle commands configured | **PASS** `ZITPLANE_P08_MANUAL_ONLY_NO_RESOURCE_ACTIONS_CONFIGURED_PASS` (initial check + `always()`) |
| Gitea-owned temporary task resource cleanup | **PASS as job evidence:** job container deleted, two task volumes removed and task network cleanup logged; no production Docker inventory |
| Real DNS, public HTTPS/certificates, actual ZITADEL/Account auth, Console/MFA/passkeys/SSO, secrets/DB backups or production deployment | **NOT EXECUTED / OUT OF SCOPE** |
### Proven root cause vs residual defect
Unlike Run #103, this run revealed **exactly the two known additional keys** on every synthetic `deploy` object: `resources` and `placement`, each an **empty mapping**. This is consistent with inert Docker Compose normalization; the validator's exact-key/empty-shape acceptance lets execution proceed to `SERVICE_SECRET_REFS` without accepting nonempty resources, placement, restart, update, rollback, mode, endpoints, unfamiliar keys or nonzero replicas. The newly added negative fixture **definitions** cover such hostile mutation but are **not CI-tested**, since `negative_cases()` never ran.
Next blocker `SERVICE_SECRET_REFS`: strict service secret grant structure does not match normalized `docker compose config --format json`. Its **precise** normalized entry representation is not in the safe logs. The code has `service_secret_refs(service)`, accepting string entries or restricted source/target dictionary where `target == source`, then exact expected references. It is possible normalized target paths or metadata differ, but no particular one can be concluded without new evidence.
**A03 FINAL VERDICT:** **partial RCA and prior-blocker PASS**, **full synthetic contract CI acceptance FAIL/BLOCKED**. All **40** negative security fixtures (25+4+3+8) **NOT EXECUTED**. Imported Login V2 [Run #99](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/99) remains real isolated disposable OIDC acceptance only. No live production evidence.
### Remaining blockers and separately approved next phase
**P0 static-contract blocker:** exact normalized service-level secret grant shape/source-to-target semantics, unknown; still need positive/negative synthetic security acceptance. Afterward, production image provenance, master-key/PAT client-secret custody and encrypted DB recoverability, real trusted HTTPS issuer/ingress, Console/MFA/SSO remain separate non-synthetic phases.
**PROPOSED P05-OIDC-08-A04 — Normalized Service-Secret Grants RCA & Full Static Contract Acceptance (NOT YET APPROVED).**
- **Approved baseline for next phase:** use final A03 documentation-closure Gitea main SHA, verify at closure; previous tested source `7954938fcee4d11c0b27751c7cf7abdcc64cd243`, Run #104/Job #220 terminal failure.
- **Pre-source Scope Lock note FIRST:** create and commit `notes/P05-OIDC-08-A04.md` before any source changes.
- **SOURCE WRITE ONLY:** `tests/ci/production_contract/validate.py`. **DOCUMENTATION WRITE:** `notes/**`, relevant `project/**`, `docs/**`, necessary associated existing README/MINIFEST. **STRICT READ-ONLY:** `auth/**`, `users/**`, `core/**`, **all `deployment/**`**, existing `.gitea/workflows/**`, other tests (apart from necessary README/MINIFEST), manifests/locks, runner, live DNS/VPS/Coolify/Cloudflare/SSL, production secrets/infrastructure and unrelated files; preserve untracked `AI_INSTRUCTIONS.md`.
- **Evidence-first diagnostics:** for known five services and six symbolic secret-reference names ONLY, log **fixed safe classes** for list entries (string vs dict vs other), whether source matches an allowlisted name, whether target is exact source/basename, canonical `/run/secrets/<source>` or other, whether unexpected grant keys or duplicates exist. No actual source/target strings, credential values, entire normalized JSON, arbitrary key names, environment/secret files, tokens or personal data logged. Read unchanged fixture source and policy **read-only**.
- **Narrow safety fix:** accept *only independently evidenced* harmless Compose-normalized representation of exactly original required grants and per-service expected order/sets with non-deployable external named placeholder secrets; reject missing, duplicated, extra, wrong-target, privileged/broad grant or unknown fields and plaintext credential exposure. Preserve full fail-closed issuer/routing, private ports, 0 replicas, inert metadata and Docker socket/command restrictions.
- **Tests:** preserve original **25**, runtime **4**, replica **3**, deploy **8** negatives; add focused missing/extra/mis-targeted secret grant rejections with exact error classes if relevant, maintain an inert normalized positive fixture. No false PASS before actual run.
- **One focused pre-run source/security/diff audit**, source commit/push, **exactly one newly approved manual Gitea CI dispatch** using unchanged workflow; record full positive markers, all negative fixture markers, manual workflow-safety and runner-owned cleanup. Failure -> stop, no rerun or post-CI code patch. Documentation sync, cumulative exact allowed-path/secret/source-inventory audit and final remote SHA.
- **Never** run Compose up/build/pull, real DNS/TLS, secrets/users, registry, production infrastructure, local app build/test, tag or release.
**No A04 execution without new explicit approval.**