-
Notifications
You must be signed in to change notification settings - Fork 213
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
Upload fallback keys with Crypto V2 #1697
Conversation
Codecov ReportBase: 37.52% // Head: 37.53% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## develop #1697 +/- ##
========================================
Coverage 37.52% 37.53%
========================================
Files 609 609
Lines 95117 95137 +20
Branches 41283 41297 +14
========================================
+ Hits 35695 35710 +15
- Misses 58383 58386 +3
- Partials 1039 1041 +2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
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.
Code looks good to me, although I don't have a huge amount of context around the changes :)
@@ -60,6 +60,8 @@ class MXBackgroundCryptoV2: MXBackgroundCrypto { | |||
- to-device events : \(syncResponse.toDevice?.events.count ?? 0) | |||
- devices changed : \(syncResponse.deviceLists?.changed?.count ?? 0) | |||
- devices left : \(syncResponse.deviceLists?.left?.count ?? 0) | |||
- one time keys : \(syncResponse.deviceOneTimeKeysCount?[kMXKeySignedCurve25519Type] ?? 0) | |||
- fallback keys : \(syncResponse.unusedFallbackKeys ?? []) |
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.
I'm sure its not, but double checking: Is this going to log keys that are sensitive?
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.
Those keys are public, after all they get uploaded to the server.
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.
Yea, actually in this particular log we only print the count of keys (or type in the case of fallback keys), but I have also started logging the actual keys elsewhere so your question is valid (and it is safe as we only print the public keys)
Upload fallback keys via
keys/upload
whenever present in the body ofUploadKeysRequest
.Additionally:
MXKeysQueryScheduler
intoMXCryptoRequests
(rather than the other way around), which hides away the details of makingkeys/query
requestsMXCryptoSDKLogger