docs(oidc): record Run 105 accepted static policy across project and operator guides

This commit is contained in:
victorsteele428 committed 2026-11-23 16:41:26 +00:00
1 parent d7721e9f41
commit 31044ff83c
8 files changed
+43

No files matched your search

+2
View File
@@ -71,3 +71,5 @@ Future feature additions need an evidence-backed status update here, an exact de
**P05-OIDC-08-A02 (2026-11-23) synthetic security acceptance status:** Gitea [Run #103](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/103) Job #219 **FAILURE**; Compose `config --quiet` PASS, source five `replicas: 0` PASS, normalized `deploy.replicas` **integer zero in all five** VERIFIED, but **all five contain additional deploy fields**, name/type/effect UNKNOWN. Strict `DEPLOY_DISABLED` rejects extra keys; **25+4+3 negative fixtures NOT EXECUTED**. Manual-only/no Docker resource action safety PASS, runner task cleanup observed. Full static contract **BLOCKED**, production HTTPS/domains/keys/backups/Console/MFA/SSO NOT VERIFIED. Earlier real disposable custom Login V2 Run #99 **SUCCESS** unaffected. [A02 operator guide](P05-OIDC-08-A02.md).
**P05-OIDC-08-A03 (2026-11-23) static production-config contract latest:** [Run #104](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/104) / Job #220 **FAILURE**. Docker Compose static config PASS. Normalized all five `replicas` int zero, with exactly **empty `resources: {}` and `placement: {}`** in deploy mappings (safe diagnostics VERIFIED); previous `DEPLOY_DISABLED` blocker passed. Next `SERVICE_SECRET_REFS` FAIL, exact normalized secret grant source/target semantics UNKNOWN. The original 25 + runtime 4 + replica 3 + deploy 8 negative cases are **NOT EXECUTED**, not accepted. Manual-only/no-resource-action step and runner job cleanup PASS. Full synthetic contract and real production HTTPS/DNS/secrets/backup/Console/MFA/SSO still BLOCKED; imported custom Login V2 real disposable browser OIDC [Run #99](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/99) remains previously accepted. [A03 details](P05-OIDC-08-A03.md).
**P05-OIDC-08-A04 current static configuration acceptance:** exactly one [Gitea Run #105](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/105) / Job #221 **SUCCESS** on source `daaa8b259a519ae0290ba28936ef2279b3a9172c`. Non-deployable synthetic contract static Compose parse PASS; seven canonical normalized secret mount grants VERIFIED; proposed canonical HTTPS issuer/Account callback, PKCE/state/nonce, Login V2/Console/API h2c routes, Host/forwarded-header/TLS policy, zero replicas/private network, secret registry and no-public-port/no-unsafe-Docker policy PASS. **48/48 malformed security fixture rejects PASS**, manual-only/no Docker lifecycle action checker PASS and runner task cleanup evidenced. **Only static configuration is accepted**; real production HTTPS/certificates/DNS/users/login/Console/MFA/passkeys/SSO/masterkey/PG encrypted restore/release build/deployment remain **NOT VERIFIED**. Previously accepted real *disposable* custom imported Login V2 Chromium/Auth.js OIDC [Run #99](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/99) remains separate accepted evidence. [A04 acceptance](P05-OIDC-08-A04.md).
+8
View File
@@ -184,3 +184,11 @@ Approved baseline `b3841d8c05d6b47ceaf1dbc5f7103b8de4f256e6`, accepted [Run #96]
Approved baseline `b3b1878e03b3d189ae97ce24a87d6d87c6151811`, pre-source note-first commit `756f3e134affcf908c3cce800cd177d78c192c78`. **Exactly one** source change in `tests/ci/production_contract/validate.py`, tested source SHA `7954938fcee4d11c0b27751c7cf7abdcc64cd243`; all Compose/JSON/workflow/Auth.js/Login/backend/packages read-only. **Exactly one** [Gitea Run #104](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/104) / Job #220 **COMPLETED FAILURE**: toolchain, checkout, static Compose config PASS; all five source and normalized zero replicas and empty `resources: {}` / `placement: {}` verified. The previous `DEPLOY_DISABLED` false-positive was passed on the checked path. Strict next `SERVICE_SECRET_REFS` FAIL before full positive markers or any of **40** negative fixtures (25+4+3+8). Manual workflow-safety `always()` PASS; runner-owned task container/two volumes/network removed. No repeated CI, post-run source patch, local application test, real DNS/TLS/secret, image build or deployment.
**Decision:** A03 partial RCA PASS / full synthetic contract security acceptance BLOCKED. Next separately approved `P05-OIDC-08-A04`: validator-only safe type/classification for service secret grants and exact expected canonical source/target mapping; preserve 40 negative fixtures, add focused secret-grant negatives, one new manual static-only run and documentation closure. [Forensic notes](../notes/P05-OIDC-08-A03.md) and [operator guide](P05-OIDC-08-A03.md).
## P05-OIDC-08-A04 — Synthetic production-configuration security acceptance SUCCESS (2026-11-23)
Approved baseline `fb5d6c5690b030608ddb393dc2cacb68605a9b07`; pre-source Scope Lock note commit `64d8c0830e5dac5417db2c8de2363b1d472f11c4`. Only validator source `tests/ci/production_contract/validate.py` changed; immutable tested source `daaa8b259a519ae0290ba28936ef2279b3a9172c`; Compose/policy/workflow/auth/Login/Account/backend/package/runner read-only. Exactly one [Gitea Run #105](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/105) / Job #221 **COMPLETED SUCCESS**, all 4 job steps PASS, no rerun or post-run source edit.
**Actual RCA:** seven normalized per-service symbolic secret grants are object entries targeting canonical `/run/secrets/<source>`, not plain matching source names; safe source/target classes were verified. Exact six symbolic registry references, per-service exact grants, strict root/read-only defaults and no duplicates/privileged grants PASS. Previous null command/entrypoint, integer-zero replicas and empty resources/placement normalized metadata remain accepted safely. Static issuer `https://auth.vib.tools`, separate Account `https://account.vib.tools`, callback, Login V2/Console/API h2c, Host/forwarded/TLS-required, private network/no ports/Docker socket/build privilege security rules PASS.
**ALL 48 security-negative fixtures PASS:** 25 original + 4 runtime + 3 replica + 8 deploy + 8 secret grant; inert canonical positive tests PASS; workflow manual-only/no configured Docker service lifecycle commands PASS and runner-owned job container/two volumes/network cleanup evidenced. **Phase A04 static synthetic CI acceptance COMPLETE**, does not mean real production HTTPS, DNS, secrets, image provenance, backups, Console, MFA, passkeys, SSO or deployment is verified. Existing custom source-built Login V2 real *disposable* browser Run #99 SUCCESS remains accepted. [Forensic evidence](../notes/P05-OIDC-08-A04.md), [operator guide](P05-OIDC-08-A04.md). Next proposed separately approved **P05-OIDC-09**: docs-only forensic production release preflight and exact further implementation scopes (no new CI or production changes).
+4
View File
@@ -162,3 +162,7 @@ The unchanged `deployment/production-contract/compose.ci.yaml` is *non-deployabl
## P05-OIDC-08-A03 — synthetic-only status, no runtime setup
**Do not deploy** `deployment/production-contract/compose.ci.yaml`; it has reserved `synthetic.invalid` images, zero replicas, a private network and unresolved external secret placeholder names. A03 [Run #104](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/104) verified five source `replicas: 0`, five normalized integer zeros and harmless empty Compose `resources: {}` / `placement: {}`, but **failed** strict `SERVICE_SECRET_REFS` before all 40 negative tests ran. The actual normalized secret grant shape is not known; never work around the failure by copying real keys, disabling secret validation, running `up` or contacting live `auth.vib.tools`/`account.vib.tools` endpoints. Only a separately approved A04 validator-only RCA may change this CI contract; production HTTPS/TLS/backup/SSO remains independently unverified. See [A03 operator report](P05-OIDC-08-A03.md).
## P05-OIDC-08-A04 — accepted synthetic policy, NOT production deployment instructions
The checked-in `deployment/production-contract/compose.ci.yaml` contains only `synthetic.invalid` image references, five zero-replica services, an internal network and six unresolved symbolic external secret placeholders. **Never run `docker compose up/run/build/pull`** on this fixture. [Run #105](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/105) verified the static Compose normalized seven authorized symbolic service grants with canonical `/run/secrets/<source>` targets, source integrity, exact callback/issuer, Login/Console/API h2c, Host/forwarded/TLS policy, no public ports/unsafe runtime/credentials, and **48/48 deliberately invalid config tests PASS**. Gitea runner owned disposable task container/volumes/network and cleaned them; no app/production services started. This is not a production installation test. Real DNS/SSL, secure master key/PAT/DB recovery, verified releases and actual Login/Console/MFA/SSO must undergo separate approved planning and live acceptance. For final CI evidence see [A04 operator report](P05-OIDC-08-A04.md).
+4
View File
@@ -121,3 +121,7 @@ In [Run #103](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/103), `ZITPLANE
## P05-OIDC-08-A03 — additional deploy keys classified, next SERVICE_SECRET_REFS guard failed
The previous [Run #103](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/103) showed unknown extra deploy keys. [Run #104](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/104) now identifies them **exactly**: normalized `resources: {}` and `placement: {}` on each of five zero-replica synthetic services. Only these safely empty known defaults can be tolerated; arbitrary populated mode/resources/placement/update/restart policies, unknown keys, nonzero replicas, public ports or executable runtime config remain disallowed. The validator reached `ZITPLANE_P08_FAIL_CLOSED_SERVICE_SECRET_REFS`. Current `service_secret_refs()` accepts string entries or restricted source/target dictionaries and checks `target == source`; it has **no safe per-entry log**, so do not presume a particular path discrepancy. A04 (requires separate approval) must log only fixed source/target **classification** of known placeholder grants, never actual values/secrets or raw Compose JSON, then accept only evidence-proven canonical mapping, run all 40+ security negatives in one new CI. Do not modify deployment/CI workflow or execute `docker compose up`, real DNS/SSL or credential actions. [Full A03 evidence](P05-OIDC-08-A03.md).
## P05-OIDC-08-A04 — normalized service-secret target RCA resolved; synthetic contract SUCCESS
Historical [Run #104](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/104) `SERVICE_SECRET_REFS` failed because the validator demanded `source == target`. [Run #105](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/105) **SUCCESS** proves the seven normalized grants are approved source names mapped to their exact canonical **`/run/secrets/<source>` target**, with fixed safe `OBJECT`/`SOURCE_EXPECTED`/`TARGET_CANONICAL_MOUNT` markers (no raw secret material logged). The validator now accepts exact same-name or canonical path only, rejects duplicate/missing/extra/wrong-service grants, wrong targets, unexpected metadata, non-root/unsafe mode. All other issuer/callback/Host/h2c/private/zero-replica/runtime gates and **48/48 negative fixtures PASS** in one CI run; manual workflow safety and runner cleanup PASS. Do **not** use `deployment/production-contract/compose.ci.yaml` for live deployment, enter actual credentials into this synthetic fixture, or treat CI policy PASS as real HTTPS/SSO readiness. Production failures require independent, separately approved production preflight; see [A04 operator report](P05-OIDC-08-A04.md).
+8
View File
@@ -204,3 +204,11 @@ Exactly one existing manual Gitea [Run #103](https://dev.ivib.cc/vibtools/ZitPla
## 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.
## P05-OIDC-08-A04 — full manually dispatched synthetic production security contract accepted (Run #105)
**Gitea manual-only [Run #105](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/105) / Job #221 `COMPLETED SUCCESS`**, immutable source `daaa8b259a519ae0290ba28936ef2279b3a9172c`, with existing unchanged `.gitea/workflows/p05-production-contract-dry-run.yml` and source `deployment/production-contract/compose.ci.yaml` / `routing-policy.json`. Runner installs Git/Python stdlib/Compose CLI, checks `docker compose ... config --quiet` and pipes normalized **JSON only to static validator**; no application service `up/run/pull/build`. Original synthetic images use `synthetic.invalid`, all five source and normalized replicas integer zero, internal-only network and symbolic external secret refs. Gitea runner independently provisions a temporary job container/volumes/network and cleans its owned task state.
**RCA verified:** `docker compose config --format json` yields **seven** per-service secret grant dictionary entries with approved symbolic `source` and exact canonical `target` under `/run/secrets/<source>`, not the earlier same-name target assumption. Safe diagnostics verified 7 `OBJECT` + `TARGET_CANONICAL_MOUNT` + `SOURCE_EXPECTED` markers, no sensitive values. Validator now enforces exact six external registry refs/required per-service sets, default-root/read-only mount grant metadata, no duplicates or extra/unknown source/target/fields. Normalized deploy `resources:{}, placement:{}, replicas:int 0` and runtime `command:null, entrypoint:null` remain narrowly allowed inert defaults.
**All static positive policy gates PASS**: proposed canonical HTTPS issuer/separate Account callback/OIDC policy, Login V2/Console/API h2c route policy, Host/forwarded trust/TLS policy, private internal-only networking, no exposed ports, inline creds, socket, privileged/build/active runtime. **48/48 negative fixtures PASS with exact rejection classes** (25 original, 4 runtime, 3 replica, 8 deploy, 8 new secret grants). Inert-positive and canonical-grant-positive cases PASS. Manual-only/no configured Docker lifecycle action check PASS in validator and `always()` step, job task container/two volumes/network cleanup evidenced. No CI rerun. **This is static synthetic-contract acceptance, not live production HTTPS, image, backup, MFA/passkey or SSO verification.** Prior isolated imported custom Login browser OIDC [Run #99](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/99) stands separately. Next proposed P05-OIDC-09 docs-only release preflight requires separate approval.
+7
View File
@@ -241,3 +241,10 @@ Run #101 source `2ca1b4493bd47209d0c7eabf7453feaeb1f5174a`: Compose parse PASS,
- **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.
## P05-OIDC-08-A04 — source-only normalizer acceptance and exact changed-file map
- **Single modified source:** `tests/ci/production_contract/validate.py`, source-tested SHA `daaa8b259a519ae0290ba28936ef2279b3a9172c`; new bounded symbolic service grant source/target/permissions classification, exact required set+duplicate rejection, 8 security-negative in-memory cases, one canonical mount positive case.
- **Preserved read-only:** `deployment/production-contract/compose.ci.yaml` Git blob `930c0b0fbfb518555436acd6f0b4bb3bdd421937`, `deployment/production-contract/routing-policy.json`, `.gitea/workflows/p05-production-contract-dry-run.yml`, `auth/**`, `users/**`, `core/**`, all other tests and package locks; no production/runner edits.
- **Documentation:** new `notes/P05-OIDC-08-A04.md` scope-first forensic acceptance and `docs/P05-OIDC-08-A04.md` operator guide, synchronized relevant notes/project/docs/README/MINIFEST and tracked inventory.
- **Accepted static evidence:** [Run #105](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/105) / Job #221 **SUCCESS**, all positive static OIDC/routing/host/secret/internal/no-runtime checks and **48/48 security-negative cases** PASS, manual-only check PASS, runner temporary job resource cleanup PASS. **Live production is not accepted**. Proposed next P05-OIDC-09 production release preflight is doc-only under separate approval.
+6
View File
@@ -191,3 +191,9 @@ Run #99 confirmed input `644 UID:GID 0:0`, copied output/image executable and ac
`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.
## P05-OIDC-08-A04 — secret grant normalization functions and complete negative acceptance
**Only source changed**: `tests/ci/production_contract/validate.py`, tested `daaa8b259a519ae0290ba28936ef2279b3a9172c`. `secret_target_class(source,target)` classifies known same-name vs exact `/run/secrets/<source>` mounts; `safe_root_owner()` requires root 0 and `safe_readonly_mode()` permits exact 0444 default (decimal 292) if metadata supplied. `diagnose_normalized_service_grants()` prints only known service names, item indices and fixed `OBJECT`/`TARGET_CANONICAL_MOUNT`/`SOURCE_EXPECTED`/permissions safety classes, not values. `service_secret_refs()` now rejects unknown fields, wrong target, unsafe UID/GID/mode, duplicates and sources outside the six-symbolic-secret registry; `validate_compose()` compares **exact per-service count and source set**, not normalizer-dependent ordering. `negative_cases()` preserves 25 original, 4 runtime, 3 replica and 8 deploy malformed cases; adds **8 secret-grant negative cases** for missing, duplicated, extra known from wrong service, unknown source, wrong target, unexpected metadata, unsafe UID and world-writable mode, plus a canonical-target positive case. Exact expected error class is mandatory.
**All checks executed and PASS in [Run #105](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/105)**: 48/48 negatives, full static positive and manual-only safety. Input raw JSON/env/secret strings never logged by new diagnostics. No source changes to production/login/Account/backend/workflow/Compose, and actual public HTTPS, secret custody/DB recovery, Console/MFA/SSO or deployment remain NOT TESTED.
+4
View File
@@ -127,3 +127,7 @@ The same manual-only Docker Compose `config` + Python stdlib pipeline was used i
## 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`.
## P05-OIDC-08-A04 — static-only no new runtime dependencies, accepted CI
[Gitea Run #105](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/105) source `daaa8b259a519ae0290ba28936ef2279b3a9172c` uses original manually triggered workflow and installed runner Compose CLI + Python stdlib (no manifest or package-lock changes). The standalone validator now classifies exact symbolic secret grant `target` as `/run/secrets/<source>` and rejects unsafe permissions, duplicates, missing and extra grants; normalized seven canonical grants and original source's six symbolically external placeholders are **STATIC VERIFIED**. The fixture remains deliberately **non-deployable**, no real secret source or `docker compose up/build/pull/run` exists in workflow. All 48 negative cases, positive canonical OIDC issuer/Account callback/h2c/Host+Forwarded/no ports and zero-replica policy, workflow-safety checker PASS in one Gitea run. CI runner ephemeral job cleanup observed; no external DNS/TLS, production images/registry/volumes or keys were tested. Subsequent live production rollout must use a separately approved vetted real deployment design and independent security/backup validation.