-
Notifications
You must be signed in to change notification settings - Fork 24
[PM-28135] Add crypto tracing logs #555
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
|
Great job! No new security vulnerabilities introduced in this pull request |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #555 +/- ##
==========================================
- Coverage 78.67% 78.60% -0.08%
==========================================
Files 283 283
Lines 29285 29179 -106
==========================================
- Hits 23041 22937 -104
+ Misses 6244 6242 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Apologies, had to fix another clippy error |
| } | ||
|
|
||
| #[cfg(feature = "internal")] | ||
| #[instrument(err, skip_all)] |
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.
👍 Proper use of skip_all to prevent logging sensitive parameters like master_key and user_key.
| } | ||
|
|
||
| impl Decryptable<KeyIds, SymmetricKeyId, CipherView> for Cipher { | ||
| #[instrument(err, skip_all, fields(cipher_id = ?self.id, org_id = ?self.organization_id, kind = ?self.r#type))] |
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.
👍 Excellent instrumentation! Logging only non-sensitive metadata (cipher_id, org_id, kind) is exactly the right approach for observability without compromising security.

🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-28135
📔 Objective
Enables
tracing, but does not yet remove the old logging (follow-up). It adds tracing to the most important crypto paths. Follow-up tickets may add more tracing.Example log output:
⏰ Reminders before review
team
🦮 Reviewer guidelines
:+1:) or similar for great changes:memo:) or ℹ️ (:information_source:) for notes or general info:question:) for questions:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmedissue and could potentially benefit from discussion
:art:) for suggestions / improvements:x:) or:warning:) for more significant problems or concerns needing attention:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt:pick:) for minor or nitpick changes