summary refs log tree commit diff
path: root/synapse/config (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit '78e48f61b' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-232-33/+7
|\
| * Update the OIDC sample config (#9695)Richard van der Hoff2021-03-291-31/+3
| | | | | | | | | | | | | | I've reiterated the advice about using `oidc` to migrate, since I've seen a few people caught by this. I've also removed a couple of the examples as they are duplicating the OIDC documentation, and I think they might be leading people astray.
| * Make it possible to use dmypy (#9692)Erik Johnston2021-03-261-2/+4
| | | | | | | | | | | | | | | | | | Running `dmypy run` will do a `mypy` check while spinning up a daemon that makes rerunning `dmypy run` a lot faster. `dmypy` doesn't support `follow_imports = silent` and has `local_partial_types` enabled, so this PR enables those options and fixes the issues that were newly raised. Note that `local_partial_types` will be enabled by default in upcoming mypy releases.
* | Merge commit 'c73cc2c2a' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-231-4/+4
|\|
| * Increase default join burst ratelimiting (#9674)Erik Johnston2021-03-231-4/+4
| | | | | | It's legitimate behaviour to try and join a bunch of rooms at once.
* | Merge commit '4ecba9bd5' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-231-1/+2
|\|
| * Merge branch 'develop' into babolivier/msc3026Brendan Abolivier2021-03-191-0/+2
| |\
| * | Move support for MSC3026 behind an experimental flagBrendan Abolivier2021-03-181-0/+2
| | |
* | | Merge commit '0e3558473' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-231-0/+3
|\ \ \ | | |/ | |/|
| * | Initial spaces summary API (#9643)Richard van der Hoff2021-03-181-0/+3
| |/ | | | | This is very bare-bones for now: federation will come soon, while pagination is descoped for now but will come later.
* | Merge commit 'ad721fc55' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-236-7/+59
|\|
| * Enable flake8-bugbear, but disable most checks. (#9499)Jonathan de Jong2021-03-166-6/+20
| | | | | | | | * Adds B00 to ignored checks. * Fixes remaining issues.
| * Add SSO attribute requirements for OIDC providers (#9609)Hubbe2021-03-161-1/+39
| | | | | | | | Allows limiting who can login using OIDC via the claims made from the IdP.
* | Merge commit 'd315e9644' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-232-19/+39
|\|
| * Add support for stable MSC2858 API (#9617)Richard van der Hoff2021-03-161-2/+11
| | | | | | | | | | The stable format uses different brand identifiers, so we need to support two identifiers for each IdP.
| * Clean up config settings for stats (#9604)Richard van der Hoff2021-03-161-17/+28
| | | | | | ... and complain if people try to turn it off.
* | Merge commit '918f6ed82' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-233-12/+118
|\|
| * JWT OIDC secrets for Sign in with Apple (#9549)Richard van der Hoff2021-03-093-11/+118
| | | | | | | | | | Apple had to be special. They want a client secret which is generated from an EC key. Fixes #9220. Also fixes #9212 while I'm here.
* | Merge commit '7fdc6cefb' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-231-1/+4
|\|
| * Fix additional type hints. (#9543)Patrick Cloke2021-03-091-1/+4
| | | | | | Type hint fixes due to Twisted 21.2.0 adding type hints.
* | Merge commit '22db45bd4' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-231-2/+1
|\|
| * quick config comment tweak to clarify allow_profile_lookup_over_federationMatthew Hodgson2021-03-081-2/+1
| |
* | Merge commit '292792194' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-235-21/+116
|\|
| * Clean up `ShardedWorkerHandlingConfig` (#9466)Erik Johnston2021-02-245-21/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Split ShardedWorkerHandlingConfig This is so that we have a type level understanding of when it is safe to call `get_instance(..)` (as opposed to `should_handle(..)`). * Remove special cases in ShardedWorkerHandlingConfig. `ShardedWorkerHandlingConfig` tried to handle the various different ways it was possible to configure federation senders and pushers. This led to special cases that weren't hit during testing. To fix this the handling of the different cases is moved from there and `generic_worker` into the worker config class. This allows us to have the logic in one place and allows the rest of the code to ignore the different cases.
* | Merge commit '1b2d6d55c' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-231-1/+0
|\|
| * Remove vestiges of uploads_path config (#9462)Richard van der Hoff2021-02-221-1/+0
| | | | | | | | `uploads_path` was a thing that was never used; most of it was removed in #6628 but a few vestiges remained.
* | Merge commit 'e22b71810' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-233-43/+71
|\|
| * Clean up the user directory sample config section (#9385)Andrew Morgan2021-02-221-32/+37
| | | | | | | | | | The user directory sample config section was a little messy, and didn't adhere to our [recommended config format guidelines](https://github.com/matrix-org/synapse/blob/develop/docs/code_style.md#configuration-file-format). This PR cleans that up a bit.
| * Ratelimit cross-user key sharing requests. (#8957)Patrick Cloke2021-02-191-0/+10
| |
| * Add documentation and type hints to parse_duration. (#9432)Patrick Cloke2021-02-191-2/+15
| |
* | Merge commit 'd9f1dccba' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-233-2/+26
|\|
| * Add a config option to prioritise local users in user directory search ↵Andrew Morgan2021-02-191-0/+9
| | | | | | | | | | | | | | | | | | 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.
| * Add configs to make profile data more private (#9203)AndrewFerr2021-02-192-0/+24
| | | | | | | | | | | | | | Add off-by-default configuration settings to: - disable putting an invitee's profile info in invite events - disable profile lookup via federation Signed-off-by: Andrew Ferrazzutti <fair@miscworks.net>
* | Merge commit '1381cd05b' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-231-4/+6
|\|
| * Parse ui_auth.session_timeout as a duration (instead of treating it as ms) ↵Rishabh Arya2021-02-181-4/+6
| | | | | | | | (#9426)
* | Merge commit 'd2f0ec12d' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-2313-53/+110
|\|
| * Update black, and run auto formatting over the codebase (#9381)Eric Eastwood2021-02-1610-28/+55
| | | | | | | | | | | | | | - Update black version to the latest - Run black auto formatting over the codebase - Run autoformatting according to [`docs/code_style.md `](https://github.com/matrix-org/synapse/blob/80d6dc9783aa80886a133756028984dbf8920168/docs/code_style.md) - Update `code_style.md` docs around installing black to use the correct version
| * Fix some typos.Patrick Cloke2021-02-122-2/+2
| |
| * Merge tag 'v1.27.0rc2' into developPatrick Cloke2021-02-117-26/+52
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Synapse 1.27.0rc2 (2021-02-11) ============================== Features -------- - Further improvements to the user experience of registration via single sign-on. ([\#9297](https://github.com/matrix-org/synapse/issues/9297)) Bugfixes -------- - Fix ratelimiting introduced in v1.27.0rc1 for invites to respect the `ratelimit` flag on application services. ([\#9302](https://github.com/matrix-org/synapse/issues/9302)) - Do not automatically calculate `public_baseurl` since it can be wrong in some situations. Reverts behaviour introduced in v1.26.0. ([\#9313](https://github.com/matrix-org/synapse/issues/9313)) Improved Documentation ---------------------- - Clarify the sample configuration for changes made to the template loading code. ([\#9310](https://github.com/matrix-org/synapse/issues/9310))
| * | Combine the CAS & SAML implementations for required attributes. (#9326)Patrick Cloke2021-02-113-23/+53
| | |
* | | Merge commit 'e40d88cff' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-227-23/+46
|\ \ \ | | |/ | |/|
| * | Backout changes for automatically calculating the public baseurl. (#9313)Patrick Cloke2021-02-117-26/+52
| | | | | | | | | | | | This breaks some people's configurations (if their Client-Server API is not accessed via port 443).
* | | Merge commit '2ab6e67ab' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-225-42/+102
|\ \ \ | | |/ | |/|
| * | Fix escaping of braces in OIDC sample config. (#9317)Patrick Cloke2021-02-041-5/+5
| | | | | | | | | This fixes the Jinja2 templates for the mapping provider.
| * | Merge branch 'social_login_hotfixes' into developRichard van der Hoff2021-02-031-10/+4
| |\|
| | * Clarify documentation about escaping URLs in templates. (#9310)Patrick Cloke2021-02-031-10/+4
| | |
| * | config: Add detail to auto_join_rooms comment (#9291)dykstranet2021-02-031-0/+2
| | | | | | | | | | | | | | | config: Add detail to auto_join_rooms comment Signed-off-by: Gary Dykstra <gary@dykstranet.com>
| * | Convert blacklisted IPv4 addresses to compatible IPv6 addresses. (#9240)Patrick Cloke2021-02-032-27/+91
| |/ | | | | Also add a few more IP ranges to the default blacklist.
* | Merge commit '261093072' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-222-5/+5
|\|
| * Put SAML callback URI under /_synapse/client. (#9289)Richard van der Hoff2021-02-021-4/+4
| |
| * Put OIDC callback URI under /_synapse/client. (#9288)Richard van der Hoff2021-02-011-1/+1
| |
| * Merge branch 'social_login' into developRichard van der Hoff2021-02-011-0/+37
| |\
* | \ Merge commit '351845452' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-221-0/+37
|\ \ \ | | |/ | |/|
| * | Collect terms consent from the user during SSO registration (#9276)Richard van der Hoff2021-02-011-0/+22
| | |
| * | Improve styling and wording of SSO UIA templates (#9286)Richard van der Hoff2021-02-011-0/+15
| | | | | | | | | fixes #9171
* | | Merge commit '18ab35284' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-224-39/+69
|\ \ \ | | |/ | |/|
| * | Merge branch 'social_login' into developRichard van der Hoff2021-02-013-39/+50
| |\|
| | * Replace username picker with a template (#9275)Richard van der Hoff2021-02-013-38/+37
| | | | | | | | | | | | | | | There's some prelimiary work here to pull out the construction of a jinja environment to a separate function. I wanted to load the template at display time rather than load time, so that it's easy to update on the fly. Honestly, I think we should do this with all our templates: the risk of ending up with malformed templates is far outweighed by the improved turnaround time for an admin trying to update them.
| | * Improve styling and wording of SSO redirect confirm template (#9272)Richard van der Hoff2021-02-011-1/+13
| | |
| * | Ratelimit invites by room and target user (#9258)Erik Johnston2021-01-291-0/+19
| | |
* | | Merge commit 'e19396d62' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-223-31/+51
|\| |
| * | Merge branch 'social_login' into developRichard van der Hoff2021-01-281-28/+39
| |\|
| | * Add 'brand' field to MSC2858 response (#9242)Richard van der Hoff2021-01-271-25/+27
| | | | | | | | | | | | | | | | | | We've decided to add a 'brand' field to help clients decide how to style the buttons. Also, fix up the allowed characters for idp_id, while I'm in the area.
| | * Support for scraping email addresses from OIDC providers (#9245)Richard van der Hoff2021-01-271-3/+12
| | |
| * | Ratelimit 3PID /requestToken API (#9238)Erik Johnston2021-01-282-3/+12
| | |
* | | Merge commit '2e537a028' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-225-23/+32
|\| |
| * | Merge branch 'social_login' into developRichard van der Hoff2021-01-273-0/+33
| |\|
| | * Implement MSC2858 support (#9183)Richard van der Hoff2021-01-273-0/+33
| | | | | | | | | Fixes #8928.
| * | Clean-up the template loading code. (#9200)Patrick Cloke2021-01-274-23/+29
| | | | | | | | | | | | | | | * Enables autoescape by default for HTML files. * Adds a new read_template method for reading a single template. * Some logic clean-up.
* | | Merge commit '1baab2035' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-223-7/+10
|\| |
| * | Do not require the CAS service URL setting (use public_baseurl instead). (#9199)Patrick Cloke2021-01-262-7/+8
| | | | | | | | | | | | The current configuration is handled for backwards compatibility, but is considered deprecated.
| * | Precompute joined hosts and store in Redis (#9198)Erik Johnston2021-01-261-0/+2
| |/
* | Merge commit '42a8e8137' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-221-4/+35
|\|
| * Add a check for duplicate IdP ids (#9184)Richard van der Hoff2021-01-211-0/+11
| |
| * Prefix idp_id with "oidc-" (#9189)Richard van der Hoff2021-01-211-4/+24
| | | | | | ... to avoid clashes with other SSO mechanisms
* | Merge commit 'c8e6e0584' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-221-3/+9
|\|
| * Tighten the restrictions on `idp_id` (#9177)Richard van der Hoff2021-01-201-3/+9
| |
* | Merge commit '0cd2938bc' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-222-1/+21
|\|
| * Support icons for Identity Providers (#9154)Richard van der Hoff2021-01-202-1/+21
| |
* | Merge commit 'fa50e4bf4' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-227-45/+27
|\|
| * Give `public_baseurl` a default value (#9159)Richard van der Hoff2021-01-207-51/+30
| |
* | Merge commit '73b03722f' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-222-11/+32
|\|
| * Fix error messages from OIDC config parsing (#9153)Richard van der Hoff2021-01-191-10/+15
| | | | | | | | Make sure we report the correct config path for errors in the OIDC configs.
| * Allow moving account data and receipts streams off master (#9104)Erik Johnston2021-01-181-1/+17
| |
* | Merge commit '9de6b9411' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-222-143/+188
|\|
| * Land support for multiple OIDC providers (#9110)Richard van der Hoff2021-01-152-143/+188
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the final step for supporting multiple OIDC providers concurrently. First of all, we reorganise the config so that you can specify a list of OIDC providers, instead of a single one. Before: oidc_config: enabled: true issuer: "https://oidc_provider" # etc After: oidc_providers: - idp_id: prov1 issuer: "https://oidc_provider" - idp_id: prov2 issuer: "https://another_oidc_provider" The old format is still grandfathered in. With that done, it's then simply a matter of having OidcHandler instantiate a new OidcProvider for each configured provider.
* | Merge commit '3e4cdfe5d' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-221-7/+5
|\|
| * Remote dependency on distutils (#9125)Richard van der Hoff2021-01-151-6/+5
| | | | | | | | | | | | | | | | | | `distutils` is pretty much deprecated these days, and replaced with `setuptools`. It's also annoying because it's you can't `pip install` it, and it's hard to figure out which debian package we should depend on to make sure it's there. Since we only use it for a tiny function anyway, let's just vendor said function into our codebase.
* | Merge commit 'd34c6e127' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-221-3/+23
|\|
| * Store an IdP ID in the OIDC session (#9109)Richard van der Hoff2021-01-151-3/+23
| | | | | | | | | | Again in preparation for handling more than one OIDC provider, add a new caveat to the macaroon used as an OIDC session cookie, which remembers which OIDC provider we are talking to. In future, when we get a callback, we'll need it to make sure we talk to the right IdP. As part of this, I'm adding an idp_id and idp_name field to the OIDC configuration object. They aren't yet documented, and we'll just use the old values by default.
* | Merge commit '420031906' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-221-0/+10
|\|
| * Give the user a better error when they present bad SSO credsRichard van der Hoff2021-01-131-0/+10
| | | | | | | | | | | | | | | | | | If a user tries to do UI Auth via SSO, but uses the wrong account on the SSO IdP, try to give them a better error. Previously, the UIA would claim to be successful, but then the operation in question would simply fail with "auth fail". Instead, serve up an error page which explains the failure.
* | Merge commit 'dc3c83a93' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-221-45/+170
|\|
| * Add jsonschema verification for the oidc provider configRichard van der Hoff2021-01-131-0/+50
| |
| * Extract OIDCProviderConfig objectRichard van der Hoff2021-01-131-45/+120
| | | | | | | | | | Collect all the config options which related to an OIDC provider into a single object.
* | Merge commit 'a03d71dc9' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-212-2/+10
|\|
| * Fix validate_config on nested objects (#9054)Richard van der Hoff2021-01-081-1/+1
| |
| * Allow running sendToDevice on workers (#9044)Erik Johnston2021-01-071-1/+9
| |
* | Merge commit '0312266ee' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-211-0/+27
|\|
| * Add initial support for a "pick your IdP" page (#9017)Richard van der Hoff2021-01-051-0/+27
| | | | | | | | | | During login, if there are multiple IdPs enabled, offer the user a choice of IdPs.
* | Merge commit '9999eb2d0' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-211-1/+1
|\|
| * Update the value of group_creation_prefix in sample config. (#8992)Jerin J Titus2020-12-291-1/+1
| | | | | | Removes the trailing slash with causes issues with matrix.to/Element.
* | Merge commit '4218473f9' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-211-0/+22
|\|
| * Send the location of the web client to the IS when inviting via 3PIDs. (#8930)Patrick Cloke2020-12-181-0/+22
| | | | | | | | Adds a new setting `email.invite_client_location` which, if defined, is passed to the identity server during invites.
* | Merge commit '28877fade' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-214-12/+31
|\|
| * Implement a username picker for synapse (#8942)Richard van der Hoff2020-12-181-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Allow re-using a UI auth validation for a period of time (#8970)Patrick Cloke2020-12-183-7/+27
| |
* | Merge commit 'ff5c4da12' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-202-12/+12
|\|
| * Fix the sample config location for the ip_range_whitelist setting. (#8954)Patrick Cloke2020-12-162-12/+12
| | | | | | | | Move it from the federation section to the server section to match ip_range_blacklist.
* | Merge commit '01333681b' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-161-1/+1
|\|
| * Various clean-ups to the logging context code (#8935)Patrick Cloke2020-12-141-1/+1
| |
* | Merge commit 'c64002e1c' into anoa/dinsic_release_1_31_0Andrew Morgan2021-04-163-61/+98
|\|
| * Default to blacklisting reserved IP ranges and add a whitelist. (#8870)Patrick Cloke2020-12-093-61/+98
| | | | | | | | This defaults `ip_range_blacklist` to reserved IP ranges and also adds an `ip_range_whitelist` setting to override it.
* | Merge commit 'cf7d3c90d' into dinsicAndrew Morgan2021-04-1613-35/+73
|\|
| * Better formatting for config errors from modules (#8874)Richard van der Hoff2020-12-0810-27/+59
| | | | | | | | | | | | | | | | | | | | The idea is that the parse_config method of extension modules can raise either a ConfigError or a JsonValidationError, and it will be magically turned into a legible error message. There's a few components to it: * Separating the "path" and the "message" parts of a ConfigError, so that we can fiddle with the path bit to turn it into an absolute path. * Generally improving the way ConfigErrors get printed. * Passing in the config path to load_module so that it can wrap any exceptions that get caught appropriately.
| * Clarify config template comments (#8891)Richard van der Hoff2020-12-082-8/+4
| |
| * Add authentication to replication endpoints. (#8853)Patrick Cloke2020-12-041-0/+10
| | | | | | | | Authentication is done by checking a shared secret provided in the Synapse configuration file.
| * Apply an IP range blacklist to push and key revocation requests. (#8821)Patrick Cloke2020-12-021-15/+25
| | | | | | | | | | | | | | | | | | | | | | | | 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-221-15/+25
| | | | | | | | | | | | | | 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.
* | Change knock room version to v7 (#88)Andrew Morgan2021-03-181-3/+1
| |
* | Add a config option to prioritise local users in user directory search ↵Andrew Morgan2021-02-191-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Add knocking support (#81)Andrew Morgan2021-02-094-9/+53
| | | | | | | | | | | | | | | | | | Implement knocking as defined by https://github.com/matrix-org/matrix-doc/pull/2403 This is the base knocking stuff, taken from https://github.com/matrix-org/synapse/pull/6739 and does not include any public room directory changes. While knocking hasn't merged yet on mainline due to waiting on getting Complement into Synapse's CI, the code has been well-tested.
* | Ensure we read account validity templates from custom template dir if ↵Andrew Morgan2021-01-191-1/+4
| | | | | | | | provided (#77)
* | Merge commit '09ac0569f' into anoa/dinsic_release_1_23_1Andrew Morgan2020-12-311-0/+13
|\|
| * Add a config option to change whether unread push notification counts are ↵Andrew Morgan2020-11-301-0/+13
| | | | | | | | | | | | | | | | per-message or per-room (#8820) This PR adds a new config option to the `push` section of the homeserver config, `group_unread_count_by_room`. By default Synapse will group push notifications by room (so if you have 1000 unread messages, if they lie in 55 rooms, you'll see an unread count on your phone of 55). However, it is also useful to be able to send out the true count of unread messages if desired. If `group_unread_count_by_room` is set to `false`, then with the above example, one would see an unread count of 1000 (email anyone?).
* | Merge commit '7c4344747' into anoa/dinsic_release_1_23_1Andrew Morgan2020-12-311-15/+20
|\|
| * Fix the formatting of push config section (#8818)Andrew Morgan2020-11-251-15/+20
| | | | | | This PR updates the push config's formatting to better align with our [code style guidelines](https://github.com/matrix-org/synapse/blob/develop/docs/code_style.md#configuration-file-format).
* | Merge commit '8ca120df7' into anoa/dinsic_release_1_23_1Andrew Morgan2020-12-311-0/+10
|\|
| * SAML: Allow specifying the IdP entityid to use. (#8630)Ben Banfield-Zanin2020-11-191-0/+10
| | | | | | | | If the SAML metadata includes multiple IdPs it is necessary to specify which IdP to redirect users to for authentication.
* | Merge commit '03e392f78' into anoa/dinsic_release_1_23_1Andrew Morgan2020-12-311-0/+6
|\|
| * SAML: Document allowing a clock/time difference from IdP (#8731)Marcus Schopen2020-11-181-0/+6
| | | | | | | | Updates the sample configuration with the pysaml2 configuration for accepting clock skew/drift between the homeserver and IdP.
* | Merge commit 'f12589547' into anoa/dinsic_release_1_23_1Andrew Morgan2020-12-311-2/+3
|\|
| * Clarify the usecase for an msisdn delegate (#8734)Adrian Wannenmacher2020-11-141-2/+3
| | | | | | Signed-off-by: Adrian Wannenmacher <tfld@tfld.dev>
* | Merge commit '4a54b821b' into anoa/dinsic_release_1_23_1Andrew Morgan2020-12-311-0/+22
|\|
| * SAML: add <mdui:UIInfo> element examples (#8718)Marcus Schopen2020-11-131-0/+22
| | | | | | add some mdui:UIInfo element examples for saml2_config in homeserver.yaml
* | Merge commit 'f27a78969' into anoa/dinsic_release_1_23_1Andrew Morgan2020-12-313-54/+80
|\|
| * Improve the sample config for SSO (OIDC, SAML, and CAS). (#8635)Patrick Cloke2020-10-303-54/+80
| |
* | Merge commit 'ef2d62701' into anoa/dinsic_release_1_23_1Andrew Morgan2020-12-311-48/+48
|\|
| * Support generating structured logs in addition to standard logs. (#8607)Patrick Cloke2020-10-291-48/+48
| | | | | | | | | | | | | | This modifies the configuration of structured logging to be usable from the standard Python logging configuration. This also separates the formatting of logs from the transport allowing JSON logs to files or standard logs to sockets.
* | Merge commit '2b7c18087' into anoa/dinsic_release_1_23_1Andrew Morgan2020-12-315-5/+5
|\|
| * Fix typos and spelling errors. (#8639)Patrick Cloke2020-10-235-5/+5
| |
* | Merge commit '3ee17585c' into dinsicAndrew Morgan2020-12-311-0/+3
|\|
| * Send some ephemeral events to appservices (#8437)Will Hunt2020-10-151-0/+3
| | | | | | Optionally sends typing, presence, and read receipt information to appservices.
* | Merge commit '74976a8e4' into dinsicAndrew Morgan2020-12-315-12/+39
|\|
| * Increase default max_upload_size from 10M to 50M (#8502)Mateusz Przybyłowicz2020-10-091-2/+2
| | | | | | Signed-off-by: Mateusz Przybyłowicz <uamfhq@gmail.com>
| * Update default room version to 6 (#8461)Richard van der Hoff2020-10-051-1/+1
| | | | | | | | Per https://github.com/matrix-org/matrix-doc/pull/2788
| * Allow background tasks to be run on a separate worker. (#8369)Patrick Cloke2020-10-021-0/+18
| |
| * Merge tag 'v1.21.0rc2' into developRichard van der Hoff2020-10-024-6/+15
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Synapse 1.21.0rc2 (2020-10-02) ============================== Features -------- - Convert additional templates from inline HTML to Jinja2 templates. ([\#8444](https://github.com/matrix-org/synapse/issues/8444)) Bugfixes -------- - Fix a regression in v1.21.0rc1 which broke thumbnails of remote media. ([\#8438](https://github.com/matrix-org/synapse/issues/8438)) - Do not expose the experimental `uk.half-shot.msc2778.login.application_service` flow in the login API, which caused a compatibility problem with Element iOS. ([\#8440](https://github.com/matrix-org/synapse/issues/8440)) - Fix malformed log line in new federation "catch up" logic. ([\#8442](https://github.com/matrix-org/synapse/issues/8442)) - Fix DB query on startup for negative streams which caused long start up times. Introduced in [\#8374](https://github.com/matrix-org/synapse/issues/8374). ([\#8447](https://github.com/matrix-org/synapse/issues/8447))
| * | Add config option for always using "userinfo endpoint" for OIDC (#7658)BBBSnowball2020-10-011-0/+9
| | | | | | | | | This allows for connecting to certain IdPs, e.g. GitLab.
| * | Enable mypy checking for unreachable code and fix instances. (#8432)Patrick Cloke2020-10-011-9/+9
| | |
* | | Allow users to click account renewal links multiple times without hitting an ↵Andrew Morgan2020-12-305-130/+151
| | | | | | | | | | | | 'Invalid Token' page (#74)
* | | Merge commit '6a8fd03ac' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-214-6/+15
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '6a8fd03ac': 1.21.0rc2 1.21.0rc2 Fix bug in remote thumbnail search (#8438) Fix DB query on startup for negative streams. (#8447) Convert additional templates to Jinja (#8444) Fix malformed log line in new federation "catch up" logic (#8442) Do not expose the experimental appservice login flow to clients. (#8440) update changelog fix a logging error in thumbnailer (#8435) changelog fixes fix version number
| * | Convert additional templates to Jinja (#8444)Patrick Cloke2020-10-024-6/+15
| |/ | | | | This converts a few more of our inline HTML templates to Jinja. This is somewhat part of #7280 and should make it a bit easier to customize these in the future.
* | Merge commit 'cc40a59b4' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-215-5/+38
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * Add prometheus metrics to track federation delays (#8430)Richard van der Hoff2020-10-014-5/+30
| | | | | | | | | | Add a pair of federation metrics to track the delays in sending PDUs to/from particular servers.
| * Allow additional SSO properties to be passed to the client (#8413)Patrick Cloke2020-09-301-0/+8
| |
* | Merge commit '8238b55e0' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-211-4/+17
|\| | | | | | | | | | | | | | | * commit '8238b55e0': Update description of server_name config option (#8415) Discard an empty upload_name before persisting an uploaded file (#7905) Don't table scan events on worker startup (#8419) Mypy fixes for `synapse.handlers.federation` (#8422)
| * Update description of server_name config option (#8415)Aaron Raimist2020-09-291-4/+17
| |
* | Merge commit '31acc5c30' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-212-6/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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/+6
| | | | | | | | | | | | | | 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 branch 'master' into developAndrew Morgan2020-09-241-2/+8
| |\
* | \ Merge commit '920dd1083' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-212-2/+14
|\ \ \ | | |/ | |/| | | | | | | | | | | | | * commit '920dd1083': 1.20.1 Mark the shadow_banned column as boolean in synapse_port_db. (#8386) Hotfix: disable autoescape by default when rendering Jinja2 templates (#8394)
| * | Hotfix: disable autoescape by default when rendering Jinja2 templates (#8394)Andrew Morgan2020-09-242-3/+11
| | | | | | | | | | | | | | | #8037 changed the default `autoescape` option when rendering Jinja2 templates from `False` to `True`. This caused some bugs, noticeably around redirect URLs being escaped in SAML2 auth confirmation templates, causing those URLs to break for users. This change returns the previous behaviour as it stood. We may want to look at each template individually and see whether autoescaping is a good idea at some point, but for now lets just fix the breakage.
* | | Merge commit '4325be1a5' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-213-3/+3
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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)
| * | Simplify super() calls to Python 3 syntax. (#8344)Patrick Cloke2020-09-183-3/+3
| | | | | | | | | | | | | | | | | | | | | 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-206-46/+50
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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)
| * | Remove obsolete __future__ imports (#8337)Jonathan de Jong2020-09-172-3/+0
| | |
| * | Improve SAML error messages (#8248)Patrick Cloke2020-09-141-30/+4
| | |
| * | Add experimental support for sharding event persister. Again. (#8294)Erik Johnston2020-09-143-13/+46
| | | | | | | | | | | | | | | | | | This is *not* ready for production yet. Caveats: 1. We should write some tests... 2. The stream token that we use for events can get stalled at the minimum position of all writers. This means that new events may not be processed and e.g. sent down sync streams if a writer isn't writing or is slow.
* | | Merge commit 'a3a90ee03' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-201-3/+9
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * | Show a confirmation page during user password reset (#8004)Andrew Morgan2020-09-101-3/+9
| | | | | | | | | | | | | | | This PR adds a confirmation step to resetting your user password between clicking the link in your email and your password actually being reset. This is to better align our password reset flow with the industry standard of requiring a confirmation from the user after email validation.
| * | Add a config option for validating 'next_link' parameters against a domain ↵Andrew Morgan2020-09-081-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | whitelist (#8275) This is a config option ported over from DINUM's Sydent: https://github.com/matrix-org/sydent/pull/285 They've switched to validating 3PIDs via Synapse rather than Sydent, and would like to retain this functionality. This original purpose for this change is phishing prevention. This solution could also potentially be replaced by a similar one to https://github.com/matrix-org/synapse/pull/8004, but across all `*/submit_token` endpoint. This option may still be useful to enterprise even with that safeguard in place though, if they want to be absolutely sure that their employees don't follow links to other domains.
* | | Merge commit '77794ebc7' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-201-2/+23
|\| | | | | | | | | | | | | | * commit '77794ebc7': Fix stack overflow when logging system encounters an error (#8268)
| * | Fix stack overflow when logging system encounters an error (#8268)Richard van der Hoff2020-09-071-2/+23
| |/
* | Merge commit '77b4711bc' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-201-1/+1
|\| | | | | | | | | | | | | * commit '77b4711bc': Add cross-signing sigs to the `keys` object (#8234) Unread counts fixes (#8254) Fix a regression from calling read_templates. (#8252)
| * Fix a regression from calling read_templates. (#8252)Patrick Cloke2020-09-041-1/+1
| | | | | | Regressed in #8037.
* | Merge commit '17fa4c7ca' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-208-10/+10
|\| | | | | | | | | | | | | | | * 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-048-10/+10
| |
* | Merge commit '9f8abdcc3' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-203-46/+13
|\| | | | | | | | | * commit '9f8abdcc3': Revert "Add experimental support for sharding event persister. (#8170)" (#8242)
| * Revert "Add experimental support for sharding event persister. (#8170)" (#8242)Brendan Abolivier2020-09-043-46/+13
| | | | | | | | | | | | | | * Revert "Add experimental support for sharding event persister. (#8170)" This reverts commit 82c1ee1c22a87b9e6e3179947014b0f11c0a1ac3. * Changelog
* | Merge commit '0d4f614fd' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-203-13/+46
|\| | | | | | | | | | | | | | | | | * 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)
| * Add experimental support for sharding event persister. (#8170)Erik Johnston2020-09-023-13/+46
| | | | | | | | | | | | This is *not* ready for production yet. Caveats: 1. We should write some tests... 2. The stream token that we use for events can get stalled at the minimum position of all writers. This means that new events may not be processed and e.g. sent down sync streams if a writer isn't writing or is slow.
* | Merge commit '56efa9ec7' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-201-8/+14
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 capping a room's retention policy (#8104)Brendan Abolivier2020-08-241-8/+14
| |
* | Merge commit '8b6c176ae' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-191-20/+0
|\| | | | | | | | | * commit '8b6c176ae': Add resources.consent conditional dependency back (#8107)
| * Add resources.consent conditional dependency back (#8107)Andrew Morgan2020-08-181-20/+0
| | | | | | Turns out that part of the codebase (synapse.config.server) checks for this key explicitly. Remove that check.
* | Merge commit 'e04e465b4' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-194-105/+191
|\| | | | | | | | | | | | | | | | | | | * 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)
| * Use the default templates when a custom template file cannot be found (#8037)Andrew Morgan2020-08-174-105/+191
| | | | | | Fixes https://github.com/matrix-org/synapse/issues/6583
* | Merge commit '61d8ff0d4' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-191-8/+16
|\| | | | | | | | | | | | | * commit '61d8ff0d4': Update changelog.d/8051.misc Newsfile Move setting of Filter into code.
| * Move setting of Filter into code.Erik Johnston2020-08-111-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We do this to prevent foot guns. The default config uses a MemoryFilter, but users are free to change to logging to files directly. If they do then they have to ensure to set the `filters: [context]` on the right handler, otherwise records get written with the wrong context. Instead we move the logic to happen when we generate a record, which is when we *log* rather than *handle*. (It's possible to add filters to loggers in the config, however they don't apply to descendant loggers and so they have to be manually set on *every* logger used in the code base)
* | Merge commit 'db131b6b2' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-193-5/+135
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'db131b6b2': Change the default log config to reduce disk I/O and storage (#8040) Implement login blocking based on SAML attributes (#8052) Add an assertion on prev_events in create_new_client_event (#8041) Typo Lint why mypy why Lint Incorporate review Incorporate review Fix PUT /pushrules to use the right rule IDs Back out the database hack and replace it with a temporary config setting Fix cache name Fix cache invalidation calls Lint Changelog Implement new experimental push rules with a database hack to enable them
| * Change the default log config to reduce disk I/O and storage (#8040)Erik Johnston2020-08-111-5/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Change default log config to buffer by default. This batches up writes to the filesystem, which is more efficient for disk I/O. This means that it can take some time for logs to get written to disk. Note that ERROR logs (and above) immediately flush the buffer. This only effects new installs, as we only write the log config if started with `--generate-config` (in the same way we do for generating signing keys). * Default to keeping last 4 days of logs. This hopefully reduces the amount of logs kept for new servers. Keeping the last 1GB of logs is likely overkill for new servers, but equally may not be enough for busy ones. Instead, we keep the last four days worth of logs, enough so that admins can investigate any problems that happened over e.g. a long weekend.
| * Implement login blocking based on SAML attributes (#8052)Richard van der Hoff2020-08-112-0/+99
| | | | | | | | | | | | | | Hopefully this mostly speaks for itself. I also did a bit of cleaning up of the error handling. Fixes #8047
| * TypoBrendan Abolivier2020-08-101-1/+1
| |
| * LintBrendan Abolivier2020-08-101-2/+2
| |
| * why mypy whyBrendan Abolivier2020-08-101-1/+3
| |
| * LintBrendan Abolivier2020-08-061-1/+1
| |
| * Incorporate reviewBrendan Abolivier2020-08-061-2/+2
| |
| * Merge branch 'develop' of github.com:matrix-org/synapse into ↵Brendan Abolivier2020-08-062-1/+25
| |\ | | | | | | | | | babolivier/new_push_rules
| * | Incorporate reviewBrendan Abolivier2020-08-061-0/+3
| | |
| * | Back out the database hack and replace it with a temporary config settingBrendan Abolivier2020-08-031-0/+10
| | |
* | | Merge commit 'a7bdf98d0' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-161-1/+4
|\ \ \ | | |/ | |/| | | | | | | * commit 'a7bdf98d0': Rename database classes to make some sense (#8033)
| * | Rename database classes to make some sense (#8033)Erik Johnston2020-08-051-1/+4
| | |
* | | Merge commit '394be6a0e' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-161-0/+21
|\| | | | | | | | | | | | | | | | | | | | * commit '394be6a0e': Newsfile Add ratelimiting on joins Add docs for undoing room shutdowns (#7998)
| * | Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2020-07-312-18/+7
| |\| | | | | | | | | | erikj/add_rate_limiting_to_joins
| | * Merge branch 'master' into developOlivier Wilkinson (reivilibre)2020-07-305-15/+73
| | |\
| * | | Add ratelimiting on joinsErik Johnston2020-07-311-0/+21
| | |/ | |/|
* | | Merge commit '3950ae51e' into anoa/dinsic_release_1_21_xAndrew Morgan2020-10-162-18/+7
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '3950ae51e': Ensure that remove_pusher is always async (#7981) Ensure the msg property of HttpResponseException is a string. (#7979) Remove from the event_relations table when purging historical events. (#7978) Add additional logging for SAML sessions. (#7971) Add MSC reference to changelog for #7736 Re-implement unread counts (#7736) Various improvements to the docs (#7899) Convert storage layer to async/await. (#7963) Add an option to disable purge in delete room admin API (#7964) Move some log lines from default logger to sql/transaction loggers (#7952) Use the JSON module from the std library instead of simplejson. (#7936) Fix exit code for `check_line_terminators.sh` (#7970) Option to allow server admins to join complex rooms (#7902) Fix typo in metrics docs (#7966) Add script for finding files with unix line terminators (#7965) Convert the remaining media repo code to async / await. (#7947) Convert a synapse.events to async/await. (#7949) Convert groups and visibility code to async / await. (#7951) Convert push to async/await. (#7948)
| * | Various improvements to the docs (#7899)Aaron Raimist2020-07-291-18/+0
| | |
| * | Option to allow server admins to join complex rooms (#7902)lugino-emeritus2020-07-281-0/+7
| | | | | | | | | | | | | | | Fixes #7901. Signed-off-by: Niklas Tittjung <nik_t.01@web.de>
* | | Add a config option for validating 'next_link' parameters against a domain ↵Andrew Morgan2020-09-091-1/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | whitelist (#8275) This is a config option ported over from DINUM's Sydent: https://github.com/matrix-org/sydent/pull/285 They've switched to validating 3PIDs via Synapse rather than Sydent, and would like to retain this functionality. This original purpose for this change is phishing prevention. This solution could also potentially be replaced by a similar one to https://github.com/matrix-org/synapse/pull/8004, but across all `*/submit_token` endpoint. This option may still be useful to enterprise even with that safeguard in place though, if they want to be absolutely sure that their employees don't follow links to other domains.
* | | Merge commit 'a9631b7b4' into anoa/dinsic_release_1_18_xAndrew Morgan2020-08-035-15/+73
|\ \ \ | | |/ | |/| | | | | | | | | | * commit 'a9631b7b4': 1.18.0 Update worker docs with recent enhancements (#7969)
| * | Update worker docs with recent enhancements (#7969)Erik Johnston2020-07-295-15/+73
| |/
* | Merge commit 'de119063f' into anoa/dinsic_release_1_18_xAndrew Morgan2020-08-037-50/+64
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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) ...
| * Fix a typo in the sample config. (#7890)Adrian2020-07-201-1/+1
| |
| * Change sample config's postgres user to synapse_user (#7889)Andrew Morgan2020-07-201-1/+1
| | | | | | | | | | | | | | The [postgres setup docs](https://github.com/matrix-org/synapse/blob/develop/docs/postgres.md#set-up-database) recommend setting up your database with user `synapse_user`. However, uncommenting the postgres defaults in the sample config leave you with user `synapse`. This PR switches the sample config to recommend `synapse_user`. Took a me a second to figure this out, so assume this will beneficial to others.
| * Add a default limit (of 100) to get/sync operations. (#7858)Patrick Cloke2020-07-171-2/+4
| |
| * Allow moving typing off master (#7869)Erik Johnston2020-07-161-9/+10
| |
| * Add ability to run multiple pusher instances (#7855)Erik Johnston2020-07-164-37/+48
| | | | | | This reuses the same scheme as federation sender sharding
* | Merge commit '85223106f' into anoa/dinsic_release_1_18_xAndrew Morgan2020-08-031-6/+112
|\| | | | | | | | | * commit '85223106f': Allow email subjects to be customised through Synapse's configuration (#7846)
| * Allow email subjects to be customised through Synapse's configuration (#7846)Brendan Abolivier2020-07-141-6/+112
| |
* | Merge commit '77d2c0541' into anoa/dinsic_release_1_18_xAndrew Morgan2020-08-031-0/+28
|\| | | | | | | | | * commit '77d2c0541': Add the option to validate the `iss` and `aud` claims for JWT logins. (#7827)
| * Add the option to validate the `iss` and `aud` claims for JWT logins. (#7827)Patrick Cloke2020-07-141-0/+28
| |
* | Merge commit '504c8f348' into anoa/dinsic_release_1_18_xAndrew Morgan2020-08-031-1/+6
|\| | | | | | | | | | | * commit '504c8f348': Fix handling of "off" in encryption_enabled_by_default_for_room_type (#7822) Update grafana dashboard
| * Fix handling of "off" in encryption_enabled_by_default_for_room_type (#7822)Brendan Abolivier2020-07-131-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes https://github.com/matrix-org/synapse/issues/7821, introduced in https://github.com/matrix-org/synapse/pull/7639 Turns out PyYAML translates `off` into a `False` boolean if it's unquoted (see https://stackoverflow.com/questions/36463531/pyyaml-automatically-converting-certain-keys-to-boolean-values), which seems to be a liberal interpretation of this bit of the YAML spec: https://yaml.org/spec/1.1/current.html#id864510 An alternative fix would be to implement the solution mentioned in the SO post linked above, but I'm aware it might break existing setups (which might use these values in the configuration file) so it's probably better just to add an extra check for this one. We should be aware that this is a thing for the next times we do that though. I didn't find any other occurrence of this bug elsewhere in the codebase.
* | Merge commit 'f299441cc' into anoa/dinsic_release_1_18_xAndrew Morgan2020-08-033-66/+132
|\| | | | | | | | | * commit 'f299441cc': Add ability to shard the federation sender (#7798)
| * Add ability to shard the federation sender (#7798)Erik Johnston2020-07-103-66/+132
| |
* | Merge commit '43726783e' into dinsicAndrew Morgan2020-08-033-7/+34
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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) ...
| * Fix some spelling mistakes / typos. (#7811)Patrick Cloke2020-07-091-1/+1
| |
| * Add documentation for JWT login type and improve sample config. (#7776)Patrick Cloke2020-07-061-4/+31
| |
| * isort 5 compatibility (#7786)Will Hunt2020-07-052-2/+2
| | | | | | 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-3/+103
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-3/+103
| |
* | Merge commit 'b44bdd7f7' into dinsicAndrew Morgan2020-08-031-0/+6
|\| | | | | | | | | * commit 'b44bdd7f7': Support running multiple media repos. (#7706)
| * Support running multiple media repos. (#7706)Erik Johnston2020-06-171-0/+6
| | | | | | | | | | This requires a new config option to specify which media repo should be responsible for running background jobs to e.g. clear out expired URL preview caches.
* | Merge commit 'e452973fd' into dinsicAndrew Morgan2020-08-031-1/+1
|\| | | | | | | | | * commit 'e452973fd': fix broken link in sample config (#7712)
| * fix broken link in sample config (#7712)Richard van der Hoff2020-06-161-1/+1
| |
* | Merge commit 'a3f11567d' into dinsicAndrew Morgan2020-08-033-16/+7
|\| | | | | | | | | * commit 'a3f11567d': Replace all remaining six usage with native Python 3 equivalents (#7704)
| * Replace all remaining six usage with native Python 3 equivalents (#7704)Dagfinn Ilmari Mannsåker2020-06-163-16/+7
| |
* | Merge commit '03619324f' into dinsicAndrew Morgan2020-08-036-110/+257
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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)
| * Create a ListenerConfig object (#7681)Richard van der Hoff2020-06-162-102/+157
| | | | | | | | | | | | | | | | | | | | This ended up being a bit more invasive than I'd hoped for (not helped by generic_worker duplicating some of the code from homeserver), but hopefully it's an improvement. The idea is that, rather than storing unstructured `dict`s in the config for the listener configurations, we instead parse it into a structured `ListenerConfig` object.
| * Increase the default SAML session expirary time to 15 minutes. (#7664)Patrick Cloke2020-06-111-2/+2
| |
| * fix typo in sample_config.yaml (#7652)wondratsch2020-06-111-1/+1
| | | | | | | | | | Just a simple typo fix. Signed-off-by: wondratsch 28294257+wondratsch@users.noreply.github.com
| * Take out a lock before modifying _CACHES (#7663)Richard van der Hoff2020-06-101-5/+15
| | | | | | | | This should fix #7610.
| * Add option to enable encryption by default for new rooms (#7639)Andrew Morgan2020-06-102-0/+82
| | | | | | | | | | | | | | | | | | 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-0/+35
| | | | | | | | | | 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-246-82/+134
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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) ...
| * Add an option to disable autojoin for guest accounts (#6637)Travis Ralston2020-06-051-0/+8
| | | | | | | | Fixes https://github.com/matrix-org/synapse/issues/3177
| * Add support for webp thumbnailing (#7586)WGH2020-06-051-0/+1
| | | | | | | | | | Closes #4382 Signed-off-by: Maxim Plotnikov <wgh@torlan.ru>
| * Performance improvements and refactor of Ratelimiter (#7595)Andrew Morgan2020-06-051-1/+7
| | | | | | | | | | | | | | | | | | | | 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.