Context
Spun off from #365 — all P0 audit gaps are resolved. These are the remaining P1 items.
P1 Gaps
1. Config before_hash asymmetry
before_hash for config operations only hashes the compatibility level string, while after_hash hashes the full config struct (compat level + normalize + aliases + default metadata + default rule set). This means before_hash and after_hash are not comparable.
Fix: Hash the full config struct for before_hash as well, matching the after_hash approach.
2. auth_success not in default enabled events
auth_success events are defined but not included in the default enabled event set. Operators who enable auth and auditing would reasonably expect successful logins to be audited by default.
Fix: Add auth_success to the default enabled events list.
3. Preset keywords and category tagging not implemented
The design calls for preset keywords (all, writes, reads, security) and event category tagging, allowing operators to configure enabled_events: [writes, security] instead of listing individual event types. This is not yet implemented.
Deliverables:
- Event category tags (e.g.,
write, read, security, lifecycle)
- Preset keywords that expand to category groups
- Config support:
enabled_events: [writes, security]
4. Read event types missing
Approximately 10+ read-only routes have no audit event generation:
- KEK/DEK GET endpoints
- Exporter GET endpoints
- Admin user/API key GET endpoints
- Analysis endpoints
- Schema/subject/config/mode GET endpoints (if
reads preset is enabled)
Note: Read events SHOULD only fire when the reads preset or explicit read event types are enabled — they MUST NOT be emitted by default.
5. audit_filtering.feature BDD file does not exist
No BDD coverage for event filtering configuration (enabled/disabled event types, presets).
Deliverables:
tests/bdd/features/mcp/audit_filtering.feature (or REST equivalent)
- Scenarios covering: default events, preset expansion, individual event enable/disable
Acceptance Criteria
References
Context
Spun off from #365 — all P0 audit gaps are resolved. These are the remaining P1 items.
P1 Gaps
1. Config
before_hashasymmetrybefore_hashfor config operations only hashes the compatibility level string, whileafter_hashhashes the full config struct (compat level + normalize + aliases + default metadata + default rule set). This meansbefore_hashandafter_hashare not comparable.Fix: Hash the full config struct for
before_hashas well, matching theafter_hashapproach.2.
auth_successnot in default enabled eventsauth_successevents are defined but not included in the default enabled event set. Operators who enable auth and auditing would reasonably expect successful logins to be audited by default.Fix: Add
auth_successto the default enabled events list.3. Preset keywords and category tagging not implemented
The design calls for preset keywords (
all,writes,reads,security) and event category tagging, allowing operators to configureenabled_events: [writes, security]instead of listing individual event types. This is not yet implemented.Deliverables:
write,read,security,lifecycle)enabled_events: [writes, security]4. Read event types missing
Approximately 10+ read-only routes have no audit event generation:
readspreset is enabled)Note: Read events SHOULD only fire when the
readspreset or explicit read event types are enabled — they MUST NOT be emitted by default.5.
audit_filtering.featureBDD file does not existNo BDD coverage for event filtering configuration (enabled/disabled event types, presets).
Deliverables:
tests/bdd/features/mcp/audit_filtering.feature(or REST equivalent)Acceptance Criteria
before_hashuses full struct hashing matchingafter_hashauth_successincluded in default enabled eventsall,writes,reads,security) implementedaudit_filtering.featureBDD file with comprehensive scenariosReferences