-
Notifications
You must be signed in to change notification settings - Fork 340
feat: adds the audit middleware to records the system audit events #3958
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
82df752
to
38bb16e
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3958 +/- ##
==========================================
- Coverage 34.54% 34.45% -0.10%
==========================================
Files 339 342 +3
Lines 39944 40091 +147
==========================================
+ Hits 13800 13812 +12
- Misses 25241 25373 +132
- Partials 903 906 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
562171e
to
173a378
Compare
Signed-off-by: chlins <chlins.zhang@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
This pull request introduces a new audit logging feature, updates dependencies, and makes configuration changes. The most important changes include the addition of audit logging functionality, updates to the API documentation, and dependency updates.
Audit Logging Feature:
api/manager/docs.go
: Added new endpoint/api/v1/audits
to fetch audit logs.manager/handlers/audit.go
: Implemented handler for fetching audit logs.manager/middlewares/audit.go
: Added middleware to log audit information for each request.manager/models/audit.go
: CreatedAudit
model to store audit logs.manager/database/database.go
: IncludedAudit
model in database migration. (Fd54b0e2L235R235)API Documentation:
api/manager/swagger.yaml
: Updated Swagger documentation to include the new audit endpoint andAudit
model. [1] [2]api/manager/swagger.json
: Updated Swagger JSON to reflect the new audit endpoint and model. [1] [2]Dependency Updates:
CHANGELOG.md
: Updated to reflect the bump in dependencies for various packages.Configuration Changes:
.golangci.yml
: Modified the output format configuration.These changes collectively enhance the functionality, maintainability, and observability of the system.
Description
Related Issue
#3937
#3811
Motivation and Context
Screenshots (if appropriate)
Types of changes
Checklist