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

Commit 4d5ed3d

Browse files
Merge pull request #67 from matrix-org/anoa/dinsic_release_1_21_x
Merge Synapse release v1.21.2 into 'dinsic'
2 parents a2b8233 + 4288fe6 commit 4d5ed3d

File tree

762 files changed

+21506
-11692
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

762 files changed

+21506
-11692
lines changed

.buildkite/test_db.db

444 KB
Binary file not shown.

.circleci/config.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,16 @@ jobs:
44
machine: true
55
steps:
66
- checkout
7-
- run: docker build -f docker/Dockerfile --label gitsha1=${CIRCLE_SHA1} -t matrixdotorg/synapse:${CIRCLE_TAG} -t matrixdotorg/synapse:${CIRCLE_TAG}-py3 .
7+
- run: docker build -f docker/Dockerfile --label gitsha1=${CIRCLE_SHA1} -t matrixdotorg/synapse:${CIRCLE_TAG} .
88
- run: docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
99
- run: docker push matrixdotorg/synapse:${CIRCLE_TAG}
10-
- run: docker push matrixdotorg/synapse:${CIRCLE_TAG}-py3
1110
dockerhubuploadlatest:
1211
machine: true
1312
steps:
1413
- checkout
15-
- run: docker build -f docker/Dockerfile --label gitsha1=${CIRCLE_SHA1} -t matrixdotorg/synapse:latest -t matrixdotorg/synapse:latest-py3 .
14+
- run: docker build -f docker/Dockerfile --label gitsha1=${CIRCLE_SHA1} -t matrixdotorg/synapse:latest .
1615
- run: docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
1716
- run: docker push matrixdotorg/synapse:latest
18-
- run: docker push matrixdotorg/synapse:latest-py3
1917

2018
workflows:
2119
version: 2

.github/ISSUE_TEMPLATE/BUG_REPORT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ about: Create a report to help us improve
44

55
---
66

7+
<!--
8+
79
**THIS IS NOT A SUPPORT CHANNEL!**
810
**IF YOU HAVE SUPPORT QUESTIONS ABOUT RUNNING OR CONFIGURING YOUR OWN HOME SERVER**,
911
please ask in **#synapse:matrix.org** (using a matrix.org account if necessary)
1012
11-
<!--
12-
1313
If you want to report a security issue, please see https://matrix.org/security-disclosure-policy/
1414
1515
This is a bug report template. By following the instructions below and

CHANGES.md

Lines changed: 448 additions & 0 deletions
Large diffs are not rendered by default.

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ https://help.github.com/articles/using-pull-requests/) to ask us to pull your
1717
changes into our repo.
1818

1919
Some other points to follow:
20-
20+
2121
* Please base your changes on the `develop` branch.
22-
22+
2323
* Please follow the [code style requirements](#code-style).
2424

2525
* Please include a [changelog entry](#changelog) with each PR.
@@ -46,7 +46,7 @@ locally. You'll need python 3.6 or later, and to install a number of tools:
4646

4747
```
4848
# Install the dependencies
49-
pip install -U black flake8 flake8-comprehensions isort
49+
pip install -e ".[lint]"
5050
5151
# Run the linter script
5252
./scripts-dev/lint.sh

INSTALL.md

Lines changed: 95 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
- [Choosing your server name](#choosing-your-server-name)
2+
- [Picking a database engine](#picking-a-database-engine)
23
- [Installing Synapse](#installing-synapse)
34
- [Installing from source](#installing-from-source)
45
- [Platform-Specific Instructions](#platform-specific-instructions)
56
- [Prebuilt packages](#prebuilt-packages)
67
- [Setting up Synapse](#setting-up-synapse)
78
- [TLS certificates](#tls-certificates)
9+
- [Client Well-Known URI](#client-well-known-uri)
810
- [Email](#email)
911
- [Registering a user](#registering-a-user)
1012
- [Setting up a TURN server](#setting-up-a-turn-server)
@@ -27,6 +29,25 @@ that your email address is probably `[email protected]` rather than
2729
`[email protected]`) - but doing so may require more advanced setup: see
2830
[Setting up Federation](docs/federate.md).
2931

32+
# Picking a database engine
33+
34+
Synapse offers two database engines:
35+
* [PostgreSQL](https://www.postgresql.org)
36+
* [SQLite](https://sqlite.org/)
37+
38+
Almost all installations should opt to use PostgreSQL. Advantages include:
39+
40+
* significant performance improvements due to the superior threading and
41+
caching model, smarter query optimiser
42+
* allowing the DB to be run on separate hardware
43+
44+
For information on how to install and use PostgreSQL, please see
45+
[docs/postgres.md](docs/postgres.md)
46+
47+
By default Synapse uses SQLite and in doing so trades performance for convenience.
48+
SQLite is only recommended in Synapse for testing purposes or for servers with
49+
light workloads.
50+
3051
# Installing Synapse
3152

3253
## Installing from source
@@ -234,17 +255,18 @@ for a number of platforms.
234255

235256
There is an offical synapse image available at
236257
https://hub.docker.com/r/matrixdotorg/synapse which can be used with
237-
the docker-compose file available at [contrib/docker](contrib/docker). Further information on
238-
this including configuration options is available in the README on
239-
hub.docker.com.
258+
the docker-compose file available at [contrib/docker](contrib/docker). Further
259+
information on this including configuration options is available in the README
260+
on hub.docker.com.
240261

241262
Alternatively, Andreas Peters (previously Silvio Fricke) has contributed a
242263
Dockerfile to automate a synapse server in a single Docker image, at
243264
https://hub.docker.com/r/avhost/docker-matrix/tags/
244265

245266
Slavi Pantaleev has created an Ansible playbook,
246267
which installs the offical Docker image of Matrix Synapse
247-
along with many other Matrix-related services (Postgres database, riot-web, coturn, mxisd, SSL support, etc.).
268+
along with many other Matrix-related services (Postgres database, Element, coturn,
269+
ma1sd, SSL support, etc.).
248270
For more details, see
249271
https://github.com/spantaleev/matrix-docker-ansible-deploy
250272

@@ -277,22 +299,27 @@ The fingerprint of the repository signing key (as shown by `gpg
277299
/usr/share/keyrings/matrix-org-archive-keyring.gpg`) is
278300
`AAF9AE843A7584B5A3E4CD2BCF45A512DE2DA058`.
279301

280-
#### Downstream Debian/Ubuntu packages
302+
#### Downstream Debian packages
281303

282-
For `buster` and `sid`, Synapse is available in the Debian repositories and
283-
it should be possible to install it with simply:
304+
We do not recommend using the packages from the default Debian `buster`
305+
repository at this time, as they are old and suffer from known security
306+
vulnerabilities. You can install the latest version of Synapse from
307+
[our repository](#matrixorg-packages) or from `buster-backports`. Please
308+
see the [Debian documentation](https://backports.debian.org/Instructions/)
309+
for information on how to use backports.
310+
311+
If you are using Debian `sid` or testing, Synapse is available in the default
312+
repositories and it should be possible to install it simply with:
284313

285314
```
286315
sudo apt install matrix-synapse
287316
```
288317

289-
There is also a version of `matrix-synapse` in `stretch-backports`. Please see
290-
the [Debian documentation on
291-
backports](https://backports.debian.org/Instructions/) for information on how
292-
to use them.
318+
#### Downstream Ubuntu packages
293319

294-
We do not recommend using the packages in downstream Ubuntu at this time, as
295-
they are old and suffer from known security vulnerabilities.
320+
We do not recommend using the packages in the default Ubuntu repository
321+
at this time, as they are old and suffer from known security vulnerabilities.
322+
The latest version of Synapse can be installed from [our repository](#matrixorg-packages).
296323

297324
### Fedora
298325

@@ -419,6 +446,60 @@ so, you will need to edit `homeserver.yaml`, as follows:
419446
For a more detailed guide to configuring your server for federation, see
420447
[federate.md](docs/federate.md).
421448

449+
## Client Well-Known URI
450+
451+
Setting up the client Well-Known URI is optional but if you set it up, it will
452+
allow users to enter their full username (e.g. `@user:<server_name>`) into clients
453+
which support well-known lookup to automatically configure the homeserver and
454+
identity server URLs. This is useful so that users don't have to memorize or think
455+
about the actual homeserver URL you are using.
456+
457+
The URL `https://<server_name>/.well-known/matrix/client` should return JSON in
458+
the following format.
459+
460+
```
461+
{
462+
"m.homeserver": {
463+
"base_url": "https://<matrix.example.com>"
464+
}
465+
}
466+
```
467+
468+
It can optionally contain identity server information as well.
469+
470+
```
471+
{
472+
"m.homeserver": {
473+
"base_url": "https://<matrix.example.com>"
474+
},
475+
"m.identity_server": {
476+
"base_url": "https://<identity.example.com>"
477+
}
478+
}
479+
```
480+
481+
To work in browser based clients, the file must be served with the appropriate
482+
Cross-Origin Resource Sharing (CORS) headers. A recommended value would be
483+
`Access-Control-Allow-Origin: *` which would allow all browser based clients to
484+
view it.
485+
486+
In nginx this would be something like:
487+
```
488+
location /.well-known/matrix/client {
489+
return 200 '{"m.homeserver": {"base_url": "https://<matrix.example.com>"}}';
490+
add_header Content-Type application/json;
491+
add_header Access-Control-Allow-Origin *;
492+
}
493+
```
494+
495+
You should also ensure the `public_baseurl` option in `homeserver.yaml` is set
496+
correctly. `public_baseurl` should be set to the URL that clients will use to
497+
connect to your server. This is the same URL you put for the `m.homeserver`
498+
`base_url` above.
499+
500+
```
501+
public_baseurl: "https://<matrix.example.com>"
502+
```
422503

423504
## Email
424505

@@ -437,7 +518,7 @@ email will be disabled.
437518

438519
## Registering a user
439520

440-
The easiest way to create a new user is to do so from a client like [Riot](https://riot.im).
521+
The easiest way to create a new user is to do so from a client like [Element](https://element.io/).
441522

442523
Alternatively you can do so from the command line if you have installed via pip.
443524

README.rst

Lines changed: 7 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ which handle:
4545
- Eventually-consistent cryptographically secure synchronisation of room
4646
state across a global open network of federated servers and services
4747
- Sending and receiving extensible messages in a room with (optional)
48-
end-to-end encryption[1]
48+
end-to-end encryption
4949
- Inviting, joining, leaving, kicking, banning room members
5050
- Managing user accounts (registration, login, logout)
5151
- Using 3rd Party IDs (3PIDs) such as email addresses, phone numbers,
@@ -82,9 +82,6 @@ at the `Matrix spec <https://matrix.org/docs/spec>`_, and experiment with the
8282

8383
Thanks for using Matrix!
8484

85-
[1] End-to-end encryption is currently in beta: `blog post <https://matrix.org/blog/2016/11/21/matrixs-olm-end-to-end-encryption-security-assessment-released-and-implemented-cross-platform-on-riot-at-last>`_.
86-
87-
8885
Support
8986
=======
9087

@@ -115,12 +112,11 @@ Unless you are running a test instance of Synapse on your local machine, in
115112
general, you will need to enable TLS support before you can successfully
116113
connect from a client: see `<INSTALL.md#tls-certificates>`_.
117114

118-
An easy way to get started is to login or register via Riot at
119-
https://riot.im/app/#/login or https://riot.im/app/#/register respectively.
115+
An easy way to get started is to login or register via Element at
116+
https://app.element.io/#/login or https://app.element.io/#/register respectively.
120117
You will need to change the server you are logging into from ``matrix.org``
121118
and instead specify a Homeserver URL of ``https://<server_name>:8448``
122119
(or just ``https://<server_name>`` if you are using a reverse proxy).
123-
(Leave the identity server as the default - see `Identity servers`_.)
124120
If you prefer to use another client, refer to our
125121
`client breakdown <https://matrix.org/docs/projects/clients-matrix>`_.
126122

@@ -137,7 +133,7 @@ it, specify ``enable_registration: true`` in ``homeserver.yaml``. (It is then
137133
recommended to also set up CAPTCHA - see `<docs/CAPTCHA_SETUP.md>`_.)
138134

139135
Once ``enable_registration`` is set to ``true``, it is possible to register a
140-
user via `riot.im <https://riot.im/app/#/register>`_ or other Matrix clients.
136+
user via a Matrix client.
141137

142138
Your new user name will be formed partly from the ``server_name``, and partly
143139
from a localpart you specify when you create the account. Your name will take
@@ -183,30 +179,6 @@ versions of synapse.
183179

184180
.. _UPGRADE.rst: UPGRADE.rst
185181

186-
187-
Using PostgreSQL
188-
================
189-
190-
Synapse offers two database engines:
191-
* `PostgreSQL <https://www.postgresql.org>`_
192-
* `SQLite <https://sqlite.org/>`_
193-
194-
Almost all installations should opt to use PostgreSQL. Advantages include:
195-
196-
* significant performance improvements due to the superior threading and
197-
caching model, smarter query optimiser
198-
* allowing the DB to be run on separate hardware
199-
* allowing basic active/backup high-availability with a "hot spare" synapse
200-
pointing at the same DB master, as well as enabling DB replication in
201-
synapse itself.
202-
203-
For information on how to install and use PostgreSQL, please see
204-
`docs/postgres.md <docs/postgres.md>`_.
205-
206-
By default Synapse uses SQLite and in doing so trades performance for convenience.
207-
SQLite is only recommended in Synapse for testing purposes or for servers with
208-
light workloads.
209-
210182
.. _reverse-proxy:
211183

212184
Using a reverse proxy with Synapse
@@ -255,10 +227,9 @@ email address.
255227
Password reset
256228
==============
257229

258-
If a user has registered an email address to their account using an identity
259-
server, they can request a password-reset token via clients such as Riot.
260-
261-
A manual password reset can be done via direct database access as follows.
230+
Users can reset their password through their client. Alternatively, a server admin
231+
can reset a users password using the `admin API <docs/admin_api/user_admin_api.rst#reset-password>`_
232+
or by directly editing the database as shown below.
262233

263234
First calculate the hash of the new password::
264235

UPGRADE.rst

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -128,17 +128,6 @@ template. These templates are similar, but the parameters are slightly different
128128
* A string ``error`` parameter is available that includes a short hint of why a
129129
user is seeing the error page.
130130

131-
ThirdPartyEventRules breaking changes
132-
-------------------------------------
133-
134-
This release introduces a backwards-incompatible change to modules making use of
135-
`ThirdPartyEventRules` in Synapse.
136-
137-
The `http_client` argument is no longer passed to modules as they are initialised. Instead,
138-
modules are expected to make use of the `http_client` property on the `ModuleApi` class.
139-
Modules are now passed a `module_api` argument during initialisation, which is an instance of
140-
`ModuleApi`.
141-
142131
Upgrading to v1.18.0
143132
====================
144133

changelog.d/67.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Merge mainline Synapse v1.21.2 into 'dinsic'.

changelog.d/8275.feature

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)