1.7 KiB
1.7 KiB
Policy Attestation Prep — PREP-POLICY-ATTEST-73-001
Status: Ready for implementation (2025-11-20) Owners: Policy Guild · Attestor Service Guild Scope: Define VerificationPolicy schema + persistence/DTOs for policy-engine to verify attestation results from Attestor.
Requirements
- Schema
VerificationPolicywith fields:id(string),tenantId,name,description,createdAtUtc,updatedAtUtc(ISO-8601 UTC)subjects: array of{ subjectRef, matchKind: digest|purl|nevra }requiredAttestors: array of{ name, keyId, threshold }transparency:{ required: bool, log: string? }validity:{ notBeforeUtc, notAfterUtc }
- DTOs for API/SDK must preserve deterministic ordering of arrays (sorted by
subjectRef, thenname). - Store in Mongo
verificationPoliciescollection with unique index on(tenantId, id).
API surface (policy-engine)
POST /v1/policy/verification-policiescreate;GET /v1/policy/verification-policies/{id}fetch;GET /v1/policy/verification-policieslist with pagination;DELETE /v1/policy/verification-policies/{id}.- Standard error envelope; headers align with existing policy API (ETag on GET;
Last-Modified).
Persistence rules
- Immutable
createdAtUtc;updatedAtUtcset on mutations; soft-delete not required. - Validation:
requiredAttestors.threshold >=1, uniquekeyIdper policy,validity.notAfterUtc>notBeforeUtc.
Acceptance criteria
- Schema & API documented and linked from sprint tracker; no code changes yet.
- Examples use fixed timestamps
2025-01-01T00:00:00Zand sample hashessha256:0123.... - Collections/indexes specified; DTO ordering deterministic.