Problem/Motivation
Integrations with stricter evidence policies need a supported way to minimize governed audit metadata. Source inspection of 3.6.2 shows that audit and diagnostic paths can add identity values, composed principal keys and labels after a caller prepares its metadata. Removing one field at the caller does not define the final stored record.
Proposed resolution
Add an opt-in extension point selected by trusted server policy. Apply the projection after metadata enrichment and before persistence, deferred callback capture and covered diagnostic logging. Preserve existing behavior when no policy applies. A request parameter, tool argument or header must not select or weaken the evidence policy.
Carry immutable policy context into evidence that survives transaction rollback, and clear request-local context before another request. The extension should support a strict allowlist that omits identity values, labels, free text and composed identifiers without changing access decisions or historical audit rows.
Remaining tasks
- Implement and document the extension contract.
- Exercise real governed denials with synthetic identities and select the resulting signed audit rows and diagnostic log context.
- Cover enrichment, rollback-surviving evidence, spoofed context, successive requests and an unchanged generic-policy control.
API changes
An optional audit metadata projection contract. No new public tool or permission grant.
Data model changes
None proposed; existing historical records remain unchanged.
Issue fork mcp_sentinel-3639294
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
jmcerdaImplementation and regression coverage are available in MR !11. The optional server-selected policy projects evidence after enrichment, preserves immutable context for deferred records, and keeps generic-policy behavior unchanged.
Focused Drupal 10.6 and Drupal 11 validation covers signed audit records, rollback, successive principal contexts, actual resource denials, and unchanged authorization decisions. Static analysis and coding standards pass; remaining full CI checks and review are required before merge.
Comment #5
jmcerdaReleased in MCP Sentinel 3.7.0. The change went in through merge request !11. The packaged archive matches the tagged source.