-
Notifications
You must be signed in to change notification settings - Fork 353
crypto: Configurable sender trust checking on decrypting #3899
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
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3899 +/- ##
=======================================
Coverage 84.07% 84.08%
=======================================
Files 266 266
Lines 27861 27894 +33
=======================================
+ Hits 23425 23455 +30
- Misses 4436 4439 +3 ☔ View full report in Codecov by Sentry. |
|
@uhoreg does this relate to a specific issue? Please link it if so. If not, please give more context about what we're trying to achieve in this PR. |
|
(Also please follow the contribution guidelines for naming PRs and commits! It helps figuring out which PR relates to what :)) |
| CrossSignedOrLegacy, | ||
| /// Only decrypt events from cross-signed devices. | ||
| CrossSigned, | ||
| } |
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.
Could you give some more explanation about what happens to events that do not met these requirements?
crates/matrix-sdk-crypto/src/machine/tests/decryption_verification_state.rs
Outdated
Show resolved
Hide resolved
crates/matrix-sdk-crypto/src/machine/tests/decryption_verification_state.rs
Outdated
Show resolved
Hide resolved
crates/matrix-sdk-crypto/src/machine/tests/decryption_verification_state.rs
Outdated
Show resolved
Hide resolved
crates/matrix-sdk-crypto/src/machine/tests/decryption_verification_state.rs
Show resolved
Hide resolved
c37d9e7 to
0447cd1
Compare
|
I think that I've addressed all the review comments |
|
Can you follow the contribution guidelines for the naming of this PR and the commits, please? |
richvdh
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.
Looks good to me now except:
- Per #3899 (comment),
#[derive(Error)]seems like an unclear way to implementDisplay. - Per #3899 (comment), please update the description of the PR to describe what it is we're fixing.
- Per benji's requests, please give the PR a name that reflects the area of the code that is affected (
crypto:, I guess) - Also please rebase your commits to remove the "minor fixes" and "address review", and rename them so that they match the contributing guide. If you pick the right point on
mainto rebase on top of (468ee53), then github will show the force-push with no changes, which means we keep an audit trail that the code has been reviewed.
crates/matrix-sdk-crypto/src/machine/tests/decryption_verification_state.rs
Outdated
Show resolved
Hide resolved
0447cd1 to
00e079b
Compare
richvdh
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.
🎉 🚢
Replaces #3701. Part of invisible crypto.
The room event decryption function now takes a
DecryptionSettingwhich allows you to require that event senders have a certain trust level based on their cross-signing status. Events that do not meet the required trust level will fail to decrypt with an error.Signed-off-by: