summary refs log tree commit diff
path: root/synapse/config (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Opentracing Documentation (#5703)Jorik Schellekens2019-07-221-12/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Opentracing survival guide * Update decorator names in doc * Doc cleanup These are all alterations as a result of comments in #5703, it includes mostly typos and clarifications. The most interesting changes are: - Split developer and user docs into two sections - Add a high level description of OpenTracing * newsfile * Move contributer specific info to docstring. * Sample config. * Trailing whitespace. * Update 5703.misc * Apply suggestions from code review Mostly just rewording parts of the docs for clarity. Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* enable aggregations support by defaultNeil Johnson2019-07-181-1/+1
|
* Clean up opentracing configuration options (#5712)Richard van der Hoff2019-07-181-22/+41
| | | | | | | | | | | | | | | | | Clean up config settings and dead code. This is mostly about cleaning up the config format, to bring it into line with our conventions. In particular: * There should be a blank line after `## Section ##' headings * There should be a blank line between each config setting * There should be a `#`-only line between a comment and the setting it describes * We don't really do the `# #` style commenting-out of whole sections if we can help it * rename `tracer_enabled` to `enabled` While we're here, do more config parsing upfront, which makes it easier to use later on. Also removes redundant code from LogContextScopeManager. Also changes the changelog fragment to a `feature` - it's exciting!
* Clean up arg name and remove lying commentErik Johnston2019-07-161-7/+5
|
* Fix invoking add_argument from homeserver.pyErik Johnston2019-07-151-1/+1
|
* Merge branch 'develop' of github.com:matrix-org/synapse into erikj/admin_api_cmdErik Johnston2019-07-157-19/+114
|\
| * Implement access token expiry (#5660)Richard van der Hoff2019-07-121-0/+16
| | | | | | | | Record how long an access token is valid for, and raise a soft-logout once it expires.
| * Add basic opentracing support (#5544)Jorik Schellekens2019-07-112-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Configure and initialise tracer Includes config options for the tracer and sets up JaegerClient. * Scope manager using LogContexts We piggy-back our tracer scopes by using log context. The current log context gives us the current scope. If new scope is created we create a stack of scopes in the context. * jaeger is a dependency now * Carrier inject and extraction for Twisted Headers * Trace federation requests on the way in and out. The span is created in _started_processing and closed in _finished_processing because we need a meaningful log context. * Create logcontext for new scope. Instead of having a stack of scopes in a logcontext we create a new context for a new scope if the current logcontext already has a scope. * Remove scope from logcontext if logcontext is top level * Disable tracer if not configured * typo * Remove dependence on jaeger internals * bools * Set service name * :Explicitely state that the tracer is disabled * Black is the new black * Newsfile * Code style * Use the new config setup. * Generate config. * Copyright * Rename config to opentracing * Remove user whitelisting * Empty whitelist by default * User ConfigError instead of RuntimeError * Use isinstance * Use tag constants for opentracing. * Remove debug comment and no need to explicitely record error * Two errors a "s(c)entry" * Docstrings! * Remove debugging brainslip * Homeserver Whitlisting * Better opentracing config comment * linting * Inclue worker name in service_name * Make opentracing an optional dependency * Neater config retreival * Clean up dummy tags * Instantiate tracing as object instead of global class * Inlcude opentracing as a homeserver member. * Thread opentracing to the request level * Reference opetnracing through hs * Instantiate dummy opentracin g for tests. * About to revert, just keeping the unfinished changes just in case * Revert back to global state, commit number: 9ce4a3d9067bf9889b86c360c05ac88618b85c4f * Use class level methods in tracerutils * Start and stop requests spans in a place where we have access to the authenticated entity * Seen it, isort it * Make sure to close the active span. * I'm getting black and blue from this. * Logger formatting Co-Authored-By: Erik Johnston <erik@matrix.org> * Outdated comment * Import opentracing at the top * Return a contextmanager * Start tracing client requests from the servlet * Return noop context manager if not tracing * Explicitely say that these are federation requests * Include servlet name in client requests * Use context manager * Move opentracing to logging/ * Seen it, isort it again! * Ignore twisted return exceptions on context exit * Escape the scope * Scopes should be entered to make them useful. * Nicer decorator names * Just one init, init? * Don't need to close something that isn't open * Docs make you smarter
| * Remove support for invite_3pid_guest. (#5625)Richard van der Hoff2019-07-051-3/+2
| | | | | | | | | | | | | | | | | | This has never been documented, and I'm not sure it's ever been used outside sytest. It's quite a lot of poorly-maintained code, so I'd like to get rid of it. For now I haven't removed the database table; I suggest we leave that for a future clearout.
| * Fixes to the federation rate limiter (#5621)Richard van der Hoff2019-07-051-2/+2
| | | | | | | | | | | | | | - Put the default window_size back to 1000ms (broken by #5181) - Make the `rc_federation` config actually do something - fix an off-by-one error in the 'concurrent' limit - Avoid creating an unused `_PerHostRatelimiter` object for every single incoming request
| * Make errors about email password resets much clearer (#5616)Andrew Morgan2019-07-051-11/+8
| | | | | | The runtime errors that dealt with local email password resets talked about config options that users may not even have in their config file yet (if upgrading). Instead, the cryptic errors are now replaced with hopefully much more helpful ones.
| * Move logging utilities out of the side drawer of util/ and into logging/ (#5606)Amber Brown2019-07-041-2/+2
| |
| * Merge branch 'develop' into rav/saml2_clientRichard van der Hoff2019-07-013-2/+47
| |\
| * | cleanupsRichard van der Hoff2019-06-271-6/+13
| | |
| * | Add support for tracking SAML2 sessions.Richard van der Hoff2019-06-261-1/+19
| | | | | | | | | | | | This allows us to correctly handle `allow_unsolicited: False`.
| * | Merge branch 'develop' into rav/saml2_clientRichard van der Hoff2019-06-2631-620/+704
| |\ \
| * | | Code cleanups and simplifications.Richard van der Hoff2019-06-111-1/+6
| | | | | | | | | | | | | | | | Also: share the saml client between redirect and response handlers.
| * | | Merge remote-tracking branch 'origin/develop' into rav/saml2_clientRichard van der Hoff2019-06-104-99/+422
| |\ \ \
| * | | | SAML2 Improvements and redirect stuffAlexander Trost2019-06-021-0/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Alexander Trost <galexrt@googlemail.com>
* | | | | Move creation of ArgumentParser to callerErik Johnston2019-07-151-10/+5
| | | | |
* | | | | Fix up commentsErik Johnston2019-07-151-1/+1
| | | | |
* | | | | Change add_arguments to be a static methodErik Johnston2019-07-155-5/+39
| | | | |
* | | | | Add basic admin cmd appErik Johnston2019-07-021-3/+45
| |_|_|/ |/| | |
* | | | Update the TLS cipher string and provide configurability for TLS on outgoing ↵Amber Brown2019-06-281-1/+31
| | | | | | | | | | | | | | | | federation (#5550)
* | | | Added possibilty to disable local password authentication (#5092)Daniel Hoffend2019-06-271-0/+7
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Daniel Hoffend <dh@dotlan.net>
* | | | Make it clearer that the template dir is relative to synapse's root dir (#5543)Andrew Morgan2019-06-271-1/+9
| |_|/ |/| | | | | Helps address #5444
* | | Merge pull request #5524 from matrix-org/rav/new_cmdline_optionsRichard van der Hoff2019-06-242-5/+41
|\ \ \ | | | | | | | | Add --data-dir and --open-private-ports options.
| * | | Add "--open-private-ports" cmdline optionRichard van der Hoff2019-06-242-5/+26
| | | | | | | | | | | | | | | | This is helpful when generating a config file for running synapse under docker.
| * | | Add --data-directory commandline argumentRichard van der Hoff2019-06-241-0/+15
| | | | | | | | | | | | | | | | We don't necessarily want to put the data in the cwd.
* | | | Merge pull request #5523 from matrix-org/rav/arg_defaultsRichard van der Hoff2019-06-2429-107/+87
|\| | | | | | | | | | | Stop conflating generated config and default config
| * | | Don't load the generated config as the default.Richard van der Hoff2019-06-2429-94/+60
| | | | | | | | | | | | | | | | It's too confusing.
| * | | Ensure that all config options have sensible defaultsRichard van der Hoff2019-06-244-13/+27
| | | | | | | | | | | | | | | | | | | | This will enable us to skip the unintuitive behaviour where the generated config and default config are the same thing.
* | | | Merge pull request #5534 from matrix-org/babolivier/federation-publicroomsBrendan Abolivier2019-06-241-10/+34
|\ \ \ \ | |/ / / |/| | | Split public rooms directory auth config in two
| * | | Split public rooms directory auth config in twoBrendan Abolivier2019-06-241-10/+34
| | | |
* | | | Remove unused Config.config_dir_path attributeRichard van der Hoff2019-06-241-3/+0
| | | | | | | | | | | | | | | | This is no longer used and only serves to confuse.
* | | | Allow configuration of the path used for ACME account keys.Richard van der Hoff2019-06-241-2/+14
|/ / / | | | | | | | | | | | | Because sticking it in the same place as the config isn't necessarily the right thing to do.
* | | Pass config_dir_path and data_dir_path into Config.read_config. (#5522)Richard van der Hoff2019-06-2430-63/+99
| | | | | | | | | | | | | | | | | | * Pull config_dir_path and data_dir_path calculation out of read_config_files * Pass config_dir_path and data_dir_path into read_config
* | | Drop support for cpu_affinity (#5525)Richard van der Hoff2019-06-222-25/+0
| | | | | | | | | This has no useful purpose on python3, and is generally a source of confusion.
* | | Improve help and cmdline option names for --generate-config options (#5512)Richard van der Hoff2019-06-211-22/+28
| | | | | | | | | | | | | | | | | | | | | * group the arguments together into a group * add new names "--generate-missing-config" and "--config-directory" for existing cmdline options "--generate-keys" and "--keys-dir", which better reflect their purposes.
* | | Refactor Config parser and add some comments. (#5511)Richard van der Hoff2019-06-211-14/+35
| | | | | | | | | | | | Add some comments, and simplify `read_config_files`.
* | | Improve logging when generating config files (#5510)Richard van der Hoff2019-06-213-1/+7
| | | | | | | | | Make it a bit clearer what's going on.
* | | Run Black. (#5482)Amber Brown2019-06-2022-427/+369
| | |
* | | Add experimental option to reduce extremities.Erik Johnston2019-06-181-0/+6
| | | | | | | | | | | | | | | | | | | | | Adds new config option `cleanup_extremities_with_dummy_events` which periodically sends dummy events to rooms with more than 10 extremities. THIS IS REALLY EXPERIMENTAL.
* | | Merge pull request #5440 from matrix-org/babolivier/third_party_event_rulesBrendan Abolivier2019-06-142-0/+44
|\ \ \ | | | | | | | | Allow server admins to define implementations of extra rules for allowing or denying incoming events
| * | | Add plugin APIs for implementations of custom event rules.Brendan Abolivier2019-06-142-0/+44
| | |/ | |/|
* / | Don't warn user about password reset disabling through config code (#5387)Andrew Morgan2019-06-111-6/+5
|/ / | | | | | | | | | | | | Moves the warning about password resets being disabled to the point where a user actually tries to reset their password. Is this an appropriate place for it to happen? Also removed the disabling of msisdn password resets when you don't have an email config, as that just doesn't make sense. Also change the error a user receives upon disabled passwords to specify that only email-based password reset is disabled.
* | Improve startup checks for insecure notary configs (#5392)Richard van der Hoff2019-06-101-4/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | It's not really a problem to trust notary responses signed by the old key so long as we are also doing TLS validation. This commit adds a check to the config parsing code at startup to check that we do not have the insecure matrix.org key without tls validation, and refuses to start without it. This allows us to remove the rather alarming-looking warning which happens at runtime.
* | Set default room version to v4. (#5379)Neil Johnson2019-06-061-1/+1
| | | | | | | | Set default room version to v4.
* | Add ability to perform password reset via email without trusting the ↵Andrew Morgan2019-06-061-15/+138
| | | | | | | | | | | | | | | | | | | | | | | | identity server (#5377) Sends password reset emails from the homeserver instead of proxying to the identity server. This is now the default behaviour for security reasons. If you wish to continue proxying password reset requests to the identity server you must now enable the email.trust_identity_server_for_password_resets option. This PR is a culmination of 3 smaller PRs which have each been separately reviewed: * #5308 * #5345 * #5368
* | Stop hardcoding trust of old matrix.org key (#5374)Richard van der Hoff2019-06-061-39/+189
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a few changes going on here: * We make checking the signature on a key server response optional: if no verify_keys are specified, we trust to TLS to validate the connection. * We change the default config so that it does not require responses to be signed by the old key. * We replace the old 'perspectives' config with 'trusted_key_servers', which is also formatted slightly differently. * We emit a warning to the logs every time we trust a key server response signed by the old key.
* | Merge branch 'rav/fix_custom_ca' into rav/enable_tls_verificationRichard van der Hoff2019-06-052-1/+17
|\ \
| * | Fix `federation_custom_ca_list` configuration option.Richard van der Hoff2019-06-051-1/+1
| | | | | | | | | | | | Previously, setting this option would cause an exception at startup.
| * | Neilj/mau tracking config explainer (#5284)Neil Johnson2019-06-051-0/+16
| | | | | | | | | | | | Improve documentation of monthly active user blocking and mau_trial_days
* | | Validate federation server TLS certificates by default.Richard van der Hoff2019-06-051-5/+5
|/ /
* | Merge pull request #5341 from matrix-org/babolivier/email_configBrendan Abolivier2019-06-041-42/+57
|\ \ | |/ |/| Make account validity renewal emails work when email notifs are disabled
| * Only parse from email if providedBrendan Abolivier2019-06-041-4/+5
| |
| * LintBrendan Abolivier2019-06-041-1/+0
| |
| * Make account validity renewal emails work when email notifs are disabledBrendan Abolivier2019-06-041-42/+57
| |
* | Merge pull request #5276 from matrix-org/babolivier/account_validity_job_deltaErik Johnston2019-05-311-1/+5
|\ \ | | | | | | Allow configuring a range for the account validity startup job
| * | Move delta from +10% to -10%Brendan Abolivier2019-05-311-1/+1
| | |
| * | Gah pythonBrendan Abolivier2019-05-311-1/+1
| | |
| * | Make max_delta equal to period * 10%Brendan Abolivier2019-05-311-11/+4
| | |
| * | Allow configuring a range for the account validity startup jobBrendan Abolivier2019-05-281-0/+11
| |/ | | | | | | | | When enabling the account validity feature, Synapse will look at startup for registered account without an expiration date, and will set one equals to 'now + validity_period' for them. On large servers, it can mean that a large number of users will have the same expiration date, which means that they will all be sent a renewal email at the same time, which isn't ideal. In order to mitigate this, this PR allows server admins to define a 'max_delta' so that the expiration date is a random value in the [now + validity_period ; now + validity_period + max_delta] range. This allows renewal emails to be progressively sent over a configured period instead of being sent all in one big batch.
* | Fix docs on resetting the user directory (#5036)Aaron Raimist2019-05-281-3/+3
| | | | | | | | Signed-off-by: Aaron Raimist <aaron@raim.ist>
* | Add missing blank line in config (#5249)Richard van der Hoff2019-05-241-0/+1
| |
* | Add config option for setting homeserver's default room version (#5223)Andrew Morgan2019-05-231-0/+32
| | | | | | | | | | Replaces DEFAULT_ROOM_VERSION constant with a method that first checks the config, then returns a hardcoded value if the option is not present. That hardcoded value is now located in the server.py config file.
* | Room Statistics (#4338)Amber Brown2019-05-212-10/+92
| |
* | Merge pull request #5204 from ↵Brendan Abolivier2019-05-211-0/+8
|\| | | | | | | | | matrix-org/babolivier/account_validity_expiration_date Add startup background job for account validity
| * DocBrendan Abolivier2019-05-211-0/+8
| |
* | Merge pull request #5209 from matrix-org/erikj/reactions_baseErik Johnston2019-05-201-0/+5
|\ \ | |/ |/| Land basic reaction and edit support.
| * Add aggregations APIErik Johnston2019-05-161-0/+5
| |
* | Add option to disable per-room profilesBrendan Abolivier2019-05-161-0/+11
| |
* | Make all the rate limiting options more consistent (#5181)Amber Brown2019-05-151-42/+73
|/
* Add ability to blacklist ip ranges for federation traffic (#5043)Andrew Morgan2019-05-131-0/+38
|
* add options to require an access_token to GET /profile and /publicRooms on ↵Matthew Hodgson2019-05-081-0/+27
| | | | | | | | | | | | | | | | | CS API (#5083) This commit adds two config options: * `restrict_public_rooms_to_local_users` Requires auth to fetch the public rooms directory through the CS API and disables fetching it through the federation API. * `require_auth_for_profile_requests` When set to `true`, requires that requests to `/profile` over the CS API are authenticated, and only returns the user's profile if the requester shares a room with the profile's owner, as per MSC1301. MSC1301 also specifies a behaviour for federation (only returning the profile if the server asking for it shares a room with the profile's owner), but that's currently really non-trivial to do in a not too expensive way. Next step is writing down a MSC that allows a HS to specify which user sent the profile query. In this implementation, Synapse won't send a profile query over federation if it doesn't believe it already shares a room with the profile's owner, though. Groups have been intentionally omitted from this commit.
* Merge branch 'master' into developRichard van der Hoff2019-05-031-10/+21
|\
| * more config comment updatesRichard van der Hoff2019-05-031-2/+5
| |
| * Blacklist 0.0.0.0 and :: by default for URL previewsRichard van der Hoff2019-05-031-10/+18
| |
* | Merge pull request #5124 from matrix-org/babolivier/aliasesBrendan Abolivier2019-05-021-0/+11
|\ \ | | | | | | Add some limitations to alias creation
| * | Add some limitations to alias creationBrendan Abolivier2019-05-021-0/+11
| | |
* | | Move admin API to a new prefixRichard van der Hoff2019-05-011-2/+2
|/ /
* | Config option for verifying federation certificates (MSC 1711) (#4967)Andrew Morgan2019-04-252-8/+93
| |
* | Don't crash on lack of expiry templatesBrendan Abolivier2019-04-181-2/+6
| |
* | Merge pull request #5047 from matrix-org/babolivier/account_expirationBrendan Abolivier2019-04-172-9/+50
|\ \ | | | | | | Send out emails with links to extend an account's validity period
| * | Send out emails with links to extend an account's validity periodBrendan Abolivier2019-04-172-9/+50
| | |
* | | Remove periods from copyright headers (#5046)Andrew Morgan2019-04-111-1/+1
| | |
* | | Merge pull request #5027 from matrix-org/babolivier/account_expirationBrendan Abolivier2019-04-091-0/+17
|\| | | | | | | | Add time-based account expiration
| * | Add account expiration featureBrendan Abolivier2019-04-091-0/+17
| |/
* | add context to phonehome stats (#5020)Neil Johnson2019-04-081-0/+4
| | | | | | | | add context to phonehome stats
* | Add config option to block users from looking up 3PIDs (#5010)Brendan Abolivier2019-04-041-0/+5
| |
* | Add config.signing_key_path. (#4974)Richard van der Hoff2019-04-021-1/+2
|/ | | | | | As requested by @andrewshadura
* Use yaml safe_loadErik Johnston2019-03-223-5/+5
|
* Merge pull request #4896 from matrix-org/erikj/disable_room_directoryErik Johnston2019-03-211-0/+10
|\ | | | | Add option to disable search room lists
| * Fix up config commentsErik Johnston2019-03-201-3/+4
| |
| * Add option to disable search room listsErik Johnston2019-03-191-0/+9
| | | | | | | | This disables both local and remote room list searching.
* | Merge pull request #4895 from matrix-org/erikj/disable_user_searchErik Johnston2019-03-201-0/+9
|\ \ | | | | | | Add option to disable searching in the user dir
| * | Fix up sample configErik Johnston2019-03-201-2/+4
| | |
| * | Update synapse/config/user_directory.pyRichard van der Hoff2019-03-201-1/+1
| | | | | | | | | Co-Authored-By: erikjohnston <erikj@jki.re>
| * | Add option to disable searching in the user dirErik Johnston2019-03-191-0/+7
| |/ | | | | | | We still populate it, as it can still be accessed via the admin API.
* | Add a config option for torture-testing worker replication. (#4902)Richard van der Hoff2019-03-201-0/+5
| | | | | | Setting this to 50 or so makes a bunch of sytests fail in worker mode.
* | Batch up outgoing read-receipts to reduce federation traffic. (#4890)Richard van der Hoff2019-03-201-0/+12
|/ | | | Rate-limit outgoing read-receipts as per #4730.
* Use a regular HomeServerConfig object for unit testsRichard van der Hoff2019-03-192-2/+10
| | | | | | | Rather than using a Mock for the homeserver config, use a genuine HomeServerConfig object. This makes for a more realistic test, and means that we don't have to keep remembering to add things to the mock config every time we add a new config setting.
* Comment out most options in the generated config. (#4863)Richard van der Hoff2019-03-1914-98/+149
| | | | | | | | | | | | | | | | | | | | Make it so that most options in the config are optional, and commented out in the generated config. The reasons this is a good thing are as follows: * If we decide that we should change the default for an option, we can do so, and only those admins that have deliberately chosen to override that option will be stuck on the old setting. * It moves us towards a point where we can get rid of the super-surprising feature of synapse where the default settings for the config come from the generated yaml. * It makes setting up a test config for unit testing an order of magnitude easier (see forthcoming PR). * It makes the generated config more consistent, and hopefully easier for users to understand.
* Add ratelimiting on failed login attempts (#4865)Brendan Abolivier2019-03-181-0/+9
|
* Add ratelimiting on login (#4821)Brendan Abolivier2019-03-151-18/+40
| | | Add two ratelimiters on login (per-IP address and per-userID).
* Correctly handle all command line optionsErik Johnston2019-03-141-1/+23
|
* Allow passing --daemonize to workersErik Johnston2019-03-132-1/+11
|
* Document using a certificate with a full chain (#4849)Andrew Morgan2019-03-131-0/+5
|
* Clarify what registration_shared_secret allows for (#2885) (#4844)Aaron Raimist2019-03-111-2/+2
| | | | | | | | | | * Clarify what registration_shared_secret allows for (#2885) Signed-off-by: Aaron Raimist <aaron@raim.ist> * Add changelog Signed-off-by: Aaron Raimist <aaron@raim.ist>
* Move settings from registration to ratelimiting in config fileBrendan Abolivier2019-03-052-18/+20
|
* Add rate-limiting on registration (#4735)Brendan Abolivier2019-03-051-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Rate-limiting for registration * Add unit test for registration rate limiting * Add config parameters for rate limiting on auth endpoints * Doc * Fix doc of rate limiting function Co-Authored-By: babolivier <contact@brendanabolivier.com> * Incorporate review * Fix config parsing * Fix linting errors * Set default config for auth rate limiting * Fix tests * Add changelog * Advance reactor instead of mocked clock * Move parameters to registration specific config and give them more sensible default values * Remove unused config options * Don't mock the rate limiter un MAU tests * Rename _register_with_store into register_with_store * Make CI happy * Remove unused import * Update sample config * Fix ratelimiting test for py2 * Add non-guest test
* Include a default configuration file in the 'docs' directory. (#4791)Richard van der Hoff2019-03-044-13/+25
|
* Fix ACME config for python 2. (#4717)Richard van der Hoff2019-02-251-3/+7
| | | Fixes #4675.
* switch from google.com to recaptcha.net for reCAPTCHA (#4731)Matthew Hodgson2019-02-251-1/+1
| | | | | | | | * add trivial clarification about jemalloc * switch from google.com to recaptcha.net because https://developers.google.com/recaptcha/docs/faq#can-i-use-recaptcha-globally
* Merge pull request #4694 from matrix-org/erikj/fix_sentry_config_formatErik Johnston2019-02-201-0/+2
|\ | | | | Fixup generated metrics config
| * Fixup generated metrics configErik Johnston2019-02-201-0/+2
| |
* | Attempt to make default config more consistentRichard van der Hoff2019-02-1924-196/+248
|/ | | | | | The general idea here is that config examples should just have a hash and no extraneous whitespace, both to make it easier for people who don't understand yaml, and to make the examples stand out from the comments.
* Merge pull request #4652 from matrix-org/babolivier/acme-delegatedBrendan Abolivier2019-02-191-0/+15
|\ | | | | Support .well-known delegation when issuing certificates through ACME
| * Improve config documentationBrendan Abolivier2019-02-191-3/+11
| |
| * Use a configuration parameter to give the domain to generate a certificate forBrendan Abolivier2019-02-181-0/+7
| |
* | Merge pull request #4632 from matrix-org/erikj/basic_sentryErik Johnston2019-02-181-1/+29
|\ \ | |/ |/| Add basic optional sentry.io integration
| * Fixup error handling and messageErik Johnston2019-02-181-5/+6
| |
| * FixupErik Johnston2019-02-181-1/+1
| |
| * Fixup comments and add warningErik Johnston2019-02-131-2/+7
| |
| * Raise an appropriate error message if sentry_sdk missingErik Johnston2019-02-121-1/+15
| |
| * Basic sentry integrationErik Johnston2019-02-121-0/+8
| |
* | config: Remove a repeated word from a logger warningJuuso "Linda" Lapinlampi2019-02-151-1/+1
| | | | | | | | The warning for missing macaroon_secret_key was "missing missing".
* | Merge pull request #4647 from matrix-org/erikj/add_room_publishing_rulesErik Johnston2019-02-151-26/+144
|\ \ | | | | | | Add configurable room list publishing rules
| * | Move defaults up into codeErik Johnston2019-02-151-22/+44
| | |
| * | Hoist up checks to reduce overall workErik Johnston2019-02-151-17/+15
| | |
| * | Fixup commentsErik Johnston2019-02-151-8/+27
| | |
| * | Clarify commentsErik Johnston2019-02-141-3/+3
| | |
| * | Clarify and fix behaviour when there are multiple aliasesErik Johnston2019-02-141-6/+18
| | |
| * | Fixup commentsErik Johnston2019-02-141-8/+15
| | |
| * | Add configurable room list publishing rulesErik Johnston2019-02-141-17/+77
| | | | | | | | | | | | | | | This allows specifying who and what is allowed to be published onto the public room list
* | | Fix errors in acme provisioning (#4648)Richard van der Hoff2019-02-141-0/+2
|/ / | | | | | | | | | | | | | | | | * Better logging for errors on startup * Fix "TypeError: '>' not supported" when starting without an existing certificate * Fix a bug where an existing certificate would be reprovisoned every day
* / Special-case the default bind_addresses for metrics listenerRichard van der Hoff2019-02-131-1/+5
|/ | | | | turns out it doesn't really support ipv6, so let's hack around that by only listening on ipv4 by default.
* Merge pull request #4625 from matrix-org/rav/fix_generate_config_warningsErik Johnston2019-02-121-7/+2
|\ | | | | fix self-signed cert notice from generate-config
| * fix self-signed cert notice from generate-configRichard van der Hoff2019-02-121-7/+2
| | | | | | | | fixes #4620
* | Disable TLS by default (#4614)Richard van der Hoff2019-02-122-27/+27
| |
* | Fix error when loading cert if tls is disabled (#4618)Richard van der Hoff2019-02-121-15/+42
|/ | | | | | If TLS is disabled, it should not be an error if no cert is given. Fixes #4554.
* fix testsRichard van der Hoff2019-02-111-1/+1
|
* Infer no_tls from presence of TLS listenersRichard van der Hoff2019-02-113-12/+23
| | | | | Rather than have to specify `no_tls` explicitly, infer whether we need to load the TLS keys etc from whether we have any TLS-enabled listeners.
* Merge branch 'rav/tls_config_logging_fixes' into rav/tls_cert/workRichard van der Hoff2019-02-111-18/+36
|\
| * Logging improvements around TLS certsRichard van der Hoff2019-02-111-18/+36
| | | | | | | | | | Log which file we're reading keys and certs from, and refactor the code a bit in preparation for other work
* | Fail cleanly if listener config lacks a 'port'Richard van der Hoff2019-02-111-0/+5
|/ | | | ... otherwise we would fail with a mysterious KeyError or something later.
* Clean up default listener configuration (#4586)Richard van der Hoff2019-02-111-48/+81
| | | | | | | | | | Rearrange the comments to try to clarify them, and expand on what some of it means. Use a sensible default 'bind_addresses' setting. For the insecure port, only bind to localhost, and enable x_forwarded, since apparently it's for use behind a load-balancer.
* ACME Reprovisioning (#4522)Amber Brown2019-02-111-1/+11
|
* Be tolerant of blank TLS fingerprints config (#4589)Amber Brown2019-02-111-1/+5
|
* Merge pull request #4420 from matrix-org/jaywink/openid-listenerErik Johnston2019-02-111-0/+10
|\ | | | | New listener resource for the federation API "openid/userinfo" endpoint
| * Fix flake8 issuesJason Robinson2019-01-231-1/+1
| | | | | | | | Signed-off-by: Jason Robinson <jasonr@matrix.org>
| * Remove openid resource from default configJason Robinson2019-01-231-4/+13
| | | | | | | | | | | | Instead document it commented out. Signed-off-by: Jason Robinson <jasonr@matrix.org>
| * Split federation OpenID userinfo endpoint out of the federation resourceJason Robinson2019-01-231-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows the OpenID userinfo endpoint to be active even if the federation resource is not active. The OpenID userinfo endpoint is called by integration managers to verify user actions using the client API OpenID access token. Without this verification, the integration manager cannot know that the access token is valid. The OpenID userinfo endpoint will be loaded in the case that either "federation" or "openid" resource is defined. The new "openid" resource is defaulted to active in default configuration. Signed-off-by: Jason Robinson <jasonr@matrix.org>
* | Deduplicate some code in synapse.app (#4567)Amber Brown2019-02-081-11/+5
| |
* | Merge branch 'master' into developRichard van der Hoff2019-02-051-3/+3
|\ \
| * | Fix default ACME config for py2 (#4564)Richard van der Hoff2019-02-051-1/+1
| | | | | | | | | Fixes #4559
| * | fix typo in config comments (#4557)Richard van der Hoff2019-02-051-2/+2
| | |
* | | by default include m.room.encryption on invites (#3902)Matthew Hodgson2019-01-301-0/+2
|/ / | | | | | | | | | | | | | | * by default include m.room.encryption on invites * fix constant * changelog
* | ACME config cleanups (#4525)Richard van der Hoff2019-01-301-26/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Handle listening for ACME requests on IPv6 addresses the weird url-but-not-actually-a-url-string doesn't handle IPv6 addresses without extra quoting. Building a string which you are about to parse again seems like a weird choice. Let's just use listenTCP, which is consistent with what we do elsewhere. * Clean up the default ACME config make it look a bit more consistent with everything else, and tweak the defaults to listen on port 80. * newsfile
* | SIGHUP for TLS cert reloading (#4495)Amber Brown2019-01-301-8/+11
| |
* | Merge pull request #4512 from matrix-org/anoa/consent_dirAndrew Morgan2019-01-291-1/+13
|\ \ | | | | | | Check consent dir path on startup
| * | Check consent dir path on startupAndrew Morgan2019-01-291-1/+13
| | |
* | | Merge pull request #4498 from matrix-org/travis/fix-docs-public_baseurlTravis Ralston2019-01-291-1/+1
|\ \ \ | |/ / |/| | Don't recommend :8448 to people on public_baseurl
| * | Don't recommend :8448 to people on public_baseurlTravis Ralston2019-01-281-1/+1
| | |
* | | Do not generate self-signed TLS certificates by default. (#4509)Amber Brown2019-01-291-43/+18
|/ /
* | Fix quoting for allowed_local_3pids example config (#4476)Richard van der Hoff2019-01-251-3/+3
| | | | | | | | | | | | | | If you use double-quotes here, you have to escape your backslashes. It's much easier with single-quotes. (Note that the existing double-backslashes are already interpreted by python's """ parsing.)
* | Merge pull request #4435 from matrix-org/neilj/fix_threepid_auth_checkNeil Johnson2019-01-241-5/+4
|\ \ | | | | | | Neilj/fix threepid auth check
| * | move guard out of is_threepid_reserved and into register.pyNeil Johnson2019-01-221-2/+0
| | |
| * | Fix None guard in config.server.is_threepid_reservedNeil Johnson2019-01-221-5/+6
| |/
* | Clarify docs for public_baseurlDavid Baker2019-01-241-1/+5
| | | | | | | | | | | | This is leading to problems with people upgrading to clients that support MSC1730 because people have this misconfigured, so try to make the docs completely unambiguous.
* | Support ACME for certificate provisioning (#4384)Amber Brown2019-01-232-26/+93
|/
* Merge pull request #4423 from matrix-org/neilj/disable_msisdn_on_registrationNeil Johnson2019-01-221-0/+9
|\ | | | | Config option to disable requesting MSISDN on registration
| * fix line lengthNeil Johnson2019-01-211-1/+3
| |
| * Config option to disable requesting MSISDN on registrationNeil Johnson2019-01-211-0/+7
| |
* | Require ECDH key exchange & remove dh_params (#4429)Amber Brown2019-01-221-40/+0
|/ | | * remove dh_params and set better cipher string
* Changing macaroon_secret_key no longer logs you out (#4387)Richard van der Hoff2019-01-161-3/+0
|
* Merge branch rav/macaroon_key_fix_0.34 into rav/macaroon_key_fix_0.34.1Richard van der Hoff2019-01-101-2/+2
|\ | | | | | | Fixes #4371
| * Revert "Fix macaroon_secret_key fallback logic"Richard van der Hoff2019-01-101-3/+3
| | | | | | | | | | | | This is already fixed in 0.34.1, by 59f93bb This reverts commit efc522c55e996e420271de2d9094835dda52ade4.
| * Merge branch 'rav/macaroon_key_fix' into rav/macaroon_key_fix_0.34Richard van der Hoff2019-01-101-5/+5
| |\
| | * Fix macaroon_secret_key fallback logicRichard van der Hoff2019-01-101-3/+3
| | |
| | * Fix fallback to signing key for macaroon-secret-keyRichard van der Hoff2019-01-101-2/+2
| | |
* | | Fix synapse.config.__main__ on python 3 (#4356)Amber Brown2019-01-081-1/+1
| | |
* | | Check jinja version for consent resource (#4327)Richard van der Hoff2019-01-071-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | * Raise a ConfigError if an invalid resource is specified * Require Jinja 2.9 for the consent resource * changelog
* | | Add a script to generate a clean config file (#4315)Richard van der Hoff2018-12-229-46/+89
| | |
* | | Fix indentation in default config (#4313)Richard van der Hoff2018-12-221-35/+35
| | | | | | | | | These settings are not supposed to be under 'listeners'.
* | | Merge branch 'release-v0.34.0' into developRichard van der Hoff2018-12-111-15/+27
|\| |
| * | Stop installing Matrix Console by defaultRichard van der Hoff2018-12-111-15/+27
| | | | | | | | | | | | This is based on the work done by @krombel in #2601.
* | | Implement SAML2 authentication (#4267)Richard van der Hoff2018-12-072-1/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements both a SAML2 metadata endpoint (at `/_matrix/saml2/metadata.xml`), and a SAML2 response receiver (at `/_matrix/saml2/authn_response`). If the SAML2 response matches what's been configured, we complete the SSO login flow by redirecting to the client url (aka `RelayState` in SAML2 jargon) with a login token. What we don't yet have is anything to build a SAML2 request and redirect the user to the identity provider. That is left as an exercise for the reader.
* | | Rip out half-implemented m.login.saml2 support (#4265)Richard van der Hoff2018-12-062-57/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Rip out half-implemented m.login.saml2 support This was implemented in an odd way that left most of the work to the client, in a way that I really didn't understand. It's going to be a pain to maintain, so let's start by ripping it out. * drop undocumented dependency on dateutil It turns out we were relying on dateutil being pulled in transitively by pysaml2. There's no need for that bloat.
* | | Implement .well-known handling (#4262)Richard van der Hoff2018-12-051-0/+9
|/ / | | | | | | Sometimes it's useful for synapse to generate its own .well-known file.
* | Add an option to enable recording IPs for appservice users (#3831)Travis Ralston2018-12-041-0/+5
| |
* | Add an option to disable search for homeservers which may not be interested ↵Travis Ralston2018-12-041-1/+11
| | | | | | | | | | | | in it (#4230) This is useful for homeservers not intended for users, such as bot-only homeservers or ones that only process IoT data.
* | Remove riot.im from the list of trusted Identity Servers in the default ↵Neil Johnson2018-11-201-1/+3
| | | | | | | | configuration (#4207)
* | Add option to track MAU stats (but not limit people) (#3830)Travis Ralston2018-11-151-0/+6
| |
* | Add config variables for enabling terms auth and the policy name (#4142)Travis Ralston2018-11-061-0/+18
| | | | | | | | So people can still collect consent the old way if they want to.
* | Set the encoding to UTF8 in the default logconfig (#4138)Amber Brown2018-11-031-0/+1
| |
* | Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2018-10-255-88/+92
|\ \ | | | | | | | | | erikj/alias_disallow_list
| * \ Merge branch 'develop' of github.com:matrix-org/synapse into ↵Neil Johnson2018-10-254-68/+91
| |\ \ | | | | | | | | | | | | matthew/autocreate_autojoin
| | * | Fix a number of flake8 errorsRichard van der Hoff2018-10-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Broadly three things here: * disable W504 which seems a bit whacko * remove a bunch of `as e` expressions from exception handlers that don't use them * use `r""` for strings which include backslashes Also, we don't use pep8 any more, so we can get rid of the duplicate config there.
| | * | Make scripts/ and scripts-dev/ pass pyflakes (and the rest of the codebase ↵Amber Brown2018-10-202-63/+60
| | | | | | | | | | | | | | | | on py3) (#4068)
| | * | Calculate absolute path for email templatesRichard van der Hoff2018-10-191-22/+18
| | | |
| * | | isortNeil Johnson2018-10-241-2/+1
| | | |
| * | | remove errant exception and styleNeil Johnson2018-10-231-1/+1
| | | |
| * | | clean up config error logic and importsNeil Johnson2018-10-171-5/+4
| | | |
| * | | improve auto room join logic, comments and testsNeil Johnson2018-10-121-1/+10
| | | |
| * | | fix UTsMatthew Hodgson2018-09-281-1/+1
| | | |
| * | | untested stab at autocreating autojoin roomsMatthew Hodgson2018-09-281-0/+4
| | | |
* | | | Use allow/denyErik Johnston2018-10-251-6/+6
| | | |
* | | | Use match rather than searchErik Johnston2018-10-241-2/+3
| | | |
* | | | Add config option to control alias creationErik Johnston2018-10-192-1/+103
| |/ / |/| |
* | | Put the warning blob at the top of the fileRichard van der Hoff2018-10-171-6/+9
| | |
* | | Ship the email templates as package_dataRichard van der Hoff2018-10-171-3/+30
|/ / | | | | | | | | | | | | | | | | | | move the example email templates into the synapse package so that they can be used as package data, which should mean that all of the packaging mechanisms (pip, docker, debian, arch, etc) should now come with the example templates. In order to grandfather in people who relied on the templates being in the old place, check for that situation and fall back to using the defaults if the templates directory does not exist.
* | Replaced all occurences of e.message with str(e)Schnuffle2018-09-271-1/+1
| | | | | | | | Signed-off-by: Schnuffle <schnuffle@github.com>
* | Remove some superfluous logging (#3855)Amber Brown2018-09-131-1/+16
| |
* | Fix jwt import checkRichard van der Hoff2018-09-072-1/+1
| | | | | | | | | | | | | | This handy code attempted to check that we could import jwt, but utterly failed to check it was the right jwt. Fixes https://github.com/matrix-org/synapse/issues/3793
* | move threepid checker to config, add missing yieldsNeil Johnson2018-08-311-0/+17
| |
* | Change admin_uri to admin_contact in config and errorsErik Johnston2018-08-241-2/+2
| |
* | Implement trail usersErik Johnston2018-08-231-0/+6
| |
* | Port over enough to get some sytests running on Python 3 (#3668)Amber Brown2018-08-201-1/+2
| |
* | Integrate presence from hotfixes (#3694)Amber Brown2018-08-181-0/+6
| |
* | server limits config docsNeil Johnson2018-08-171-0/+26
| |
* | add new error type ResourceLimitNeil Johnson2018-08-161-0/+1
| |
* | update admin email to uriNeil Johnson2018-08-151-1/+1
| |
* | replace admin_email with admin_uri for greater flexibilityNeil Johnson2018-08-151-1/+1
| |
* | support admin_email config and pass through into blocking errors, return ↵Neil Johnson2018-08-131-0/+4
| | | | | | | | AuthError in all cases
* | Revert "support admin_email config and pass through into blocking errors, ↵Neil Johnson2018-08-131-4/+0
| | | | | | | | | | | | return AuthError in all cases" This reverts commit 0d43f991a19840a224d3dac78d79f13d78212ee6.
* | support admin_email config and pass through into blocking errors, return ↵Neil Johnson2018-08-131-0/+4
| | | | | | | | AuthError in all cases
* | log *after* reloading log configRichard van der Hoff2018-08-101-2/+1
| | | | | | | | ... because logging *before* reloading means the log message gets lost in the old MemoryLogger
* | Merge branch 'develop' into neilj/disable_hsNeil Johnson2018-08-081-0/+3
|\ \
| * | implement reserved users for mau limitsNeil Johnson2018-08-071-1/+1
| | |
| * | load mau limit threepidsNeil Johnson2018-08-061-0/+3
| | |
* | | disable HS from configNeil Johnson2018-08-041-0/+4
|/ /
* / fix (lots of) py3 test failuresNeil Johnson2018-08-031-2/+2
|/
* Merge branch 'master' into developRichard van der Hoff2018-08-021-0/+2
|\
| * Merge pull request #3377 from Valodim/note-affinityRichard van der Hoff2018-07-191-0/+2
| |\ | | | | | | document that the affinity package is required for the cpu_affinity setting
| | * add note that the affinity package is required for the cpu_affinity settingVincent Breitmoser2018-06-091-0/+2
| | |
| | * Merge tag 'v0.31.0'Neil Johnson2018-06-063-1/+20
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes in synapse v0.31.0 (2018-06-06) ====================================== Most notable change from v0.30.0 is to switch to python prometheus library to improve system stats reporting. WARNING this changes a number of prometheus metrics in a backwards-incompatible manner. For more details, see `docs/metrics-howto.rst <docs/metrics-howto.rst#removal-of-deprecated-metrics--time-based-counters-becoming-histograms-in-0310>`_. Bug Fixes: * Fix metric documentation tables (PR #3341) * Fix LaterGuage error handling (694968f) * Fix replication metrics (b7e7fd2) Changes in synapse v0.31.0-rc1 (2018-06-04) ========================================== Features: * Switch to the Python Prometheus library (PR #3256, #3274) * Let users leave the server notice room after joining (PR #3287) Changes: * daily user type phone home stats (PR #3264) * Use iter* methods for _filter_events_for_server (PR #3267) * Docs on consent bits (PR #3268) * Remove users from user directory on deactivate (PR #3277) * Avoid sending consent notice to guest users (PR #3288) * disable CPUMetrics if no /proc/self/stat (PR #3299) * Add local and loopback IPv6 addresses to url_preview_ip_range_blacklist (PR #3312) Thanks to @thegcat! * Consistently use six's iteritems and wrap lazy keys/values in list() if they're not meant to be lazy (PR #3307) * Add private IPv6 addresses to example config for url preview blacklist (PR #3317) Thanks to @thegcat! * Reduce stuck read-receipts: ignore depth when updating (PR #3318) * Put python's logs into Trial when running unit tests (PR #3319) Changes, python 3 migration: * Replace some more comparisons with six (PR #3243) Thanks to @NotAFile! * replace some iteritems with six (PR #3244) Thanks to @NotAFile! * Add batch_iter to utils (PR #3245) Thanks to @NotAFile! * use repr, not str (PR #3246) Thanks to @NotAFile! * Misc Python3 fixes (PR #3247) Thanks to @NotAFile! * Py3 storage/_base.py (PR #3278) Thanks to @NotAFile! * more six iteritems (PR #3279) Thanks to @NotAFile! * More Misc. py3 fixes (PR #3280) Thanks to @NotAFile! * remaining isintance fixes (PR #3281) Thanks to @NotAFile! * py3-ize state.py (PR #3283) Thanks to @NotAFile! * extend tox testing for py3 to avoid regressions (PR #3302) Thanks to @krombel! * use memoryview in py3 (PR #3303) Thanks to @NotAFile! Bugs: * Fix federation backfill bugs (PR #3261) * federation: fix LaterGauge usage (PR #3328) Thanks to @intelfx!
* | | | remove need to plot limit_usage_by_mauNeil Johnson2018-08-011-3/+6
| | | |
* | | | coding styleNeil Johnson2018-07-311-1/+1
| | | |
* | | | limit register and sign in on number of monthly usersNeil Johnson2018-07-301-0/+5
| | | |
* | | | Comment dummy TURN parameters in default configDavid Baker2018-07-111-2/+2
|/ / / | | | | | | | | | | | | | | | | | | This default config is parsed and used a base before the actual config is overlaid, so with these values not commented out, the code to detect when no turn params were set and refuse to generate credentials was never firing because the dummy default was always set.
* | | run isortAmber Brown2018-07-0913-51/+59
| | |
* | | More server_name validationRichard van der Hoff2018-07-041-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | We need to do a bit more validation when we get a server name, but don't want to be re-doing it all over the shop, so factor out a separate parse_and_validate_server_name, and do the extra validation. Also, use it to verify the server name in the config file.
* | | fix testsMatthew Hodgson2018-06-281-0/+1
| | |
* | | add ip_range_whitelist parameter to limit where ASes can connect fromMatthew Hodgson2018-06-281-1/+10
| | |
* | | Write a clear restart indicator in logsRichard van der Hoff2018-06-201-6/+18
| | | | | | | | | | | | | | | I'm fed up with never being able to find the point a server restarted in the logs.
* | | Merge remote-tracking branch 'origin/master' into developRichard van der Hoff2018-06-051-0/+3
|\| | | |/ |/|
| * remove trailing whitespaceRichard van der Hoff2018-05-301-2/+2
| |
| * fix english and wrap commentRichard van der Hoff2018-05-301-1/+2
| |
| * add link to thorough instruction how to configure consentRuben Barkow2018-05-251-0/+2
| |