1
0
Commit Graph

19895 Commits

Author SHA1 Message Date
Olivier Wilkinson (reivilibre)
7392d2f02f Return the device ID when registering an appservice user in test helpers 2021-12-17 18:18:48 +00:00
Olivier Wilkinson (reivilibre)
b50b46034d Fix the get_bulk_e2e_unused_fallback_keys query to return devices with only used keys 2021-12-17 18:08:49 +00:00
Olivier Wilkinson (reivilibre)
7486fdb463 Break up get_app_service_users_in_room to make it easier to debug 2021-12-17 18:08:16 +00:00
Olivier Wilkinson (reivilibre)
d091b4de11 Get unused fallback key types in bulk and send them out 2021-12-13 17:47:57 +00:00
Olivier Wilkinson (reivilibre)
b17f575d42 Count the OTKs in bulk 2021-12-13 17:41:27 +00:00
Olivier Wilkinson (reivilibre)
67e438af77 Fix up tests that weren't expecting extra call arguments 2021-12-13 17:06:17 +00:00
Olivier Wilkinson (reivilibre)
5d89494198 Fix two tests 2021-12-13 16:54:54 +00:00
Olivier Wilkinson (reivilibre)
ec81f8d38f Find interesting users for the AS when sending OTKs and FBKs 2021-12-13 16:49:45 +00:00
Olivier Wilkinson (reivilibre)
b99b311795 Add some method stubs and add the OTKs and FBKs to the response 2021-12-13 16:49:44 +00:00
Olivier Wilkinson (reivilibre)
36595a7cdc Pipe through the feature flag 2021-12-13 16:49:43 +00:00
Olivier Wilkinson (reivilibre)
c5e072fad5 Add feature flag for experimental MSC3202 transaction extensions 2021-12-13 16:49:43 +00:00
Olivier Wilkinson (reivilibre)
cab682fe89 Fix up some tests 2021-12-13 16:49:42 +00:00
Olivier Wilkinson (reivilibre)
06455cf91a Boring piping 2021-12-13 16:49:41 +00:00
Olivier Wilkinson (reivilibre)
37215edd81 Fix up type after rebase onto anoa's branch 2021-12-13 16:49:40 +00:00
Olivier Wilkinson (reivilibre)
2434034250 During AS catch-up, send empty OTK counts and fallback keys for now 2021-12-13 16:49:40 +00:00
Olivier Wilkinson (reivilibre)
473d1a399e Emit the one-time key counts and fallback keys over federation 2021-12-13 16:49:39 +00:00
Olivier Wilkinson (reivilibre)
9e171fd15e Feed one-time key counts and unused fallback keys through the transaction 2021-12-13 16:49:38 +00:00
Olivier Wilkinson (reivilibre)
dcdfa6f46d Add type aliases for one-time key counts and unused fallback keys that will be sent 2021-12-10 13:48:56 +00:00
Olivier Wilkinson (reivilibre)
72d37f2d8f Support opting-in to MSC3202 transactional behaviour using the registration file 2021-12-10 13:48:19 +00:00
Andrew Morgan
ba9143817f Fix calls to create_appservice_txn in tests 2021-12-07 10:45:30 +00:00
Andrew Morgan
c0b157dc9b Merge branch 'develop' of github.com:matrix-org/synapse into anoa/e2e_as_to_device 2021-12-07 10:36:37 +00:00
reivilibre
2f053f3f82 Stabilise support for MSC2918 refresh tokens as they have now been merged into the Matrix specification. (#11435) 2021-12-06 19:11:43 +00:00
Quentin Gliech
a15a893df8 Save the OIDC session ID (sid) with the device on login (#11482)
As a step towards allowing back-channel logout for OIDC.
2021-12-06 12:43:06 -05:00
Dirk Klimpel
8b4b153c9e Add admin API to get some information about federation status (#11407) 2021-12-06 16:59:50 +00:00
Patrick Cloke
494ebd7347 Include bundled aggregations in /sync and related fixes (#11478)
Due to updates to MSC2675 this includes a few fixes:

* Include bundled aggregations for /sync.
* Do not include bundled aggregations for /initialSync and /events.
* Do not bundle aggregations for state events.
* Clarifies comments and variable names.
2021-12-06 15:51:15 +00:00
Sean Quah
a77c369897 Move glob_to_regex and re_word_boundary to matrix-python-common (#11505) 2021-12-06 11:36:08 +00:00
Eric Eastwood
4eb77965cd Update backward extremity docs to make it clear that it does not indicate whether we have fetched an events' prev_events (#11469)
Spawning from https://github.com/matrix-org/synapse/pull/9445#discussion_r758958181

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2021-12-03 18:25:04 -06:00
Andrew Morgan
385b3bf056 Modify tests to handle new location of to-device messages in AS txns 2021-12-03 20:03:09 +00:00
Andrew Morgan
403490de8b Insert to-device messages into the new to-device part of AS txns 2021-12-03 20:03:09 +00:00
Andrew Morgan
275e1e0b3a Add to-device messages as their own special section in AS txns 2021-12-03 20:03:09 +00:00
Andrew Morgan
13b25cf51e Fix tests to mock _TransactionController.send of ApplicationServiceScheduler.enqueue*
With enqueue_for_appservice being called per-event per-appservice, it's
not a great target for mocking. So we use _TransactionController.send
instead, to track things that are actually sent out to AS's.

This also has the benefit of testing a wider bit of the AS txn pipeline
2021-12-03 20:03:09 +00:00
Andrew Morgan
6d68b8a4e8 Refactor and generalise the sending of arbitrary fields over AS transactions
Things were starting to get a little inflexible as we kept adding new
types of data to send to application services. It's better to just
have one method for adding data to AS transactions, than one for
each type of data.

Note that subsequent PRs will need to add device lists, one-time keys
and fallback keys to these transactions. Adding those are additional
arguments to a method is much nicer than a new method for each one.

Plus with this setup we can add multiple different types of data at
once without kicking off an AS transaction for each type. This will
be useful for OTK/fallback keys, as we plan to lazily attach those
when handling other event types.
2021-12-03 20:03:09 +00:00
reivilibre
637df95de6 Support configuring the lifetime of non-refreshable access tokens separately to refreshable access tokens. (#11445) 2021-12-03 16:42:44 +00:00
Dirk Klimpel
e5f426cd54 Add type hints to synapse/tests/rest/admin (#11501) 2021-12-03 13:57:13 +00:00
Olivier Wilkinson (reivilibre)
8cd68b8102 Revert accidental commits to develop. 2021-12-03 12:31:28 +00:00
Olivier Wilkinson (reivilibre)
6cae125e20 Newsfile
Signed-off-by: Olivier Wilkinson (reivilibre) <oliverw@matrix.org>
2021-12-03 12:25:37 +00:00
Olivier Wilkinson (reivilibre)
7be88fbf48 Give tests.server.setup_test_homeserver (nominally!) the same behaviour
by calling into `make_test_homeserver_synchronous`.

The function *could* have been inlined at this point but the function is big enough

and it felt fine to leave it as is.

At least there isn't a confusing name clash anymore!
2021-12-03 11:40:05 +00:00
Olivier Wilkinson (reivilibre)
b3fd99b74a Move tests.utils.setup_test_homeserver to tests.server
It had no users.

We have just taken the identity of a previous function but don't provide the same
behaviour, so we need to fix this in the next commit...
2021-12-03 11:38:14 +00:00
Olivier Wilkinson (reivilibre)
f7ec6e7d9e Convert one of the setup_test_homeservers to make_test_homeserver_synchronous
and pass in the homeserver rather than calling a same-named function to ask for one.

Later commits will jiggle things around to make this sensible.
2021-12-03 11:35:24 +00:00
Richard van der Hoff
5640992d17 Disambiguate queries on state_key (#11497)
We're going to add a `state_key` column to the `events` table, so we need to
add some disambiguation to queries which use it.
2021-12-02 22:42:58 +00:00
David Robertson
d26808dd85 Comments on the /sync tentacles (#11494)
This mainly consists of docstrings and inline comments. There are one or two type annotations and variable renames thrown in while I was here.

Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
2021-12-02 20:58:32 +00:00
reivilibre
f91624a595 Clean up tests.storage.test_appservice (#11492) 2021-12-02 18:43:33 +00:00
reivilibre
16d39a5490 Clean up tests.storage.test_main to remove use of legacy code. (#11493) 2021-12-02 18:13:43 +00:00
reivilibre
8a4c296987 Clean up tests.test_visibility to remove legacy code. (#11495) 2021-12-02 18:13:30 +00:00
Shay
49e1356ee3 Minor cleanup on recently ported doc pages (#11466)
* move wiki pages to synapse/docs and add a few titles where necessary

* update SUMMARY.md with added pages

* add changelog

* move incorrectly located newsfragment

* update changelog number

* snake case added files and update summary.md accordingly

* update issue/pr links

* update relative links to docs

* update changelog to indicate that we moved wiki pages to the docs and state reasoning

* requested changes to admin_faq.md

* requested changes to database_maintenance_tools.md

* requested changes to understanding_synapse_through_graphana_graphs.md

* add changelog

* fix leftover merge errata

* fix unwanted changes from merge

* use two spaces between entries

* outdent code blocks
2021-12-02 09:46:20 -08:00
Patrick Cloke
d2279f471b Add most of the missing type hints to synapse.federation. (#11483)
This skips a few methods which are difficult to type.
2021-12-02 16:18:10 +00:00
Sean Quah
b50e39df57 Avoid waiting for zombie processes in synctl stop (#11490) 2021-12-02 16:07:06 +00:00
Sean Quah
858d80bf0f Fix media repository failing when media store path contains symlinks (#11446) 2021-12-02 16:05:24 +00:00
reivilibre
435f044807 Add type annotations to tests.storage.test_appservice. (#11488) 2021-12-02 15:30:05 +00:00
Richard van der Hoff
f61462e1be scripts-dev/sign_json: support for signing events (#11486) 2021-12-02 15:18:40 +00:00