Commit Graph

9841 Commits

Author SHA1 Message Date
Damir Jelić
98ba714b20 sdk: Fix a clippy warning 2024-09-06 13:51:04 +02:00
Andy Balaam
07aa6d7bc7 doc: Fix missing 'o' in the doc comment for the recovery module 2024-09-05 17:12:15 +01:00
Benjamin Bouvier
9df1c48079 timeline(tests): ASCII art 2024-09-05 16:46:25 +02:00
Benjamin Bouvier
977a9995fe timeline(tests): simplify matching a day divider or a read marker using public APIs 2024-09-05 16:46:25 +02:00
Benjamin Bouvier
f978960d30 timeline: don't insert a read marker when all subsequent events have been inserted by ourselves 2024-09-05 16:46:25 +02:00
Benjamin Bouvier
3f93324a85 timeline(style): gather common code under the same arm branches 2024-09-05 16:46:25 +02:00
Richard van der Hoff
3204953738 crypto: update changelog 2024-09-05 13:22:10 +01:00
Richard van der Hoff
88b005ace3 crypto: clarify logging on conclusion of verification requests
* Not verifying the remote device/user is normal: log it at debug rather than
  info.
* On the other hand, if we do verify something, let's log that at info rather
  than trace.

Also fix a comment, while we're here.
2024-09-05 13:22:10 +01:00
Richard van der Hoff
c761a84acd crypto: logging during QR code verifications
* Upgrade the log when we get the "reciprocate" message (which tells us the
   other side has scanned our QR code) to debug, instead of trace.
 * Warn if we get a reciprocate we don't understand
 * Log when the user confirms that the other side has scanned successfully.
2024-09-05 13:22:10 +01:00
Richard van der Hoff
a2bfc07ecc crypto: log the method on an m.verification.start message
This is the message that tells us whether the other side wants to do QR code or
SAS (emoji) verification. Knowing which they have chosen is really helpful for
following the flow!
2024-09-05 13:22:10 +01:00
Richard van der Hoff
b1a533a071 crypto: log flow_id when processing verification requests
Attach the flow_id (the transaction ID or message ID from the `request`
message) to the span, so that it is displayed alongside loglines that happen
when processing the request.
2024-09-05 13:22:10 +01:00
Richard van der Hoff
fed418d9a8 crypto: log when we show a QR code
Take the logging that happens when a QR code verification is added to the
`verification cache`, and push it down to the `VerificationCache` itself. Doing
so means that we will log when we *show* a QR code as well as when we scan it.

I would have found this helpful when trying to debug a verification flow this
week.
2024-09-05 13:22:10 +01:00
Richard van der Hoff
2c2d8e9ff0 crypto: log details of our public identity when we update it
For debugging, it's useful to have a record of what we believe our own public
cross-signing keys to be. Currently, we log the keys at startup if we restore
them from the database, but if we subsequently create, or download, a set of
keys, they aren't logged.
2024-09-05 13:22:10 +01:00
Andy Balaam
b9b8de7ff1 crypto: Mark all new SenderData info as non-legacy
Since we now have a clear idea of the structure, and anything we create
now should be usable in future.
2024-09-05 13:54:01 +02:00
Benjamin Bouvier
552df0e4c6 timeline(tests): use the event factory in a few more places 2024-09-05 10:01:37 +02:00
Benjamin Bouvier
12f36d5972 timeline: document and rename some concepts around pending poll events 2024-09-05 10:01:37 +02:00
Richard van der Hoff
f7ee643475 crypto: update changelog 2024-09-04 16:07:03 +01:00
Richard van der Hoff
73486b2b7b crypto: update senderdata integration tests
Extend the integration tests for megolm sender data to check that we update
existing inbound group sessions when we get a `/keys/query` response.
2024-09-04 16:07:03 +01:00
Richard van der Hoff
3c27f83857 crypto: update sender data on /keys/query responses
When we receive an `/keys/query` response, look for existing
inboundgroupsessions created by updated devices, and see if we can update any
of their senderdata settings.
2024-09-04 16:07:03 +01:00
Richard van der Hoff
385c2b8e71 crypto: Expose sender_data_finder module as pub(crate)
This module has a number of useful types (in particular, error types). Rather
than addding even more types to the top level module, let's export the
`sender_data_finder` module as a whole.
2024-09-04 16:07:03 +01:00
Richard van der Hoff
6bc9887314 crypto: fix memorystore groupsession batch query
If the previous session is removed from the list, we should still be able to
continue iterating through the *rest* of the list.
2024-09-04 16:07:03 +01:00
Richard van der Hoff
30d3d9d26c crypto: expose InboundGroupSession.sender_data
We need write access to this in the integration tests
2024-09-04 16:07:03 +01:00
Hubert Chathi
dfb67c88e6 crypto: add changelog 2024-09-04 14:59:21 +01:00
Hubert Chathi
98a79de811 crypto: check trust requirement when decrypting 2024-09-04 14:59:21 +01:00
Hubert Chathi
62d4abd454 crypto: add DecryptionSettings parameter to functions 2024-09-04 14:59:21 +01:00
Hubert Chathi
7b71d3ca1b crypto: add error code for sender device not sufficiently trusted on decryption 2024-09-04 14:59:21 +01:00
Hubert Chathi
31b4d0a2d1 crypto: add setting for checking sender device trust on decryption 2024-09-04 14:59:21 +01:00
Stefan Ceriu
14ee78c54d ffi: expose methods for manually withdrawing certain users' verification or trusting their devices and resending failed messages 2024-09-04 15:39:35 +03:00
Stefan Ceriu
f3d3924bb6 send_queue: publish retry updates when unwedging an event; have the timeline update the corresponding item in response. 2024-09-04 15:39:35 +03:00
Stefan Ceriu
6c704352a9 send_queue: add mechanism for unwedging and resending a request based on its transaction identifier 2024-09-04 15:39:35 +03:00
Damir Jelić
0db0ea0977 docs: Add PR review guidelines. 2024-09-04 13:42:16 +02:00
Benjamin Bouvier
3f7909641f client builder(nit): avoid unnecessary clone 2024-09-04 12:41:17 +02:00
Benjamin Bouvier
5b0ad01bab event cache: don't return a useless Option 2024-09-04 12:41:17 +02:00
Kévin Commaille
b0e8121347 sqlite: Bump sqlite crates
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-09-04 10:55:38 +02:00
dependabot[bot]
aa94ad846b build(deps): bump quinn-proto from 0.11.3 to 0.11.8
Bumps [quinn-proto](https://github.com/quinn-rs/quinn) from 0.11.3 to 0.11.8.
- [Release notes](https://github.com/quinn-rs/quinn/releases)
- [Commits](https://github.com/quinn-rs/quinn/compare/quinn-proto-0.11.3...quinn-proto-0.11.8)

---
updated-dependencies:
- dependency-name: quinn-proto
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-04 10:50:34 +02:00
Hubert Chathi
1dd8c908c5 crypto: Error when sending keys to previously-verified users with identity-based strategy (#3896) matrix-sdk-ffi/20240904 2024-09-03 18:06:32 +01:00
Stefan Ceriu
5b14fe6f34 crypto: fix OIDC cross-signing reset flows after backend authorization failure response change (#3933) 2024-09-03 14:43:46 +00:00
Ivan Enderlin
a737421875 chore(ui): Rename variables.
This is not a timestamp but a regular stamp. Make it clear with the
variable names.
2024-09-03 15:52:05 +02:00
Ivan Enderlin
49252b5342 test: Restore Complement Crypto. 2024-09-03 11:52:32 +02:00
Richard van der Hoff
d8b0f9f3d7 crypto: add cryptostore integ test
Add a new integration test for
`CryptoStore::get_inbound_group_sessions_for_device_batch`
2024-09-02 18:07:38 +01:00
Richard van der Hoff
1de99161e2 indexeddb: implement get_inbound_group_sessions_for_device_batch 2024-09-02 18:07:38 +01:00
Richard van der Hoff
675f576343 indexeddb: add new index on inbound_group_sessions
Add an index on `(sender_key, sender_data_type, session_id)`.
2024-09-02 18:07:38 +01:00
Richard van der Hoff
7cf8e9eb9b indexeddb: add new fields to InboundGroupSessionIndexedDbObject
Add new `session_id`, `sender_key` and `sender_data_type` properties to stored
inbound group session objects.
2024-09-02 18:07:38 +01:00
Richard van der Hoff
7bcc920514 sqlite: add get_inbound_group_sessions_for_device_batch 2024-09-02 18:07:38 +01:00
Richard van der Hoff
12653fb2b6 sqlite: add new curve_key and sender_data_type columns 2024-09-02 18:07:38 +01:00
Richard van der Hoff
eeaf31ce53 crypto: implement MemoryStore::get_inbound_group_sessions_for_device_batch 2024-09-02 18:07:38 +01:00
Richard van der Hoff
228a117ccb crypto: add get_inbound_group_sessions_for_device_batch to CryptoStore 2024-09-02 18:07:38 +01:00
Andy Balaam
3f408a9a36 crypto: Create a SenderDataType enum 2024-09-02 18:07:38 +01:00
Kévin Commaille
7f4e79e2a3 Add link to SQLite docs
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-09-02 17:44:30 +02:00
Kévin Commaille
7807ed8bda sqlite: Update last access time first to force write transaction
Avoids errors when the read transaction tries to upgrade to a write transaction.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-09-02 17:44:30 +02:00