Issue #3639294: Add trusted audit evidence projection

Closes #3639294

Adds an optional server-selected policy for projecting audit metadata after enrichment and before persistence, deferred callback capture, and covered diagnostic logging. Integrations can omit sensitive identity values, labels, and free text without changing authorization decisions or historical audit records.

The default policy preserves existing behavior. A request parameter, header, or tool argument cannot choose the evidence policy. Immutable context follows deferred evidence, and principal dispatch restores request-local state before subsequent work. Entity denials are projected after the actual resource is selected.

Focused validation passed 24 tests / 214 assertions on Drupal 11 and 7 / 68 on Drupal 10.6 / PHP 8.2, covering signed rows, enrichment, rollback, sequential contexts, and generic-policy controls. The protected downstream API contract also passed 9 tests / 155 assertions after excluding private implementation helpers from its public/protected member inventory. Static analysis and coding standards pass; the remaining full CI lanes must pass before merge.

Merge request reports

Loading
Loading