Repository navigation
security(workforce-validation): authorize component-evidence resolution before owner reads #414
Description
Finding
Fresh review of canonical PR #235 found that corroborate_final_weight_component_evidence(...) originally performed native component-owner reads without executing a purpose-bound authorization decision at this application boundary. Possession of final-weight/binding evidence is not reusable authorization.
The repaired boundary requires exact ValidationPrincipal, PurposeBoundAccessPolicy, and purpose_code, authorizes before the first owner read, binds the audit resource to the exact final analysis-weight receipt, and requests only component projection fields actually consumed.
Ordinary-forward repair
21588e6fc0b9d6b9a2ed64dd76a7b28f4cb71176— denied-purpose/cross-tenant zero-owner-read RED.bfc67d959636255b1d77fc5eaa3546d58a67c6ff— purpose-bound authorization-before-read repair.9ff8d6daefff6264ba589fc7296e27a1e351c094,41c93ba93962499ca6d2275b68f597238e988669,e13de7cfca9adc3fd82a5b0300711b2640edba84— success/error/currentness/runtime-type coverage through the same boundary.03f9d44024f40e0e49e39022bcfd2b164ec4c475→a4653faa76f7fbcd321af7088bad2145d59fb54f— exact final-receipt audit target RED→repair.460856815b3c0de51eb09b025aeb281aeec691bd→8f271077d2d923f632f7971b598cc878d429ce94— field-minimization RED→repair: base-only final weight no longer requests adjustment-only transform fields; specialized paths retain the fields they actually read.8be428ddd7c0a6efbc22e1eb1795441b581913aa→9b19ae464d32b5d8863552a443cfa7551eafe89c— test-only hypothesis/restoration confirming the deliberately compositeFinalWeightComponentEvidenceReadPortremains API truth.
#416 is an additive refinement rather than a replacement of #414. Fresh review showed tenant_record_id and validity_study_id were consumed from native component projections by _require_component_scope(...) but omitted from the authorized field sets. b4145493988bee3dd869bc7d6688f6fbe7278235 adds the zero-owner-read denial regression when either scope field is missing; 4ec16e61f40265675df0e8464d4ee2bd314fcca3 adds both coordinates to _BASE_READ_FIELDS and _ADJUSTMENT_READ_FIELDS. #414 minimization remains intact because base-only paths still do not request adjustment-only transform fields.
Current canonical source head is 4ec16e61f40265675df0e8464d4ee2bd314fcca3. All source evidence remains non-hosted until exact-head acceptance completes.
Required contract
- authorization precedes every native component owner read;
- the audit target is
final_weight_component_evidence_resolution:<analysis-weight receipt tail>; - requested fields include every native projection coordinate the corroborator consumes, including
tenant_record_idandvalidity_study_id; - base-only lineage requests no adjustment-only transform fields;
- adjustment-only fields are requested only when a governed specialized component is actually read;
- denied purpose/tenant/scope/consumed-field leaves owner-read counts at zero;
- the composite
FinalWeightComponentEvidenceReadPortcontract remains unchanged; - science(workforce-validation): bind final-weight lineage to exact typed component receipts #411/security(workforce-validation): bind component projections to tenant and validity-study authority #412 exact receipt identity, native-owner scope provenance, construction chronology and governed-use currentness remain intact;
- security(workforce-validation): prevent public forging of corroborated component resolutions #413/security(workforce-validation): close tuple.__new__ bypass on component-resolution issuance #415 proof-result issuance integrity remains intact;
- durable feat(workforce-validation): adopt registry into owner persistence #248 adoption must preserve authorization-before-read, exact receipt targeting, field minimization and complete authorization of consumed scope fields.
Completion boundary
Do not close for source repair alone. Completion requires current exact-head owned test/docstring/edge evidence, installed-wheel/package/PostgreSQL/security gates, qualifying independent review, normal protected integration, and durable #248 (or verified successor) adoption after the parent becomes protected truth.
Activity