docs(oidc): synchronize A03 secret-grant blocker in project and operator documentation
This commit is contained in:
1 parent
6d9a037ce3
commit
657e3aa931
8 files changed
+37
No files matched your search
@@ -200,3 +200,7 @@ Exactly one manual [Gitea Run #102](https://dev.ivib.cc/vibtools/ZitPlane/action
|
||||
## P05-OIDC-08-A02 — five normalized zero replicas confirmed, unknown extra deploy keys
|
||||
|
||||
Exactly one existing manual Gitea [Run #103](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/103) / Job #219 `completed/failure` at source `45a2edb854acd98546e60a68482075bc5f742bd2`. Unchanged synthetic `compose.ci.yaml` parses under `docker compose config --quiet` **PASS**. Stdlib validator independently confirmed all five tracked source `deploy.replicas: 0` declarations and read the canonical Compose JSON: **each** of five service `deploy` mappings retained a true JSON/Python **integer zero** `replicas` property, **but each also contained additional unknown top-level deploy keys**. Strict `set(deploy).issubset({"replicas"})` therefore fail-closed with `ZITPLANE_P08_FAIL_CLOSED_DEPLOY_DISABLED`. Extra key **names, types and effects NOT VERIFIED**; do not infer harmlessness. Source original 25 + four runtime + three new replica negatives **NOT EXECUTED**; separate `always()` manual-only/no Docker lifecycle action checker **PASS**. Runner task container/two volumes/network removed. No application service or production DNS/TLS/secret/deployment touched. Next independently approved `P05-OIDC-08-A03`: validator-only safe exact extra-key classification and evidence-proven inert-default narrowing, one manual CI; do not change Compose/workflow. Prior real imported Login V2 OIDC Run #99 separate success.
|
||||
|
||||
## P05-OIDC-08-A03 — inert Compose deploy fields verified; normalized secret grant blocks full CI
|
||||
|
||||
The unchanged **manual-only** `.gitea/workflows/p05-production-contract-dry-run.yml` dispatched exactly once in [Run #104](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/104), Job #220, **completed/failure** on immutable source `7954938fcee4d11c0b27751c7cf7abdcc64cd243`. CLI install/checkout and `docker compose ... config --quiet` **PASS**. The only source patch, `tests/ci/production_contract/validate.py`, pinned the original `compose.ci.yaml` Git blob, safely classified named normalized `deploy` entries and allowed only structurally empty/null known deployment metadata. Five normalized `deploy` mappings each had `replicas: 0` integer, `resources: {}`, `placement: {}` and no unknown-key marker, **VERIFIED**. The prior `DEPLOY_DISABLED` barrier was passed on the execution path, then **`ZITPLANE_P08_FAIL_CLOSED_SERVICE_SECRET_REFS`** stopped the validator. Secret list item/target detail **UNKNOWN**; 25 original, 4 runtime, 3 replica and 8 deploy negative assertions all **NOT EXECUTED**. `always()` manual-only/no Docker lifecycle command checker **PASS**, runner task container/two volumes/network removed as job logs show. No app services or production state touched. Next proposed independently approved A04: only validator source, safe grant type/target classification, then one manual CI; no new run in A03.
|
||||
@@ -234,3 +234,10 @@ Run #101 source `2ca1b4493bd47209d0c7eabf7453feaeb1f5174a`: Compose parse PASS,
|
||||
- **Strict read-only:** `deployment/production-contract/compose.ci.yaml` and `routing-policy.json`, existing `.gitea/workflows/p05-production-contract-dry-run.yml`, all other tests and Login/Auth.js/backend, lockfiles, runner and infrastructure.
|
||||
- **CI Run #103 terminal:** Compose config and five original-zero fixture declarations PASS; five normalized `replicas` int zero PASS; **five unexpected extra deploy fields PRESENT**, exact name unknown; `DEPLOY_DISABLED` rejection FAIL; all 32 negative fixture cases NOT EXECUTED. Existing `notes/P05-OIDC-08-A02.md`, `docs/P05-OIDC-08-A02.md` record honest security-blocking result.
|
||||
- Next source edit only with separately approved `P05-OIDC-08-A03`; no post-dispatch patch in this phase.
|
||||
|
||||
## P05-OIDC-08-A03 — exact changed-file map and accepted evidence boundary
|
||||
|
||||
- **Only application/CI source edited**: `tests/ci/production_contract/validate.py` (tested `7954938fcee4d11c0b27751c7cf7abdcc64cd243`). Added pinned synthetic fixture Git SHA check, known deployment metadata type-only diagnostics, allow-only-empty metadata gate and eight negative fixture definitions.
|
||||
- **Read-only preserved**: `deployment/production-contract/{compose.ci.yaml,routing-policy.json}`, prior manual `.gitea/workflows/p05-production-contract-dry-run.yml`, all `auth/**`, `users/**`, `core/**`, other tests, package files/locks/runner/production.
|
||||
- **Phase evidence and user guide**: `notes/P05-OIDC-08-A03.md`, `docs/P05-OIDC-08-A03.md` plus synchronized notes/project/docs and associated README/MINIFEST. Source five zero replicas, normalized empty resources/placement defaults VERIFIABLE; **full static contract NOT accepted** due `SERVICE_SECRET_REFS`. All 40 invalid fixtures source present but NOT EXECUTED.
|
||||
- **Next proposed A04** only validator service-secret-grant safe-shape RCA under separate approval. No post-run A03 source fix.
|
||||
@@ -185,3 +185,9 @@ Run #99 confirmed input `644 UID:GID 0:0`, copied output/image executable and ac
|
||||
`tests/ci/production_contract/validate.py::verify_tracked_zero_replica_fixture()` reads ONLY the checked-in `deployment/production-contract/compose.ci.yaml` as text, requires exact five service blocks and one `deploy: replicas: 0` per block, prints a static PASS marker. Confirmed **PASS** in Run #103. `diagnose_normalized_deploy()` examines only recognized five service IDs, `deploy` mapping presence/type, unexpected extra field **existence** and `replicas` zero/nonzero TYPE classes without printing arbitrary keys/values. In Run #103, all 5 `deploy` mappings were OBJECT with `REPLICAS_INT_ZERO` and `UNEXPECTED_FIELDS_PRESENT`. Actual unknown key names were intentionally not logged.
|
||||
|
||||
`validate_compose()` continues to reject build/executable overrides, public ports, Docker socket, privilege, unexpected images, nonzero replicas and unfamiliar `deploy` keys, with conditional handling of proven source-zero normalized omission. The **actual** normalized mapping had extra keys, so strict `DEPLOY_DISABLED` **FAIL**, before final positive marker or `negative_cases()`. All original 25, prior 4 runtime and 3 additional replica negatives remain **SOURCE PRESENT / NOT CI EXECUTED**. The unchanged `workflow_safety()` checker **PASS**. Future A03 must first identify extra normalized deploy key name/safe type and only narrow-allow inert defaults if truly proven, retaining fail-closed security. No app/backend/Compose/workflow/source other than validator changed.
|
||||
|
||||
## P05-OIDC-08-A03 — new inert metadata function, safe diagnostics, next grant RCA
|
||||
|
||||
`tests/ci/production_contract/validate.py::inert_deploy_metadata(key,value)` recognizes **only a finite list of Docker Compose deploy metadata keys**, accepting null/empty structures (including resources with strictly empty `limits`/`reservations`) and rejecting populated deployment behavior, `mode` strings, unknown keys and nonzero or missing replicas. `safe_deploy_shape()` and `diagnose_normalized_deploy()` emit predefined known field names and fixed shape categories, never arbitrary input keys or values. `verify_tracked_zero_replica_fixture()` now validates unchanged synthetic fixture Git blob SHA `930c0b0fbfb518555436acd6f0b4bb3bdd421937` plus exact five source `replicas:0`. Eight hostile extra-deploy negative fixtures added to preserved 25+4+3.
|
||||
|
||||
Actual [Run #104](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/104) confirmed `resources: {}` and `placement: {}` on five services, all normalized replicas integer zero, with old `DEPLOY_DISABLED` rejection no longer emitted. **New fail-closed `SERVICE_SECRET_REFS`** came from pre-existing `service_secret_refs()`: it allows string secret entries or restricted dict source/target where `target == source` and then compares expected service grants. The actual normalized grant structure was **not logged**, so a source/target mismatch is only a hypothesis. All 40 negative cases remained NOT EXECUTED. A04 may add value-free per-entry classification and narrowly adapt to actual canonical target if independently verified, without exposing secret values or broadening permissions. No other source/security checks changed.
|
||||
@@ -123,3 +123,7 @@ The same manual-only Docker Compose `config` + Python stdlib pipeline was used i
|
||||
## P05-OIDC-08-A02 — static Compose normalization evidence, not production dependencies
|
||||
|
||||
[Run #103](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/103) uses **unchanged** manual workflow, Git/python3 stdlib/Docker Compose CLI only; no new external app dependencies, images, credentials or actual production endpoint. Source `45a2edb854acd98546e60a68482075bc5f742bd2` verified original five `replicas: 0` declarations and normalized Docker Compose JSON integer-zero `replicas` for every synthetic service. The strict `deploy` keys check failed only because **additional unknown metadata fields** were present in all normalized objects. Do **not** infer those fields' names, allow production behavior, use the synthetic fixture as actual Compose, or start services. CI safety passed; 32 malformed contract assertions were NOT EXECUTED. Production TLS, secret vault and encrypted restore continue to require separate authorization.
|
||||
|
||||
## P05-OIDC-08-A03 — no new production or runtime dependency
|
||||
|
||||
A03 retains **the exact existing manual workflow**: a temporary Gitea Node Alpine runner with Git, Python stdlib and Docker Compose CLI invokes only Compose `config`, Python validation and the always safety check. No package manifest, lockfile, registry image, real master key, PAT, DNS/TLS certificate or production infrastructure was modified. A03 validator source adds only stdlib `hashlib` and safe in-memory static fixture rules. The unchanged `synthetic.invalid` images, zero replicas and symbolic external secrets are never used as deployment. [Run #104](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/104) confirms Compose parse PASS, original five source zeros, normalized integer zeros and empty deploy resources/placement; later strict secret grant normalization FAIL, with **40 negative cases unexecuted**. No local app builds/tests or production deployment. Consult `notes/P05-OIDC-08-A03.md`.
|
||||
Reference in new issue
Block a user