Skip to content

Conversation

@Praveenrajmani
Copy link
Contributor

This commit introduces comprehensive audit log categorization and enhanced filtering capabilities for API, audit, and error logs:

  • Add AuditCategory enum with 15 categories (config, user, service-account, policy, group, bucket, lifecycle, replication, notification, encryption, cors, versioning, service, kms, site-replication, pool, idp, log-recorder)
  • Add AuditAction enum with common actions (create, update, delete, enable, disable, set, reset, restore, clear, start, stop, restart, attach, detach)
  • Extend Audit struct with Category, Action, and Details fields for richer audit event metadata
  • Add MaxPerNode field to APILogOpts, AuditLogOpts, and ErrorLogOpts to limit log entries retrieved per cluster node
  • Add Category filter to AuditLogOpts for filtering by audit category
  • Introduce detailed audit structures for different categories (ConfigAuditDetails, UserAuditDetails, ServiceAccountAuditDetails, PolicyAuditDetails, GroupAuditDetails, BucketConfigAuditDetails, ServiceAuditDetails)
  • Generate msgp serialization code for new audit types

These changes enable more granular audit log queries and structured audit event tracking across MinIO admin operations.

@Praveenrajmani Praveenrajmani force-pushed the audit-log-changes branch 2 times, most recently from 5955705 to 65b1605 Compare October 17, 2025 05:16
@Praveenrajmani Praveenrajmani marked this pull request as ready for review October 21, 2025 04:34
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces comprehensive audit log categorization and enhanced filtering capabilities for MinIO admin operations. The changes enable more granular audit log queries and structured tracking of audit events across different categories of operations.

Key Changes:

  • Added audit event categorization with 18 categories (config, user, service-account, policy, group, bucket, lifecycle, replication, notification, encryption, cors, versioning, service, kms, site-replication, pool, idp, log-recorder) and 14 action types (create, update, delete, enable, disable, set, reset, restore, clear, start, stop, restart, attach, detach)
  • Extended the Audit struct with Category, Action, and Details fields for richer audit event metadata
  • Added MaxPerNode field to log options (APILogOpts, AuditLogOpts, ErrorLogOpts) to limit log entries retrieved per cluster node
  • Added Category filter to AuditLogOpts for filtering audit logs by category

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
log/audit.go Added audit enums (AuditCategory, AuditAction), extended Audit struct with category/action/details fields, introduced detailed audit structures for different categories, and added Message/Details methods for human-readable summaries
log/audit_gen_test.go Generated msgp serialization test code for new audit detail types (BucketConfigAuditDetails, ConfigAuditDetails, GroupAuditDetails, IAMImportDetails, IDPAuditDetails, KMSAuditDetails, PolicyAuditDetails, PoolAuditDetails, RecorderAuditDetails, ServiceAccountAuditDetails, ServiceAuditDetails, SiteReplicationAuditDetails, UserAuditDetails)
audit-logs.go Added Category filter and MaxPerNode limit to AuditLogOpts for enhanced filtering capabilities
api-logs.go Added MaxPerNode field to APILogOpts to limit log entries per node
error-logs.go Added MaxPerNode field to ErrorLogOpts to limit log entries per node

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Praveenrajmani Praveenrajmani force-pushed the audit-log-changes branch 3 times, most recently from bd1bfc2 to ff65607 Compare October 23, 2025 19:24
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 6 out of 7 changed files in this pull request and generated 4 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

@klauspost klauspost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See if this makes sense.

Praveenrajmani added 2 commits October 30, 2025 14:36
This commit introduces comprehensive audit log categorization and enhanced
filtering capabilities for API, audit, and error logs:

- Add AuditCategory enum with 15 categories (config, user, service-account,
  policy, group, bucket, lifecycle, replication, notification, encryption,
  cors, versioning, service, kms, site-replication, pool, idp, log-recorder)
- Add AuditAction enum with common actions (create, update, delete, enable,
  disable, set, reset, restore, clear, start, stop, restart, attach, detach)
- Extend Audit struct with Category, Action, and Details fields for richer
  audit event metadata
- Add MaxPerNode field to APILogOpts, AuditLogOpts, and ErrorLogOpts to limit
  log entries retrieved per cluster node
- Add Category filter to AuditLogOpts for filtering by audit category
- Introduce detailed audit structures for different categories (ConfigAuditDetails,
  UserAuditDetails, ServiceAccountAuditDetails, PolicyAuditDetails,
  GroupAuditDetails, BucketConfigAuditDetails, ServiceAuditDetails)
- Generate msgp serialization code for new audit types

These changes enable more granular audit log queries and structured audit
event tracking across MinIO admin operations.
The newer version of msgp generates simpler code for generic types,
removing explicit type conversions in favor of direct method calls.
@Praveenrajmani
Copy link
Contributor Author

PTAL @balamurugana @vadmeste

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants