5.8 KiB
P05-OIDC-08-A04 — Normalized Service-Secret Grants RCA & Full Static Contract Acceptance
Date: 2026-11-23 Asia/Dhaka.
User-approved baseline: fb5d6c5690b030608ddb393dc2cacb68605a9b07, verified exact Gitea main before any edits.
Previous CI: Run #104, Job #220 COMPLETED FAILURE, tested source 7954938fcee4d11c0b27751c7cf7abdcc64cd243. Source fixture and static Compose PASS; 5 deploy.replicas int zero, resources: {}, placement: {}, command:null and entrypoint:null VERIFIED in normalized output. Earlier strict DEPLOY_DISABLED blocker passed along reached path, followed by ZITPLANE_P08_FAIL_CLOSED_SERVICE_SECRET_REFS; exact secret grant format UNKNOWN. All 25 original + 4 runtime + 3 replica + 8 deploy negative fixtures NOT EXECUTED. Manual-only/no Docker-lifecycle workflow safety PASS and runner-owned task cleanup observed.
Earlier independent login: Run #99 real imported custom Login V2/Chromium/PKCE/Auth.js disposable localhost CI success remains accepted; not real public HTTPS.
Exact Scope Lock — COMMIT THIS NOTE FIRST, BEFORE ANY SOURCE MODIFICATION
SOURCE WRITE EXACT (one file only): tests/ci/production_contract/validate.py.
DOCUMENTATION WRITE: notes/**, relevant project/**, relevant docs/**, necessary associated existing README.md and MINIFEST.md only.
STRICT READ ONLY: all auth/**, users/**, core/**, all deployment/** including immutable deployment/production-contract/compose.ci.yaml and routing-policy.json, all existing .gitea/workflows/**, all other tests/** (outside validator/related existing README or MINIFEST), package manifests/locks, Gitea runner config, VPS/Coolify/Cloudflare/SSL/DNS/production infrastructure/secret stores, unrelated files. Preserve untracked AI_INSTRUCTIONS.md: do NOT modify/add/remove or inspect its private contents.
NEVER: local app tests/build, docker compose up/run/build/pull, real service startup, production DNS/TLS lookup, live users/secrets, publish image, production deployment, tag or release. Existing manual workflow only and exactly ONE newly approved CI dispatch after pre-CI focused security/diff audit. If it fails, record exact results and do NOT edit source after dispatch or run second CI.
Read-only evidence and safe diagnosis strategy
- Original synthetic YAML has 5 undeployable services, internal-only network,
replicas: 0, reserved synthetic image refs, six external symbolic name-only placeholders. Per-service expected: ingress none;zitadel-apimasterkey+postgres;zitadel-loginPAT+cookie;accountclient+auth;postgrespostgres password. Existing policy exact trusted issuer/callback, Host/forwarded, h2c paths, no ports. - Existing
service_secret_refs()accepts strings or restricted{"source","target","uid","gid","mode"}dictionaries but requirestarget == source, and exact per-service ordered refs. Normalized output NOT logged in prior CI; plausible safe normalization variants include dictionary grants whose target is the canonical/run/secrets/<source>mount path, or reordered entries, but neither is yet verified. Do NOT assert actual cause until this phase's single CI. - Source edit only validator: Add safe grant diagnostics for known service IDs and expected symbolic placeholders. Print only static field/class markers (list/entry string vs dict, whether source is approved and authorized to this service, whether target is exact source or the canonical
/run/secrets/<source>vs unexpected, whether uid/gid remain root and mode remains canonical read-only, missing/duplicate/extra/unknown key flag). Never print raw source/target strings, arbitrary keys, env values, credential data, full JSON, paths of user files or secret values. - Permit only genuinely safe Compose grant normalization proven by exact normalized category in CI (string names, or dictionary with authorized source and either same-name or exact canonical
/run/secrets/<source>target, default root-owned/read-only metadata). Compare exact set+count of grants per service; reject duplicates, omission, wrong-service grants, extra unauthorized sources, wrong target, expanded mount privilege, unknown keys or abnormal type. The symbolic six-secret registry must still exactly match unchanged external placeholder policy. Never weaken other exact checks (canonical HTTPS OIDC callback, Host/Forwarded TLS, private network, 0 replicas and inert empty metadata, non-deployable image, no public ports/privilege/socket/build/command). - Preserve 25 original + 4 runtime + 3 replica + 8 deploy targeted negatives and add focused missing/duplicate/extra/wrong-service/wrong-target/unsafe-permission grant negative fixtures with exact expected
SERVICE_SECRET_REFSclass. Never claim these ran prior to Gitea evidence. - Once focused pre-CI source/security/diff audit confirms only this source and this scope note, commit/push tested source SHA. Dispatch unchanged
p05-production-contract-dry-run.ymlexactly once. Record actual positive markers, each fixture marker, manual-onlyalways()guard, runner-owned cleanup and terminal status. No rerun or post-run source patch on failure. - Documentation closure: append truthful PASS/FAIL/NOT EXECUTED to this note and new
docs/P05-OIDC-08-A04.md, sync relevantproject/**,docs/**, README/MINIFEST and exact tracked inventory. Perform cumulative path/secret/security audit and verify final Gitea main SHA. Distinguish CI-tested SHA from later docs-only SHA.
Production remains not deployed/unverified: no real HTTPS, DNS, SSL, production user, issuer, Console, MFA/passkeys/SSO, secure secret vault, master key custody or encrypted backup/restore acceptance in this phase.
Status before source changes: Scope Lock note first; exact normalized secret-grant source/target shape still UNKNOWN.