[PM-41866] [server] add event logging for attachment downloads - #8190
Open
vlad-trofimov wants to merge 1 commit into
Open
[PM-41866] [server] add event logging for attachment downloads#8190vlad-trofimov wants to merge 1 commit into
vlad-trofimov wants to merge 1 commit into
Conversation
Collaborator
|
Thank you for your contribution! We've added this to our internal tracking system for review. Details on our contribution process can be found here: https://contributing.bitwarden.com/contributing/pull-requests/community-pr-process. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8190 +/- ##
==========================================
- Coverage 63.89% 63.65% -0.25%
==========================================
Files 2359 2366 +7
Lines 102319 102728 +409
Branches 9240 9320 +80
==========================================
+ Hits 65378 65388 +10
- Misses 34714 35113 +399
Partials 2227 2227 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
🎟️ Tracking
This is related to https://bitwarden.atlassian.net/browse/PFI-824
📔 Objective
Attachment interactions on vault items can be a critical action in regulated environments where organizations need a full audit trail of who accessed sensitive files and when. Today, Cipher_AttachmentCreated (1103) and Cipher_AttachmentDeleted (1104) are logged, but downloads are not. This leaves a gap in the event history for compliance reviews. This PR introduces a new event, Cipher_AttachmentDownloaded (1133), emitted server-side from CipherService.GetAttachmentDownloadDataAsync whenever a user requests the signed download URL for an attachment.
Because the server issues the URL, the event cannot be bypassed by a modified client - distinguishing it from client-reported Cipher_Client* events. Attachment metadata already flows on sync, so this signal is limited to genuine user-initiated download actions and won't inflate the event table with sync noise.
📸 Screenshots