summary refs log tree commit diff
path: root/synapse/config (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused captcha_bypass_secret option (#7137)Aaron Raimist2020-03-251-5/+0
| | | Signed-off-by: Aaron Raimist <aaron@raim.ist>
* Improve database configuration docs (#6988)Richard van der Hoff2020-03-202-36/+59
| | | | | Attempts to clarify the sample config for databases, and add some stuff about tcp keepalives to `postgres.md`.
* Revert "Add options to disable setting profile info for prevent changes. ↵Richard van der Hoff2020-03-171-17/+0
| | | | | | | (#7053)" This reverts commit 54dd28621b070ca67de9f773fe9a89e1f4dc19da, reversing changes made to 6640460d054e8f4444046a34bdf638921b31c01e.
* LintBrendan Abolivier2020-03-111-2/+1
|
* Put the file in the templates directoryBrendan Abolivier2020-03-111-12/+21
|
* Update wording and configBrendan Abolivier2020-03-111-0/+3
|
* Move the default SAML2 error HTML to a dedicated fileBrendan Abolivier2020-03-111-18/+11
| | | | | Also add some JS to it to process any error we might have in the URI (see #6893).
* Add options to disable setting profile info for prevent changes. (#7053)Brendan Abolivier2020-03-101-0/+17
|\
| * Update synapse/config/registration.pyDirk Klimpel2020-03-101-1/+1
| | | | | | Co-Authored-By: Brendan Abolivier <github@brendanabolivier.com>
| * updates after reviewdklimpel2020-03-091-8/+8
| |
| * add disable_3pid_changesdklimpel2020-03-081-0/+6
| |
| * lint2dklimpel2020-03-081-2/+2
| |
| * changelogdklimpel2020-03-081-2/+2
| |
| * Add options to disable setting profile info for prevent changes.dklimpel2020-03-081-0/+11
| |
* | Rephrase default messageBrendan Abolivier2020-03-101-2/+2
| |
* | LintBrendan Abolivier2020-03-101-1/+1
| |
* | SAML2: render a comprehensible error page if something goes wrongBrendan Abolivier2020-03-101-0/+26
| | | | | | | | | | | | If an error happened while processing a SAML AuthN response, or a client ends up doing a `GET` request to `/authn_response`, then render a customisable error page rather than a confusing error.
* | Merge branch 'master' into developBrendan Abolivier2020-03-033-0/+96
|\ \ | |/ |/|
| * Factor out complete_sso_login and expose it to the Module APIBrendan Abolivier2020-03-031-1/+1
| |
| * Add a whitelist for the SSO confirmation step.Richard van der Hoff2020-03-021-0/+18
| |
| * Add a confirmation step to the SSO login flowBrendan Abolivier2020-03-023-0/+78
| |
* | Fix minor issues with email config (#6962)Richard van der Hoff2020-02-241-36/+30
| | | | | | | | | | | | * Give `notif_template_html`, `notif_template_text` default values (fixes #6960) * Don't complain if `smtp_host` and `smtp_port` are unset, since they have sensible defaults (fixes #6961) * Set the example for `enable_notifs` to `True`, for consistency and because it's more useful * Raise errors as ConfigError rather than RuntimeError for nicer formatting
* | Clarify list/set/dict/tuple comprehensions and enforce via flake8 (#6957)Patrick Cloke2020-02-212-3/+3
|/ | | | Ensure good comprehension hygiene using flake8-comprehensions.
* Merge pull request #6907 from matrix-org/babolivier/acme-configBrendan Abolivier2020-02-181-0/+19
|\ | | | | Add mention and warning about ACME v1 deprecation to the TLS config
| * Linters are hard but in they end they just want what's best for usBrendan Abolivier2020-02-131-1/+1
| |
| * Add a separator for the config warningBrendan Abolivier2020-02-131-1/+1
| |
| * Add mention and warning about ACME v1 deprecation to the Synapse configBrendan Abolivier2020-02-131-0/+19
| |
* | Add a warning about indentation to generated config (#6920)Richard van der Hoff2020-02-141-2/+14
|/ | | Fixes #6916.
* Allow empty federation_certificate_verification_whitelist (#6849)timfi2020-02-061-0/+2
|
* Fix empty account_validity config blockAndrew Morgan2020-01-201-1/+2
|
* Add more logging around message retention policies support (#6717)Brendan Abolivier2020-01-171-0/+8
| | | So we can debug issues like #6683 more easily
* Delegate remote_user_id mapping to the saml mapping provider (#6723)Richard van der Hoff2020-01-171-0/+1
| | | Turns out that figuring out a remote user id for the SAML user isn't quite as obvious as it seems. Factor it out to the SamlMappingProvider so that it's easy to control.
* Clarify the `account_validity` and `email` sections of the sample ↵Richard van der Hoff2020-01-173-140/+167
| | | | | | | | | | | configuration. (#6685) Generally try to make this more comprehensible, and make it match the conventions. I've removed the documentation for all the settings which allow you to change the names of the template files, because I can't really see why they are useful.
* Merge pull request #6621 from matrix-org/babolivier/purge_job_config_typoBrendan Abolivier2020-01-071-5/+5
|\ | | | | Fix a typo in the purge jobs configuration example
| * RewordBrendan Abolivier2020-01-071-3/+3
| |
| * Change the example from 5min to 12hBrendan Abolivier2020-01-071-4/+4
| | | | | | | | Have a purge job running every 5min is probably not something we want to advise admins to do as a sort-of default.
| * Fix a typo in the purge jobs configuration exampleBrendan Abolivier2020-01-031-1/+1
| |
* | Add experimental 'databases' config (#6580)Erik Johnston2020-01-061-13/+42
| |
* | Automate generation of the sample and debian log configs (#6627)Richard van der Hoff2020-01-031-1/+8
| |
* | Raise an error if someone tries to use the log_file config option (#6626)Richard van der Hoff2020-01-031-2/+15
| | | | | | | | This has caused some confusion for people who didn't notice it going away.
* | Remove unused, undocumented "content repo" resource (#6628)Richard van der Hoff2020-01-031-5/+0
|/ | | | | | This looks like it got half-killed back in #888. Fixes #6567.
* Split state groups into a separate data store (#6296)Erik Johnston2019-12-201-5/+5
|
* Add an export_signing_key script (#6546)Richard van der Hoff2019-12-191-8/+15
| | | | | I want to do some key rotation, and it is silly that we don't have a way to do this.
* Add database config class (#6513)Erik Johnston2019-12-181-16/+62
| | | | | This encapsulates config for a given database and is the way to get new connections.
* Add option to allow profile queries without sharing a room (#6523)Will Hunt2019-12-161-0/+13
|
* Bump version of mypyErik Johnston2019-12-123-4/+4
|
* Allow SAML username provider plugins (#6411)Andrew Morgan2019-12-101-60/+126
|
* privacy by default for room dir (#6355)Neil Johnson2019-12-041-12/+14
| | | | Ensure that the the default settings for the room directory are that the it is hidden from public view by default.
* Add ephemeral messages support (MSC2228) (#6409)Brendan Abolivier2019-12-031-0/+2
| | | | | | | | Implement part [MSC2228](https://github.com/matrix-org/matrix-doc/pull/2228). The parts that differ are: * the feature is hidden behind a configuration flag (`enable_ephemeral_messages`) * self-destruction doesn't happen for state events * only implement support for the `m.self_destruct_after` field (not the `m.self_destruct` one) * doesn't send synthetic redactions to clients because for this specific case we consider the clients to be able to destroy an event themselves, instead we just censor it (by pruning its JSON) in the database
* Clarifications for the email configuration settings. (#6423)Richard van der Hoff2019-11-281-1/+16
| | | Cf #6422
* Merge pull request #6358 from matrix-org/babolivier/message_retentionBrendan Abolivier2019-11-271-1/+182
|\ | | | | Implement message retention policies (MSC1763)
| * Merge branch 'develop' into babolivier/message_retentionBrendan Abolivier2019-11-265-11/+11
| |\
| * | Lint againBrendan Abolivier2019-11-191-1/+1
| | |
| * | Lint againBrendan Abolivier2019-11-191-1/+1
| | |
| * | LintBrendan Abolivier2019-11-191-15/+24
| | |
| * | Implement per-room message retention policiesBrendan Abolivier2019-11-041-0/+172
| | |
* | | Remove assertion and provide a clear warning on startup for missing ↵Andrew Morgan2019-11-262-0/+9
| |/ |/| | | | | public_baseurl (#6379)
* | Clean up newline quote marks around the codebase (#6362)Andrew Morgan2019-11-213-5/+5
| |
* | Merge branch 'develop' of github.com:matrix-org/synapse into ↵Andrew Morgan2019-11-141-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | anoa/homeserver_copy * 'develop' of github.com:matrix-org/synapse: Blacklist PurgeRoomTestCase (#6361) Set room version default to 5
| * \ Merge pull request #6220 from matrix-org/neilj/set_room_version_default_to_5Brendan Abolivier2019-11-141-1/+1
| |\ \ | | |/ | |/| Set room version default to 5
| | * Set room version default to 5Neil Johnson2019-10-191-1/+1
| | |
* | | A couple more instancesAndrew Morgan2019-11-121-1/+1
| | |
* | | Replace instance variations of homeserver with correct case/spacingAndrew Morgan2019-11-123-4/+4
|/ /
* | Remove last usages of deprecated logging.warn method (#6314)Andrew Morgan2019-11-011-2/+2
| |
* | Remove usage of deprecated logger.warn method from codebase (#6271)Andrew Morgan2019-10-312-3/+3
| | | | | | Replace every instance of `logger.warn` with `logger.warning` as the former is deprecated.
* | Fix typo in domain name in account_threepid_delegates config option (#6273)Andrew Morgan2019-10-301-1/+1
| |
* | Option to suppress resource exceeded alerting (#6173)Neil Johnson2019-10-241-2/+8
| | | | | | | | The expected use case is to suppress MAU limiting on small instances
* | Add config linting script that checks for bool casing (#6203)Andrew Morgan2019-10-239-15/+22
|/ | | | | Add a linting script that enforces all boolean values in the default config be lowercase. This has annoyed me for a while so I decided to fix it.
* Fix logging config for the docker image (#6197)Richard van der Hoff2019-10-181-3/+2
| | | | | | | | Turns out that loggers that are instantiated before the config is loaded get turned off. Also bring the logging config that is generated by --generate-config into line. Fixes #6194.
* cas: support setting display name (#6114)Valérian Rousset2019-10-111-0/+3
| | | Now, the CAS server can return an attribute stating what's the desired displayname, instead of using the username directly.
* Refactor HomeserverConfig so it can be typechecked (#6137)Amber Brown2019-10-1033-79/+385
|
* Fix up some typechecking (#6150)Amber Brown2019-10-026-12/+20
| | | | | | * type checking fixes * changelog
* Fix 'redaction_retention_period' sampel config to match guidelinesErik Johnston2019-09-261-1/+1
|
* Explicitly log when a homeserver does not have a trusted key server ↵Neil Johnson2019-09-262-12/+52
| | | | configured (#6090)
* Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2019-09-253-61/+185
|\ | | | | | | erikj/cleanup_user_ips_2
| * Enable cleaning up extremities with dummy events by default to prevent undue ↵Neil Johnson2019-09-251-3/+1
| | | | | | | | build up of forward extremities. (#5884)
| * Merge remote-tracking branch 'origin/develop' into rav/saml_mapping_workRichard van der Hoff2019-09-241-6/+42
| |\
| | * Merge pull request #6069 from matrix-org/rav/fix_attribute_mappingRichard van der Hoff2019-09-241-6/+42
| | |\ | | | | | | | | Fix a bug with saml attribute maps.
| | | * docstrings and commentsRichard van der Hoff2019-09-241-7/+21
| | | |
| | | * Merge branch 'develop' into rav/fix_attribute_mappingRichard van der Hoff2019-09-1914-168/+524
| | | |\
| | | * | Fix a bug with saml attribute maps.Richard van der Hoff2019-09-191-6/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes a bug where the default attribute maps were prioritised over user-specified ones, resulting in incorrect mappings. The problem is that if you call SPConfig.load() multiple times, it adds new attribute mappers to a list. So by calling it with the default config first, and then the user-specified config, we would always get the default mappers before the user-specified mappers. To solve this, let's merge the config dicts first, and then pass them to SPConfig.
| * | | | Merge remote-tracking branch 'origin/develop' into rav/saml_mapping_workRichard van der Hoff2019-09-245-3/+44
| |\| | |
| | * | | Add submit_url response parameter to msisdn /requestToken (#6079)Andrew Morgan2019-09-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Second part of solving #6076 Fixes #6076 We return a submit_url parameter on calls to POST */msisdn/requestToken so that clients know where to submit token information to.
| | * | | Merge pull request #6064 from matrix-org/rav/saml_config_cleanupRichard van der Hoff2019-09-231-51/+62
| | |\ \ \ | | | | | | | | | | | | Make the sample saml config closer to our standards
| | | * \ \ Merge branch 'develop' into rav/saml_config_cleanupRichard van der Hoff2019-09-1914-168/+524
| | | |\ \ \ | | | | | |/ | | | | |/|
| | * | | | Use the federation blacklist for requests to untrusted Identity Servers (#6000)Andrew Morgan2019-09-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Uses a SimpleHttpClient instance equipped with the federation_ip_range_blacklist list for requests to identity servers provided by user input. Does not use a blacklist when contacting identity servers specified by account_threepid_delegates. The homeserver trusts the latter and we don't want to prevent homeserver admins from specifying delegates that are on internal IP addresses. Fixes #5935
| * | | | | Merge branch 'develop' into rav/saml_mapping_workRichard van der Hoff2019-09-1914-168/+524
| |\ \ \ \ \ | | | |_|/ / | | |/| | |
| * | | | | Record mappings from saml users in an external tableRichard van der Hoff2019-09-131-2/+76
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | We want to assign unique mxids to saml users based on an incrementing suffix. For that to work, we need to record the allocated mxid in a separate table.
| * | | | Make the sample saml config closer to our standardsRichard van der Hoff2019-09-131-51/+62
| | |_|/ | |/| | | | | | | | | | It' still not great, thanks to the nested dictionaries, but it's better.
* | | | Review commentsErik Johnston2019-09-251-1/+1
| | | |
* | | | Prune rows in user_ips older than configured periodErik Johnston2019-09-241-0/+13
| |_|/ |/| | | | | | | | Defaults to pruning everything older than 28d.
* | | fix broken copyrightsMatthew Hodgson2019-09-232-2/+2
| | |
* | | Allow HS to send emails when adding an email to the HS (#6042)Andrew Morgan2019-09-201-0/+36
| | |
* | | Fix typo in account_threepid_delegates config (#6028)Jorik Schellekens2019-09-181-1/+1
| |/ |/|
* | (#5849) Convert rst to markdown (#6040)dstipp2019-09-171-6/+6
| | | | | | | | | | Converting some of the rst documentation to markdown. Attempted to preserve whitespace and line breaks to minimize cosmetic change.
* | Fix well-known lookups with the federation certificate whitelist (#5997)Amber Brown2019-09-141-1/+8
| |
* | Fix for structured logging tests stomping on logs (#6023)Amber Brown2019-09-131-8/+25
| |
* | add report_stats_endpoint config option (#6012)Sorunome2019-09-121-0/+9
| | | | | | This PR adds the optional `report_stats_endpoint` to configure where stats are reported to, if enabled.
* | Blow up config if opentracing is missing (#5985)Jorik Schellekens2019-09-121-0/+7
| | | | | | | | * Blow up config if opentracing is missing
* | Merge pull request #6015 from matrix-org/erikj/ratelimit_admin_redactionErik Johnston2019-09-111-0/+13
|\ \ | | | | | | Allow use of different ratelimits for admin redactions.
| * | Fix commentsErik Johnston2019-09-111-1/+1
| | | | | | | | | Co-Authored-By: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
| * | Allow use of different ratelimits for admin redactions.Erik Johnston2019-09-111-0/+13
| | | | | | | | | | | | | | | This is useful to allow room admins to quickly deal with a large number of abusive messages.
* | | Check dependencies on setup in the nicer way. (#5989)Jorik Schellekens2019-09-112-27/+12
|/ /
* | Merge pull request #5934 from matrix-org/erikj/censor_redactionsErik Johnston2019-09-091-0/+17
|\ \ | | | | | | Censor redactions in DB after a month
| * | Default to censoring redactions after seven daysErik Johnston2019-09-091-4/+6
| | |
| * | Handle setting retention period to 0Erik Johnston2019-09-091-1/+1
| | |
| * | Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2019-09-051-8/+5
| |\ \ | | | | | | | | | | | | erikj/censor_redactions
| * | | Make redaction retention period configurableErik Johnston2019-09-051-0/+15
| | | |
* | | | Servers-known-about statistic (#5981)Amber Brown2019-09-071-0/+31
| | | |
* | | | Allow Synapse to send registration emails + choose Synapse or an external ↵Andrew Morgan2019-09-062-28/+130
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | server to handle 3pid validation (#5987) This is a combination of a few different PRs, finally all being merged into `develop`: * #5875 * #5876 * #5868 (This one added the `/versions` flag but the flag itself was actually [backed out](https://github.com/matrix-org/synapse/commit/891afb57cbdf9867f2848341b29c75d6f35eef5a#diff-e591d42d30690ffb79f63bb726200891) in #5969. What's left is just giving /versions access to the config file, which could be useful in the future) * #5835 * #5969 * #5940 Clients should not actually use the new registration functionality until https://github.com/matrix-org/synapse/pull/5972 is merged. UPGRADE.rst, changelog entries and config file changes should all be reviewed closely before this PR is merged.
* | | Fix and refactor room and user stats (#5971)Erik Johnston2019-09-041-8/+5
|/ / | | | | Previously the stats were not being correctly populated.
* | Add a link to python's logging config schema (#5926)Jorik Schellekens2019-08-281-1/+2
| |
* | Let synctl use a config directory. (#5904)Jorik Schellekens2019-08-281-3/+4
| | | | | | * Let synctl use a config directory.
* | Config templating (#5900)Jorik Schellekens2019-08-284-37/+161
| | | | | | | | | | | | | | | | | | | | | | | | Template config files * Imagine a system composed entirely of x, y, z etc and the basic operations.. Wait George, why XOR? Why not just neq? George: Eh, I didn't think of that.. Co-Authored-By: Erik Johnston <erik@matrix.org>
* | Implement a structured logging output system. (#5680)Amber Brown2019-08-281-42/+61
| |
* | Merge pull request #5895 from matrix-org/erikj/notary_keyErik Johnston2019-08-271-4/+30
|\ \ | | | | | | Add config option to sign remote key query responses with a separate key.
| * | Don't implicitly include server signing keyErik Johnston2019-08-231-7/+6
| | |
| * | Add config option for keys to use to sign keysErik Johnston2019-08-211-4/+31
| | | | | | | | | | | | | | | This allows servers to separate keys that are used to sign remote keys when acting as a notary server.
* | | public_base_url is actually public_baseurlAaron Raimist2019-08-261-1/+1
|/ / | | | | | | Signed-off-by: Aaron Raimist <aaron@raim.ist>
* / Fix up password reset template config names (#5863)Andrew Morgan2019-08-151-8/+8
|/ | | | | Fixes #5833 The emailconfig code was attempting to pull incorrect config file names. This corrects that, while also marking a difference between a config file variable that's a filepath versus a str containing HTML.
* fix config being a dict, actuallyAmber H. Brown2019-08-141-1/+1
|
* Don't load the media repo when configured to use an external media repo (#5754)Amber Brown2019-08-131-0/+20
|
* LintBrendan Abolivier2019-08-011-12/+7
|
* Allow defining HTML templates to serve the user on account renewalBrendan Abolivier2019-08-011-2/+48
|
* Remove non-functional 'expire_access_token' setting (#5782)Richard van der Hoff2019-07-301-6/+0
| | | | | | | | The `expire_access_token` didn't do what it sounded like it should do. What it actually did was make Synapse enforce the 'time' caveat on macaroons used as access tokens, but since our access token macaroons never contained such a caveat, it was always a no-op. (The code to add 'time' caveats was removed back in v0.18.5, in #1656)
* Room Complexity Client Implementation (#5783)Amber Brown2019-07-301-0/+41
|
* Make Jaeger fully configurable (#5694)Jorik Schellekens2019-07-231-0/+22
| | | | | | * Allow Jaeger to be configured * Update sample config
* Fix logging in workers (#5729)Amber Brown2019-07-221-0/+1
| | | This also adds a worker blacklist.
* Merge branch 'release-v1.2.0' into developJorik Schellekens2019-07-221-12/+2
|\
| * 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>
* | Remove non-dedicated logging options and command line arguments (#5678)Amber Brown2019-07-192-75/+12
|/
* 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
| |