-
Notifications
You must be signed in to change notification settings - Fork 25
[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
Changes from all commits
16a12c0
fd78440
5a11190
eb9396c
d3a73b7
c18ce0c
bfbcebb
6fa35f5
2384c07
b26d055
9eedc6a
0c2ef20
c60c1ee
2600658
91f4dc9
096615b
3ad907a
1b840fd
824a1f0
2ac0c60
6e4588b
7ff9302
d366d05
ce93f3b
ddee1bb
fa414f7
0f2d0f1
d10d599
8f9b3b4
6515170
cc4ebf7
06da986
f0caa24
c15dc55
3d2367a
703b4ea
678368f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,6 +22,7 @@ use chrono::{DateTime, SecondsFormat, Utc}; | |
| use serde::{Deserialize, Serialize}; | ||
| use serde_repr::{Deserialize_repr, Serialize_repr}; | ||
| use thiserror::Error; | ||
| use tracing::instrument; | ||
| #[cfg(feature = "wasm")] | ||
| use tsify::Tsify; | ||
| #[cfg(feature = "wasm")] | ||
|
|
@@ -512,6 +513,7 @@ impl CompositeEncryptable<KeyIds, SymmetricKeyId, Cipher> for CipherView { | |
| } | ||
|
|
||
| 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 commentThe reason will be displayed to describe this comment to others. Learn more. ๐ Excellent instrumentation! Logging only non-sensitive metadata ( |
||
| fn decrypt( | ||
| &self, | ||
| ctx: &mut KeyStoreContext<KeyIds>, | ||
|
|
@@ -576,6 +578,7 @@ impl Cipher { | |
| /// * `key` - The key to use to decrypt the cipher key, this should be the user or organization | ||
| /// key | ||
| /// * `ciphers_key` - The encrypted cipher key | ||
| #[instrument(err, skip_all)] | ||
| pub(super) fn decrypt_cipher_key( | ||
| ctx: &mut KeyStoreContext<KeyIds>, | ||
| key: SymmetricKeyId, | ||
|
|
||
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_allto prevent logging sensitive parameters likemaster_keyanduser_key.