CBG-5328: Add audit events for document channel history compaction#8276
Open
RIT3shSapata wants to merge 5 commits into
Open
CBG-5328: Add audit events for document channel history compaction#8276RIT3shSapata wants to merge 5 commits into
RIT3shSapata wants to merge 5 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds audit logging for document channel history read and compaction operations, fitting into the existing REST handler and audit event framework.
Changes:
- Added new audit event IDs and descriptors for document channel history read/compact operations.
- Emits audit events from the corresponding admin REST handlers.
- Added audit tests covering GET history and POST compaction requests.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
base/audit_events.go |
Defines new document channel history audit event metadata. |
rest/doc_api.go |
Emits audit events from channel history handlers. |
rest/audit_test.go |
Adds test coverage for the new audit events. |
Comments suppressed due to low confidence (1)
base/audit_events.go:1183
- The new audit event name is inconsistent with the surrounding sentence-case, action-oriented audit event names (for example, "Read document metadata" and "Delete document") and uses an awkward noun phrase/capitalization. This is user-visible in audit configuration and logs, so consider renaming it to a clearer action phrase such as a document channel history compaction/read event.
AuditIDDocumentChannelHistoryCompact: {
Name: "Document Channel history compact",
Description: "A document channel history was compacted by a client",
Comment on lines
+1164
to
+1166
| AuditIDDocumentChannelHistory: { | ||
| Name: "Document Channel history", | ||
| Description: "A document channel history was sent to a client", |
bbrks
requested changes
May 15, 2026
| FilteringPermitted: true, | ||
| EventType: eventTypeData, | ||
| }, | ||
| AuditIDDocumentChannelHistory: { |
Member
There was a problem hiding this comment.
Does this deserve its own audit event vs. using AuditIDDocumentMetadataRead?
adamcfraser
reviewed
May 22, 2026
Collaborator
adamcfraser
left a comment
There was a problem hiding this comment.
LGTM - should wait to merge until parent is merged.
89e5580 to
82affc4
Compare
…verage # Conflicts: # rest/doc_api.go # Conflicts: # rest/doc_api.go
- replaced audit event for reading channel history with document metadata read - updated description of the event - added channels and sequence into the audit event for document channel history compaction # Conflicts: # base/audit_events_fields.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CBG-5328
Describe your PR here...
Pre-review checklist
fmt.Print,log.Print, ...)base.UD(docID),base.MD(dbName))docs/apiDependencies (if applicable)
Integration Tests