Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Sync develop for renew tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dklimpel committed Apr 13, 2020
2 parents 5a7978f + 4a0dada commit dadecae
Show file tree
Hide file tree
Showing 90 changed files with 1,697 additions and 1,025 deletions.
2 changes: 0 additions & 2 deletions .buildkite/worker-blacklist
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ Message history can be paginated

Can re-join room if re-invited

/upgrade creates a new room

The only membership state included in an initial sync is for all the senders in the timeline

Local device key changes get to remote servers
Expand Down
6 changes: 1 addition & 5 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,10 @@ correctly fix the issue with building the Debian packages. ([\#7212](https://git
Synapse 1.12.2 (2020-04-02)
===========================

This release works around [an
issue](https://github.com/matrix-org/synapse/issues/7208) with building the
debian packages.
This release works around [an issue](https://github.com/matrix-org/synapse/issues/7208) with building the debian packages.

No other significant changes since 1.12.1.

>>>>>>> master
Synapse 1.12.1 (2020-04-02)
===========================

Expand Down
1 change: 1 addition & 0 deletions changelog.d/6899.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Improve error responses when accessing remote public room lists.
1 change: 1 addition & 0 deletions changelog.d/7185.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Move client command handling out of TCP protocol.
1 change: 1 addition & 0 deletions changelog.d/7187.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Move server command handling out of TCP protocol.
1 change: 1 addition & 0 deletions changelog.d/7192.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove sent outbound device list pokes from the database.
1 change: 1 addition & 0 deletions changelog.d/7193.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add a background database update job to clear out duplicate `device_lists_outbound_pokes`.
1 change: 1 addition & 0 deletions changelog.d/7207.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove some extraneous debugging log lines.
1 change: 1 addition & 0 deletions changelog.d/7219.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add typing information to federation server code.
1 change: 1 addition & 0 deletions changelog.d/7226.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Move catchup of replication streams logic to worker.
1 change: 1 addition & 0 deletions changelog.d/7228.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Unblacklist '/upgrade creates a new room' sytest for workers.
1 change: 1 addition & 0 deletions changelog.d/7230.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Require admin privileges to enable room encryption by default. This does not affect existing rooms.
1 change: 1 addition & 0 deletions changelog.d/7233.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove redundant checks on `daemonize` from synctl.
1 change: 1 addition & 0 deletions changelog.d/7234.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update the contributed documentation on managing synapse workers with systemd, and bring it into the core distribution.
1 change: 1 addition & 0 deletions changelog.d/7235.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Improve the support for SSO authentication on the login fallback page.
1 change: 1 addition & 0 deletions changelog.d/7236.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Upgrade jQuery to v3.4.1 on fallback login/registration pages.
1 change: 1 addition & 0 deletions changelog.d/7237.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Change log line that told user to implement onLogin/onRegister fallback js functions to a warning, instead of an info, so it's more visible.
1 change: 1 addition & 0 deletions changelog.d/7238.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add documentation to the `password_providers` config option. Add known password provider implementations to docs.
1 change: 1 addition & 0 deletions changelog.d/7240.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Do not allow a deactivated user to login via SSO.
1 change: 1 addition & 0 deletions changelog.d/7241.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Convert some of synapse.rest.media to async/await.
1 change: 1 addition & 0 deletions changelog.d/7248.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add documentation to the `password_providers` config option. Add known password provider implementations to docs.
1 change: 1 addition & 0 deletions changelog.d/7249.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix --help command-line argument.
1 change: 1 addition & 0 deletions changelog.d/7251.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Modify suggested nginx reverse proxy configuration to match Synapse's default file upload size. Contributed by @ProCycleDev.
1 change: 1 addition & 0 deletions changelog.d/7260.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix room publish permissions not being checked on room creation.
1 change: 1 addition & 0 deletions changelog.d/7329.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Move catchup of replication streams logic to worker.
152 changes: 2 additions & 150 deletions contrib/systemd-with-workers/README.md
Original file line number Diff line number Diff line change
@@ -1,150 +1,2 @@
# Setup Synapse with Workers and Systemd

This is a setup for managing synapse with systemd including support for
managing workers. It provides a `matrix-synapse`, as well as a
`matrix-synapse-worker@` service for any workers you require. Additionally to
group the required services it sets up a `matrix.target`. You can use this to
automatically start any bot- or bridge-services. More on this in
[Bots and Bridges](#bots-and-bridges).

See the folder [system](system) for any service and target files.

The folder [workers](workers) contains an example configuration for the
`federation_reader` worker. Pay special attention to the name of the
configuration file. In order to work with the `matrix-synapse-worker@.service`
service, it needs to have the exact same name as the worker app.

This setup expects neither the homeserver nor any workers to fork. Forking is
handled by systemd.

## Setup

1. Adjust your matrix configs. Make sure that the worker config files have the
exact same name as the worker app. Compare `matrix-synapse-worker@.service` for
why. You can find an example worker config in the [workers](workers) folder. See
below for relevant settings in the `homeserver.yaml`.
2. Copy the `*.service` and `*.target` files in [system](system) to
`/etc/systemd/system`.
3. `systemctl enable matrix-synapse.service` this adds the homeserver
app to the `matrix.target`
4. *Optional.* `systemctl enable
matrix-synapse-worker@federation_reader.service` this adds the federation_reader
app to the `matrix-synapse.service`
5. *Optional.* Repeat step 4 for any additional workers you require.
6. *Optional.* Add any bots or bridges by enabling them.
7. Start all matrix related services via `systemctl start matrix.target`
8. *Optional.* Enable autostart of all matrix related services on system boot
via `systemctl enable matrix.target`

## Usage

After you have setup you can use the following commands to manage your synapse
installation:

```
# Start matrix-synapse, all workers and any enabled bots or bridges.
systemctl start matrix.target
# Restart matrix-synapse and all workers (not necessarily restarting bots
# or bridges, see "Bots and Bridges")
systemctl restart matrix-synapse.service
# Stop matrix-synapse and all workers (not necessarily restarting bots
# or bridges, see "Bots and Bridges")
systemctl stop matrix-synapse.service
# Restart a specific worker (i. e. federation_reader), the homeserver is
# unaffected by this.
systemctl restart matrix-synapse-worker@federation_reader.service
# Add a new worker (assuming all configs are setup already)
systemctl enable matrix-synapse-worker@federation_writer.service
systemctl restart matrix-synapse.service
```

## The Configs

Make sure the `worker_app` is set in the `homeserver.yaml` and it does not fork.

```
worker_app: synapse.app.homeserver
daemonize: false
```

None of the workers should fork, as forking is handled by systemd. Hence make
sure this is present in all worker config files.

```
worker_daemonize: false
```

The config files of all workers are expected to be located in
`/etc/matrix-synapse/workers`. If you want to use a different location you have
to edit the provided `*.service` files accordingly.

## Bots and Bridges

Most bots and bridges do not care if the homeserver goes down or is restarted.
Depending on the implementation this may crash them though. So look up the docs
or ask the community of the specific bridge or bot you want to run to make sure
you choose the correct setup.

Whichever configuration you choose, after the setup the following will enable
automatically starting (and potentially restarting) your bot/bridge with the
`matrix.target`.

```
systemctl enable <yourBotOrBridgeName>.service
```

**Note** that from an inactive synapse the bots/bridges will only be started with
synapse if you start the `matrix.target`, not if you start the
`matrix-synapse.service`. This is on purpose. Think of `matrix-synapse.service`
as *just* synapse, but `matrix.target` being anything matrix related, including
synapse and any and all enabled bots and bridges.

### Start with synapse but ignore synapse going down

If the bridge can handle shutdowns of the homeserver you'll want to install the
service in the `matrix.target` and optionally add a
`After=matrix-synapse.service` dependency to have the bot/bridge start after
synapse on starting everything.

In this case the service file should look like this.

```
[Unit]
# ...
# Optional, this will only ensure that if you start everything, synapse will
# be started before the bot/bridge will be started.
After=matrix-synapse.service
[Service]
# ...
[Install]
WantedBy=matrix.target
```

### Stop/restart when synapse stops/restarts

If the bridge can't handle shutdowns of the homeserver you'll still want to
install the service in the `matrix.target` but also have to specify the
`After=matrix-synapse.service` *and* `BindsTo=matrix-synapse.service`
dependencies to have the bot/bridge stop/restart with synapse.

In this case the service file should look like this.

```
[Unit]
# ...
# Mandatory
After=matrix-synapse.service
BindsTo=matrix-synapse.service
[Service]
# ...
[Install]
WantedBy=matrix.target
```
The documentation for using systemd to manage synapse workers is now part of
the main synapse distribution. See [docs/systemd-with-workers](../../docs/systemd-with-workers).
19 changes: 0 additions & 19 deletions contrib/systemd-with-workers/system/matrix-synapse-worker@.service

This file was deleted.

7 changes: 0 additions & 7 deletions contrib/systemd-with-workers/system/matrix.target

This file was deleted.

6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
matrix-synapse-py3 (1.12.3ubuntu1) UNRELEASED; urgency=medium

* Add information about .well-known files to Debian installation scripts.

-- Patrick Cloke <patrickc@matrix.org> Mon, 06 Apr 2020 10:10:38 -0400

matrix-synapse-py3 (1.12.3) stable; urgency=medium

[ Richard van der Hoff ]
Expand Down
13 changes: 8 additions & 5 deletions debian/po/templates.pot
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the matrix-synapse package.
# This file is distributed under the same license as the matrix-synapse-py3 package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: matrix-synapse\n"
"Report-Msgid-Bugs-To: matrix-synapse@packages.debian.org\n"
"POT-Creation-Date: 2017-02-21 07:51+0000\n"
"Project-Id-Version: matrix-synapse-py3\n"
"Report-Msgid-Bugs-To: matrix-synapse-py3@packages.debian.org\n"
"POT-Creation-Date: 2020-04-06 16:39-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand All @@ -28,7 +28,10 @@ msgstr ""
#: ../templates:1001
msgid ""
"The name that this homeserver will appear as, to clients and other servers "
"via federation. This name should match the SRV record published in DNS."
"via federation. This is normally the public hostname of the server running "
"synapse, but can be different if you set up delegation. Please refer to the "
"delegation documentation in this case: https://github.com/matrix-org/synapse/"
"blob/master/docs/delegate.md."
msgstr ""

#. Type: boolean
Expand Down
6 changes: 4 additions & 2 deletions debian/templates
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ Template: matrix-synapse/server-name
Type: string
_Description: Name of the server:
The name that this homeserver will appear as, to clients and other
servers via federation. This name should match the SRV record
published in DNS.
servers via federation. This is normally the public hostname of the
server running synapse, but can be different if you set up delegation.
Please refer to the delegation documentation in this case:
https://github.com/matrix-org/synapse/blob/master/docs/delegate.md.

Template: matrix-synapse/report-stats
Type: boolean
Expand Down
6 changes: 5 additions & 1 deletion docs/password_auth_providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ into Synapse, and provides a number of methods by which it can integrate
with the authentication system.

This document serves as a reference for those looking to implement their
own password auth providers.
own password auth providers. Additionally, here is a list of known
password auth provider module implementations:

* [matrix-synapse-ldap3](https://github.com/matrix-org/matrix-synapse-ldap3/)
* [matrix-synapse-shared-secret-auth](https://github.com/devture/matrix-synapse-shared-secret-auth)

## Required methods

Expand Down
3 changes: 3 additions & 0 deletions docs/reverse_proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ the reverse proxy and the homeserver.
location /_matrix {
proxy_pass http://localhost:8008;
proxy_set_header X-Forwarded-For $remote_addr;
# Nginx by default only allows file uploads up to 1M in size
# Increase client_max_body_size to match max_upload_size defined in homeserver.yaml
client_max_body_size 10M;
}
}

Expand Down
14 changes: 13 additions & 1 deletion docs/sample_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1657,7 +1657,19 @@ email:
#template_dir: "res/templates"


#password_providers:
# Password providers allow homeserver administrators to integrate
# their Synapse installation with existing authentication methods
# ex. LDAP, external tokens, etc.
#
# For more information and known implementations, please see
# https://github.com/matrix-org/synapse/blob/master/docs/password_auth_providers.md
#
# Note: instances wishing to use SAML or CAS authentication should
# instead use the `saml2_config` or `cas_config` options,
# respectively.
#
password_providers:
# # Example config for an LDAP auth provider
# - module: "ldap_auth_provider.LdapAuthProvider"
# config:
# enabled: true
Expand Down
Loading

0 comments on commit dadecae

Please sign in to comment.