summary refs log tree commit diff
path: root/tests/handlers (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit '28877fade' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-211-1/+142
|\
| * Implement a username picker for synapse (#8942)Richard van der Hoff2020-12-181-1/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The final part (for now) of my work to implement a username picker in synapse itself. The idea is that we allow `UsernameMappingProvider`s to return `localpart=None`, in which case, rather than redirecting the browser back to the client, we redirect to a username-picker resource, which allows the user to enter a username. We *then* complete the SSO flow (including doing the client permission checks). The static resources for the username picker itself (in https://github.com/matrix-org/synapse/tree/rav/username_picker/synapse/res/username_picker) are essentially lifted wholesale from https://github.com/matrix-org/matrix-synapse-saml-mozilla/tree/master/matrix_synapse_saml_mozilla/res. As the comment says, we might want to think about making them customisable, but that can be a follow-up. Fixes #8876.
* | Merge commit 'c9c1c9d82' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-201-1/+39
|\|
| * Fix a bug that deactivated users appear in the directory (#8933)Dirk Klimpel2020-12-171-1/+39
| | | | | | | | | | | | | | | | | | | | Fixes a bug that deactivated users appear in the directory when their profile information was updated. To change profile information of deactivated users is neccesary for example you will remove displayname or avatar. But they should not appear in directory. They are deactivated. Co-authored-by: Erik Johnston <erikj@jki.re>
* | Merge commit 'ff5c4da12' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-201-4/+4
|\|
| * Push login completion down into SsoHandler (#8941)Richard van der Hoff2020-12-161-4/+4
| | | | | | This is another part of my work towards fixing #8876. It moves some of the logic currently in the SAML and OIDC handlers - in particular the call to `AuthHandler.complete_sso_login` down into the `SsoHandler`.
* | Fix old-style uses of self.make_request in dinum test codeAndrew Morgan2021-04-162-12/+7
| |
* | Merge commit 'bd30cfe86' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-165-13/+13
|\|
| * Merge pull request #8951 from matrix-org/rav/username_picker_2Richard van der Hoff2020-12-161-81/+104
| |\ | | | | | | More preparatory refactoring of the OidcHandler tests
| * | Remove spurious "SynapseRequest" result from `make_request"Richard van der Hoff2020-12-155-13/+13
| | | | | | | | | | | | This was never used, so let's get rid of it.
* | | Merge commit '8388a7fb3' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-161-81/+104
|\ \ \ | | |/ | |/|
| * | Make `_make_callback_with_userinfo` asyncRichard van der Hoff2020-12-151-68/+83
| | | | | | | | | | | | | | | | | | ... so that we can test its behaviour when it raises. Also pull it out to the top level so that I can use it from other test classes.
| * | Remove spurious mocking of complete_sso_loginRichard van der Hoff2020-12-151-2/+0
| | | | | | | | | | | | The tests that need this all do it already.
| * | Test `get_extra_attributes` fallbackRichard van der Hoff2020-12-151-11/+21
| |/ | | | | | | | | despite the warnings saying "don't implement get_extra_attributes", we had implemented it, so the tests weren't doing what we thought they were.
* | Merge commit '01333681b' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-164-197/+260
|\|
| * Preparatory refactoring of the SamlHandlerTestCase (#8938)Richard van der Hoff2020-12-152-54/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | * move simple_async_mock to test_utils ... so that it can be re-used * Remove references to `SamlHandler._map_saml_response_to_user` from tests This method is going away, so we can no longer use it as a test point. Instead, factor out a higher-level method which takes a SAML object, and verify correct behaviour by mocking out `AuthHandler.complete_sso_login`. * changelog
| * Fix startup failure with localdb_enabled: False (#8937)Richard van der Hoff2020-12-141-0/+23
| |
| * Various clean-ups to the logging context code (#8935)Patrick Cloke2020-12-141-3/+3
| |
| * Preparatory refactoring of the OidcHandlerTestCase (#8911)Richard van der Hoff2020-12-141-141/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove references to handler._auth_handler (and replace them with hs.get_auth_handler) * Factor out a utility function for building Requests * Remove mocks of `OidcHandler._map_userinfo_to_user` This method is going away, so mocking it out is no longer a valid approach. Instead, we mock out lower-level methods (eg _remote_id_from_userinfo), or simply allow the regular implementation to proceed and update the expectations accordingly. * Remove references to `OidcHandler._map_userinfo_to_user` from tests This method is going away, so we can no longer use it as a test point. Instead we build mock "callback" requests which we pass into `handle_oidc_callback`, and verify correct behaviour by mocking out `AuthHandler.complete_sso_login`.
* | lintAndrew Morgan2021-04-161-1/+3
| |
* | Merge commit 'f14428b25' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-161-2/+2
|\|
| * Allow spam-checker modules to be provide async methods. (#8890)David Teller2020-12-111-2/+2
| | | | | | | | Spam checker modules can now provide async methods. This is implemented in a backwards-compatible manner.
* | Merge commit '6ff34e00d' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-161-0/+23
|\|
| * Skip the SAML tests if xmlsec1 isn't available. (#8905)Patrick Cloke2020-12-091-0/+23
| |
* | Merge commit 'cf7d3c90d' into dinsicAndrew Morgan2021-04-164-22/+10
|\|
| * Merge tag 'v1.24.0rc2' into developPatrick Cloke2020-12-042-2/+29
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Synapse 1.24.0rc2 (2020-12-04) ============================== Bugfixes -------- - Fix a regression in v1.24.0rc1 which failed to allow SAML mapping providers which were unable to redirect users to an additional page. ([\#8878](https://github.com/matrix-org/synapse/issues/8878)) Internal Changes ---------------- - Add support for the `prometheus_client` newer than 0.9.0. Contributed by Jordan Bancino. ([\#8875](https://github.com/matrix-org/synapse/issues/8875))
| * \ Merge remote-tracking branch 'origin/develop' into rav/remove_unused_mocksRichard van der Hoff2020-12-022-31/+9
| |\ \
| | * \ Merge pull request #8858 from matrix-org/rav/sso_uiaRichard van der Hoff2020-12-022-19/+9
| | |\ \ | | | | | | | | | | UIA: offer only available auth flows
| | | * | Factor out FakeResponse from test_oidcRichard van der Hoff2020-12-021-16/+1
| | | | |
| | | * | fix up various test casesRichard van der Hoff2020-12-021-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | A few test cases were relying on being able to mount non-client servlets on the test resource. it's better to give them their own Resources.
| * | | | remove unused `resource_for_federation`Richard van der Hoff2020-12-021-1/+13
| | | | | | | | | | | | | | | | | | | | This is now only used in `test_typing`, so move it there.
| * | | | Remove redundant mockingRichard van der Hoff2020-12-022-4/+0
| |/ / /
| * / / Apply an IP range blacklist to push and key revocation requests. (#8821)Patrick Cloke2020-12-026-9/+9
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replaces the `federation_ip_range_blacklist` configuration setting with an `ip_range_blacklist` setting with wider scope. It now applies to: * Federation * Identity servers * Push notifications * Checking key validitity for third-party invite events The old `federation_ip_range_blacklist` setting is still honored if present, but with reduced scope (it only applies to federation and identity servers).
* | | Port "Add support for no_proxy and case insensitive env variables" from ↵Andrew Morgan2021-03-226-9/+9
| | | | | | | | | | | | | | | | | | | | | mainline to dinsic (#93) This PR is simply porting https://github.com/matrix-org/synapse/pull/9372 to dinsic. I also had to bring in https://github.com/matrix-org/synapse/pull/8821 and https://github.com/matrix-org/synapse/pull/9084 for this code to work properly - a sign that we should merge mainline into dinsic again soon.
* | | Add a config option to prioritise local users in user directory search ↵Andrew Morgan2021-02-191-0/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | results (#84) * Add a config option to prioritise local users in user directory search results (#9383) This PR adds a homeserver config option, `user_directory.prefer_local_users`, that when enabled will show local users higher in user directory search results than remote users. This option is off by default. Note that turning this on doesn't necessarily mean that remote users will always be put below local users, but they should be assuming all other ranking factors (search query match, profile information present etc) are identical. This is useful for, say, University networks that are openly federating, but want to prioritise local students and staff in the user directory over other random users. * Don't mix simple and english psql query types
* | | Merge commit '693dab487' into anoa/dinsic_release_1_23_1Andrew Morgan2020-12-312-2/+29
|\ \ \ | | |/ | |/|
| * | Fix a regression that mapping providers should be able to redirect users. ↵Patrick Cloke2020-12-042-2/+29
| |/ | | | | | | | | (#8878) This was broken in #8801.
* | Merge commit '53b12688d' into anoa/dinsic_release_1_23_1Andrew Morgan2020-12-312-17/+193
|\|
| * Fix a regression when grandfathering SAML users. (#8855)Patrick Cloke2020-12-022-1/+41
| | | | | | | | | | | | This was broken in #8801 when abstracting code shared with OIDC. After this change both SAML and OIDC have a concept of grandfathering users, but with different implementations.
| * Add basic SAML tests for mapping users. (#8800)Patrick Cloke2020-12-022-17/+153
| |
* | Merge commit 'd3ed93504' into anoa/dinsic_release_1_23_1Andrew Morgan2020-12-311-0/+580
|\|
| * Create a `PasswordProvider` wrapper object (#8849)Richard van der Hoff2020-12-021-2/+3
| | | | | | | | The idea here is to abstract out all the conditional code which tests which methods a given password provider has, to provide a consistent interface.
| * Support "identifier" dicts in UIA (#8848)Richard van der Hoff2020-12-011-10/+1
| | | | | | | | | | | | | | | | | | | | The spec requires synapse to support `identifier` dicts for `m.login.password` user-interactive auth, which it did not (instead, it required an undocumented `user` parameter.) To fix this properly, we need to pull the code that interprets `identifier` into `AuthHandler.validate_login` so that it can be called from the UIA code. Fixes #5665.
| * Don't offer password login when it is disabled (#8835)Richard van der Hoff2020-12-011-3/+105
| | | | | | Fix a minor bug where we would offer "m.login.password" login if a custom auth provider supported it, even if password login was disabled.
| * Add some tests for `password_auth_providers` (#8819)Richard van der Hoff2020-12-011-0/+486
| | | | | | | | These things seemed to be completely untested, so I added a load of tests for them.
* | Merge commit '09ac0569f' into anoa/dinsic_release_1_23_1Andrew Morgan2020-12-311-3/+3
|\|
| * Simplify the way the `HomeServer` object caches its internal attributes. ↵Jonathan de Jong2020-11-301-3/+3
| | | | | | | | | | (#8565) Changes `@cache_in_self` to use underscore-prefixed attributes.
* | Merge commit '7c4344747' into anoa/dinsic_release_1_23_1Andrew Morgan2020-12-312-2/+88
|\|
| * Support trying multiple localparts for OpenID Connect. (#8801)Patrick Cloke2020-11-251-1/+87
| | | | | | | | Abstracts the SAML and OpenID Connect code which attempts to regenerate the localpart of a matrix ID if it is already in use.
* | Merge commit '8ca120df7' into anoa/dinsic_release_1_23_1Andrew Morgan2020-12-312-21/+69
|\|
| * Improve error checking for OIDC/SAML mapping providers (#8774)Patrick Cloke2020-11-191-20/+69
| | | | | | | | | | | | Checks that the localpart returned by mapping providers for SAML and OIDC are valid before registering new users. Extends the OIDC tests for existing users and invalid data.
| * Consistently use room_id from federation request body (#8776)Richard van der Hoff2020-11-191-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | * Consistently use room_id from federation request body Some federation APIs have a redundant `room_id` path param (see https://github.com/matrix-org/matrix-doc/issues/2330). We should make sure we consistently use either the path param or the body param, and the body param is easier. * Kill off some references to "context" Once upon a time, "rooms" were known as "contexts". I think this kills of the last references to "contexts".
| * Merge pull request #8761 from matrix-org/rav/test_request_renderingRichard van der Hoff2020-11-174-10/+0
| |\ | | | | | | Make `make_request` actually render the request
| * | Abstract shared SSO code. (#8765)Patrick Cloke2020-11-171-7/+7
| | | | | | | | | De-duplicates code between the SAML and OIDC implementations.
| * | Add admin API for logging in as a user (#8617)Erik Johnston2020-11-171-4/+10
| | |
* | | Merged commit 'deff8f628' into anoa/dinsic_release_1_23_1Andrew Morgan2020-12-312-11/+17
| | |
* | | Merge commit 'acfe3b306' into anoa/dinsic_release_1_23_1Andrew Morgan2020-12-315-15/+0
|\ \ \ | | |/ | |/|
| * | Remove redundant `HomeserverTestCase.render`Richard van der Hoff2020-11-164-10/+0
| |/
* | Merge commit 'c3119d153' into anoa/dinsic_release_1_23_1Andrew Morgan2020-12-311-0/+57
|\|
| * Block clients from sending server ACLs that lock the local server out. (#8708)Erik Johnston2020-11-031-0/+57
| | | | | | Fixes #4042
* | Merge commit 'ef2d62701' into anoa/dinsic_release_1_23_1Andrew Morgan2020-12-312-2/+2
|\|
| * Add ability for access tokens to belong to one user but grant access to ↵Erik Johnston2020-10-292-2/+2
| | | | | | | | | | | | | | | | | | | | another user. (#8616) We do it this way round so that only the "owner" can delete the access token (i.e. `/logout/all` by the "owner" also deletes that token, but `/logout/all` by the "target user" doesn't). A future PR will add an API for creating such a token. When the target user and authenticated entity are different the `Processed request` log line will be logged with a: `{@admin:server as @bob:server} ...`. I'm not convinced by that format (especially since it adds spaces in there, making it harder to use `cut -d ' '` to chop off the start of log lines). Suggestions welcome.
* | Merge commit '2b7c18087' into anoa/dinsic_release_1_23_1Andrew Morgan2020-12-312-18/+26
|\|
| * Start fewer opentracing spans (#8640)Erik Johnston2020-10-261-12/+8
| | | | | | | | | | | | | | #8567 started a span for every background process. This is good as it means all Synapse code that gets run should be in a span (unless in the sentinel logging context), but it means we generate about 15x the number of spans as we did previously. This PR attempts to reduce that number by a) not starting one for send commands to Redis, and b) deferring starting background processes until after we're sure they're necessary. I don't really know how much this will help.
| * Fix handling of User-Agent headers with bad utf-8. (#8632)Erik Johnston2020-10-231-6/+18
| |
* | Merge commit '74976a8e4' into dinsicAndrew Morgan2020-12-3115-83/+379
|\|
| * Merge pull request #8537 from matrix-org/rav/simplify_locally_reject_inviteRichard van der Hoff2020-10-152-2/+1
| |\ | | | | | | Simplify `_locally_reject_invite`
| | * Simplify `_locally_reject_invite`Richard van der Hoff2020-10-131-1/+1
| | | | | | | | | | | | | | | Update `EventCreationHandler.create_event` to accept an auth_events param, and use it in `_locally_reject_invite` instead of reinventing the wheel.
| | * Remove redundant `token_id` parameter to create_eventRichard van der Hoff2020-10-131-1/+0
| | | | | | | | | | | | this is always the same as requester.access_token_id.
| * | Fix not sending events over federation when using sharded event persisters ↵Erik Johnston2020-10-141-3/+10
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#8536) * Fix outbound federaion with multiple event persisters. We incorrectly notified federation senders that the minimum persisted stream position had advanced when we got an `RDATA` from an event persister. Notifying of federation senders already correctly happens in the notifier, so we just delete the offending line. * Change some interfaces to use RoomStreamToken. By enforcing use of `RoomStreamTokens` we make it less likely that people pass in random ints that they got from somewhere random.
| * Move additional tasks to the background worker, part 4 (#8513)Patrick Cloke2020-10-131-34/+14
| |
| * Fix message duplication if something goes wrong after persisting the event ↵Erik Johnston2020-10-131-0/+157
| | | | | | | | | | (#8476) Should fix #3365.
| * Remove the deprecated Handlers object (#8494)Patrick Cloke2020-10-099-40/+20
| | | | | | All handlers now available via get_*_handler() methods on the HomeServer.
| * Invalidate the cache when an olm fallback key is uploaded (#8501)Hubert Chathi2020-10-081-0/+20
| |
| * Add support for MSC2697: Dehydrated devices (#8380)Hubert Chathi2020-10-071-0/+82
| | | | | | | | This allows a user to store an offline device on the server and then restore it at a subsequent login.
| * Merge pull request #8463 from matrix-org/rav/clean_up_event_handlingRichard van der Hoff2020-10-071-1/+1
| |\ | | | | | | Reduce inconsistencies between codepaths for membership and non-membership events.
| | * kill off `send_nonmember_event`Richard van der Hoff2020-10-051-1/+1
| | | | | | | | | | | | This is now redundant, and we can just call `handle_new_client_event` directly.
| * | Add support for MSC2732: olm fallback keys (#8312)Hubert Chathi2020-10-061-0/+65
| |/
| * Add config option for always using "userinfo endpoint" for OIDC (#7658)BBBSnowball2020-10-011-2/+8
| | | | | | This allows for connecting to certain IdPs, e.g. GitLab.
* | Merge commit 'cc40a59b4' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-211-55/+105
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'cc40a59b4': 1.21.0 Add prometheus metrics to track federation delays (#8430) Make token serializing/deserializing async (#8427) Allow additional SSO properties to be passed to the client (#8413) changelog Add an improved "forward extremities" metric Rewrite BucketCollector Fix _exposition.py to stop stripping samples Drop support for ancient prometheus_client (#8426) Various clean ups to room stream tokens. (#8423) changelog Report state res metrics to Prometheus and log Move Measure calls into `resolve_events_with_store` Expose a `get_resource_usage` method in `Measure` Move `resolve_events_with_store` into StateResolutionHandler
| * Allow additional SSO properties to be passed to the client (#8413)Patrick Cloke2020-09-301-55/+105
| |
* | Merge commit '31acc5c30' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-211-0/+35
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '31acc5c30': Escape the error description on the sso_error template. (#8405) Fix occasional "Re-starting finished log context" from keyring (#8398) Allow existing users to login via OpenID Connect. (#8345) Fix schema delta for servers that have not backfilled (#8396) Fix MultiWriteIdGenerator's handling of restarts. (#8374) s/URLs/variables in changelog s/accidentally/incorrectly in changelog Update changelog wording Add type annotations to SimpleHttpClient (#8372) Add new sequences to port DB script (#8387) Add EventStreamPosition type (#8388) Mark the shadow_banned column as boolean in synapse_port_db. (#8386)
| * Allow existing users to login via OpenID Connect. (#8345)Tdxdxoz2020-09-251-0/+35
| | | | | | | | | | | | | | Co-authored-by: Benjamin Koch <bbbsnowball@gmail.com> This adds configuration flags that will match a user to pre-existing users when logging in via OpenID Connect. This is useful when switching to an existing SSO system.
* | Merge commit '4325be1a5' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-213-2/+13
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '4325be1a5': Fix missing null character check on guest_access room state Fixed a bug with reactivating users with the admin API (#8362) Admin API for reported events (#8217) Fix wording of deprecation notice in changelog Deprecation warning for synapse admin api being accessible under /_matrix Create function to check for long names in devices (#8364) Add a comment re #1691 Fix a bad merge from release-v1.20.0. (#8354) Admin API for querying rooms where a user is a member (#8306) Catch-up after Federation Outage (bonus): Catch-up on Synapse Startup (#8322) Simplify super() calls to Python 3 syntax. (#8344) Allow appservice users to /login (#8320) Update test logging to be able to accept braces (#8335) Move lint dependencies to extras_require (#8330)
| * Create function to check for long names in devices (#8364)Dionysis Grigoropoulos2020-09-221-0/+11
| | | | | | | | | | | | | | | | | | * Create a new function to verify that the length of a device name is under a certain threshold. * Refactor old code and tests to use said function. * Verify device name length during registration of device * Add a test for the above Signed-off-by: Dionysis Grigoropoulos <dgrig@erethon.com>
| * Simplify super() calls to Python 3 syntax. (#8344)Patrick Cloke2020-09-182-2/+2
| | | | | | | | | | | | | | This converts calls like super(Foo, self) -> super(). Generated with: sed -i "" -Ee 's/super\([^\(]+\)/super()/g' **/*.py
* | Merge commit '837293c31' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-201-0/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '837293c31': Remove obsolete __future__ imports (#8337) Use admin_patterns for all admin APIs. (#8331) Fix a potential bug of UnboundLocalError (#8329) Switch metaclass initialization to python 3-compatible syntax (#8326) Catch-up after Federation Outage (split, 4): catch-up loop (#8272) Use slots in attrs classes where possible (#8296) Fix typos in comments. Add the topic and avatar to the room details admin API (#8305) Improve SAML error messages (#8248) Add experimental support for sharding event persister. Again. (#8294) Make `StreamToken.room_key` be a `RoomStreamToken` instance. (#8281) Use TLSv1.2 for fake servers in tests (#8208) Add /_synapse/client to the reverse proxy docs (#8227) Clean up `Notifier.on_new_room_event` code path (#8288)
| * Catch-up after Federation Outage (split, 4): catch-up loop (#8272)reivilibre2020-09-151-0/+5
| |
* | Merge commit 'a3a90ee03' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-201-0/+1
|\| | | | | | | | | | | | | | | | | | | * commit 'a3a90ee03': Show a confirmation page during user password reset (#8004) Do not error when thumbnailing invalid files (#8236) Remove some unused distributor signals (#8216) Fixup pusher pool notifications (#8287) Revert "Fixup pusher pool notifications" Fixup pusher pool notifications
| * Fixup pusher pool notifications (#8287)Erik Johnston2020-09-091-0/+1
| | | | | | | | | | `pusher_pool.on_new_notifications` expected a min and max stream ID, however that was not what we were passing in. Instead, let's just pass it the current max stream ID and have it track the last stream ID it got passed. I believe that it mostly worked as we called the function for every event. However, it would break for events that got persisted out of order, i.e, that were persisted but the max stream ID wasn't incremented as not all preceding events had finished persisting, and push for that event would be delayed until another event got pushed to the effected users.
| * Revert "Fixup pusher pool notifications"Erik Johnston2020-09-091-1/+0
| | | | | | | | This reverts commit e7fd336a53a4ca489cdafc389b494d5477019dc0.
| * Fixup pusher pool notificationsErik Johnston2020-09-091-0/+1
| |
* | Merge commit 'cca03dbec' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-204-25/+22
|\| | | | | | | | | | | | | | | | | * commit 'cca03dbec': fix typo s/fixes/fix/ Directly import json from the standard library. (#8259) Allow for make_awaitable's return value to be re-used. (#8261) Rename 'populate_stats_process_rooms_2' background job back to 'populate_stats_process_rooms' again (#8243)
| * Allow for make_awaitable's return value to be re-used. (#8261)Patrick Cloke2020-09-083-16/+16
| |
| * Rename 'populate_stats_process_rooms_2' background job back to ↵Andrew Morgan2020-09-081-9/+6
| | | | | | | | | | | | | | 'populate_stats_process_rooms' again (#8243) Fixes https://github.com/matrix-org/synapse/issues/8238 Alongside the delta file, some changes were also necessary to the codebase to remove references to the now defunct `populate_stats_process_rooms_2` background job. Thankfully the latter doesn't seem to have made it into any documentation yet :)
* | Merge commit '17fa4c7ca' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-202-2/+2
|\| | | | | | | | | | | | | | | * commit '17fa4c7ca': Catch up after Federation Outage (split, 2): Track last successful stream ordering after transmission (#8247) Catch-up after Federation Outage (split, 1) (#8230) Fix type signature in simple_select_one_onecol and friends (#8241) Stop sub-classing object (#8249)
| * Stop sub-classing object (#8249)Patrick Cloke2020-09-042-2/+2
| |
* | Merge commit '0d4f614fd' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-201-3/+3
|\| | | | | | | | | | | | | | | | | * commit '0d4f614fd': Refactor `_get_e2e_device_keys_for_federation_query_txn` (#8225) Add experimental support for sharding event persister. (#8170) Add /user/{user_id}/shared_rooms/ api (#7785) Do not try to store invalid data in the stats table (#8226) Convert the main methods run by the reactor to async. (#8213)
* | Merge commit 'aec708517' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-201-2/+39
|\| | | | | | | | | | | * commit 'aec708517': Convert state and stream stores and related code to async (#8194) Ensure that the OpenID Connect remote ID is a string. (#8190)
| * Ensure that the OpenID Connect remote ID is a string. (#8190)Patrick Cloke2020-08-281-2/+39
| |
* | Merge commit 'e00816ad9' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-201-1/+3
|\| | | | | | | | | * commit 'e00816ad9': Do not yield on awaitables in tests. (#8193)
| * Do not yield on awaitables in tests. (#8193)Patrick Cloke2020-08-271-1/+3
| |
* | Merge commit 'b49a5b930' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-202-17/+16
|\| | | | | | | | | * commit 'b49a5b930': Convert stats and related calls to async/await (#8192)
| * Convert stats and related calls to async/await (#8192)Patrick Cloke2020-08-272-17/+16
| |
* | Merge commit '4a739c73b' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-201-2/+2
|\| | | | | | | | | * commit '4a739c73b': Convert simple_update* and simple_select* to async (#8173)
| * Convert simple_update* and simple_select* to async (#8173)Patrick Cloke2020-08-271-2/+2
| |
* | Merge commit 'a466b6797' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-203-13/+44
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'a466b6797': Reduce run-times of tests by advancing the reactor less (#7757) Update debian systemd service to use Type=notify (#8169) Remove remaining is_guest argument uses from get_room_data calls (#8181) Do not propagate typing notifications from shadow-banned users. (#8176) Remove unused parameter from, and add safeguard in, get_room_data (#8174) Add required Debian dependencies to allow docker builds on the arm platform (#8144) Allow running mypy directly. (#8175) Update the test federation client to handle streaming responses (#8130) Do not propagate profile changes of shadow-banned users into rooms. (#8157) Make SlavedIdTracker.advance have same interface as MultiWriterIDGenerator (#8171) Convert simple_select_one and simple_select_one_onecol to async (#8162)
| * Reduce run-times of tests by advancing the reactor less (#7757)Andrew Morgan2020-08-271-1/+1
| |
| * Do not propagate typing notifications from shadow-banned users. (#8176)Patrick Cloke2020-08-261-6/+20
| |
| * Convert simple_select_one and simple_select_one_onecol to async (#8162)Patrick Cloke2020-08-262-14/+46
| |
* | Merge commit '56efa9ec7' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-203-7/+69
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '56efa9ec7': (22 commits) Fix rate limiting unit tests. (#8167) Add functions to `MultiWriterIdGen` used by events stream (#8164) Do not allow send_nonmember_event to be called with shadow-banned users. (#8158) Changelog fixes Make StreamIdGen `get_next` and `get_next_mult` async (#8161) Wording fixes to 'name' user admin api filter (#8163) Fix missing double-backtick in RST document Search in columns 'name' and 'displayname' in the admin users endpoint (#7377) Add type hints for state. (#8140) Stop shadow-banned users from sending non-member events. (#8142) Allow capping a room's retention policy (#8104) Add healthcheck for default localhost 8008 port on /health endpoint. (#8147) Fix flaky shadow-ban tests. (#8152) Don't fail /submit_token requests on incorrect session ID if request_token_inhibit_3pid_errors is turned on (#7991) Do not apply ratelimiting on joins to appservices (#8139) Micro-optimisations to get_auth_chain_ids (#8132) Allow denying or shadow banning registrations via the spam checker (#8034) Stop shadow-banned users from sending invites. (#8095) Be more tolerant of membership events in unknown rooms (#8110) Improve the error code when trying to register using a name reserved for guests. (#8135) ...
| * Allow denying or shadow banning registrations via the spam checker (#8034)Patrick Cloke2020-08-203-7/+69
| |
* | Merge commit 'c9c544cda' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-191-8/+23
|\| | | | | | | | | | | | | | | | | | | | | | | | | * commit 'c9c544cda': Remove `ChainedIdGenerator`. (#8123) Switch the JSON byte producer from a pull to a push producer. (#8116) Updated docs: Added note about missing 308 redirect support. (#8120) Be stricter about JSON that is accepted by Synapse (#8106) Convert runWithConnection to async. (#8121) Remove the unused inlineCallbacks code-paths in the caching code (#8119) Separate `get_current_token` into two. (#8113) Convert events worker database to async/await. (#8071) Add a link to the matrix-synapse-rest-password-provider. (#8111)
* | Merge commit '050e20e7c' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-192-1/+4
|\| | | | | | | | | * commit '050e20e7c': Convert some of the general database methods to async (#8100)
| * Convert some of the general database methods to async (#8100)Patrick Cloke2020-08-172-3/+3
| |
* | Merge commit 'e04e465b4' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-191-1/+1
|\| | | | | | | | | | | | | | | | | | | * commit 'e04e465b4': Use the default templates when a custom template file cannot be found (#8037) Changelog changes Convert stream database to async/await. (#8074) Add a shadow-banned flag to users. (#8092) Convert pusher databases to async/await. (#8075) Convert receipts and events databases to async/await. (#8076)
| * Convert stream database to async/await. (#8074)Patrick Cloke2020-08-171-1/+1
| |
* | Merge commit '5ecc8b582' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-191-1/+1
|\| | | | | | | | | * commit '5ecc8b582': Convert devices database to async/await. (#8069)
| * Convert devices database to async/await. (#8069)Patrick Cloke2020-08-121-1/+1
| |
* | Merge commit 'd68e10f30' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-191-1/+2
|\| | | | | | | | | * commit 'd68e10f30': Convert account data, device inbox, and censor events databases to async/await (#8063)
| * Convert account data, device inbox, and censor events databases to ↵Patrick Cloke2020-08-121-1/+2
| | | | | | | | async/await (#8063)
* | Merge commit 'a0acdfa9e' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-191-5/+6
|\| | | | | | | | | * commit 'a0acdfa9e': Converts event_federation and registration databases to async/await (#8061)
| * Converts event_federation and registration databases to async/await (#8061)Patrick Cloke2020-08-111-5/+6
| |
* | Merge commit '7f837959e' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-191-1/+1
|\| | | | | | | | | | | * commit '7f837959e': Convert directory, e2e_room_keys, end_to_end_keys, monthly_active_users database to async (#8042) Convert additional database stores to async/await (#8045)
| * Convert directory, e2e_room_keys, end_to_end_keys, monthly_active_users ↵Patrick Cloke2020-08-071-1/+1
| | | | | | | | database to async (#8042)
* | Merge commit 'd4a7829b1' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-191-2/+2
|\| | | | | | | | | * commit 'd4a7829b1': Convert synapse.api to async/await (#8031)
| * Convert synapse.api to async/await (#8031)Patrick Cloke2020-08-061-2/+2
| |
* | Merge commit 'a7bdf98d0' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-162-42/+42
|\| | | | | | | | | * commit 'a7bdf98d0': Rename database classes to make some sense (#8033)
| * Rename database classes to make some sense (#8033)Erik Johnston2020-08-052-42/+42
| |
* | Merge commit '5d92a1428' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-161-6/+40
|\| | | | | | | | | * commit '5d92a1428': Prevent join->join membership transitions changing member count (#7977)
| * Prevent join->join membership transitions changing member count (#7977)Andrew Morgan2020-08-031-6/+40
| | | | | | | | | | | | | | | | | | | | | | `StatsHandler` handles updates to the `current_state_delta_stream`, and updates room stats such as the amount of state events, joined users, etc. However, it counts every new join membership as a new user entering a room (and that user being in another room), whereas it's possible for a user's membership status to go from join -> join, for instance when they change their per-room profile information. This PR adds a check for join->join membership transitions, and bails out early, as none of the further checks are necessary at that point. Due to this bug, membership stats in many rooms have ended up being wildly larger than their true values. I am not sure if we also want to include a migration step which recalculates these statistics (possibly using the `_populate_stats_process_rooms` bg update). Bug introduced in the initial implementation https://github.com/matrix-org/synapse/pull/4338.
* | Merge commit 'c978f6c45' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-162-4/+4
|\| | | | | | | | | * commit 'c978f6c45': Convert federation client to async/await. (#7975)
| * Convert federation client to async/await. (#7975)Patrick Cloke2020-07-302-4/+4
| |
* | Merge commit '4cce8ef74' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-161-2/+3
|\| | | | | | | | | * commit '4cce8ef74': Convert appservice to async. (#7973)
| * Convert appservice to async. (#7973)Patrick Cloke2020-07-301-2/+3
| |
* | Remember mappings when we bind a 3pid using the internal sydent bind API (#66)Andrew Morgan2020-10-141-0/+6
| | | | | | | | | | | | | | https://github.com/matrix-org/synapse-dinsic/pull/51 added an option that would automatically bind a user's threepid to a configured identity server after they had registered. Unfortunately, when you bind threepids, ideally you would store that mapping in the database so that later on you can remove those mappings when you deactivate an account. We found that due the fact that we did not store these mappings, threepids were not unbound upon user account deactivation. This PR fixes the issue by creating the mappings again, meaning they will again be removed upon account deactivation.
* | Merge commit 'de119063f' into anoa/dinsic_release_1_18_xAndrew Morgan2020-08-033-18/+22
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'de119063f': (31 commits) Convert room list handler to async/await. (#7912) Element CSS and logo in email templates (#7919) Lint the contrib/ directory in CI and linting scripts, add synctl to linting script (#7914) Remove unused code from synapse.logging.utils. (#7897) Fix a typo in the sample config. (#7890) Fix deprecation warning: import ABC from collections.abc (#7892) Change sample config's postgres user to synapse_user (#7889) Fix deprecation warning due to invalid escape sequences (#7895) Remove Ubuntu Eoan that is now EOL (#7888) Fix the trace function for async functions. (#7872) Add help for creating a user via docker (#7885) Switch to Debian:Slim from Alpine for the docker image (#7839) Stop using 'device_max_stream_id' (#7882) Fix TypeError in synapse.notifier (#7880) Add a default limit (of 100) to get/sync operations. (#7858) Change "unknown room ver" logging to warning. (#7881) Convert device handler to async/await (#7871) Convert synapse.app to async/await. (#7868) Convert _base, profile, and _receipts handlers to async/await (#7860) Add admin endpoint to get members in a room. (#7842) ...
| * Convert device handler to async/await (#7871)Patrick Cloke2020-07-172-12/+11
| |
| * Convert _base, profile, and _receipts handlers to async/await (#7860)Patrick Cloke2020-07-171-6/+11
| |
* | Merge commit 'a973bcb8a' into anoa/dinsic_release_1_18_xAndrew Morgan2020-08-033-239/+424
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'a973bcb8a': Add some tiny type annotations (#7870) Remove obsolete comment. Ensure that calls to `json.dumps` are compatible with the standard library json. (#7836) Avoid brand new rooms in `delete_old_current_state_events` (#7854) Allow accounts to be re-activated from the admin APIs. (#7847) Fix tests Fix typo Newsfile Use get_users_in_room rather than state handler in typing for speed Fix client reader sharding tests (#7853) Convert E2E key and room key handlers to async/await. (#7851) Return the proper 403 Forbidden error during errors with JWT logins. (#7844) remove `retry_on_integrity_error` wrapper for persist_events (#7848)
| * Fix testsErik Johnston2020-07-151-2/+2
| |
| * Convert E2E key and room key handlers to async/await. (#7851)Patrick Cloke2020-07-152-237/+422
| |
* | Merge commit '43726783e' into dinsicAndrew Morgan2020-08-032-36/+36
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '43726783e': (22 commits) 1.17.0rc1 Fix some spelling mistakes / typos. (#7811) `update_membership` declaration: now always returns an event id. (#7809) Improve stacktraces from exceptions in background processes (#7808) Fix `can only concatenate list (not "tuple") to list` exception (#7810) Pass original request headers from workers to the main process. (#7797) Generate real events when we reject invites (#7804) Add `HomeServer.signing_key` property (#7805) Revert "Update the installation docs on apt-transport-https (#7801)" Do not use simplejson in Synapse. (#7800) Stop passing bytes when dumping JSON (#7799) Update the installation docs on apt-transport-https (#7801) shuffle changelog slightly Change Caddy links (old is deprecated) (#7789) Stop populating unused table `local_invites`. (#7793) Refactor getting replication updates from database v2. (#7740) Add libwebp dependency to Dockerfile (#7791) Add documentation for JWT login type and improve sample config. (#7776) Convert the appservice handler to async/await. (#7775) Don't ignore `set_tweak` actions with no explicit `value`. (#7766) ...
| * Convert the appservice handler to async/await. (#7775)Patrick Cloke2020-07-061-33/+35
| |
| * isort 5 compatibility (#7786)Will Hunt2020-07-051-3/+1
| | | | | | The CI appears to use the latest version of isort, which is a problem when isort gets a major version bump. Rather than try to pin the version, I've done the necessary to make isort5 happy with synapse.
* | Merge commit 'dc80a0762' into dinsicAndrew Morgan2020-08-031-2/+208
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'dc80a0762': 1.16.0rc1 Back out MSC2625 implementation (#7761) Additional configuration options for auto-join rooms (#7763) Add some metrics for inbound and outbound federation processing times (#7755) Explain the purpose of the "tests" conditional dependency requirement (#7751) Add another yield point to state res v2 (#7746) Move flake8 to end. Don't exit script on failure (#7738) Make tox actions work on Debian 10 (#7703) Yield during large v2 state res. (#7735) add org.matrix.login.jwt so that m.login.jwt can be deprecated (#7675) Set Content-Length for Metrics requests (#7730) Sync ignored table names in synapse_port_db to current database schema (#7717) Allow local media to be marked as safe from being quarantined. (#7718) Convert directory handler to async/await (#7727) Speed up state res v2 across large state differences. (#7725)
| * Additional configuration options for auto-join rooms (#7763)Patrick Cloke2020-06-301-2/+210
| |
* | Merge commit '363082561' into dinsicAndrew Morgan2020-08-031-6/+7
|\| | | | | | | | | * commit '363082561': Convert the typing handler to async/await. (#7679)
| * Convert the typing handler to async/await. (#7679)Patrick Cloke2020-06-171-6/+7
| |
* | Merge commit '03619324f' into dinsicAndrew Morgan2020-08-034-7/+109
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '03619324f': Create a ListenerConfig object (#7681) Fix changelog wording 1.15.1 Wrap register_device coroutine in an ensureDeferred (#7684) Ensure the body is a string before comparing push rules. (#7701) Ensure etag is a string for GET room_keys/version response (#7691) Update m.id.phone to use 'phone' instead of 'number' (#7687) Fix "There was no active span when trying to log." error (#7698) Enable 3PID add/bind/unbind endpoints on r0 routes Discard RDATA from already seen positions. (#7648) Replace iteritems/itervalues/iterkeys with native versions. (#7692) Fix warnings about losing log context during UI auth. (#7688) Fix a typo when comparing the URI & method during UI Auth. (#7689) Remove "user_id" from GET /presence. (#7606) Increase the default SAML session expirary time to 15 minutes. (#7664) fix typo in sample_config.yaml (#7652) Take out a lock before modifying _CACHES (#7663) Add option to enable encryption by default for new rooms (#7639) Clean-up the fallback login code. (#7657)
| * Ensure etag is a string for GET room_keys/version response (#7691)Hubert Chathi2020-06-151-0/+1
| |
| * Add option to enable encryption by default for new rooms (#7639)Andrew Morgan2020-06-102-5/+104
| | | | | | | | | | | | | | | | | | Fixes https://github.com/matrix-org/synapse/issues/2431 Adds config option `encryption_enabled_by_default_for_room_type`, which determines whether encryption should be enabled with the default encryption algorithm in private or public rooms upon creation. Whether the room is private or public is decided based upon the room creation preset that is used. Part of this PR is also pulling out all of the individual instances of `m.megolm.v1.aes-sha2` into a constant variable to eliminate typos ala https://github.com/matrix-org/synapse/pull/7637 Based on #7637
* | Add option to autobind user's email on registration (#51)Andrew Morgan2020-07-021-1/+84
| | | | | | | | | | Adds an option, `bind_new_user_emails_to_sydent`, which uses Sydent's [internal bind api](https://github.com/matrix-org/sydent#internal-bind-and-unbind-api) to automatically bind email addresses of users immediately after they register. This is quite enterprise-specific, but could be generally useful to multiple organizations. This aims to solve the problem of requiring users to verify their email twice when using the functionality of an identity server in a corporate deployment - where both the homeserver and identity server are controlled. It does with while eliminating the need for the `account_threepid_delegates.email` option, which historically has been a very complicated option to reason about.
* | Merge branch 'release-v1.15.0' of github.com:matrix-org/synapse into ↵Andrew Morgan2020-06-244-14/+20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dinsic-release-v1.15.x * 'release-v1.15.0' of github.com:matrix-org/synapse: (55 commits) 1.15.0 Fix some attributions Update CHANGES.md 1.15.0rc1 Revert "1.15.0rc1" 1.15.0rc1 Fix bug in account data replication stream. (#7656) Convert the registration handler to async/await. (#7649) Accept device information at the login fallback endpoint. (#7629) Convert user directory handler and related classes to async/await. (#7640) Add an option to disable autojoin for guest accounts (#6637) Clarifications to the admin api documentation (#7647) Update to the stable SSO prefix for UI Auth. (#7630) Fix type information on `assert_*_is_admin` methods (#7645) Remove some unused constants. (#7644) Typo fixes. Allow new users to be registered via the admin API even if the monthly active user limit has been reached (#7263) Add device management to admin API (#7481) Attempt to fix PhoneHomeStatsTestCase.test_performance_100 being flaky. (#7634) Support CS API v0.6.0 (#6585) ...
| * Convert user directory handler and related classes to async/await. (#7640)Patrick Cloke2020-06-051-4/+4
| |
| * Add an option to disable autojoin for guest accounts (#6637)Travis Ralston2020-06-051-0/+10
| | | | | | | | Fixes https://github.com/matrix-org/synapse/issues/3177
| * Performance improvements and refactor of Ratelimiter (#7595)Andrew Morgan2020-06-051-5/+1
| | | | | | | | | | | | | | | | | | | | While working on https://github.com/matrix-org/synapse/issues/5665 I found myself digging into the `Ratelimiter` class and seeing that it was both: * Rather undocumented, and * causing a *lot* of config checks This PR attempts to refactor and comment the `Ratelimiter` class, as well as encourage config file accesses to only be done at instantiation. Best to be reviewed commit-by-commit.
| * Fix encryption algorithm typos in tests/comments (#7637)Andrew Morgan2020-06-041-5/+5
| | | | | | | | | | | | | | | | @uhoreg has confirmed these were both typos. They are only in comments and tests though, rather than anything critical. Introduced in: * https://github.com/matrix-org/synapse/pull/7157 * https://github.com/matrix-org/synapse/pull/5726
* | Add a bulk user info endpoint and deprecate the old one (#46)Andrew Morgan2020-06-191-1/+134
| | | | | | | | | | | | | | | | | | The current `/user/<user_id>/info` API was useful in that it could be used by any user to lookup whether another user was deactivate or expired. However, it was impractical as it only allowed for a single lookup at once. Clients trying to use this API were met with speed issues as they tried to query this information for all users in a room. This PR adds an equivalent CS and Federation API that takes a list of user IDs, and returning a mapping from user ID to info dictionary. Note that the federation in this PR was a bit trickier than in the original #12 as we can no longer use a federation query, as those don't allow for JSON bodies - which we require to pass a list of user IDs. Instead we do the whole thing of adding a method to transport/client and transport/server. This PR also adds unittests. The earlier PR used Sytest, presumably for testing across federation, but as this is Synapse-specific that felt a little gross. Unit tests for the deprecated endpoint have not been added.
* | Merge branch 'release-v1.14.0' of github.com:matrix-org/synapse into ↵Andrew Morgan2020-06-104-4/+642
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dinsic-release-v1.14.x * 'release-v1.14.0' of github.com:matrix-org/synapse: (108 commits) Fix typo in PR link Update debian changelog 1.14.0 Improve changelog wording 1.14.0rc2 Fix sample config docs error (#7581) Fix up comments Fix specifying cache factors via env vars with * in name. (#7580) Don't apply cache factor to event cache. (#7578) Ensure ReplicationStreamer is always started when replication enabled. (#7579) Remove the changes to the debian changelog Not full release yet, this is rc1 Merge event persistence move changelog entries More changelog fix Changelog fixes 1.14.0 Replace device_27_unique_idx bg update with a fg one (#7562) Fix incorrect exception handling in KeyUploadServlet.on_POST (#7563) Fix recording of federation stream token (#7564) Simplify reap_monthly_active_users (#7558) ...
| * Add ability to wait for replication streams (#7542)Erik Johnston2020-05-221-1/+4
| | | | | | | | | | | | | | The idea here is that if an instance persists an event via the replication HTTP API it can return before we receive that event over replication, which can lead to races where code assumes that persisting an event immediately updates various caches (e.g. current state of the room). Most of Synapse doesn't hit such races, so we don't do the waiting automagically, instead we do so where necessary to avoid unnecessary delays. We may decide to change our minds here if it turns out there are a lot of subtle races going on. People probably want to look at this commit by commit.
| * Support UI Authentication for OpenID Connect accounts (#7457)Patrick Cloke2020-05-151-5/+10
| |
| * Implement room version 6 (MSC2240). (#7506)Patrick Cloke2020-05-151-3/+3
| |
| * Strictly enforce canonicaljson requirements in a new room version (#7381)Patrick Cloke2020-05-141-1/+66
| |
| * Extend spam checker to allow for multiple modules (#7435)Andrew Morgan2020-05-081-2/+2
| |
| * Implement OpenID Connect-based login (#7256)Quentin Gliech2020-05-081-0/+565
| |
* | Merge branch 'release-v1.13.0' of github.com:matrix-org/synapse into ↵Andrew Morgan2020-06-105-66/+242
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dinsic-release-v1.14.x * 'release-v1.13.0' of github.com:matrix-org/synapse: (257 commits) Update changelog based on feedback. Move warnings in the changelog and re-iterate changes to branches. 1.13.0 update dh-virtualenv (#7526) 1.13.0rc3 Hash passwords earlier in the registration process (#7523) 1.13.0rc2 1.13.0rc2 Stop `get_joined_users` corruption from custom statuses (#7376) Do not validate that the client dict is stable during UI Auth. (#7483) Fix new flake8 errors (#7489) Don't UPGRADE database rows RST indenting Put rollback instructions in upgrade notes Fix changelog typo Oh yeah, RST Absolute URL it is then Fix upgrade notes link Provide summary of upgrade issues in changelog. Fix ) Move next version notes from changelog to upgrade notes ...
| * Stop Auth methods from polling the config on every req. (#7420)Andrew Morgan2020-05-062-14/+22
| |
| * async/await is_server_admin (#7363)Andrew Morgan2020-05-012-36/+53
| |
| * Convert auth handler to async/await (#7261)Patrick Cloke2020-04-152-29/+55
| |
| * Allow admins to create aliases when they are not in the room (#7191)Patrick Cloke2020-04-011-0/+62
| |
| * Merge pull request #7157 from matrix-org/rev.outbound_device_pokes_testsRichard van der Hoff2020-03-301-1/+1
| |\ | | | | | | Add tests for outbound device pokes
| | * Remove spurious "name" parameter to `default_config`Richard van der Hoff2020-03-241-1/+1
| | | | | | | | | | | | | | | this is never set to anything other than "test", and is a source of unnecessary boilerplate.
| * | Add options to prevent users from changing their profile. (#7096)Dirk Klimpel2020-03-271-1/+64
| |/
| * Revert "Add options to disable setting profile info for prevent changes. ↵Richard van der Hoff2020-03-171-32/+1
| | | | | | | | | | | | | | (#7053)" This reverts commit 54dd28621b070ca67de9f773fe9a89e1f4dc19da, reversing changes made to 6640460d054e8f4444046a34bdf638921b31c01e.
| * Add options to disable setting profile info for prevent changes. (#7053)Brendan Abolivier2020-03-101-1/+32
| |\
| | * updates after reviewdklimpel2020-03-091-3/+3
| | |
| | * fix testsdklimpel2020-03-091-2/+2
| | |
| | * add testsdklimpel2020-03-091-3/+3
| | |
| | * Add options to disable setting profile info for prevent changes.dklimpel2020-03-081-1/+32
| | |
* | | Fix and refactor rewritten IS url feature. Add sample config docs (#40)Andrew Morgan2020-04-221-3/+4
| | |
* | | Allow deleting an alias if the user has sufficient power level (#6986)Andrew Morgan2020-03-241-24/+104
|\| | | | | | | | | | | | | | * commit '13892776e': Allow deleting an alias if the user has sufficient power level (#6986)
| * | Allow deleting an alias if the user has sufficient power level (#6986)Patrick Cloke2020-03-041-24/+104
| | |
* | | Validate the alt_aliases property of canonical alias events (#6971)Andrew Morgan2020-03-241-36/+30
|\| | | | | | | | | | | | | | * commit '7dcbc33a1': Validate the alt_aliases property of canonical alias events (#6971)
| * | Validate the alt_aliases property of canonical alias events (#6971)Patrick Cloke2020-03-031-36/+30
| |/
* | Store room version on invite (#6983)Andrew Morgan2020-03-241-0/+1
|\| | | | | | | | | * commit '3e99528f2': Store room version on invite (#6983)
| * Store room version on invite (#6983)Richard van der Hoff2020-02-261-0/+1
| | | | | | | | | | When we get an invite over federation, store the room version in the rooms table. The general idea here is that, when we pull the invite out again, we'll want to know what room_version it belongs to (so that we can later redact it if need be). So we need to store it somewhere...
* | Port PresenceHandler to async/await (#6991)Andrew Morgan2020-03-241-6/+12
|\| | | | | | | | | * commit '1f773eec9': Port PresenceHandler to async/await (#6991)
| * Port PresenceHandler to async/await (#6991)Erik Johnston2020-02-261-6/+12
| |
* | Clarify list/set/dict/tuple comprehensions and enforce via flake8 (#6957)Andrew Morgan2020-03-243-11/+11
|\| | | | | | | | | | | | | * commit '509e381af': Clarify list/set/dict/tuple comprehensions and enforce via flake8 (#6957) changelog Increase MAX_EVENTS_BEHIND for replication clients
| * Clarify list/set/dict/tuple comprehensions and enforce via flake8 (#6957)Patrick Cloke2020-02-213-11/+11
| | | | | | | | Ensure good comprehension hygiene using flake8-comprehensions.
* | Merge pull request #6949 from matrix-org/rav/list_room_aliases_peekableAndrew Morgan2020-03-241-2/+2
|\| | | | | | | | | | | | | | | * commit '2fb7794e6': changelog Make room alias lists peekable Add `allow_departed_users` param to `check_in_room_or_world_readable` Refactor the membership check methods in Auth
| * Refactor the membership check methods in AuthRichard van der Hoff2020-02-181-2/+2
| | | | | | | | | | these were getting a bit unwieldy, so let's combine `check_joined_room` and `check_user_was_in_room` into a single `check_user_in_room`.
* | Stop sending events when creating or deleting aliases (#6904)Andrew Morgan2020-03-241-2/+152
|\| | | | | | | | | * commit 'fe3941f6e': Stop sending events when creating or deleting aliases (#6904)
| * Stop sending events when creating or deleting aliases (#6904)Patrick Cloke2020-02-181-2/+152
| | | | | | Stop sending events when creating or deleting associations (room aliases). Send an updated canonical alias event if one of the alt_aliases is deleted.
* | Convert the directory handler tests to use HomeserverTestCase (#6919)Andrew Morgan2020-03-231-24/+17
|\| | | | | | | | | * commit '02e89021f': Convert the directory handler tests to use HomeserverTestCase (#6919)
| * Convert the directory handler tests to use HomeserverTestCase (#6919)Patrick Cloke2020-02-141-24/+17
| | | | | | Convert directory handler tests to use HomeserverTestCase.
* | Filter the results of user directory searching via the spam checker (#6888)Andrew Morgan2020-03-231-0/+92
|\| | | | | | | | | * commit '49f877d32': Filter the results of user directory searching via the spam checker (#6888)
| * Filter the results of user directory searching via the spam checker (#6888)Patrick Cloke2020-02-141-0/+92
| | | | | | Add a method to the spam checker to filter the user directory results.
* | Reject device display names that are too long (#6882)Andrew Morgan2020-03-231-0/+18
|\| | | | | | | | | * commit 'a92e703ab': Reject device display names that are too long (#6882)
| * Reject device display names that are too long (#6882)Patrick Cloke2020-02-101-0/+18
| | | | | | | | | | | | | | | | * Reject device display names that are too long. Too long is currently defined as 100 characters in length. * Add a regression test for rejecting a too long device display name.
* | Add typing to synapse.federation.sender (#6871)Andrew Morgan2020-03-231-2/+6
|\| | | | | | | | | * commit 'b08b0a22d': Add typing to synapse.federation.sender (#6871)
| * Add typing to synapse.federation.sender (#6871)Erik Johnston2020-02-071-2/+6
| |
* | Merge pull request #6856 from matrix-org/rav/redact_changes/6Andrew Morgan2020-03-231-2/+4
|\| | | | | | | | | * commit 'e1b240329': Pass room_version into `event_from_pdu_json`
| * Pass room_version into `event_from_pdu_json`Richard van der Hoff2020-02-061-2/+4
| | | | | | | | It's called from all over the shop, so this one's a bit messy.
* | Merge pull request #6806 from matrix-org/rav/redact_changes/3Andrew Morgan2020-03-231-2/+2
|\| | | | | | | | | | | | | | | * commit 'a5afdd15e': changelog Pass room_version into add_hashes_and_signatures Pass room_version into create_local_event_from_event_dict Store the room version in EventBuilder
| * Merge pull request #6806 from matrix-org/rav/redact_changes/3Richard van der Hoff2020-01-311-2/+2
| |\ | | | | | | Pass room_version into add_hashes_and_signatures
| | * Store the room version in EventBuilderRichard van der Hoff2020-01-301-2/+2
| | |
* | | Merge pull request #6820 from matrix-org/rav/get_room_version_idAndrew Morgan2020-03-231-1/+1
|\| | | | | | | | | | | | | | | | | | | | * commit '160522e32': newsfile Add `get_room_version` method s/get_room_version/get_room_version_id/
| * | s/get_room_version/get_room_version_id/Richard van der Hoff2020-01-311-1/+1
| |/ | | | | | | | | ... to make way for a forthcoming get_room_version which returns a RoomVersion object.
* | Resync remote device list when detected as stale. (#6786)Andrew Morgan2020-03-231-3/+3
|\| | | | | | | | | * commit 'b66032705': Resync remote device list when detected as stale. (#6786)
| * Resync remote device list when detected as stale. (#6786)Erik Johnston2020-01-301-3/+3
| |
* | Add `local_current_membership` table (#6655)Andrew Morgan2020-03-231-2/+2
|\| | | | | | | | | * commit '28c98e51f': Add `local_current_membership` table (#6655)
| * Add `local_current_membership` table (#6655)Erik Johnston2020-01-151-2/+2
| | | | | | | | | | | | | | Currently we rely on `current_state_events` to figure out what rooms a user was in and their last membership event in there. However, if the server leaves the room then the table may be cleaned up and that information is lost. So lets add a table that separately holds that information.
* | Kill off RegistrationError (#6691)Andrew Morgan2020-03-231-2/+0
|\| | | | | | | | | * commit '326c893d2': Kill off RegistrationError (#6691)
| * Kill off RegistrationError (#6691)Richard van der Hoff2020-01-131-2/+0
| | | | | | This is pretty pointless. Let's just use SynapseError.
* | Add database config class (#6513)Andrew Morgan2020-03-201-19/+20
|\| | | | | | | | | | | * commit '2284eb3a5': Add database config class (#6513) too many parens
| * Add database config class (#6513)Erik Johnston2019-12-181-19/+20
| | | | | | | | | | This encapsulates config for a given database and is the way to get new connections.
* | look up cross-signing keys from the DB in bulk (#6486)Andrew Morgan2020-03-191-8/+0
|\| | | | | | | | | * commit 'cb2db1799': look up cross-signing keys from the DB in bulk (#6486)
| * look up cross-signing keys from the DB in bulk (#6486)Hubert Chathi2019-12-121-8/+0
| |
* | Back out perf regression from get_cross_signing_keys_from_cache. (#6494)Andrew Morgan2020-03-191-0/+8
|\| | | | | | | | | | | | | | | | | | | | | | | | | * commit 'adfdd82b2': Back out perf regression from get_cross_signing_keys_from_cache. (#6494) Fix comment Fix port db script Newsfile Fixup tests Move start up DB checks to main data store. Pass Database into the data store Move are_all_users_on_domain checks to main data store. Change DataStores to accept 'database' param.
| * Back out perf regression from get_cross_signing_keys_from_cache. (#6494)Neil Johnson2019-12-091-0/+8
| | | | | | Back out cross-signing code added in Synapse 1.5.0, which caused a performance regression.
* | Merge pull request #6484 from matrix-org/erikj/port_sync_handlerAndrew Morgan2020-03-192-23/+34
|\| | | | | | | | | | | | | * commit 'a9b393340': Fixup functions to consistently return deferreds Newsfile Port SyncHandler to async/await
| * Merge pull request #6484 from matrix-org/erikj/port_sync_handlerErik Johnston2019-12-092-23/+34
| |\ | | | | | | Port SyncHandler to async/await
| | * Fixup functions to consistently return deferredsErik Johnston2019-12-061-6/+18
| | |
| | * Port SyncHandler to async/awaitErik Johnston2019-12-051-17/+16
| | |
* | | Merge pull request #6469 from matrix-org/erikj/make_database_classAndrew Morgan2020-03-192-41/+69
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'f3ea2f5a0': Remove unused var Fix DB scripts Newsfile Move background update handling out of store Comments Move DB pool and helper functions into dedicated Database class
| * | Move background update handling out of storeErik Johnston2019-12-052-20/+48
| | |
| * | Move DB pool and helper functions into dedicated Database classErik Johnston2019-12-052-21/+21
| |/
* | Merge pull request #6464 from matrix-org/erikj/make_public_sql_baseAndrew Morgan2020-03-192-21/+21
|\| | | | | | | | | | | | | * commit 'ddbbfc951': Newsfile Remove underscore from SQLBaseStore functions Don't call SQLBaseStore methods from outside stores
| * Remove underscore from SQLBaseStore functionsErik Johnston2019-12-042-21/+21
| |
* | Implementation of MSC2314 (#6176)Andrew Morgan2020-03-181-0/+3
|\| | | | | | | | | * commit '0f87b912a': Implementation of MSC2314 (#6176)
| * Implementation of MSC2314 (#6176)Amber Brown2019-11-281-0/+3
| |
* | add etag and count to key backup endpoints (#5858)Andrew Morgan2020-03-181-0/+31
|\| | | | | | | | | * commit '0d27aba90': add etag and count to key backup endpoints (#5858)
| * add etag and count to key backup endpoints (#5858)Hubert Chathi2019-11-271-0/+31
| |
* | Fix bug which caused rejected events to be stored with the wrong room state ↵Andrew Morgan2020-03-161-0/+126
|\| | | | | | | | | | | | | (#6320) * commit '807ec3bd9': Fix bug which caused rejected events to be stored with the wrong room state (#6320)
| * Fix bug which caused rejected events to be stored with the wrong room state ↵Richard van der Hoff2019-11-061-0/+126
| | | | | | | | | | | | | | | | | | | | | | | | (#6320) Fixes a bug where rejected events were persisted with the wrong state group. Also fixes an occasional internal-server-error when receiving events over federation which are rejected and (possibly because they are backwards-extremities) have no prev_group. Fixes #6289.
* | Merge pull request #5727 from matrix-org/uhoreg/e2e_cross-signing2-part3Andrew Morgan2020-03-161-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '53d7680e3': Update synapse/storage/data_stores/main/devices.py rename get_devices_by_remote to get_device_updates_by_remote black apply changes as a result of PR review don't error if federation query doesn't have cross-signing keys move get_e2e_cross_signing_key to EndToEndKeyWorkerStore so it works with workers black vendor-prefix the EDU name until MSC1756 is merged into the spec fix unit test add news file update to work with newer code, and fix formatting add missing param make black happy don't crash if the user doesn't have cross-signing keys implement federation parts of cross-signing
| * rename get_devices_by_remote to get_device_updates_by_remoteHubert Chathi2019-10-301-2/+2
| |
* | Merge pull request #6279 from matrix-org/erikj/federation_server_async_awaitAndrew Morgan2020-03-161-0/+3
|\| | | | | | | | | | | | | | | * commit 'b4465564c': Don't return coroutines Make concurrently_execute work with async/await Newsfile Port federation_server to async/await
| * Port federation_server to async/awaitErik Johnston2019-10-291-0/+3
| |
* | Merge pull request #6255 from matrix-org/erikj/stats_configAndrew Morgan2020-03-161-0/+2
|\| | | | | | | | | | | | | * commit '87259b3a3': Fix tests Newsfile Remove repeated calls to config.stats_enabled.
| * Fix testsErik Johnston2019-10-251-0/+2
| |
* | Merge pull request #6231 from matrix-org/erikj/refactor_storesAndrew Morgan2020-03-161-4/+4
|\|
| * Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2019-10-221-1/+294
| |\ | | | | | | | | | erikj/refactor_stores
| * \ Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2019-10-221-0/+65
| |\ \ | | | | | | | | | | | | erikj/refactor_stores
| * | | Move storage classes into a main "data store".Erik Johnston2019-10-211-4/+4
| | | | | | | | | | | | | | | | | | | | This is in preparation for having multiple data stores that offer different functionality, e.g. splitting out state or event storage.
* | | | Merge pull request #5726 from matrix-org/uhoreg/e2e_cross-signing2-part2Andrew Morgan2020-03-161-1/+294
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '276173163': Add changelog entry fix doc strings make isort happy add some comments drop some logger lines to debug make changes based on PR feedback add function docs use something that's the right type for user_id run black split out signature processing into separate functions avoid modifying input parameter fix test update with newer coding style add test make isort happy make black happy allow uploading signatures of master key signed by devices implement device signature uploading/fetching
| * | | Merge branch 'develop' into cross-signing_sig_uploadHubert Chathi2019-10-186-59/+185
| |\ \ \ | | | |/ | | |/|
| * | | use something that's the right type for user_idHubert Chathi2019-09-061-1/+1
| | | |