-
Notifications
You must be signed in to change notification settings - Fork 334
WPB-20208 Audit log on asset download #4784
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
WPB-20208 Audit log on asset download #4784
Conversation
72cc58d to
f1b0322
Compare
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.
Pull Request Overview
This PR implements comprehensive audit logging for asset operations in the Cargohold service, extending beyond upload events to include download, signed URL creation, and remote asset download logging.
Key changes include:
- Enhanced audit logging functions to cover download, signed URL creation, and remote asset operations
- Updated asset handling functions to include audit metadata and qualified principals for proper logging
- Comprehensive unit tests with property-based testing to validate audit log JSON structure
- Integration tests covering various federated download scenarios across multiple backends
Reviewed Changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| services/cargohold/src/CargoHold/API/AuditLog.hs | Expanded audit logging with new functions for download, URL creation, and remote access |
| services/cargohold/src/CargoHold/API/V3.hs | Updated asset operations to support qualified principals and audit metadata |
| services/cargohold/src/CargoHold/Util.hs | Modified signed URL generation to include audit logging |
| services/cargohold/src/CargoHold/S3.hs | Added Arbitrary instances and cleaned up type signatures |
| services/cargohold/test/unit/Test/CargoHold/API/AuditLogTest.hs | Property-based tests for audit log JSON validation |
| services/cargohold/test/unit/Test/CargoHold/API/LogJSON.hs | Test utilities for structured JSON logging |
| integration/test/Test/Cargohold/API.hs | Enhanced integration tests for federated audit logging scenarios |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
services/cargohold/test/unit/Test/CargoHold/API/AuditLogTest.hs
Outdated
Show resolved
Hide resolved
services/cargohold/test/unit/Test/CargoHold/API/AuditLogTest.hs
Outdated
Show resolved
Hide resolved
c825167 to
890a52a
Compare
| lookupText, | ||
| lookupBool, |
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.
they don't seems to be used, maybe we can rely on lens-aeson instead.
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.
Thanks, I'll remove these in the follow-up PR to reduce the number of rebases...
pcapriotti
left a comment
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
https://wearezeta.atlassian.net/browse/WPB-20208
Checklist
changelog.d