Illustrative scenario: a team changes gateway routing, redaction and logging through pull requests. A generic update event cannot tell reviewers which policy served a request, who approved it, or what to restore.
The decision: require a provenance record for every privileged gateway change before deployment. W3C PROV-DM models entities, activities, and responsible agents; activities use and generate entities, and associations identify agent responsibility. It records lineage, not correctness; pair it with tests and approvals.
Prerequisites: versioned config, immutable policy IDs, SSO deployer identity, stable review IDs, and audit storage outside gateway logs. Metadata-only Kubernetes audit cannot reconstruct omitted request or response bodies (docs).
Steps
- Define the change entity: repository, commit SHA, policy version, and a hash of the effective config. Exclude secrets and prompt text.
- Record the activity: deploy job ID, timestamp, environment, and review ID. Avoid free-text approval fields.
- Record agents separately: human approver and deployer. A bot may deploy; it must not approve.
- Attach evidence: redaction tests, routing tests, and the previous policy version for rollback.
- Reject deployment when a field is missing or the config hash differs from the reviewed artifact.
Illustrative record, not a schema or executable code, and not tested as a gate:
{"entity":{"repo":"gateway","commit":"...","policy":"redact-7"},
"activity":{"deploy":"job-42","review":"PR-19"},
"agent":{"approved_by":"...","deployed_by":"..."},
"rollback_to":"redact-6"}
Test the gate
Open a pull request that changes one redaction rule and remove rollback_to. Expected: CI or deploy admission blocks it and names the missing field. If that change deploys, required-field presence enforcement failed or is not on the admission path.
Then change the config after approval. Expected: the gate blocks the hash mismatch. If this change deploys, presence checks may pass, but approval is not bound to the reviewed artifact. If the record contains prompt text or API keys, fix the serializer before rollout.
Limitations: provenance shows lineage, not that an output is safe or correct, and it does not replace access control. For a single-operator setup, a signed commit plus a rollback tag may be enough; do not add a database just to satisfy a diagram.
This article was created with AI assistance.
Top comments (0)