Compare commits
348 Commits
anoa/knock
...
erikj/test
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aa2fe082ae | ||
|
|
a7882f9887 | ||
|
|
31c5382d7a | ||
|
|
758ed5f1bc | ||
|
|
12ec55bfaa | ||
|
|
939ef657ce | ||
|
|
ccfafac882 | ||
|
|
b249f002b8 | ||
|
|
2506074ef0 | ||
|
|
7a43482f19 | ||
|
|
c55e62548c | ||
|
|
42a8e81370 | ||
|
|
b5120f09f1 | ||
|
|
7447f19702 | ||
|
|
eee6fcf5fa | ||
|
|
1fa15b74e0 | ||
|
|
937b849a2e | ||
|
|
818bf313bc | ||
|
|
f81d02d75b | ||
|
|
4c37d2acd5 | ||
|
|
adabf328ac | ||
|
|
933f258967 | ||
|
|
d5349959f4 | ||
|
|
1b37107cac | ||
|
|
c8e6e05842 | ||
|
|
7e072d38b1 | ||
|
|
e51b2f3f91 | ||
|
|
0cd2938bc8 | ||
|
|
620ecf13b0 | ||
|
|
a5b9c87ac6 | ||
|
|
6c0dfd2e8e | ||
|
|
fa50e4bf4d | ||
|
|
5b8ee181b7 | ||
|
|
74ced7d070 | ||
|
|
3005a2816c | ||
|
|
72822e60be | ||
|
|
fa842a9866 | ||
|
|
47d48a5853 | ||
|
|
94549771f7 | ||
|
|
73b03722f4 | ||
|
|
de45bf5b5b | ||
|
|
6633a4015a | ||
|
|
f08ef64926 | ||
|
|
2b467d0b61 | ||
|
|
02070c69fa | ||
|
|
a8703819eb | ||
|
|
de1f8de319 | ||
|
|
883d4e6f2b | ||
|
|
b5dea8702d | ||
|
|
350d9923cd | ||
|
|
2de7e263ed | ||
|
|
9de6b94117 | ||
|
|
3e4cdfe5d9 | ||
|
|
74dd906041 | ||
|
|
9ffac2bef1 | ||
|
|
d34c6e1279 | ||
|
|
0dd2649c12 | ||
|
|
4575ad0b1e | ||
|
|
20af310889 | ||
|
|
14950a45d6 | ||
|
|
1a08e0cdab | ||
|
|
d2479c6870 | ||
|
|
659c415ed4 | ||
|
|
631dd06f2c | ||
|
|
7036e24e98 | ||
|
|
21a296cd5a | ||
|
|
12702be951 | ||
|
|
26d10331e5 | ||
|
|
420031906a | ||
|
|
5310808d3b | ||
|
|
233c8b9fce | ||
|
|
d02e4b2825 | ||
|
|
aee8e6a95d | ||
|
|
ef410232f3 | ||
|
|
dc3c83a933 | ||
|
|
d1eb1b96e8 | ||
|
|
7cc9509eca | ||
|
|
98a64b7f7f | ||
|
|
aa4d8c1f9a | ||
|
|
ebd534b58d | ||
|
|
891c925b88 | ||
|
|
f7478d5cc6 | ||
|
|
bc4bf7b384 | ||
|
|
429c339de8 | ||
|
|
3dd6ba135e | ||
|
|
7a2e9b549d | ||
|
|
6d91e6ca5f | ||
|
|
789d9ebad3 | ||
|
|
e385c8b473 | ||
|
|
723b19748a | ||
|
|
fa6deb298b | ||
|
|
0f8945e166 | ||
|
|
2ec8ca5e60 | ||
|
|
b161528fcc | ||
|
|
c9195744a4 | ||
|
|
42d3a28d8b | ||
|
|
1315a2e8be | ||
|
|
671138f658 | ||
|
|
4e04435bda | ||
|
|
63f4990298 | ||
|
|
2fb1c2b6e6 | ||
|
|
7db2622d30 | ||
|
|
c21d8f1c1d | ||
|
|
ef0388a648 | ||
|
|
bce0c91d9a | ||
|
|
a03d71dc9d | ||
|
|
12f79da587 | ||
|
|
d32870ffa5 | ||
|
|
fa5f5cbc74 | ||
|
|
195adf4025 | ||
|
|
23a59d24ae | ||
|
|
b530eaa262 | ||
|
|
5e99a94502 | ||
|
|
e34df813ce | ||
|
|
63593134a1 | ||
|
|
9066c2fd7f | ||
|
|
a458e2866e | ||
|
|
8a910f97a4 | ||
|
|
bbd04441ed | ||
|
|
23d701864f | ||
|
|
3fc2399dbe | ||
|
|
1d5c021a45 | ||
|
|
8d3d264052 | ||
|
|
eee3c3c52f | ||
|
|
1b4d5d6acf | ||
|
|
0312266ee3 | ||
|
|
8f08021e86 | ||
|
|
62b5f13768 | ||
|
|
0248409bfa | ||
|
|
bde6705ad1 | ||
|
|
2fe0fb21f6 | ||
|
|
37eaf9c272 | ||
|
|
c027a199f3 | ||
|
|
06fefe0bb1 | ||
|
|
9dde9c9f01 | ||
|
|
111b673fc1 | ||
|
|
d2c616a413 | ||
|
|
31b1905e13 | ||
|
|
1c9a850562 | ||
|
|
a685bbb018 | ||
|
|
0eccf53146 | ||
|
|
168ba00d01 | ||
|
|
b7c580e333 | ||
|
|
637282bb50 | ||
|
|
b8591899ab | ||
|
|
9999eb2d02 | ||
|
|
14a7371375 | ||
|
|
cfcf5541b4 | ||
|
|
68bb26da69 | ||
|
|
d0c3c24eb2 | ||
|
|
a802606475 | ||
|
|
4218473f9e | ||
|
|
56e00ca85e | ||
|
|
d781a81e69 | ||
|
|
5e7d75daa2 | ||
|
|
28877fade9 | ||
|
|
5d4c330ed9 | ||
|
|
4136255d3c | ||
|
|
a7a913918c | ||
|
|
70586aa63e | ||
|
|
f1db20b5a5 | ||
|
|
14eab1b4d2 | ||
|
|
c9c1c9d82f | ||
|
|
f2783fc201 | ||
|
|
4c33796b20 | ||
|
|
c07022303e | ||
|
|
35be260090 | ||
|
|
7932d4e9f7 | ||
|
|
06006058d7 | ||
|
|
ff5c4da128 | ||
|
|
e1b8e37f93 | ||
|
|
44b7d4c6d6 | ||
|
|
bd30cfe86a | ||
|
|
7a332850e6 | ||
|
|
651e1ae534 | ||
|
|
3ad699cc65 | ||
|
|
be2db93b3c | ||
|
|
757b5a0bf6 | ||
|
|
8388a7fb3a | ||
|
|
c1883f042d | ||
|
|
2dd2e90e2b | ||
|
|
c9dd47d668 | ||
|
|
ed61fe4ada | ||
|
|
394516ad1b | ||
|
|
ac2acf1524 | ||
|
|
5bcf6e8289 | ||
|
|
0378581c13 | ||
|
|
7eebe4b3fc | ||
|
|
01333681bc | ||
|
|
b3a4b53587 | ||
|
|
6d02eb22df | ||
|
|
1619802228 | ||
|
|
895e04319b | ||
|
|
f14428b25c | ||
|
|
5d34f40d49 | ||
|
|
a8eceb01e5 | ||
|
|
3af0672350 | ||
|
|
0a34cdfc66 | ||
|
|
1d55c7b567 | ||
|
|
dc016c66ae | ||
|
|
80a992d7b9 | ||
|
|
c64002e1c1 | ||
|
|
1821f7cc26 | ||
|
|
a5f7aff5e5 | ||
|
|
344ab0b53a | ||
|
|
6ff34e00d9 | ||
|
|
43bf3c5178 | ||
|
|
a4a5c7a35e | ||
|
|
3e8292d483 | ||
|
|
cf7d3c90d6 | ||
|
|
9bbbb11ac2 | ||
|
|
57068eae75 | ||
|
|
fd83debcc0 | ||
|
|
320e8c8064 | ||
|
|
adfc9cb53d | ||
|
|
1cec3d1457 | ||
|
|
9b26a4ac87 | ||
|
|
0eb9b2f866 | ||
|
|
3ce2f303f1 | ||
|
|
cd9e72b185 | ||
|
|
1a9553045c | ||
|
|
ab7a24cc6b | ||
|
|
36ba73f53d | ||
|
|
025fa06fc7 | ||
|
|
ff1f0ee094 | ||
|
|
1f3748f033 | ||
|
|
92d87c6882 | ||
|
|
02e588856a | ||
|
|
96358cb424 | ||
|
|
df4b1e9c74 | ||
|
|
b774c555d8 | ||
|
|
df3e6a23a7 | ||
|
|
112f6bd49e | ||
|
|
2602514f34 | ||
|
|
693dab487c | ||
|
|
22c6c19f91 | ||
|
|
295c209cdd | ||
|
|
6e4f71c057 | ||
|
|
cf3b8156be | ||
|
|
66f75c5b74 | ||
|
|
269ba1bc84 | ||
|
|
ed5172852a | ||
|
|
f347f0cd58 | ||
|
|
935732768c | ||
|
|
0bac276890 | ||
|
|
92ce4a5258 | ||
|
|
b751624ff8 | ||
|
|
c834f1d67a | ||
|
|
76469898ee | ||
|
|
90cf1eec44 | ||
|
|
7ea85302f3 | ||
|
|
30fba62108 | ||
|
|
c5b6abd53d | ||
|
|
693516e756 | ||
|
|
0fed46ebe5 | ||
|
|
c4675e1b24 | ||
|
|
e41720d85f | ||
|
|
c67af840aa | ||
|
|
53b12688dd | ||
|
|
8388384a64 | ||
|
|
c21bdc813f | ||
|
|
d3ed93504b | ||
|
|
edb3d3f827 | ||
|
|
4d9496559d | ||
|
|
9edff901d1 | ||
|
|
3f0cba657c | ||
|
|
89f7930730 | ||
|
|
ddc4343683 | ||
|
|
09ac0569fe | ||
|
|
d1be293f00 | ||
|
|
59e18a1333 | ||
|
|
9f0f274fe0 | ||
|
|
f8d13ca13d | ||
|
|
17fa58bdd1 | ||
|
|
ca60822b34 | ||
|
|
a090b86209 | ||
|
|
856eab606b | ||
|
|
5cbe8d93fe | ||
|
|
1cd356765e | ||
|
|
382b4e83f1 | ||
|
|
7c43447477 | ||
|
|
14f81a6d24 | ||
|
|
3f0ff53158 | ||
|
|
2b110dda2a | ||
|
|
d963c69ba5 | ||
|
|
968939bdac | ||
|
|
4fd222ad70 | ||
|
|
f38676d161 | ||
|
|
b08dc7effe | ||
|
|
97b35ee259 | ||
|
|
e3d7806704 | ||
|
|
6fde6aa9c0 | ||
|
|
7127855741 | ||
|
|
59a995f38d | ||
|
|
8ca120df7c | ||
|
|
476b8c0ae6 | ||
|
|
1091bcea3e | ||
|
|
79bfe966e0 | ||
|
|
53a6f5ddf0 | ||
|
|
950bb0305f | ||
|
|
51338491c9 | ||
|
|
03e392f787 | ||
|
|
d356588339 | ||
|
|
b690542a34 | ||
|
|
244bff4edd | ||
|
|
0285885bab | ||
|
|
59c8f4f0db | ||
|
|
ef366720d5 | ||
|
|
c087f68053 | ||
|
|
deff8f628d | ||
|
|
ee382025b0 | ||
|
|
e487d9fabc | ||
|
|
473dfec1e5 | ||
|
|
f737368a26 | ||
|
|
0ce31ef614 | ||
|
|
acfe3b3065 | ||
|
|
be8fa65d0b | ||
|
|
129ae841e5 | ||
|
|
1f41422c98 | ||
|
|
3dc1871219 | ||
|
|
f125895475 | ||
|
|
c3e3552ec4 | ||
|
|
4f76eef0e8 | ||
|
|
bebfb9a97b | ||
|
|
791d7cd6f0 | ||
|
|
ebc405446e | ||
|
|
0d33c53534 | ||
|
|
cfd895a22e | ||
|
|
70c0d47989 | ||
|
|
9debe657a3 | ||
|
|
d3523e3e97 | ||
|
|
f1de4bb58b | ||
|
|
e8d0853739 | ||
|
|
34226ec761 | ||
|
|
0a5185495b | ||
|
|
4a54b821bb | ||
|
|
023f791143 | ||
|
|
68fc0dcb5a | ||
|
|
69147ed158 | ||
|
|
427ede619f | ||
|
|
1b15a3d92c | ||
|
|
4cb00d297f | ||
|
|
c2d4467cd4 | ||
|
|
41a389934e | ||
|
|
5829872bec | ||
|
|
89700dfb8c | ||
|
|
eedaf90c84 | ||
|
|
4c7587ef99 |
@@ -15,6 +15,7 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from synapse.storage.engines import create_engine
|
from synapse.storage.engines import create_engine
|
||||||
|
|
||||||
logger = logging.getLogger("create_postgres_db")
|
logger = logging.getLogger("create_postgres_db")
|
||||||
|
|||||||
@@ -6,8 +6,6 @@
|
|||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y python3.5 python3.5-dev python3-pip libxml2-dev libxslt-dev zlib1g-dev tox
|
apt-get install -y python3.5 python3.5-dev python3-pip libxml2-dev libxslt-dev xmlsec1 zlib1g-dev tox
|
||||||
|
|
||||||
export LANG="C.UTF-8"
|
export LANG="C.UTF-8"
|
||||||
|
|
||||||
exec tox -e py35-old,combine
|
|
||||||
Binary file not shown.
@@ -5,9 +5,10 @@ jobs:
|
|||||||
- image: docker:git
|
- image: docker:git
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- setup_remote_docker
|
|
||||||
- docker_prepare
|
- docker_prepare
|
||||||
- run: docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
|
- run: docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
|
||||||
|
# for release builds, we want to get the amd64 image out asap, so first
|
||||||
|
# we do an amd64-only build, before following up with a multiarch build.
|
||||||
- docker_build:
|
- docker_build:
|
||||||
tag: -t matrixdotorg/synapse:${CIRCLE_TAG}
|
tag: -t matrixdotorg/synapse:${CIRCLE_TAG}
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
@@ -20,12 +21,10 @@ jobs:
|
|||||||
- image: docker:git
|
- image: docker:git
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- setup_remote_docker
|
|
||||||
- docker_prepare
|
- docker_prepare
|
||||||
- run: docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
|
- run: docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
|
||||||
- docker_build:
|
# for `latest`, we don't want the arm images to disappear, so don't update the tag
|
||||||
tag: -t matrixdotorg/synapse:latest
|
# until all of the platforms are built.
|
||||||
platforms: linux/amd64
|
|
||||||
- docker_build:
|
- docker_build:
|
||||||
tag: -t matrixdotorg/synapse:latest
|
tag: -t matrixdotorg/synapse:latest
|
||||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||||
@@ -46,12 +45,16 @@ workflows:
|
|||||||
|
|
||||||
commands:
|
commands:
|
||||||
docker_prepare:
|
docker_prepare:
|
||||||
description: Downloads the buildx cli plugin and enables multiarch images
|
description: Sets up a remote docker server, downloads the buildx cli plugin, and enables multiarch images
|
||||||
parameters:
|
parameters:
|
||||||
buildx_version:
|
buildx_version:
|
||||||
type: string
|
type: string
|
||||||
default: "v0.4.1"
|
default: "v0.4.1"
|
||||||
steps:
|
steps:
|
||||||
|
- setup_remote_docker:
|
||||||
|
# 19.03.13 was the most recent available on circleci at the time of
|
||||||
|
# writing.
|
||||||
|
version: 19.03.13
|
||||||
- run: apk add --no-cache curl
|
- run: apk add --no-cache curl
|
||||||
- run: mkdir -vp ~/.docker/cli-plugins/ ~/dockercache
|
- run: mkdir -vp ~/.docker/cli-plugins/ ~/dockercache
|
||||||
- run: curl --silent -L "https://github.com/docker/buildx/releases/download/<< parameters.buildx_version >>/buildx-<< parameters.buildx_version >>.linux-amd64" > ~/.docker/cli-plugins/docker-buildx
|
- run: curl --silent -L "https://github.com/docker/buildx/releases/download/<< parameters.buildx_version >>/buildx-<< parameters.buildx_version >>.linux-amd64" > ~/.docker/cli-plugins/docker-buildx
|
||||||
|
|||||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -12,10 +12,12 @@
|
|||||||
_trial_temp/
|
_trial_temp/
|
||||||
_trial_temp*/
|
_trial_temp*/
|
||||||
/out
|
/out
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
# stuff that is likely to exist when you run a server locally
|
# stuff that is likely to exist when you run a server locally
|
||||||
/*.db
|
/*.db
|
||||||
/*.log
|
/*.log
|
||||||
|
/*.log.*
|
||||||
/*.log.config
|
/*.log.config
|
||||||
/*.pid
|
/*.pid
|
||||||
/.python-version
|
/.python-version
|
||||||
|
|||||||
802
CHANGES.md
802
CHANGES.md
@@ -1,3 +1,509 @@
|
|||||||
|
Synapse 1.26.0rc1 (2021-01-20)
|
||||||
|
==============================
|
||||||
|
|
||||||
|
This release brings a new schema version for Synapse and rolling back to a previous
|
||||||
|
version is not trivial. Please review [UPGRADE.rst](UPGRADE.rst) for more details
|
||||||
|
on these changes and for general upgrade guidance.
|
||||||
|
|
||||||
|
Features
|
||||||
|
--------
|
||||||
|
|
||||||
|
- Add support for multiple SSO Identity Providers. ([\#9015](https://github.com/matrix-org/synapse/issues/9015), [\#9017](https://github.com/matrix-org/synapse/issues/9017), [\#9036](https://github.com/matrix-org/synapse/issues/9036), [\#9067](https://github.com/matrix-org/synapse/issues/9067), [\#9081](https://github.com/matrix-org/synapse/issues/9081), [\#9082](https://github.com/matrix-org/synapse/issues/9082), [\#9105](https://github.com/matrix-org/synapse/issues/9105), [\#9107](https://github.com/matrix-org/synapse/issues/9107), [\#9109](https://github.com/matrix-org/synapse/issues/9109), [\#9110](https://github.com/matrix-org/synapse/issues/9110), [\#9127](https://github.com/matrix-org/synapse/issues/9127), [\#9153](https://github.com/matrix-org/synapse/issues/9153), [\#9154](https://github.com/matrix-org/synapse/issues/9154), [\#9177](https://github.com/matrix-org/synapse/issues/9177))
|
||||||
|
- During user-interactive authentication via single-sign-on, give a better error if the user uses the wrong account on the SSO IdP. ([\#9091](https://github.com/matrix-org/synapse/issues/9091))
|
||||||
|
- Give the `public_baseurl` a default value, if it is not explicitly set in the configuration file. ([\#9159](https://github.com/matrix-org/synapse/issues/9159))
|
||||||
|
- Improve performance when calculating ignored users in large rooms. ([\#9024](https://github.com/matrix-org/synapse/issues/9024))
|
||||||
|
- Implement [MSC2176](https://github.com/matrix-org/matrix-doc/pull/2176) in an experimental room version. ([\#8984](https://github.com/matrix-org/synapse/issues/8984))
|
||||||
|
- Add an admin API for protecting local media from quarantine. ([\#9086](https://github.com/matrix-org/synapse/issues/9086))
|
||||||
|
- Remove a user's avatar URL and display name when deactivated with the Admin API. ([\#8932](https://github.com/matrix-org/synapse/issues/8932))
|
||||||
|
- Update `/_synapse/admin/v1/users/<user_id>/joined_rooms` to work for both local and remote users. ([\#8948](https://github.com/matrix-org/synapse/issues/8948))
|
||||||
|
- Add experimental support for handling to-device messages on worker processes. ([\#9042](https://github.com/matrix-org/synapse/issues/9042), [\#9043](https://github.com/matrix-org/synapse/issues/9043), [\#9044](https://github.com/matrix-org/synapse/issues/9044), [\#9130](https://github.com/matrix-org/synapse/issues/9130))
|
||||||
|
- Add experimental support for handling `/keys/claim` and `/room_keys` APIs on worker processes. ([\#9068](https://github.com/matrix-org/synapse/issues/9068))
|
||||||
|
- Add experimental support for handling `/devices` API on worker processes. ([\#9092](https://github.com/matrix-org/synapse/issues/9092))
|
||||||
|
- Add experimental support for moving off receipts and account data persistence off master. ([\#9104](https://github.com/matrix-org/synapse/issues/9104), [\#9166](https://github.com/matrix-org/synapse/issues/9166))
|
||||||
|
|
||||||
|
|
||||||
|
Bugfixes
|
||||||
|
--------
|
||||||
|
|
||||||
|
- Fix a long-standing issue where an internal server error would occur when requesting a profile over federation that did not include a display name / avatar URL. ([\#9023](https://github.com/matrix-org/synapse/issues/9023))
|
||||||
|
- Fix a long-standing bug where some caches could grow larger than configured. ([\#9028](https://github.com/matrix-org/synapse/issues/9028))
|
||||||
|
- Fix error handling during insertion of client IPs into the database. ([\#9051](https://github.com/matrix-org/synapse/issues/9051))
|
||||||
|
- Fix bug where we didn't correctly record CPU time spent in `on_new_event` block. ([\#9053](https://github.com/matrix-org/synapse/issues/9053))
|
||||||
|
- Fix a minor bug which could cause confusing error messages from invalid configurations. ([\#9054](https://github.com/matrix-org/synapse/issues/9054))
|
||||||
|
- Fix incorrect exit code when there is an error at startup. ([\#9059](https://github.com/matrix-org/synapse/issues/9059))
|
||||||
|
- Fix `JSONDecodeError` spamming the logs when sending transactions to remote servers. ([\#9070](https://github.com/matrix-org/synapse/issues/9070))
|
||||||
|
- Fix "Failed to send request" errors when a client provides an invalid room alias. ([\#9071](https://github.com/matrix-org/synapse/issues/9071))
|
||||||
|
- Fix bugs in federation catchup logic that caused outbound federation to be delayed for large servers after start up. Introduced in v1.8.0 and v1.21.0. ([\#9114](https://github.com/matrix-org/synapse/issues/9114), [\#9116](https://github.com/matrix-org/synapse/issues/9116))
|
||||||
|
- Fix corruption of `pushers` data when a postgres bouncer is used. ([\#9117](https://github.com/matrix-org/synapse/issues/9117))
|
||||||
|
- Fix minor bugs in handling the `clientRedirectUrl` parameter for SSO login. ([\#9128](https://github.com/matrix-org/synapse/issues/9128))
|
||||||
|
- Fix "Unhandled error in Deferred: BodyExceededMaxSize" errors when .well-known files that are too large. ([\#9108](https://github.com/matrix-org/synapse/issues/9108))
|
||||||
|
- Fix "UnboundLocalError: local variable 'length' referenced before assignment" errors when the response body exceeds the expected size. This bug was introduced in v1.25.0. ([\#9145](https://github.com/matrix-org/synapse/issues/9145))
|
||||||
|
- Fix a long-standing bug "ValueError: invalid literal for int() with base 10" when `/publicRooms` is requested with an invalid `server` parameter. ([\#9161](https://github.com/matrix-org/synapse/issues/9161))
|
||||||
|
|
||||||
|
|
||||||
|
Improved Documentation
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
- Add some extra docs for getting Synapse running on macOS. ([\#8997](https://github.com/matrix-org/synapse/issues/8997))
|
||||||
|
- Correct a typo in the `systemd-with-workers` documentation. ([\#9035](https://github.com/matrix-org/synapse/issues/9035))
|
||||||
|
- Correct a typo in `INSTALL.md`. ([\#9040](https://github.com/matrix-org/synapse/issues/9040))
|
||||||
|
- Add missing `user_mapping_provider` configuration to the Keycloak OIDC example. Contributed by @chris-ruecker. ([\#9057](https://github.com/matrix-org/synapse/issues/9057))
|
||||||
|
- Quote `pip install` packages when extras are used to avoid shells interpreting bracket characters. ([\#9151](https://github.com/matrix-org/synapse/issues/9151))
|
||||||
|
|
||||||
|
|
||||||
|
Deprecations and Removals
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
- Remove broken and unmaintained `demo/webserver.py` script. ([\#9039](https://github.com/matrix-org/synapse/issues/9039))
|
||||||
|
|
||||||
|
|
||||||
|
Internal Changes
|
||||||
|
----------------
|
||||||
|
|
||||||
|
- Improve efficiency of large state resolutions. ([\#8868](https://github.com/matrix-org/synapse/issues/8868), [\#9029](https://github.com/matrix-org/synapse/issues/9029), [\#9115](https://github.com/matrix-org/synapse/issues/9115), [\#9118](https://github.com/matrix-org/synapse/issues/9118), [\#9124](https://github.com/matrix-org/synapse/issues/9124))
|
||||||
|
- Various clean-ups to the structured logging and logging context code. ([\#8939](https://github.com/matrix-org/synapse/issues/8939))
|
||||||
|
- Ensure rejected events get added to some metadata tables. ([\#9016](https://github.com/matrix-org/synapse/issues/9016))
|
||||||
|
- Ignore date-rotated homeserver logs saved to disk. ([\#9018](https://github.com/matrix-org/synapse/issues/9018))
|
||||||
|
- Remove an unused column from `access_tokens` table. ([\#9025](https://github.com/matrix-org/synapse/issues/9025))
|
||||||
|
- Add a `-noextras` factor to `tox.ini`, to support running the tests with no optional dependencies. ([\#9030](https://github.com/matrix-org/synapse/issues/9030))
|
||||||
|
- Fix running unit tests when optional dependencies are not installed. ([\#9031](https://github.com/matrix-org/synapse/issues/9031))
|
||||||
|
- Allow bumping schema version when using split out state database. ([\#9033](https://github.com/matrix-org/synapse/issues/9033))
|
||||||
|
- Configure the linters to run on a consistent set of files. ([\#9038](https://github.com/matrix-org/synapse/issues/9038))
|
||||||
|
- Various cleanups to device inbox store. ([\#9041](https://github.com/matrix-org/synapse/issues/9041))
|
||||||
|
- Drop unused database tables. ([\#9055](https://github.com/matrix-org/synapse/issues/9055))
|
||||||
|
- Remove unused `SynapseService` class. ([\#9058](https://github.com/matrix-org/synapse/issues/9058))
|
||||||
|
- Remove unnecessary declarations in the tests for the admin API. ([\#9063](https://github.com/matrix-org/synapse/issues/9063))
|
||||||
|
- Remove `SynapseRequest.get_user_agent`. ([\#9069](https://github.com/matrix-org/synapse/issues/9069))
|
||||||
|
- Remove redundant `Homeserver.get_ip_from_request` method. ([\#9080](https://github.com/matrix-org/synapse/issues/9080))
|
||||||
|
- Add type hints to media repository. ([\#9093](https://github.com/matrix-org/synapse/issues/9093))
|
||||||
|
- Fix the wrong arguments being passed to `BlacklistingAgentWrapper` from `MatrixFederationAgent`. Contributed by Timothy Leung. ([\#9098](https://github.com/matrix-org/synapse/issues/9098))
|
||||||
|
- Reduce the scope of caught exceptions in `BlacklistingAgentWrapper`. ([\#9106](https://github.com/matrix-org/synapse/issues/9106))
|
||||||
|
- Improve `UsernamePickerTestCase`. ([\#9112](https://github.com/matrix-org/synapse/issues/9112))
|
||||||
|
- Remove dependency on `distutils`. ([\#9125](https://github.com/matrix-org/synapse/issues/9125))
|
||||||
|
- Enforce that replication HTTP clients are called with keyword arguments only. ([\#9144](https://github.com/matrix-org/synapse/issues/9144))
|
||||||
|
- Fix the Python 3.5 / old dependencies build in CI. ([\#9146](https://github.com/matrix-org/synapse/issues/9146))
|
||||||
|
- Replace the old `perspectives` option in the Synapse docker config file template with `trusted_key_servers`. ([\#9157](https://github.com/matrix-org/synapse/issues/9157))
|
||||||
|
|
||||||
|
|
||||||
|
Synapse 1.25.0 (2021-01-13)
|
||||||
|
===========================
|
||||||
|
|
||||||
|
Ending Support for Python 3.5 and Postgres 9.5
|
||||||
|
----------------------------------------------
|
||||||
|
|
||||||
|
With this release, the Synapse team is announcing a formal deprecation policy for our platform dependencies, like Python and PostgreSQL:
|
||||||
|
|
||||||
|
All future releases of Synapse will follow the upstream end-of-life schedules.
|
||||||
|
|
||||||
|
Which means:
|
||||||
|
|
||||||
|
* This is the last release which guarantees support for Python 3.5.
|
||||||
|
* We will end support for PostgreSQL 9.5 early next month.
|
||||||
|
* We will end support for Python 3.6 and PostgreSQL 9.6 near the end of the year.
|
||||||
|
|
||||||
|
Crucially, this means __we will not produce .deb packages for Debian 9 (Stretch) or Ubuntu 16.04 (Xenial)__ beyond the transition period described below.
|
||||||
|
|
||||||
|
The website https://endoflife.date/ has convenient summaries of the support schedules for projects like [Python](https://endoflife.date/python) and [PostgreSQL](https://endoflife.date/postgresql).
|
||||||
|
|
||||||
|
If you are unable to upgrade your environment to a supported version of Python or Postgres, we encourage you to consider using the [Synapse Docker images](./INSTALL.md#docker-images-and-ansible-playbooks) instead.
|
||||||
|
|
||||||
|
### Transition Period
|
||||||
|
|
||||||
|
We will make a good faith attempt to avoid breaking compatibility in all releases through the end of March 2021. However, critical security vulnerabilities in dependencies or other unanticipated circumstances may arise which necessitate breaking compatibility earlier.
|
||||||
|
|
||||||
|
We intend to continue producing .deb packages for Debian 9 (Stretch) and Ubuntu 16.04 (Xenial) through the transition period.
|
||||||
|
|
||||||
|
Removal warning
|
||||||
|
---------------
|
||||||
|
|
||||||
|
The old [Purge Room API](https://github.com/matrix-org/synapse/tree/master/docs/admin_api/purge_room.md)
|
||||||
|
and [Shutdown Room API](https://github.com/matrix-org/synapse/tree/master/docs/admin_api/shutdown_room.md)
|
||||||
|
are deprecated and will be removed in a future release. They will be replaced by the
|
||||||
|
[Delete Room API](https://github.com/matrix-org/synapse/tree/master/docs/admin_api/rooms.md#delete-room-api).
|
||||||
|
|
||||||
|
`POST /_synapse/admin/v1/rooms/<room_id>/delete` replaces `POST /_synapse/admin/v1/purge_room` and
|
||||||
|
`POST /_synapse/admin/v1/shutdown_room/<room_id>`.
|
||||||
|
|
||||||
|
Bugfixes
|
||||||
|
--------
|
||||||
|
|
||||||
|
- Fix HTTP proxy support when using a proxy that is on a blacklisted IP. Introduced in v1.25.0rc1. Contributed by @Bubu. ([\#9084](https://github.com/matrix-org/synapse/issues/9084))
|
||||||
|
|
||||||
|
|
||||||
|
Synapse 1.25.0rc1 (2021-01-06)
|
||||||
|
==============================
|
||||||
|
|
||||||
|
Features
|
||||||
|
--------
|
||||||
|
|
||||||
|
- Add an admin API that lets server admins get power in rooms in which local users have power. ([\#8756](https://github.com/matrix-org/synapse/issues/8756))
|
||||||
|
- Add optional HTTP authentication to replication endpoints. ([\#8853](https://github.com/matrix-org/synapse/issues/8853))
|
||||||
|
- Improve the error messages printed as a result of configuration problems for extension modules. ([\#8874](https://github.com/matrix-org/synapse/issues/8874))
|
||||||
|
- Add the number of local devices to Room Details Admin API. Contributed by @dklimpel. ([\#8886](https://github.com/matrix-org/synapse/issues/8886))
|
||||||
|
- Add `X-Robots-Tag` header to stop web crawlers from indexing media. Contributed by Aaron Raimist. ([\#8887](https://github.com/matrix-org/synapse/issues/8887))
|
||||||
|
- Spam-checkers may now define their methods as `async`. ([\#8890](https://github.com/matrix-org/synapse/issues/8890))
|
||||||
|
- Add support for allowing users to pick their own user ID during a single-sign-on login. ([\#8897](https://github.com/matrix-org/synapse/issues/8897), [\#8900](https://github.com/matrix-org/synapse/issues/8900), [\#8911](https://github.com/matrix-org/synapse/issues/8911), [\#8938](https://github.com/matrix-org/synapse/issues/8938), [\#8941](https://github.com/matrix-org/synapse/issues/8941), [\#8942](https://github.com/matrix-org/synapse/issues/8942), [\#8951](https://github.com/matrix-org/synapse/issues/8951))
|
||||||
|
- Add an `email.invite_client_location` configuration option to send a web client location to the invite endpoint on the identity server which allows customisation of the email template. ([\#8930](https://github.com/matrix-org/synapse/issues/8930))
|
||||||
|
- The search term in the list room and list user Admin APIs is now treated as case-insensitive. ([\#8931](https://github.com/matrix-org/synapse/issues/8931))
|
||||||
|
- Apply an IP range blacklist to push and key revocation requests. ([\#8821](https://github.com/matrix-org/synapse/issues/8821), [\#8870](https://github.com/matrix-org/synapse/issues/8870), [\#8954](https://github.com/matrix-org/synapse/issues/8954))
|
||||||
|
- Add an option to allow re-use of user-interactive authentication sessions for a period of time. ([\#8970](https://github.com/matrix-org/synapse/issues/8970))
|
||||||
|
- Allow running the redact endpoint on workers. ([\#8994](https://github.com/matrix-org/synapse/issues/8994))
|
||||||
|
|
||||||
|
|
||||||
|
Bugfixes
|
||||||
|
--------
|
||||||
|
|
||||||
|
- Fix bug where we might not correctly calculate the current state for rooms with multiple extremities. ([\#8827](https://github.com/matrix-org/synapse/issues/8827))
|
||||||
|
- Fix a long-standing bug in the register admin endpoint (`/_synapse/admin/v1/register`) when the `mac` field was not provided. The endpoint now properly returns a 400 error. Contributed by @edwargix. ([\#8837](https://github.com/matrix-org/synapse/issues/8837))
|
||||||
|
- Fix a long-standing bug on Synapse instances supporting Single-Sign-On, where users would be prompted to enter their password to confirm certain actions, even though they have not set a password. ([\#8858](https://github.com/matrix-org/synapse/issues/8858))
|
||||||
|
- Fix a longstanding bug where a 500 error would be returned if the `Content-Length` header was not provided to the upload media resource. ([\#8862](https://github.com/matrix-org/synapse/issues/8862))
|
||||||
|
- Add additional validation to pusher URLs to be compliant with the specification. ([\#8865](https://github.com/matrix-org/synapse/issues/8865))
|
||||||
|
- Fix the error code that is returned when a user tries to register on a homeserver on which new-user registration has been disabled. ([\#8867](https://github.com/matrix-org/synapse/issues/8867))
|
||||||
|
- Fix a bug where `PUT /_synapse/admin/v2/users/<user_id>` failed to create a new user when `avatar_url` is specified. Bug introduced in Synapse v1.9.0. ([\#8872](https://github.com/matrix-org/synapse/issues/8872))
|
||||||
|
- Fix a 500 error when attempting to preview an empty HTML file. ([\#8883](https://github.com/matrix-org/synapse/issues/8883))
|
||||||
|
- Fix occasional deadlock when handling SIGHUP. ([\#8918](https://github.com/matrix-org/synapse/issues/8918))
|
||||||
|
- Fix login API to not ratelimit application services that have ratelimiting disabled. ([\#8920](https://github.com/matrix-org/synapse/issues/8920))
|
||||||
|
- Fix bug where we ratelimited auto joining of rooms on registration (using `auto_join_rooms` config). ([\#8921](https://github.com/matrix-org/synapse/issues/8921))
|
||||||
|
- Fix a bug where deactivated users appeared in the user directory when their profile information was updated. ([\#8933](https://github.com/matrix-org/synapse/issues/8933), [\#8964](https://github.com/matrix-org/synapse/issues/8964))
|
||||||
|
- Fix bug introduced in Synapse v1.24.0 which would cause an exception on startup if both `enabled` and `localdb_enabled` were set to `False` in the `password_config` setting of the configuration file. ([\#8937](https://github.com/matrix-org/synapse/issues/8937))
|
||||||
|
- Fix a bug where 500 errors would be returned if the `m.room_history_visibility` event had invalid content. ([\#8945](https://github.com/matrix-org/synapse/issues/8945))
|
||||||
|
- Fix a bug causing common English words to not be considered for a user directory search. ([\#8959](https://github.com/matrix-org/synapse/issues/8959))
|
||||||
|
- Fix bug where application services couldn't register new ghost users if the server had reached its MAU limit. ([\#8962](https://github.com/matrix-org/synapse/issues/8962))
|
||||||
|
- Fix a long-standing bug where a `m.image` event without a `url` would cause errors on push. ([\#8965](https://github.com/matrix-org/synapse/issues/8965))
|
||||||
|
- Fix a small bug in v2 state resolution algorithm, which could also cause performance issues for rooms with large numbers of power levels. ([\#8971](https://github.com/matrix-org/synapse/issues/8971))
|
||||||
|
- Add validation to the `sendToDevice` API to raise a missing parameters error instead of a 500 error. ([\#8975](https://github.com/matrix-org/synapse/issues/8975))
|
||||||
|
- Add validation of group IDs to raise a 400 error instead of a 500 eror. ([\#8977](https://github.com/matrix-org/synapse/issues/8977))
|
||||||
|
|
||||||
|
|
||||||
|
Improved Documentation
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
- Fix the "Event persist rate" section of the included grafana dashboard by adding missing prometheus rules. ([\#8802](https://github.com/matrix-org/synapse/issues/8802))
|
||||||
|
- Combine related media admin API docs. ([\#8839](https://github.com/matrix-org/synapse/issues/8839))
|
||||||
|
- Fix an error in the documentation for the SAML username mapping provider. ([\#8873](https://github.com/matrix-org/synapse/issues/8873))
|
||||||
|
- Clarify comments around template directories in `sample_config.yaml`. ([\#8891](https://github.com/matrix-org/synapse/issues/8891))
|
||||||
|
- Move instructions for database setup, adjusted heading levels and improved syntax highlighting in [INSTALL.md](../INSTALL.md). Contributed by @fossterer. ([\#8987](https://github.com/matrix-org/synapse/issues/8987))
|
||||||
|
- Update the example value of `group_creation_prefix` in the sample configuration. ([\#8992](https://github.com/matrix-org/synapse/issues/8992))
|
||||||
|
- Link the Synapse developer room to the development section in the docs. ([\#9002](https://github.com/matrix-org/synapse/issues/9002))
|
||||||
|
|
||||||
|
|
||||||
|
Deprecations and Removals
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
- Deprecate Shutdown Room and Purge Room Admin APIs. ([\#8829](https://github.com/matrix-org/synapse/issues/8829))
|
||||||
|
|
||||||
|
|
||||||
|
Internal Changes
|
||||||
|
----------------
|
||||||
|
|
||||||
|
- Properly store the mapping of external ID to Matrix ID for CAS users. ([\#8856](https://github.com/matrix-org/synapse/issues/8856), [\#8958](https://github.com/matrix-org/synapse/issues/8958))
|
||||||
|
- Remove some unnecessary stubbing from unit tests. ([\#8861](https://github.com/matrix-org/synapse/issues/8861))
|
||||||
|
- Remove unused `FakeResponse` class from unit tests. ([\#8864](https://github.com/matrix-org/synapse/issues/8864))
|
||||||
|
- Pass `room_id` to `get_auth_chain_difference`. ([\#8879](https://github.com/matrix-org/synapse/issues/8879))
|
||||||
|
- Add type hints to push module. ([\#8880](https://github.com/matrix-org/synapse/issues/8880), [\#8882](https://github.com/matrix-org/synapse/issues/8882), [\#8901](https://github.com/matrix-org/synapse/issues/8901), [\#8940](https://github.com/matrix-org/synapse/issues/8940), [\#8943](https://github.com/matrix-org/synapse/issues/8943), [\#9020](https://github.com/matrix-org/synapse/issues/9020))
|
||||||
|
- Simplify logic for handling user-interactive-auth via single-sign-on servers. ([\#8881](https://github.com/matrix-org/synapse/issues/8881))
|
||||||
|
- Skip the SAML tests if the requirements (`pysaml2` and `xmlsec1`) aren't available. ([\#8905](https://github.com/matrix-org/synapse/issues/8905))
|
||||||
|
- Fix multiarch docker image builds. ([\#8906](https://github.com/matrix-org/synapse/issues/8906))
|
||||||
|
- Don't publish `latest` docker image until all archs are built. ([\#8909](https://github.com/matrix-org/synapse/issues/8909))
|
||||||
|
- Various clean-ups to the structured logging and logging context code. ([\#8916](https://github.com/matrix-org/synapse/issues/8916), [\#8935](https://github.com/matrix-org/synapse/issues/8935))
|
||||||
|
- Automatically drop stale forward-extremities under some specific conditions. ([\#8929](https://github.com/matrix-org/synapse/issues/8929))
|
||||||
|
- Refactor test utilities for injecting HTTP requests. ([\#8946](https://github.com/matrix-org/synapse/issues/8946))
|
||||||
|
- Add a maximum size of 50 kilobytes to .well-known lookups. ([\#8950](https://github.com/matrix-org/synapse/issues/8950))
|
||||||
|
- Fix bug in `generate_log_config` script which made it write empty files. ([\#8952](https://github.com/matrix-org/synapse/issues/8952))
|
||||||
|
- Clean up tox.ini file; disable coverage checking for non-test runs. ([\#8963](https://github.com/matrix-org/synapse/issues/8963))
|
||||||
|
- Add type hints to the admin and room list handlers. ([\#8973](https://github.com/matrix-org/synapse/issues/8973))
|
||||||
|
- Add type hints to the receipts and user directory handlers. ([\#8976](https://github.com/matrix-org/synapse/issues/8976))
|
||||||
|
- Drop the unused `local_invites` table. ([\#8979](https://github.com/matrix-org/synapse/issues/8979))
|
||||||
|
- Add type hints to the base storage code. ([\#8980](https://github.com/matrix-org/synapse/issues/8980))
|
||||||
|
- Support using PyJWT v2.0.0 in the test suite. ([\#8986](https://github.com/matrix-org/synapse/issues/8986))
|
||||||
|
- Fix `tests.federation.transport.RoomDirectoryFederationTests` and ensure it runs in CI. ([\#8998](https://github.com/matrix-org/synapse/issues/8998))
|
||||||
|
- Add type hints to the crypto module. ([\#8999](https://github.com/matrix-org/synapse/issues/8999))
|
||||||
|
|
||||||
|
|
||||||
|
Synapse 1.24.0 (2020-12-09)
|
||||||
|
===========================
|
||||||
|
|
||||||
|
Due to the two security issues highlighted below, server administrators are
|
||||||
|
encouraged to update Synapse. We are not aware of these vulnerabilities being
|
||||||
|
exploited in the wild.
|
||||||
|
|
||||||
|
Security advisory
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
The following issues are fixed in v1.23.1 and v1.24.0.
|
||||||
|
|
||||||
|
- There is a denial of service attack
|
||||||
|
([CVE-2020-26257](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-26257))
|
||||||
|
against the federation APIs in which future events will not be correctly sent
|
||||||
|
to other servers over federation. This affects all servers that participate in
|
||||||
|
open federation. (Fixed in [#8776](https://github.com/matrix-org/synapse/pull/8776)).
|
||||||
|
|
||||||
|
- Synapse may be affected by OpenSSL
|
||||||
|
[CVE-2020-1971](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-1971).
|
||||||
|
Synapse administrators should ensure that they have the latest versions of
|
||||||
|
the cryptography Python package installed.
|
||||||
|
|
||||||
|
To upgrade Synapse along with the cryptography package:
|
||||||
|
|
||||||
|
* Administrators using the [`matrix.org` Docker
|
||||||
|
image](https://hub.docker.com/r/matrixdotorg/synapse/) or the [Debian/Ubuntu
|
||||||
|
packages from
|
||||||
|
`matrix.org`](https://github.com/matrix-org/synapse/blob/master/INSTALL.md#matrixorg-packages)
|
||||||
|
should ensure that they have version 1.24.0 or 1.23.1 installed: these images include
|
||||||
|
the updated packages.
|
||||||
|
* Administrators who have [installed Synapse from
|
||||||
|
source](https://github.com/matrix-org/synapse/blob/master/INSTALL.md#installing-from-source)
|
||||||
|
should upgrade the cryptography package within their virtualenv by running:
|
||||||
|
```sh
|
||||||
|
<path_to_virtualenv>/bin/pip install 'cryptography>=3.3'
|
||||||
|
```
|
||||||
|
* Administrators who have installed Synapse from distribution packages should
|
||||||
|
consult the information from their distributions.
|
||||||
|
|
||||||
|
Internal Changes
|
||||||
|
----------------
|
||||||
|
|
||||||
|
- Add a maximum version for pysaml2 on Python 3.5. ([\#8898](https://github.com/matrix-org/synapse/issues/8898))
|
||||||
|
|
||||||
|
|
||||||
|
Synapse 1.23.1 (2020-12-09)
|
||||||
|
===========================
|
||||||
|
|
||||||
|
Due to the two security issues highlighted below, server administrators are
|
||||||
|
encouraged to update Synapse. We are not aware of these vulnerabilities being
|
||||||
|
exploited in the wild.
|
||||||
|
|
||||||
|
Security advisory
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
The following issues are fixed in v1.23.1 and v1.24.0.
|
||||||
|
|
||||||
|
- There is a denial of service attack
|
||||||
|
([CVE-2020-26257](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-26257))
|
||||||
|
against the federation APIs in which future events will not be correctly sent
|
||||||
|
to other servers over federation. This affects all servers that participate in
|
||||||
|
open federation. (Fixed in [#8776](https://github.com/matrix-org/synapse/pull/8776)).
|
||||||
|
|
||||||
|
- Synapse may be affected by OpenSSL
|
||||||
|
[CVE-2020-1971](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-1971).
|
||||||
|
Synapse administrators should ensure that they have the latest versions of
|
||||||
|
the cryptography Python package installed.
|
||||||
|
|
||||||
|
To upgrade Synapse along with the cryptography package:
|
||||||
|
|
||||||
|
* Administrators using the [`matrix.org` Docker
|
||||||
|
image](https://hub.docker.com/r/matrixdotorg/synapse/) or the [Debian/Ubuntu
|
||||||
|
packages from
|
||||||
|
`matrix.org`](https://github.com/matrix-org/synapse/blob/master/INSTALL.md#matrixorg-packages)
|
||||||
|
should ensure that they have version 1.24.0 or 1.23.1 installed: these images include
|
||||||
|
the updated packages.
|
||||||
|
* Administrators who have [installed Synapse from
|
||||||
|
source](https://github.com/matrix-org/synapse/blob/master/INSTALL.md#installing-from-source)
|
||||||
|
should upgrade the cryptography package within their virtualenv by running:
|
||||||
|
```sh
|
||||||
|
<path_to_virtualenv>/bin/pip install 'cryptography>=3.3'
|
||||||
|
```
|
||||||
|
* Administrators who have installed Synapse from distribution packages should
|
||||||
|
consult the information from their distributions.
|
||||||
|
|
||||||
|
Bugfixes
|
||||||
|
--------
|
||||||
|
|
||||||
|
- Fix a bug in some federation APIs which could lead to unexpected behaviour if different parameters were set in the URI and the request body. ([\#8776](https://github.com/matrix-org/synapse/issues/8776))
|
||||||
|
|
||||||
|
|
||||||
|
Internal Changes
|
||||||
|
----------------
|
||||||
|
|
||||||
|
- Add a maximum version for pysaml2 on Python 3.5. ([\#8898](https://github.com/matrix-org/synapse/issues/8898))
|
||||||
|
|
||||||
|
|
||||||
|
Synapse 1.24.0rc2 (2020-12-04)
|
||||||
|
==============================
|
||||||
|
|
||||||
|
Bugfixes
|
||||||
|
--------
|
||||||
|
|
||||||
|
- Fix a regression in v1.24.0rc1 which failed to allow SAML mapping providers which were unable to redirect users to an additional page. ([\#8878](https://github.com/matrix-org/synapse/issues/8878))
|
||||||
|
|
||||||
|
|
||||||
|
Internal Changes
|
||||||
|
----------------
|
||||||
|
|
||||||
|
- Add support for the `prometheus_client` newer than 0.9.0. Contributed by Jordan Bancino. ([\#8875](https://github.com/matrix-org/synapse/issues/8875))
|
||||||
|
|
||||||
|
|
||||||
|
Synapse 1.24.0rc1 (2020-12-02)
|
||||||
|
==============================
|
||||||
|
|
||||||
|
Features
|
||||||
|
--------
|
||||||
|
|
||||||
|
- Add admin API for logging in as a user. ([\#8617](https://github.com/matrix-org/synapse/issues/8617))
|
||||||
|
- Allow specification of the SAML IdP if the metadata returns multiple IdPs. ([\#8630](https://github.com/matrix-org/synapse/issues/8630))
|
||||||
|
- Add support for re-trying generation of a localpart for OpenID Connect mapping providers. ([\#8801](https://github.com/matrix-org/synapse/issues/8801), [\#8855](https://github.com/matrix-org/synapse/issues/8855))
|
||||||
|
- Allow the `Date` header through CORS. Contributed by Nicolas Chamo. ([\#8804](https://github.com/matrix-org/synapse/issues/8804))
|
||||||
|
- Add a config option, `push.group_by_unread_count`, which controls whether unread message counts in push notifications are defined as "the number of rooms with unread messages" or "total unread messages". ([\#8820](https://github.com/matrix-org/synapse/issues/8820))
|
||||||
|
- Add `force_purge` option to delete-room admin api. ([\#8843](https://github.com/matrix-org/synapse/issues/8843))
|
||||||
|
|
||||||
|
|
||||||
|
Bugfixes
|
||||||
|
--------
|
||||||
|
|
||||||
|
- Fix a bug where appservices may be sent an excessive amount of read receipts and presence. Broke in v1.22.0. ([\#8744](https://github.com/matrix-org/synapse/issues/8744))
|
||||||
|
- Fix a bug in some federation APIs which could lead to unexpected behaviour if different parameters were set in the URI and the request body. ([\#8776](https://github.com/matrix-org/synapse/issues/8776))
|
||||||
|
- Fix a bug where synctl could spawn duplicate copies of a worker. Contributed by Waylon Cude. ([\#8798](https://github.com/matrix-org/synapse/issues/8798))
|
||||||
|
- Allow per-room profiles to be used for the server notice user. ([\#8799](https://github.com/matrix-org/synapse/issues/8799))
|
||||||
|
- Fix a bug where logging could break after a call to SIGHUP. ([\#8817](https://github.com/matrix-org/synapse/issues/8817))
|
||||||
|
- Fix `register_new_matrix_user` failing with "Bad Request" when trailing slash is included in server URL. Contributed by @angdraug. ([\#8823](https://github.com/matrix-org/synapse/issues/8823))
|
||||||
|
- Fix a minor long-standing bug in login, where we would offer the `password` login type if a custom auth provider supported it, even if password login was disabled. ([\#8835](https://github.com/matrix-org/synapse/issues/8835))
|
||||||
|
- Fix a long-standing bug which caused Synapse to require unspecified parameters during user-interactive authentication. ([\#8848](https://github.com/matrix-org/synapse/issues/8848))
|
||||||
|
- Fix a bug introduced in v1.20.0 where the user-agent and IP address reported during user registration for CAS, OpenID Connect, and SAML were of the wrong form. ([\#8784](https://github.com/matrix-org/synapse/issues/8784))
|
||||||
|
|
||||||
|
|
||||||
|
Improved Documentation
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
- Clarify the usecase for a msisdn delegate. Contributed by Adrian Wannenmacher. ([\#8734](https://github.com/matrix-org/synapse/issues/8734))
|
||||||
|
- Remove extraneous comma from JSON example in User Admin API docs. ([\#8771](https://github.com/matrix-org/synapse/issues/8771))
|
||||||
|
- Update `turn-howto.md` with troubleshooting notes. ([\#8779](https://github.com/matrix-org/synapse/issues/8779))
|
||||||
|
- Fix the example on how to set the `Content-Type` header in nginx for the Client Well-Known URI. ([\#8793](https://github.com/matrix-org/synapse/issues/8793))
|
||||||
|
- Improve the documentation for the admin API to list all media in a room with respect to encrypted events. ([\#8795](https://github.com/matrix-org/synapse/issues/8795))
|
||||||
|
- Update the formatting of the `push` section of the homeserver config file to better align with the [code style guidelines](https://github.com/matrix-org/synapse/blob/develop/docs/code_style.md#configuration-file-format). ([\#8818](https://github.com/matrix-org/synapse/issues/8818))
|
||||||
|
- Improve documentation how to configure prometheus for workers. ([\#8822](https://github.com/matrix-org/synapse/issues/8822))
|
||||||
|
- Update example prometheus console. ([\#8824](https://github.com/matrix-org/synapse/issues/8824))
|
||||||
|
|
||||||
|
|
||||||
|
Deprecations and Removals
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
- Remove old `/_matrix/client/*/admin` endpoints which were deprecated since Synapse 1.20.0. ([\#8785](https://github.com/matrix-org/synapse/issues/8785))
|
||||||
|
- Disable pretty printing JSON responses for curl. Users who want pretty-printed output should use [jq](https://stedolan.github.io/jq/) in combination with curl. Contributed by @tulir. ([\#8833](https://github.com/matrix-org/synapse/issues/8833))
|
||||||
|
|
||||||
|
|
||||||
|
Internal Changes
|
||||||
|
----------------
|
||||||
|
|
||||||
|
- Simplify the way the `HomeServer` object caches its internal attributes. ([\#8565](https://github.com/matrix-org/synapse/issues/8565), [\#8851](https://github.com/matrix-org/synapse/issues/8851))
|
||||||
|
- Add an example and documentation for clock skew to the SAML2 sample configuration to allow for clock/time difference between the homserver and IdP. Contributed by @localguru. ([\#8731](https://github.com/matrix-org/synapse/issues/8731))
|
||||||
|
- Generalise `RoomMemberHandler._locally_reject_invite` to apply to more flows than just invite. ([\#8751](https://github.com/matrix-org/synapse/issues/8751))
|
||||||
|
- Generalise `RoomStore.maybe_store_room_on_invite` to handle other, non-invite membership events. ([\#8754](https://github.com/matrix-org/synapse/issues/8754))
|
||||||
|
- Refactor test utilities for injecting HTTP requests. ([\#8757](https://github.com/matrix-org/synapse/issues/8757), [\#8758](https://github.com/matrix-org/synapse/issues/8758), [\#8759](https://github.com/matrix-org/synapse/issues/8759), [\#8760](https://github.com/matrix-org/synapse/issues/8760), [\#8761](https://github.com/matrix-org/synapse/issues/8761), [\#8777](https://github.com/matrix-org/synapse/issues/8777))
|
||||||
|
- Consolidate logic between the OpenID Connect and SAML code. ([\#8765](https://github.com/matrix-org/synapse/issues/8765))
|
||||||
|
- Use `TYPE_CHECKING` instead of magic `MYPY` variable. ([\#8770](https://github.com/matrix-org/synapse/issues/8770))
|
||||||
|
- Add a commandline script to sign arbitrary json objects. ([\#8772](https://github.com/matrix-org/synapse/issues/8772))
|
||||||
|
- Minor log line improvements for the SSO mapping code used to generate Matrix IDs from SSO IDs. ([\#8773](https://github.com/matrix-org/synapse/issues/8773))
|
||||||
|
- Add additional error checking for OpenID Connect and SAML mapping providers. ([\#8774](https://github.com/matrix-org/synapse/issues/8774), [\#8800](https://github.com/matrix-org/synapse/issues/8800))
|
||||||
|
- Add type hints to HTTP abstractions. ([\#8806](https://github.com/matrix-org/synapse/issues/8806), [\#8812](https://github.com/matrix-org/synapse/issues/8812))
|
||||||
|
- Remove unnecessary function arguments and add typing to several membership replication classes. ([\#8809](https://github.com/matrix-org/synapse/issues/8809))
|
||||||
|
- Optimise the lookup for an invite from another homeserver when trying to reject it. ([\#8815](https://github.com/matrix-org/synapse/issues/8815))
|
||||||
|
- Add tests for `password_auth_provider`s. ([\#8819](https://github.com/matrix-org/synapse/issues/8819))
|
||||||
|
- Drop redundant database index on `event_json`. ([\#8845](https://github.com/matrix-org/synapse/issues/8845))
|
||||||
|
- Simplify `uk.half-shot.msc2778.login.application_service` login handler. ([\#8847](https://github.com/matrix-org/synapse/issues/8847))
|
||||||
|
- Refactor `password_auth_provider` support code. ([\#8849](https://github.com/matrix-org/synapse/issues/8849))
|
||||||
|
- Add missing `ordering` to background database updates. ([\#8850](https://github.com/matrix-org/synapse/issues/8850))
|
||||||
|
- Allow for specifying a room version when creating a room in unit tests via `RestHelper.create_room_as`. ([\#8854](https://github.com/matrix-org/synapse/issues/8854))
|
||||||
|
|
||||||
|
|
||||||
|
Synapse 1.23.0 (2020-11-18)
|
||||||
|
===========================
|
||||||
|
|
||||||
|
This release changes the way structured logging is configured. See the [upgrade notes](UPGRADE.rst#upgrading-to-v1230) for details.
|
||||||
|
|
||||||
|
**Note**: We are aware of a trivially exploitable denial of service vulnerability in versions of Synapse prior to 1.20.0. Complete details will be disclosed on Monday, November 23rd. If you have not upgraded recently, please do so.
|
||||||
|
|
||||||
|
Bugfixes
|
||||||
|
--------
|
||||||
|
|
||||||
|
- Fix a dependency versioning bug in the Dockerfile that prevented Synapse from starting. ([\#8767](https://github.com/matrix-org/synapse/issues/8767))
|
||||||
|
|
||||||
|
|
||||||
|
Synapse 1.23.0rc1 (2020-11-13)
|
||||||
|
==============================
|
||||||
|
|
||||||
|
Features
|
||||||
|
--------
|
||||||
|
|
||||||
|
- Add a push rule that highlights when a jitsi conference is created in a room. ([\#8286](https://github.com/matrix-org/synapse/issues/8286))
|
||||||
|
- Add an admin api to delete a single file or files that were not used for a defined time from server. Contributed by @dklimpel. ([\#8519](https://github.com/matrix-org/synapse/issues/8519))
|
||||||
|
- Split admin API for reported events (`GET /_synapse/admin/v1/event_reports`) into detail and list endpoints. This is a breaking change to #8217 which was introduced in Synapse v1.21.0. Those who already use this API should check their scripts. Contributed by @dklimpel. ([\#8539](https://github.com/matrix-org/synapse/issues/8539))
|
||||||
|
- Support generating structured logs via the standard logging configuration. ([\#8607](https://github.com/matrix-org/synapse/issues/8607), [\#8685](https://github.com/matrix-org/synapse/issues/8685))
|
||||||
|
- Add an admin API to allow server admins to list users' pushers. Contributed by @dklimpel. ([\#8610](https://github.com/matrix-org/synapse/issues/8610), [\#8689](https://github.com/matrix-org/synapse/issues/8689))
|
||||||
|
- Add an admin API `GET /_synapse/admin/v1/users/<user_id>/media` to get information about uploaded media. Contributed by @dklimpel. ([\#8647](https://github.com/matrix-org/synapse/issues/8647))
|
||||||
|
- Add an admin API for local user media statistics. Contributed by @dklimpel. ([\#8700](https://github.com/matrix-org/synapse/issues/8700))
|
||||||
|
- Add `displayname` to Shared-Secret Registration for admins. ([\#8722](https://github.com/matrix-org/synapse/issues/8722))
|
||||||
|
|
||||||
|
|
||||||
|
Bugfixes
|
||||||
|
--------
|
||||||
|
|
||||||
|
- Fix fetching of E2E cross signing keys over federation when only one of the master key and device signing key is cached already. ([\#8455](https://github.com/matrix-org/synapse/issues/8455))
|
||||||
|
- Fix a bug where Synapse would blindly forward bad responses from federation to clients when retrieving profile information. ([\#8580](https://github.com/matrix-org/synapse/issues/8580))
|
||||||
|
- Fix a bug where the account validity endpoint would silently fail if the user ID did not have an expiration time. It now returns a 400 error. ([\#8620](https://github.com/matrix-org/synapse/issues/8620))
|
||||||
|
- Fix email notifications for invites without local state. ([\#8627](https://github.com/matrix-org/synapse/issues/8627))
|
||||||
|
- Fix handling of invalid group IDs to return a 400 rather than log an exception and return a 500. ([\#8628](https://github.com/matrix-org/synapse/issues/8628))
|
||||||
|
- Fix handling of User-Agent headers that are invalid UTF-8, which caused user agents of users to not get correctly recorded. ([\#8632](https://github.com/matrix-org/synapse/issues/8632))
|
||||||
|
- Fix a bug in the `joined_rooms` admin API if the user has never joined any rooms. The bug was introduced, along with the API, in v1.21.0. ([\#8643](https://github.com/matrix-org/synapse/issues/8643))
|
||||||
|
- Fix exception during handling multiple concurrent requests for remote media when using multiple media repositories. ([\#8682](https://github.com/matrix-org/synapse/issues/8682))
|
||||||
|
- Fix bug that prevented Synapse from recovering after losing connection to the database. ([\#8726](https://github.com/matrix-org/synapse/issues/8726))
|
||||||
|
- Fix bug where the `/_synapse/admin/v1/send_server_notice` API could send notices to non-notice rooms. ([\#8728](https://github.com/matrix-org/synapse/issues/8728))
|
||||||
|
- Fix PostgreSQL port script fails when DB has no backfilled events. Broke in v1.21.0. ([\#8729](https://github.com/matrix-org/synapse/issues/8729))
|
||||||
|
- Fix PostgreSQL port script to correctly handle foreign key constraints. Broke in v1.21.0. ([\#8730](https://github.com/matrix-org/synapse/issues/8730))
|
||||||
|
- Fix PostgreSQL port script so that it can be run again after a failure. Broke in v1.21.0. ([\#8755](https://github.com/matrix-org/synapse/issues/8755))
|
||||||
|
|
||||||
|
|
||||||
|
Improved Documentation
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
- Instructions for Azure AD in the OpenID Connect documentation. Contributed by peterk. ([\#8582](https://github.com/matrix-org/synapse/issues/8582))
|
||||||
|
- Improve the sample configuration for single sign-on providers. ([\#8635](https://github.com/matrix-org/synapse/issues/8635))
|
||||||
|
- Fix the filepath of Dex's example config and the link to Dex's Getting Started guide in the OpenID Connect docs. ([\#8657](https://github.com/matrix-org/synapse/issues/8657))
|
||||||
|
- Note support for Python 3.9. ([\#8665](https://github.com/matrix-org/synapse/issues/8665))
|
||||||
|
- Minor updates to docs on running tests. ([\#8666](https://github.com/matrix-org/synapse/issues/8666))
|
||||||
|
- Interlink prometheus/grafana documentation. ([\#8667](https://github.com/matrix-org/synapse/issues/8667))
|
||||||
|
- Notes on SSO logins and media_repository worker. ([\#8701](https://github.com/matrix-org/synapse/issues/8701))
|
||||||
|
- Document experimental support for running multiple event persisters. ([\#8706](https://github.com/matrix-org/synapse/issues/8706))
|
||||||
|
- Add information regarding the various sources of, and expected contributions to, Synapse's documentation to `CONTRIBUTING.md`. ([\#8714](https://github.com/matrix-org/synapse/issues/8714))
|
||||||
|
- Migrate documentation `docs/admin_api/event_reports` to markdown. ([\#8742](https://github.com/matrix-org/synapse/issues/8742))
|
||||||
|
- Add some helpful hints to the README for new Synapse developers. Contributed by @chagai95. ([\#8746](https://github.com/matrix-org/synapse/issues/8746))
|
||||||
|
|
||||||
|
|
||||||
|
Internal Changes
|
||||||
|
----------------
|
||||||
|
|
||||||
|
- Optimise `/createRoom` with multiple invited users. ([\#8559](https://github.com/matrix-org/synapse/issues/8559))
|
||||||
|
- Implement and use an `@lru_cache` decorator. ([\#8595](https://github.com/matrix-org/synapse/issues/8595))
|
||||||
|
- Don't instansiate Requester directly. ([\#8614](https://github.com/matrix-org/synapse/issues/8614))
|
||||||
|
- Type hints for `RegistrationStore`. ([\#8615](https://github.com/matrix-org/synapse/issues/8615))
|
||||||
|
- Change schema to support access tokens belonging to one user but granting access to another. ([\#8616](https://github.com/matrix-org/synapse/issues/8616))
|
||||||
|
- Remove unused OPTIONS handlers. ([\#8621](https://github.com/matrix-org/synapse/issues/8621))
|
||||||
|
- Run `mypy` as part of the lint.sh script. ([\#8633](https://github.com/matrix-org/synapse/issues/8633))
|
||||||
|
- Correct Synapse's PyPI package name in the OpenID Connect installation instructions. ([\#8634](https://github.com/matrix-org/synapse/issues/8634))
|
||||||
|
- Catch exceptions during initialization of `password_providers`. Contributed by Nicolai Søborg. ([\#8636](https://github.com/matrix-org/synapse/issues/8636))
|
||||||
|
- Fix typos and spelling errors in the code. ([\#8639](https://github.com/matrix-org/synapse/issues/8639))
|
||||||
|
- Reduce number of OpenTracing spans started. ([\#8640](https://github.com/matrix-org/synapse/issues/8640), [\#8668](https://github.com/matrix-org/synapse/issues/8668), [\#8670](https://github.com/matrix-org/synapse/issues/8670))
|
||||||
|
- Add field `total` to device list in admin API. ([\#8644](https://github.com/matrix-org/synapse/issues/8644))
|
||||||
|
- Add more type hints to the application services code. ([\#8655](https://github.com/matrix-org/synapse/issues/8655), [\#8693](https://github.com/matrix-org/synapse/issues/8693))
|
||||||
|
- Tell Black to format code for Python 3.5. ([\#8664](https://github.com/matrix-org/synapse/issues/8664))
|
||||||
|
- Don't pull event from DB when handling replication traffic. ([\#8669](https://github.com/matrix-org/synapse/issues/8669))
|
||||||
|
- Abstract some invite-related code in preparation for landing knocking. ([\#8671](https://github.com/matrix-org/synapse/issues/8671), [\#8688](https://github.com/matrix-org/synapse/issues/8688))
|
||||||
|
- Clarify representation of events in logfiles. ([\#8679](https://github.com/matrix-org/synapse/issues/8679))
|
||||||
|
- Don't require `hiredis` package to be installed to run unit tests. ([\#8680](https://github.com/matrix-org/synapse/issues/8680))
|
||||||
|
- Fix typing info on cache call signature to accept `on_invalidate`. ([\#8684](https://github.com/matrix-org/synapse/issues/8684))
|
||||||
|
- Fail tests if they do not await coroutines. ([\#8690](https://github.com/matrix-org/synapse/issues/8690))
|
||||||
|
- Improve start time by adding an index to `e2e_cross_signing_keys.stream_id`. ([\#8694](https://github.com/matrix-org/synapse/issues/8694))
|
||||||
|
- Re-organize the structured logging code to separate the TCP transport handling from the JSON formatting. ([\#8697](https://github.com/matrix-org/synapse/issues/8697))
|
||||||
|
- Use Python 3.8 in Docker images by default. ([\#8698](https://github.com/matrix-org/synapse/issues/8698))
|
||||||
|
- Remove the "draft" status of the Room Details Admin API. ([\#8702](https://github.com/matrix-org/synapse/issues/8702))
|
||||||
|
- Improve the error returned when a non-string displayname or avatar_url is used when updating a user's profile. ([\#8705](https://github.com/matrix-org/synapse/issues/8705))
|
||||||
|
- Block attempts by clients to send server ACLs, or redactions of server ACLs, that would result in the local server being blocked from the room. ([\#8708](https://github.com/matrix-org/synapse/issues/8708))
|
||||||
|
- Add metrics the allow the local sysadmin to track 3PID `/requestToken` requests. ([\#8712](https://github.com/matrix-org/synapse/issues/8712))
|
||||||
|
- Consolidate duplicated lists of purged tables that are checked in tests. ([\#8713](https://github.com/matrix-org/synapse/issues/8713))
|
||||||
|
- Add some `mdui:UIInfo` element examples for `saml2_config` in the homeserver config. ([\#8718](https://github.com/matrix-org/synapse/issues/8718))
|
||||||
|
- Improve the error message returned when a remote server incorrectly sets the `Content-Type` header in response to a JSON request. ([\#8719](https://github.com/matrix-org/synapse/issues/8719))
|
||||||
|
- Speed up repeated state resolutions on the same room by caching event ID to auth event ID lookups. ([\#8752](https://github.com/matrix-org/synapse/issues/8752))
|
||||||
|
|
||||||
|
|
||||||
Synapse 1.22.1 (2020-10-30)
|
Synapse 1.22.1 (2020-10-30)
|
||||||
===========================
|
===========================
|
||||||
|
|
||||||
@@ -6223,8 +6729,8 @@ Changes in synapse 0.5.1 (2014-11-26)
|
|||||||
|
|
||||||
See UPGRADES.rst for specific instructions on how to upgrade.
|
See UPGRADES.rst for specific instructions on how to upgrade.
|
||||||
|
|
||||||
> - Fix bug where we served up an Event that did not match its signatures.
|
- Fix bug where we served up an Event that did not match its signatures.
|
||||||
> - Fix regression where we no longer correctly handled the case where a homeserver receives an event for a room it doesn\'t recognise (but is in.)
|
- Fix regression where we no longer correctly handled the case where a homeserver receives an event for a room it doesn\'t recognise (but is in.)
|
||||||
|
|
||||||
Changes in synapse 0.5.0 (2014-11-19)
|
Changes in synapse 0.5.0 (2014-11-19)
|
||||||
=====================================
|
=====================================
|
||||||
@@ -6235,44 +6741,44 @@ This release also changes the internal database schemas and so requires servers
|
|||||||
|
|
||||||
Homeserver:
|
Homeserver:
|
||||||
|
|
||||||
: - Add authentication and authorization to the federation protocol. Events are now signed by their originating homeservers.
|
- Add authentication and authorization to the federation protocol. Events are now signed by their originating homeservers.
|
||||||
- Implement the new authorization model for rooms.
|
- Implement the new authorization model for rooms.
|
||||||
- Split out web client into a seperate repository: matrix-angular-sdk.
|
- Split out web client into a seperate repository: matrix-angular-sdk.
|
||||||
- Change the structure of PDUs.
|
- Change the structure of PDUs.
|
||||||
- Fix bug where user could not join rooms via an alias containing 4-byte UTF-8 characters.
|
- Fix bug where user could not join rooms via an alias containing 4-byte UTF-8 characters.
|
||||||
- Merge concept of PDUs and Events internally.
|
- Merge concept of PDUs and Events internally.
|
||||||
- Improve logging by adding request ids to log lines.
|
- Improve logging by adding request ids to log lines.
|
||||||
- Implement a very basic room initial sync API.
|
- Implement a very basic room initial sync API.
|
||||||
- Implement the new invite/join federation APIs.
|
- Implement the new invite/join federation APIs.
|
||||||
|
|
||||||
Webclient:
|
Webclient:
|
||||||
|
|
||||||
: - The webclient has been moved to a seperate repository.
|
- The webclient has been moved to a seperate repository.
|
||||||
|
|
||||||
Changes in synapse 0.4.2 (2014-10-31)
|
Changes in synapse 0.4.2 (2014-10-31)
|
||||||
=====================================
|
=====================================
|
||||||
|
|
||||||
Homeserver:
|
Homeserver:
|
||||||
|
|
||||||
: - Fix bugs where we did not notify users of correct presence updates.
|
- Fix bugs where we did not notify users of correct presence updates.
|
||||||
- Fix bug where we did not handle sub second event stream timeouts.
|
- Fix bug where we did not handle sub second event stream timeouts.
|
||||||
|
|
||||||
Webclient:
|
Webclient:
|
||||||
|
|
||||||
: - Add ability to click on messages to see JSON.
|
- Add ability to click on messages to see JSON.
|
||||||
- Add ability to redact messages.
|
- Add ability to redact messages.
|
||||||
- Add ability to view and edit all room state JSON.
|
- Add ability to view and edit all room state JSON.
|
||||||
- Handle incoming redactions.
|
- Handle incoming redactions.
|
||||||
- Improve feedback on errors.
|
- Improve feedback on errors.
|
||||||
- Fix bugs in mobile CSS.
|
- Fix bugs in mobile CSS.
|
||||||
- Fix bugs with desktop notifications.
|
- Fix bugs with desktop notifications.
|
||||||
|
|
||||||
Changes in synapse 0.4.1 (2014-10-17)
|
Changes in synapse 0.4.1 (2014-10-17)
|
||||||
=====================================
|
=====================================
|
||||||
|
|
||||||
Webclient:
|
Webclient:
|
||||||
|
|
||||||
: - Fix bug with display of timestamps.
|
- Fix bug with display of timestamps.
|
||||||
|
|
||||||
Changes in synpase 0.4.0 (2014-10-17)
|
Changes in synpase 0.4.0 (2014-10-17)
|
||||||
=====================================
|
=====================================
|
||||||
@@ -6285,8 +6791,8 @@ You will also need an updated syutil and config. See UPGRADES.rst.
|
|||||||
|
|
||||||
Homeserver:
|
Homeserver:
|
||||||
|
|
||||||
: - Sign federation transactions to assert strong identity over federation.
|
- Sign federation transactions to assert strong identity over federation.
|
||||||
- Rename timestamp keys in PDUs and events from \'ts\' and \'hsob\_ts\' to \'origin\_server\_ts\'.
|
- Rename timestamp keys in PDUs and events from \'ts\' and \'hsob\_ts\' to \'origin\_server\_ts\'.
|
||||||
|
|
||||||
Changes in synapse 0.3.4 (2014-09-25)
|
Changes in synapse 0.3.4 (2014-09-25)
|
||||||
=====================================
|
=====================================
|
||||||
@@ -6295,48 +6801,48 @@ This version adds support for using a TURN server. See docs/turn-howto.rst on ho
|
|||||||
|
|
||||||
Homeserver:
|
Homeserver:
|
||||||
|
|
||||||
: - Add support for redaction of messages.
|
- Add support for redaction of messages.
|
||||||
- Fix bug where inviting a user on a remote home server could take up to 20-30s.
|
- Fix bug where inviting a user on a remote home server could take up to 20-30s.
|
||||||
- Implement a get current room state API.
|
- Implement a get current room state API.
|
||||||
- Add support specifying and retrieving turn server configuration.
|
- Add support specifying and retrieving turn server configuration.
|
||||||
|
|
||||||
Webclient:
|
Webclient:
|
||||||
|
|
||||||
: - Add button to send messages to users from the home page.
|
- Add button to send messages to users from the home page.
|
||||||
- Add support for using TURN for VoIP calls.
|
- Add support for using TURN for VoIP calls.
|
||||||
- Show display name change messages.
|
- Show display name change messages.
|
||||||
- Fix bug where the client didn\'t get the state of a newly joined room until after it has been refreshed.
|
- Fix bug where the client didn\'t get the state of a newly joined room until after it has been refreshed.
|
||||||
- Fix bugs with tab complete.
|
- Fix bugs with tab complete.
|
||||||
- Fix bug where holding down the down arrow caused chrome to chew 100% CPU.
|
- Fix bug where holding down the down arrow caused chrome to chew 100% CPU.
|
||||||
- Fix bug where desktop notifications occasionally used \"Undefined\" as the display name.
|
- Fix bug where desktop notifications occasionally used \"Undefined\" as the display name.
|
||||||
- Fix more places where we sometimes saw room IDs incorrectly.
|
- Fix more places where we sometimes saw room IDs incorrectly.
|
||||||
- Fix bug which caused lag when entering text in the text box.
|
- Fix bug which caused lag when entering text in the text box.
|
||||||
|
|
||||||
Changes in synapse 0.3.3 (2014-09-22)
|
Changes in synapse 0.3.3 (2014-09-22)
|
||||||
=====================================
|
=====================================
|
||||||
|
|
||||||
Homeserver:
|
Homeserver:
|
||||||
|
|
||||||
: - Fix bug where you continued to get events for rooms you had left.
|
- Fix bug where you continued to get events for rooms you had left.
|
||||||
|
|
||||||
Webclient:
|
Webclient:
|
||||||
|
|
||||||
: - Add support for video calls with basic UI.
|
- Add support for video calls with basic UI.
|
||||||
- Fix bug where one to one chats were named after your display name rather than the other person\'s.
|
- Fix bug where one to one chats were named after your display name rather than the other person\'s.
|
||||||
- Fix bug which caused lag when typing in the textarea.
|
- Fix bug which caused lag when typing in the textarea.
|
||||||
- Refuse to run on browsers we know won\'t work.
|
- Refuse to run on browsers we know won\'t work.
|
||||||
- Trigger pagination when joining new rooms.
|
- Trigger pagination when joining new rooms.
|
||||||
- Fix bug where we sometimes didn\'t display invitations in recents.
|
- Fix bug where we sometimes didn\'t display invitations in recents.
|
||||||
- Automatically join room when accepting a VoIP call.
|
- Automatically join room when accepting a VoIP call.
|
||||||
- Disable outgoing and reject incoming calls on browsers we don\'t support VoIP in.
|
- Disable outgoing and reject incoming calls on browsers we don\'t support VoIP in.
|
||||||
- Don\'t display desktop notifications for messages in the room you are non-idle and speaking in.
|
- Don\'t display desktop notifications for messages in the room you are non-idle and speaking in.
|
||||||
|
|
||||||
Changes in synapse 0.3.2 (2014-09-18)
|
Changes in synapse 0.3.2 (2014-09-18)
|
||||||
=====================================
|
=====================================
|
||||||
|
|
||||||
Webclient:
|
Webclient:
|
||||||
|
|
||||||
: - Fix bug where an empty \"bing words\" list in old accounts didn\'t send notifications when it should have done.
|
- Fix bug where an empty \"bing words\" list in old accounts didn\'t send notifications when it should have done.
|
||||||
|
|
||||||
Changes in synapse 0.3.1 (2014-09-18)
|
Changes in synapse 0.3.1 (2014-09-18)
|
||||||
=====================================
|
=====================================
|
||||||
@@ -6345,8 +6851,8 @@ This is a release to hotfix v0.3.0 to fix two regressions.
|
|||||||
|
|
||||||
Webclient:
|
Webclient:
|
||||||
|
|
||||||
: - Fix a regression where we sometimes displayed duplicate events.
|
- Fix a regression where we sometimes displayed duplicate events.
|
||||||
- Fix a regression where we didn\'t immediately remove rooms you were banned in from the recents list.
|
- Fix a regression where we didn\'t immediately remove rooms you were banned in from the recents list.
|
||||||
|
|
||||||
Changes in synapse 0.3.0 (2014-09-18)
|
Changes in synapse 0.3.0 (2014-09-18)
|
||||||
=====================================
|
=====================================
|
||||||
@@ -6355,91 +6861,91 @@ See UPGRADE for information about changes to the client server API, including br
|
|||||||
|
|
||||||
Homeserver:
|
Homeserver:
|
||||||
|
|
||||||
: - When a user changes their displayname or avatar the server will now update all their join states to reflect this.
|
- When a user changes their displayname or avatar the server will now update all their join states to reflect this.
|
||||||
- The server now adds \"age\" key to events to indicate how old they are. This is clock independent, so at no point does any server or webclient have to assume their clock is in sync with everyone else.
|
- The server now adds \"age\" key to events to indicate how old they are. This is clock independent, so at no point does any server or webclient have to assume their clock is in sync with everyone else.
|
||||||
- Fix bug where we didn\'t correctly pull in missing PDUs.
|
- Fix bug where we didn\'t correctly pull in missing PDUs.
|
||||||
- Fix bug where prev\_content key wasn\'t always returned.
|
- Fix bug where prev\_content key wasn\'t always returned.
|
||||||
- Add support for password resets.
|
- Add support for password resets.
|
||||||
|
|
||||||
Webclient:
|
Webclient:
|
||||||
|
|
||||||
: - Improve page content loading.
|
- Improve page content loading.
|
||||||
- Join/parts now trigger desktop notifications.
|
- Join/parts now trigger desktop notifications.
|
||||||
- Always show room aliases in the UI if one is present.
|
- Always show room aliases in the UI if one is present.
|
||||||
- No longer show user-count in the recents side panel.
|
- No longer show user-count in the recents side panel.
|
||||||
- Add up & down arrow support to the text box for message sending to step through your sent history.
|
- Add up & down arrow support to the text box for message sending to step through your sent history.
|
||||||
- Don\'t display notifications for our own messages.
|
- Don\'t display notifications for our own messages.
|
||||||
- Emotes are now formatted correctly in desktop notifications.
|
- Emotes are now formatted correctly in desktop notifications.
|
||||||
- The recents list now differentiates between public & private rooms.
|
- The recents list now differentiates between public & private rooms.
|
||||||
- Fix bug where when switching between rooms the pagination flickered before the view jumped to the bottom of the screen.
|
- Fix bug where when switching between rooms the pagination flickered before the view jumped to the bottom of the screen.
|
||||||
- Add bing word support.
|
- Add bing word support.
|
||||||
|
|
||||||
Registration API:
|
Registration API:
|
||||||
|
|
||||||
: - The registration API has been overhauled to function like the login API. In practice, this means registration requests must now include the following: \'type\':\'m.login.password\'. See UPGRADE for more information on this.
|
- The registration API has been overhauled to function like the login API. In practice, this means registration requests must now include the following: \'type\':\'m.login.password\'. See UPGRADE for more information on this.
|
||||||
- The \'user\_id\' key has been renamed to \'user\' to better match the login API.
|
- The \'user\_id\' key has been renamed to \'user\' to better match the login API.
|
||||||
- There is an additional login type: \'m.login.email.identity\'.
|
- There is an additional login type: \'m.login.email.identity\'.
|
||||||
- The command client and web client have been updated to reflect these changes.
|
- The command client and web client have been updated to reflect these changes.
|
||||||
|
|
||||||
Changes in synapse 0.2.3 (2014-09-12)
|
Changes in synapse 0.2.3 (2014-09-12)
|
||||||
=====================================
|
=====================================
|
||||||
|
|
||||||
Homeserver:
|
Homeserver:
|
||||||
|
|
||||||
: - Fix bug where we stopped sending events to remote home servers if a user from that home server left, even if there were some still in the room.
|
- Fix bug where we stopped sending events to remote home servers if a user from that home server left, even if there were some still in the room.
|
||||||
- Fix bugs in the state conflict resolution where it was incorrectly rejecting events.
|
- Fix bugs in the state conflict resolution where it was incorrectly rejecting events.
|
||||||
|
|
||||||
Webclient:
|
Webclient:
|
||||||
|
|
||||||
: - Display room names and topics.
|
- Display room names and topics.
|
||||||
- Allow setting/editing of room names and topics.
|
- Allow setting/editing of room names and topics.
|
||||||
- Display information about rooms on the main page.
|
- Display information about rooms on the main page.
|
||||||
- Handle ban and kick events in real time.
|
- Handle ban and kick events in real time.
|
||||||
- VoIP UI and reliability improvements.
|
- VoIP UI and reliability improvements.
|
||||||
- Add glare support for VoIP.
|
- Add glare support for VoIP.
|
||||||
- Improvements to initial startup speed.
|
- Improvements to initial startup speed.
|
||||||
- Don\'t display duplicate join events.
|
- Don\'t display duplicate join events.
|
||||||
- Local echo of messages.
|
- Local echo of messages.
|
||||||
- Differentiate sending and sent of local echo.
|
- Differentiate sending and sent of local echo.
|
||||||
- Various minor bug fixes.
|
- Various minor bug fixes.
|
||||||
|
|
||||||
Changes in synapse 0.2.2 (2014-09-06)
|
Changes in synapse 0.2.2 (2014-09-06)
|
||||||
=====================================
|
=====================================
|
||||||
|
|
||||||
Homeserver:
|
Homeserver:
|
||||||
|
|
||||||
: - When the server returns state events it now also includes the previous content.
|
- When the server returns state events it now also includes the previous content.
|
||||||
- Add support for inviting people when creating a new room.
|
- Add support for inviting people when creating a new room.
|
||||||
- Make the homeserver inform the room via m.room.aliases when a new alias is added for a room.
|
- Make the homeserver inform the room via m.room.aliases when a new alias is added for a room.
|
||||||
- Validate m.room.power\_level events.
|
- Validate m.room.power\_level events.
|
||||||
|
|
||||||
Webclient:
|
Webclient:
|
||||||
|
|
||||||
: - Add support for captchas on registration.
|
- Add support for captchas on registration.
|
||||||
- Handle m.room.aliases events.
|
- Handle m.room.aliases events.
|
||||||
- Asynchronously send messages and show a local echo.
|
- Asynchronously send messages and show a local echo.
|
||||||
- Inform the UI when a message failed to send.
|
- Inform the UI when a message failed to send.
|
||||||
- Only autoscroll on receiving a new message if the user was already at the bottom of the screen.
|
- Only autoscroll on receiving a new message if the user was already at the bottom of the screen.
|
||||||
- Add support for ban/kick reasons.
|
- Add support for ban/kick reasons.
|
||||||
|
|
||||||
Changes in synapse 0.2.1 (2014-09-03)
|
Changes in synapse 0.2.1 (2014-09-03)
|
||||||
=====================================
|
=====================================
|
||||||
|
|
||||||
Homeserver:
|
Homeserver:
|
||||||
|
|
||||||
: - Added support for signing up with a third party id.
|
- Added support for signing up with a third party id.
|
||||||
- Add synctl scripts.
|
- Add synctl scripts.
|
||||||
- Added rate limiting.
|
- Added rate limiting.
|
||||||
- Add option to change the external address the content repo uses.
|
- Add option to change the external address the content repo uses.
|
||||||
- Presence bug fixes.
|
- Presence bug fixes.
|
||||||
|
|
||||||
Webclient:
|
Webclient:
|
||||||
|
|
||||||
: - Added support for signing up with a third party id.
|
- Added support for signing up with a third party id.
|
||||||
- Added support for banning and kicking users.
|
- Added support for banning and kicking users.
|
||||||
- Added support for displaying and setting ops.
|
- Added support for displaying and setting ops.
|
||||||
- Added support for room names.
|
- Added support for room names.
|
||||||
- Fix bugs with room membership event display.
|
- Fix bugs with room membership event display.
|
||||||
|
|
||||||
Changes in synapse 0.2.0 (2014-09-02)
|
Changes in synapse 0.2.0 (2014-09-02)
|
||||||
=====================================
|
=====================================
|
||||||
@@ -6448,36 +6954,36 @@ This update changes many configuration options, updates the database schema and
|
|||||||
|
|
||||||
Homeserver:
|
Homeserver:
|
||||||
|
|
||||||
: - Require SSL for server-server connections.
|
- Require SSL for server-server connections.
|
||||||
- Add SSL listener for client-server connections.
|
- Add SSL listener for client-server connections.
|
||||||
- Add ability to use config files.
|
- Add ability to use config files.
|
||||||
- Add support for kicking/banning and power levels.
|
- Add support for kicking/banning and power levels.
|
||||||
- Allow setting of room names and topics on creation.
|
- Allow setting of room names and topics on creation.
|
||||||
- Change presence to include last seen time of the user.
|
- Change presence to include last seen time of the user.
|
||||||
- Change url path prefix to /\_matrix/\...
|
- Change url path prefix to /\_matrix/\...
|
||||||
- Bug fixes to presence.
|
- Bug fixes to presence.
|
||||||
|
|
||||||
Webclient:
|
Webclient:
|
||||||
|
|
||||||
: - Reskin the CSS for registration and login.
|
- Reskin the CSS for registration and login.
|
||||||
- Various improvements to rooms CSS.
|
- Various improvements to rooms CSS.
|
||||||
- Support changes in client-server API.
|
- Support changes in client-server API.
|
||||||
- Bug fixes to VOIP UI.
|
- Bug fixes to VOIP UI.
|
||||||
- Various bug fixes to handling of changes to room member list.
|
- Various bug fixes to handling of changes to room member list.
|
||||||
|
|
||||||
Changes in synapse 0.1.2 (2014-08-29)
|
Changes in synapse 0.1.2 (2014-08-29)
|
||||||
=====================================
|
=====================================
|
||||||
|
|
||||||
Webclient:
|
Webclient:
|
||||||
|
|
||||||
: - Add basic call state UI for VoIP calls.
|
- Add basic call state UI for VoIP calls.
|
||||||
|
|
||||||
Changes in synapse 0.1.1 (2014-08-29)
|
Changes in synapse 0.1.1 (2014-08-29)
|
||||||
=====================================
|
=====================================
|
||||||
|
|
||||||
Homeserver:
|
Homeserver:
|
||||||
|
|
||||||
: - Fix bug that caused the event stream to not notify some clients about changes.
|
- Fix bug that caused the event stream to not notify some clients about changes.
|
||||||
|
|
||||||
Changes in synapse 0.1.0 (2014-08-29)
|
Changes in synapse 0.1.0 (2014-08-29)
|
||||||
=====================================
|
=====================================
|
||||||
@@ -6486,26 +6992,22 @@ Presence has been reenabled in this release.
|
|||||||
|
|
||||||
Homeserver:
|
Homeserver:
|
||||||
|
|
||||||
: -
|
- Update client to server API, including:
|
||||||
|
- Use a more consistent url scheme.
|
||||||
Update client to server API, including:
|
- Provide more useful information in the initial sync api.
|
||||||
|
- Change the presence handling to be much more efficient.
|
||||||
: - Use a more consistent url scheme.
|
- Change the presence server to server API to not require explicit polling of all users who share a room with a user.
|
||||||
- Provide more useful information in the initial sync api.
|
- Fix races in the event streaming logic.
|
||||||
|
|
||||||
- Change the presence handling to be much more efficient.
|
|
||||||
- Change the presence server to server API to not require explicit polling of all users who share a room with a user.
|
|
||||||
- Fix races in the event streaming logic.
|
|
||||||
|
|
||||||
Webclient:
|
Webclient:
|
||||||
|
|
||||||
: - Update to use new client to server API.
|
- Update to use new client to server API.
|
||||||
- Add basic VOIP support.
|
- Add basic VOIP support.
|
||||||
- Add idle timers that change your status to away.
|
- Add idle timers that change your status to away.
|
||||||
- Add recent rooms column when viewing a room.
|
- Add recent rooms column when viewing a room.
|
||||||
- Various network efficiency improvements.
|
- Various network efficiency improvements.
|
||||||
- Add basic mobile browser support.
|
- Add basic mobile browser support.
|
||||||
- Add a settings page.
|
- Add a settings page.
|
||||||
|
|
||||||
Changes in synapse 0.0.1 (2014-08-22)
|
Changes in synapse 0.0.1 (2014-08-22)
|
||||||
=====================================
|
=====================================
|
||||||
@@ -6514,26 +7016,26 @@ Presence has been disabled in this release due to a bug that caused the homeserv
|
|||||||
|
|
||||||
Homeserver:
|
Homeserver:
|
||||||
|
|
||||||
: - Completely change the database schema to support generic event types.
|
- Completely change the database schema to support generic event types.
|
||||||
- Improve presence reliability.
|
- Improve presence reliability.
|
||||||
- Improve reliability of joining remote rooms.
|
- Improve reliability of joining remote rooms.
|
||||||
- Fix bug where room join events were duplicated.
|
- Fix bug where room join events were duplicated.
|
||||||
- Improve initial sync API to return more information to the client.
|
- Improve initial sync API to return more information to the client.
|
||||||
- Stop generating fake messages for room membership events.
|
- Stop generating fake messages for room membership events.
|
||||||
|
|
||||||
Webclient:
|
Webclient:
|
||||||
|
|
||||||
: - Add tab completion of names.
|
- Add tab completion of names.
|
||||||
- Add ability to upload and send images.
|
- Add ability to upload and send images.
|
||||||
- Add profile pages.
|
- Add profile pages.
|
||||||
- Improve CSS layout of room.
|
- Improve CSS layout of room.
|
||||||
- Disambiguate identical display names.
|
- Disambiguate identical display names.
|
||||||
- Don\'t get remote users display names and avatars individually.
|
- Don\'t get remote users display names and avatars individually.
|
||||||
- Use the new initial sync API to reduce number of round trips to the homeserver.
|
- Use the new initial sync API to reduce number of round trips to the homeserver.
|
||||||
- Change url scheme to use room aliases instead of room ids where known.
|
- Change url scheme to use room aliases instead of room ids where known.
|
||||||
- Increase longpoll timeout.
|
- Increase longpoll timeout.
|
||||||
|
|
||||||
Changes in synapse 0.0.0 (2014-08-13)
|
Changes in synapse 0.0.0 (2014-08-13)
|
||||||
=====================================
|
=====================================
|
||||||
|
|
||||||
> - Initial alpha release
|
- Initial alpha release
|
||||||
|
|||||||
273
INSTALL.md
273
INSTALL.md
@@ -1,19 +1,44 @@
|
|||||||
- [Choosing your server name](#choosing-your-server-name)
|
# Installation Instructions
|
||||||
- [Picking a database engine](#picking-a-database-engine)
|
|
||||||
- [Installing Synapse](#installing-synapse)
|
|
||||||
- [Installing from source](#installing-from-source)
|
|
||||||
- [Platform-Specific Instructions](#platform-specific-instructions)
|
|
||||||
- [Prebuilt packages](#prebuilt-packages)
|
|
||||||
- [Setting up Synapse](#setting-up-synapse)
|
|
||||||
- [TLS certificates](#tls-certificates)
|
|
||||||
- [Client Well-Known URI](#client-well-known-uri)
|
|
||||||
- [Email](#email)
|
|
||||||
- [Registering a user](#registering-a-user)
|
|
||||||
- [Setting up a TURN server](#setting-up-a-turn-server)
|
|
||||||
- [URL previews](#url-previews)
|
|
||||||
- [Troubleshooting Installation](#troubleshooting-installation)
|
|
||||||
|
|
||||||
# Choosing your server name
|
There are 3 steps to follow under **Installation Instructions**.
|
||||||
|
|
||||||
|
- [Installation Instructions](#installation-instructions)
|
||||||
|
- [Choosing your server name](#choosing-your-server-name)
|
||||||
|
- [Installing Synapse](#installing-synapse)
|
||||||
|
- [Installing from source](#installing-from-source)
|
||||||
|
- [Platform-Specific Instructions](#platform-specific-instructions)
|
||||||
|
- [Debian/Ubuntu/Raspbian](#debianubunturaspbian)
|
||||||
|
- [ArchLinux](#archlinux)
|
||||||
|
- [CentOS/Fedora](#centosfedora)
|
||||||
|
- [macOS](#macos)
|
||||||
|
- [OpenSUSE](#opensuse)
|
||||||
|
- [OpenBSD](#openbsd)
|
||||||
|
- [Windows](#windows)
|
||||||
|
- [Prebuilt packages](#prebuilt-packages)
|
||||||
|
- [Docker images and Ansible playbooks](#docker-images-and-ansible-playbooks)
|
||||||
|
- [Debian/Ubuntu](#debianubuntu)
|
||||||
|
- [Matrix.org packages](#matrixorg-packages)
|
||||||
|
- [Downstream Debian packages](#downstream-debian-packages)
|
||||||
|
- [Downstream Ubuntu packages](#downstream-ubuntu-packages)
|
||||||
|
- [Fedora](#fedora)
|
||||||
|
- [OpenSUSE](#opensuse-1)
|
||||||
|
- [SUSE Linux Enterprise Server](#suse-linux-enterprise-server)
|
||||||
|
- [ArchLinux](#archlinux-1)
|
||||||
|
- [Void Linux](#void-linux)
|
||||||
|
- [FreeBSD](#freebsd)
|
||||||
|
- [OpenBSD](#openbsd-1)
|
||||||
|
- [NixOS](#nixos)
|
||||||
|
- [Setting up Synapse](#setting-up-synapse)
|
||||||
|
- [Using PostgreSQL](#using-postgresql)
|
||||||
|
- [TLS certificates](#tls-certificates)
|
||||||
|
- [Client Well-Known URI](#client-well-known-uri)
|
||||||
|
- [Email](#email)
|
||||||
|
- [Registering a user](#registering-a-user)
|
||||||
|
- [Setting up a TURN server](#setting-up-a-turn-server)
|
||||||
|
- [URL previews](#url-previews)
|
||||||
|
- [Troubleshooting Installation](#troubleshooting-installation)
|
||||||
|
|
||||||
|
## Choosing your server name
|
||||||
|
|
||||||
It is important to choose the name for your server before you install Synapse,
|
It is important to choose the name for your server before you install Synapse,
|
||||||
because it cannot be changed later.
|
because it cannot be changed later.
|
||||||
@@ -29,28 +54,9 @@ that your email address is probably `user@example.com` rather than
|
|||||||
`user@email.example.com`) - but doing so may require more advanced setup: see
|
`user@email.example.com`) - but doing so may require more advanced setup: see
|
||||||
[Setting up Federation](docs/federate.md).
|
[Setting up Federation](docs/federate.md).
|
||||||
|
|
||||||
# Picking a database engine
|
## Installing Synapse
|
||||||
|
|
||||||
Synapse offers two database engines:
|
### Installing from source
|
||||||
* [PostgreSQL](https://www.postgresql.org)
|
|
||||||
* [SQLite](https://sqlite.org/)
|
|
||||||
|
|
||||||
Almost all installations should opt to use PostgreSQL. Advantages include:
|
|
||||||
|
|
||||||
* significant performance improvements due to the superior threading and
|
|
||||||
caching model, smarter query optimiser
|
|
||||||
* allowing the DB to be run on separate hardware
|
|
||||||
|
|
||||||
For information on how to install and use PostgreSQL, please see
|
|
||||||
[docs/postgres.md](docs/postgres.md)
|
|
||||||
|
|
||||||
By default Synapse uses SQLite and in doing so trades performance for convenience.
|
|
||||||
SQLite is only recommended in Synapse for testing purposes or for servers with
|
|
||||||
light workloads.
|
|
||||||
|
|
||||||
# Installing Synapse
|
|
||||||
|
|
||||||
## Installing from source
|
|
||||||
|
|
||||||
(Prebuilt packages are available for some platforms - see [Prebuilt packages](#prebuilt-packages).)
|
(Prebuilt packages are available for some platforms - see [Prebuilt packages](#prebuilt-packages).)
|
||||||
|
|
||||||
@@ -68,7 +74,7 @@ these on various platforms.
|
|||||||
|
|
||||||
To install the Synapse homeserver run:
|
To install the Synapse homeserver run:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
mkdir -p ~/synapse
|
mkdir -p ~/synapse
|
||||||
virtualenv -p python3 ~/synapse/env
|
virtualenv -p python3 ~/synapse/env
|
||||||
source ~/synapse/env/bin/activate
|
source ~/synapse/env/bin/activate
|
||||||
@@ -85,7 +91,7 @@ prefer.
|
|||||||
This Synapse installation can then be later upgraded by using pip again with the
|
This Synapse installation can then be later upgraded by using pip again with the
|
||||||
update flag:
|
update flag:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
source ~/synapse/env/bin/activate
|
source ~/synapse/env/bin/activate
|
||||||
pip install -U matrix-synapse
|
pip install -U matrix-synapse
|
||||||
```
|
```
|
||||||
@@ -93,7 +99,7 @@ pip install -U matrix-synapse
|
|||||||
Before you can start Synapse, you will need to generate a configuration
|
Before you can start Synapse, you will need to generate a configuration
|
||||||
file. To do this, run (in your virtualenv, as before):
|
file. To do this, run (in your virtualenv, as before):
|
||||||
|
|
||||||
```
|
```sh
|
||||||
cd ~/synapse
|
cd ~/synapse
|
||||||
python -m synapse.app.homeserver \
|
python -m synapse.app.homeserver \
|
||||||
--server-name my.domain.name \
|
--server-name my.domain.name \
|
||||||
@@ -111,45 +117,43 @@ wise to back them up somewhere safe. (If, for whatever reason, you do need to
|
|||||||
change your homeserver's keys, you may find that other homeserver have the
|
change your homeserver's keys, you may find that other homeserver have the
|
||||||
old key cached. If you update the signing key, you should change the name of the
|
old key cached. If you update the signing key, you should change the name of the
|
||||||
key in the `<server name>.signing.key` file (the second word) to something
|
key in the `<server name>.signing.key` file (the second word) to something
|
||||||
different. See the
|
different. See the [spec](https://matrix.org/docs/spec/server_server/latest.html#retrieving-server-keys) for more information on key management).
|
||||||
[spec](https://matrix.org/docs/spec/server_server/latest.html#retrieving-server-keys)
|
|
||||||
for more information on key management).
|
|
||||||
|
|
||||||
To actually run your new homeserver, pick a working directory for Synapse to
|
To actually run your new homeserver, pick a working directory for Synapse to
|
||||||
run (e.g. `~/synapse`), and:
|
run (e.g. `~/synapse`), and:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
cd ~/synapse
|
cd ~/synapse
|
||||||
source env/bin/activate
|
source env/bin/activate
|
||||||
synctl start
|
synctl start
|
||||||
```
|
```
|
||||||
|
|
||||||
### Platform-Specific Instructions
|
#### Platform-Specific Instructions
|
||||||
|
|
||||||
#### Debian/Ubuntu/Raspbian
|
##### Debian/Ubuntu/Raspbian
|
||||||
|
|
||||||
Installing prerequisites on Ubuntu or Debian:
|
Installing prerequisites on Ubuntu or Debian:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
sudo apt-get install build-essential python3-dev libffi-dev \
|
sudo apt install build-essential python3-dev libffi-dev \
|
||||||
python3-pip python3-setuptools sqlite3 \
|
python3-pip python3-setuptools sqlite3 \
|
||||||
libssl-dev virtualenv libjpeg-dev libxslt1-dev
|
libssl-dev virtualenv libjpeg-dev libxslt1-dev
|
||||||
```
|
```
|
||||||
|
|
||||||
#### ArchLinux
|
##### ArchLinux
|
||||||
|
|
||||||
Installing prerequisites on ArchLinux:
|
Installing prerequisites on ArchLinux:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
sudo pacman -S base-devel python python-pip \
|
sudo pacman -S base-devel python python-pip \
|
||||||
python-setuptools python-virtualenv sqlite3
|
python-setuptools python-virtualenv sqlite3
|
||||||
```
|
```
|
||||||
|
|
||||||
#### CentOS/Fedora
|
##### CentOS/Fedora
|
||||||
|
|
||||||
Installing prerequisites on CentOS 8 or Fedora>26:
|
Installing prerequisites on CentOS 8 or Fedora>26:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
sudo dnf install libtiff-devel libjpeg-devel libzip-devel freetype-devel \
|
sudo dnf install libtiff-devel libjpeg-devel libzip-devel freetype-devel \
|
||||||
libwebp-devel tk-devel redhat-rpm-config \
|
libwebp-devel tk-devel redhat-rpm-config \
|
||||||
python3-virtualenv libffi-devel openssl-devel
|
python3-virtualenv libffi-devel openssl-devel
|
||||||
@@ -158,7 +162,7 @@ sudo dnf groupinstall "Development Tools"
|
|||||||
|
|
||||||
Installing prerequisites on CentOS 7 or Fedora<=25:
|
Installing prerequisites on CentOS 7 or Fedora<=25:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
sudo yum install libtiff-devel libjpeg-devel libzip-devel freetype-devel \
|
sudo yum install libtiff-devel libjpeg-devel libzip-devel freetype-devel \
|
||||||
lcms2-devel libwebp-devel tcl-devel tk-devel redhat-rpm-config \
|
lcms2-devel libwebp-devel tcl-devel tk-devel redhat-rpm-config \
|
||||||
python3-virtualenv libffi-devel openssl-devel
|
python3-virtualenv libffi-devel openssl-devel
|
||||||
@@ -170,11 +174,11 @@ uses SQLite 3.7. You may be able to work around this by installing a more
|
|||||||
recent SQLite version, but it is recommended that you instead use a Postgres
|
recent SQLite version, but it is recommended that you instead use a Postgres
|
||||||
database: see [docs/postgres.md](docs/postgres.md).
|
database: see [docs/postgres.md](docs/postgres.md).
|
||||||
|
|
||||||
#### macOS
|
##### macOS
|
||||||
|
|
||||||
Installing prerequisites on macOS:
|
Installing prerequisites on macOS:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
xcode-select --install
|
xcode-select --install
|
||||||
sudo easy_install pip
|
sudo easy_install pip
|
||||||
sudo pip install virtualenv
|
sudo pip install virtualenv
|
||||||
@@ -184,22 +188,23 @@ brew install pkg-config libffi
|
|||||||
On macOS Catalina (10.15) you may need to explicitly install OpenSSL
|
On macOS Catalina (10.15) you may need to explicitly install OpenSSL
|
||||||
via brew and inform `pip` about it so that `psycopg2` builds:
|
via brew and inform `pip` about it so that `psycopg2` builds:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
brew install openssl@1.1
|
brew install openssl@1.1
|
||||||
export LDFLAGS=-L/usr/local/Cellar/openssl\@1.1/1.1.1d/lib/
|
export LDFLAGS="-L/usr/local/opt/openssl/lib"
|
||||||
|
export CPPFLAGS="-I/usr/local/opt/openssl/include"
|
||||||
```
|
```
|
||||||
|
|
||||||
#### OpenSUSE
|
##### OpenSUSE
|
||||||
|
|
||||||
Installing prerequisites on openSUSE:
|
Installing prerequisites on openSUSE:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
sudo zypper in -t pattern devel_basis
|
sudo zypper in -t pattern devel_basis
|
||||||
sudo zypper in python-pip python-setuptools sqlite3 python-virtualenv \
|
sudo zypper in python-pip python-setuptools sqlite3 python-virtualenv \
|
||||||
python-devel libffi-devel libopenssl-devel libjpeg62-devel
|
python-devel libffi-devel libopenssl-devel libjpeg62-devel
|
||||||
```
|
```
|
||||||
|
|
||||||
#### OpenBSD
|
##### OpenBSD
|
||||||
|
|
||||||
A port of Synapse is available under `net/synapse`. The filesystem
|
A port of Synapse is available under `net/synapse`. The filesystem
|
||||||
underlying the homeserver directory (defaults to `/var/synapse`) has to be
|
underlying the homeserver directory (defaults to `/var/synapse`) has to be
|
||||||
@@ -213,73 +218,72 @@ mounted with `wxallowed` (cf. `mount(8)`).
|
|||||||
Creating a `WRKOBJDIR` for building python under `/usr/local` (which on a
|
Creating a `WRKOBJDIR` for building python under `/usr/local` (which on a
|
||||||
default OpenBSD installation is mounted with `wxallowed`):
|
default OpenBSD installation is mounted with `wxallowed`):
|
||||||
|
|
||||||
```
|
```sh
|
||||||
doas mkdir /usr/local/pobj_wxallowed
|
doas mkdir /usr/local/pobj_wxallowed
|
||||||
```
|
```
|
||||||
|
|
||||||
Assuming `PORTS_PRIVSEP=Yes` (cf. `bsd.port.mk(5)`) and `SUDO=doas` are
|
Assuming `PORTS_PRIVSEP=Yes` (cf. `bsd.port.mk(5)`) and `SUDO=doas` are
|
||||||
configured in `/etc/mk.conf`:
|
configured in `/etc/mk.conf`:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
doas chown _pbuild:_pbuild /usr/local/pobj_wxallowed
|
doas chown _pbuild:_pbuild /usr/local/pobj_wxallowed
|
||||||
```
|
```
|
||||||
|
|
||||||
Setting the `WRKOBJDIR` for building python:
|
Setting the `WRKOBJDIR` for building python:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
echo WRKOBJDIR_lang/python/3.7=/usr/local/pobj_wxallowed \\nWRKOBJDIR_lang/python/2.7=/usr/local/pobj_wxallowed >> /etc/mk.conf
|
echo WRKOBJDIR_lang/python/3.7=/usr/local/pobj_wxallowed \\nWRKOBJDIR_lang/python/2.7=/usr/local/pobj_wxallowed >> /etc/mk.conf
|
||||||
```
|
```
|
||||||
|
|
||||||
Building Synapse:
|
Building Synapse:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
cd /usr/ports/net/synapse
|
cd /usr/ports/net/synapse
|
||||||
make install
|
make install
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Windows
|
##### Windows
|
||||||
|
|
||||||
If you wish to run or develop Synapse on Windows, the Windows Subsystem For
|
If you wish to run or develop Synapse on Windows, the Windows Subsystem For
|
||||||
Linux provides a Linux environment on Windows 10 which is capable of using the
|
Linux provides a Linux environment on Windows 10 which is capable of using the
|
||||||
Debian, Fedora, or source installation methods. More information about WSL can
|
Debian, Fedora, or source installation methods. More information about WSL can
|
||||||
be found at https://docs.microsoft.com/en-us/windows/wsl/install-win10 for
|
be found at <https://docs.microsoft.com/en-us/windows/wsl/install-win10> for
|
||||||
Windows 10 and https://docs.microsoft.com/en-us/windows/wsl/install-on-server
|
Windows 10 and <https://docs.microsoft.com/en-us/windows/wsl/install-on-server>
|
||||||
for Windows Server.
|
for Windows Server.
|
||||||
|
|
||||||
## Prebuilt packages
|
### Prebuilt packages
|
||||||
|
|
||||||
As an alternative to installing from source, prebuilt packages are available
|
As an alternative to installing from source, prebuilt packages are available
|
||||||
for a number of platforms.
|
for a number of platforms.
|
||||||
|
|
||||||
### Docker images and Ansible playbooks
|
#### Docker images and Ansible playbooks
|
||||||
|
|
||||||
There is an offical synapse image available at
|
There is an official synapse image available at
|
||||||
https://hub.docker.com/r/matrixdotorg/synapse which can be used with
|
<https://hub.docker.com/r/matrixdotorg/synapse> which can be used with
|
||||||
the docker-compose file available at [contrib/docker](contrib/docker). Further
|
the docker-compose file available at [contrib/docker](contrib/docker). Further
|
||||||
information on this including configuration options is available in the README
|
information on this including configuration options is available in the README
|
||||||
on hub.docker.com.
|
on hub.docker.com.
|
||||||
|
|
||||||
Alternatively, Andreas Peters (previously Silvio Fricke) has contributed a
|
Alternatively, Andreas Peters (previously Silvio Fricke) has contributed a
|
||||||
Dockerfile to automate a synapse server in a single Docker image, at
|
Dockerfile to automate a synapse server in a single Docker image, at
|
||||||
https://hub.docker.com/r/avhost/docker-matrix/tags/
|
<https://hub.docker.com/r/avhost/docker-matrix/tags/>
|
||||||
|
|
||||||
Slavi Pantaleev has created an Ansible playbook,
|
Slavi Pantaleev has created an Ansible playbook,
|
||||||
which installs the offical Docker image of Matrix Synapse
|
which installs the offical Docker image of Matrix Synapse
|
||||||
along with many other Matrix-related services (Postgres database, Element, coturn,
|
along with many other Matrix-related services (Postgres database, Element, coturn,
|
||||||
ma1sd, SSL support, etc.).
|
ma1sd, SSL support, etc.).
|
||||||
For more details, see
|
For more details, see
|
||||||
https://github.com/spantaleev/matrix-docker-ansible-deploy
|
<https://github.com/spantaleev/matrix-docker-ansible-deploy>
|
||||||
|
|
||||||
|
#### Debian/Ubuntu
|
||||||
|
|
||||||
### Debian/Ubuntu
|
##### Matrix.org packages
|
||||||
|
|
||||||
#### Matrix.org packages
|
|
||||||
|
|
||||||
Matrix.org provides Debian/Ubuntu packages of the latest stable version of
|
Matrix.org provides Debian/Ubuntu packages of the latest stable version of
|
||||||
Synapse via https://packages.matrix.org/debian/. They are available for Debian
|
Synapse via <https://packages.matrix.org/debian/>. They are available for Debian
|
||||||
9 (Stretch), Ubuntu 16.04 (Xenial), and later. To use them:
|
9 (Stretch), Ubuntu 16.04 (Xenial), and later. To use them:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
sudo apt install -y lsb-release wget apt-transport-https
|
sudo apt install -y lsb-release wget apt-transport-https
|
||||||
sudo wget -O /usr/share/keyrings/matrix-org-archive-keyring.gpg https://packages.matrix.org/debian/matrix-org-archive-keyring.gpg
|
sudo wget -O /usr/share/keyrings/matrix-org-archive-keyring.gpg https://packages.matrix.org/debian/matrix-org-archive-keyring.gpg
|
||||||
echo "deb [signed-by=/usr/share/keyrings/matrix-org-archive-keyring.gpg] https://packages.matrix.org/debian/ $(lsb_release -cs) main" |
|
echo "deb [signed-by=/usr/share/keyrings/matrix-org-archive-keyring.gpg] https://packages.matrix.org/debian/ $(lsb_release -cs) main" |
|
||||||
@@ -299,7 +303,7 @@ The fingerprint of the repository signing key (as shown by `gpg
|
|||||||
/usr/share/keyrings/matrix-org-archive-keyring.gpg`) is
|
/usr/share/keyrings/matrix-org-archive-keyring.gpg`) is
|
||||||
`AAF9AE843A7584B5A3E4CD2BCF45A512DE2DA058`.
|
`AAF9AE843A7584B5A3E4CD2BCF45A512DE2DA058`.
|
||||||
|
|
||||||
#### Downstream Debian packages
|
##### Downstream Debian packages
|
||||||
|
|
||||||
We do not recommend using the packages from the default Debian `buster`
|
We do not recommend using the packages from the default Debian `buster`
|
||||||
repository at this time, as they are old and suffer from known security
|
repository at this time, as they are old and suffer from known security
|
||||||
@@ -311,49 +315,49 @@ for information on how to use backports.
|
|||||||
If you are using Debian `sid` or testing, Synapse is available in the default
|
If you are using Debian `sid` or testing, Synapse is available in the default
|
||||||
repositories and it should be possible to install it simply with:
|
repositories and it should be possible to install it simply with:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
sudo apt install matrix-synapse
|
sudo apt install matrix-synapse
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Downstream Ubuntu packages
|
##### Downstream Ubuntu packages
|
||||||
|
|
||||||
We do not recommend using the packages in the default Ubuntu repository
|
We do not recommend using the packages in the default Ubuntu repository
|
||||||
at this time, as they are old and suffer from known security vulnerabilities.
|
at this time, as they are old and suffer from known security vulnerabilities.
|
||||||
The latest version of Synapse can be installed from [our repository](#matrixorg-packages).
|
The latest version of Synapse can be installed from [our repository](#matrixorg-packages).
|
||||||
|
|
||||||
### Fedora
|
#### Fedora
|
||||||
|
|
||||||
Synapse is in the Fedora repositories as `matrix-synapse`:
|
Synapse is in the Fedora repositories as `matrix-synapse`:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
sudo dnf install matrix-synapse
|
sudo dnf install matrix-synapse
|
||||||
```
|
```
|
||||||
|
|
||||||
Oleg Girko provides Fedora RPMs at
|
Oleg Girko provides Fedora RPMs at
|
||||||
https://obs.infoserver.lv/project/monitor/matrix-synapse
|
<https://obs.infoserver.lv/project/monitor/matrix-synapse>
|
||||||
|
|
||||||
### OpenSUSE
|
#### OpenSUSE
|
||||||
|
|
||||||
Synapse is in the OpenSUSE repositories as `matrix-synapse`:
|
Synapse is in the OpenSUSE repositories as `matrix-synapse`:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
sudo zypper install matrix-synapse
|
sudo zypper install matrix-synapse
|
||||||
```
|
```
|
||||||
|
|
||||||
### SUSE Linux Enterprise Server
|
#### SUSE Linux Enterprise Server
|
||||||
|
|
||||||
Unofficial package are built for SLES 15 in the openSUSE:Backports:SLE-15 repository at
|
Unofficial package are built for SLES 15 in the openSUSE:Backports:SLE-15 repository at
|
||||||
https://download.opensuse.org/repositories/openSUSE:/Backports:/SLE-15/standard/
|
<https://download.opensuse.org/repositories/openSUSE:/Backports:/SLE-15/standard/>
|
||||||
|
|
||||||
### ArchLinux
|
#### ArchLinux
|
||||||
|
|
||||||
The quickest way to get up and running with ArchLinux is probably with the community package
|
The quickest way to get up and running with ArchLinux is probably with the community package
|
||||||
https://www.archlinux.org/packages/community/any/matrix-synapse/, which should pull in most of
|
<https://www.archlinux.org/packages/community/any/matrix-synapse/>, which should pull in most of
|
||||||
the necessary dependencies.
|
the necessary dependencies.
|
||||||
|
|
||||||
pip may be outdated (6.0.7-1 and needs to be upgraded to 6.0.8-1 ):
|
pip may be outdated (6.0.7-1 and needs to be upgraded to 6.0.8-1 ):
|
||||||
|
|
||||||
```
|
```sh
|
||||||
sudo pip install --upgrade pip
|
sudo pip install --upgrade pip
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -362,28 +366,28 @@ ELFCLASS32 (x64 Systems), you may need to reinstall py-bcrypt to correctly
|
|||||||
compile it under the right architecture. (This should not be needed if
|
compile it under the right architecture. (This should not be needed if
|
||||||
installing under virtualenv):
|
installing under virtualenv):
|
||||||
|
|
||||||
```
|
```sh
|
||||||
sudo pip uninstall py-bcrypt
|
sudo pip uninstall py-bcrypt
|
||||||
sudo pip install py-bcrypt
|
sudo pip install py-bcrypt
|
||||||
```
|
```
|
||||||
|
|
||||||
### Void Linux
|
#### Void Linux
|
||||||
|
|
||||||
Synapse can be found in the void repositories as 'synapse':
|
Synapse can be found in the void repositories as 'synapse':
|
||||||
|
|
||||||
```
|
```sh
|
||||||
xbps-install -Su
|
xbps-install -Su
|
||||||
xbps-install -S synapse
|
xbps-install -S synapse
|
||||||
```
|
```
|
||||||
|
|
||||||
### FreeBSD
|
#### FreeBSD
|
||||||
|
|
||||||
Synapse can be installed via FreeBSD Ports or Packages contributed by Brendan Molloy from:
|
Synapse can be installed via FreeBSD Ports or Packages contributed by Brendan Molloy from:
|
||||||
|
|
||||||
- Ports: `cd /usr/ports/net-im/py-matrix-synapse && make install clean`
|
- Ports: `cd /usr/ports/net-im/py-matrix-synapse && make install clean`
|
||||||
- Packages: `pkg install py37-matrix-synapse`
|
- Packages: `pkg install py37-matrix-synapse`
|
||||||
|
|
||||||
### OpenBSD
|
#### OpenBSD
|
||||||
|
|
||||||
As of OpenBSD 6.7 Synapse is available as a pre-compiled binary. The filesystem
|
As of OpenBSD 6.7 Synapse is available as a pre-compiled binary. The filesystem
|
||||||
underlying the homeserver directory (defaults to `/var/synapse`) has to be
|
underlying the homeserver directory (defaults to `/var/synapse`) has to be
|
||||||
@@ -392,20 +396,35 @@ and mounting it to `/var/synapse` should be taken into consideration.
|
|||||||
|
|
||||||
Installing Synapse:
|
Installing Synapse:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
doas pkg_add synapse
|
doas pkg_add synapse
|
||||||
```
|
```
|
||||||
|
|
||||||
### NixOS
|
#### NixOS
|
||||||
|
|
||||||
Robin Lambertz has packaged Synapse for NixOS at:
|
Robin Lambertz has packaged Synapse for NixOS at:
|
||||||
https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/misc/matrix-synapse.nix
|
<https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/misc/matrix-synapse.nix>
|
||||||
|
|
||||||
# Setting up Synapse
|
## Setting up Synapse
|
||||||
|
|
||||||
Once you have installed synapse as above, you will need to configure it.
|
Once you have installed synapse as above, you will need to configure it.
|
||||||
|
|
||||||
## TLS certificates
|
### Using PostgreSQL
|
||||||
|
|
||||||
|
By default Synapse uses [SQLite](https://sqlite.org/) and in doing so trades performance for convenience.
|
||||||
|
SQLite is only recommended in Synapse for testing purposes or for servers with
|
||||||
|
very light workloads.
|
||||||
|
|
||||||
|
Almost all installations should opt to use [PostgreSQL](https://www.postgresql.org). Advantages include:
|
||||||
|
|
||||||
|
- significant performance improvements due to the superior threading and
|
||||||
|
caching model, smarter query optimiser
|
||||||
|
- allowing the DB to be run on separate hardware
|
||||||
|
|
||||||
|
For information on how to install and use PostgreSQL in Synapse, please see
|
||||||
|
[docs/postgres.md](docs/postgres.md)
|
||||||
|
|
||||||
|
### TLS certificates
|
||||||
|
|
||||||
The default configuration exposes a single HTTP port on the local
|
The default configuration exposes a single HTTP port on the local
|
||||||
interface: `http://localhost:8008`. It is suitable for local testing,
|
interface: `http://localhost:8008`. It is suitable for local testing,
|
||||||
@@ -419,19 +438,19 @@ The recommended way to do so is to set up a reverse proxy on port
|
|||||||
Alternatively, you can configure Synapse to expose an HTTPS port. To do
|
Alternatively, you can configure Synapse to expose an HTTPS port. To do
|
||||||
so, you will need to edit `homeserver.yaml`, as follows:
|
so, you will need to edit `homeserver.yaml`, as follows:
|
||||||
|
|
||||||
* First, under the `listeners` section, uncomment the configuration for the
|
- First, under the `listeners` section, uncomment the configuration for the
|
||||||
TLS-enabled listener. (Remove the hash sign (`#`) at the start of
|
TLS-enabled listener. (Remove the hash sign (`#`) at the start of
|
||||||
each line). The relevant lines are like this:
|
each line). The relevant lines are like this:
|
||||||
|
|
||||||
```
|
```yaml
|
||||||
- port: 8448
|
- port: 8448
|
||||||
type: http
|
type: http
|
||||||
tls: true
|
tls: true
|
||||||
resources:
|
resources:
|
||||||
- names: [client, federation]
|
- names: [client, federation]
|
||||||
```
|
```
|
||||||
|
|
||||||
* You will also need to uncomment the `tls_certificate_path` and
|
- You will also need to uncomment the `tls_certificate_path` and
|
||||||
`tls_private_key_path` lines under the `TLS` section. You will need to manage
|
`tls_private_key_path` lines under the `TLS` section. You will need to manage
|
||||||
provisioning of these certificates yourself — Synapse had built-in ACME
|
provisioning of these certificates yourself — Synapse had built-in ACME
|
||||||
support, but the ACMEv1 protocol Synapse implements is deprecated, not
|
support, but the ACMEv1 protocol Synapse implements is deprecated, not
|
||||||
@@ -446,7 +465,7 @@ so, you will need to edit `homeserver.yaml`, as follows:
|
|||||||
For a more detailed guide to configuring your server for federation, see
|
For a more detailed guide to configuring your server for federation, see
|
||||||
[federate.md](docs/federate.md).
|
[federate.md](docs/federate.md).
|
||||||
|
|
||||||
## Client Well-Known URI
|
### Client Well-Known URI
|
||||||
|
|
||||||
Setting up the client Well-Known URI is optional but if you set it up, it will
|
Setting up the client Well-Known URI is optional but if you set it up, it will
|
||||||
allow users to enter their full username (e.g. `@user:<server_name>`) into clients
|
allow users to enter their full username (e.g. `@user:<server_name>`) into clients
|
||||||
@@ -457,7 +476,7 @@ about the actual homeserver URL you are using.
|
|||||||
The URL `https://<server_name>/.well-known/matrix/client` should return JSON in
|
The URL `https://<server_name>/.well-known/matrix/client` should return JSON in
|
||||||
the following format.
|
the following format.
|
||||||
|
|
||||||
```
|
```json
|
||||||
{
|
{
|
||||||
"m.homeserver": {
|
"m.homeserver": {
|
||||||
"base_url": "https://<matrix.example.com>"
|
"base_url": "https://<matrix.example.com>"
|
||||||
@@ -467,7 +486,7 @@ the following format.
|
|||||||
|
|
||||||
It can optionally contain identity server information as well.
|
It can optionally contain identity server information as well.
|
||||||
|
|
||||||
```
|
```json
|
||||||
{
|
{
|
||||||
"m.homeserver": {
|
"m.homeserver": {
|
||||||
"base_url": "https://<matrix.example.com>"
|
"base_url": "https://<matrix.example.com>"
|
||||||
@@ -484,10 +503,11 @@ Cross-Origin Resource Sharing (CORS) headers. A recommended value would be
|
|||||||
view it.
|
view it.
|
||||||
|
|
||||||
In nginx this would be something like:
|
In nginx this would be something like:
|
||||||
```
|
|
||||||
|
```nginx
|
||||||
location /.well-known/matrix/client {
|
location /.well-known/matrix/client {
|
||||||
return 200 '{"m.homeserver": {"base_url": "https://<matrix.example.com>"}}';
|
return 200 '{"m.homeserver": {"base_url": "https://<matrix.example.com>"}}';
|
||||||
add_header Content-Type application/json;
|
default_type application/json;
|
||||||
add_header Access-Control-Allow-Origin *;
|
add_header Access-Control-Allow-Origin *;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -497,11 +517,11 @@ correctly. `public_baseurl` should be set to the URL that clients will use to
|
|||||||
connect to your server. This is the same URL you put for the `m.homeserver`
|
connect to your server. This is the same URL you put for the `m.homeserver`
|
||||||
`base_url` above.
|
`base_url` above.
|
||||||
|
|
||||||
```
|
```yaml
|
||||||
public_baseurl: "https://<matrix.example.com>"
|
public_baseurl: "https://<matrix.example.com>"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Email
|
### Email
|
||||||
|
|
||||||
It is desirable for Synapse to have the capability to send email. This allows
|
It is desirable for Synapse to have the capability to send email. This allows
|
||||||
Synapse to send password reset emails, send verifications when an email address
|
Synapse to send password reset emails, send verifications when an email address
|
||||||
@@ -516,7 +536,7 @@ and `notif_from` fields filled out. You may also need to set `smtp_user`,
|
|||||||
If email is not configured, password reset, registration and notifications via
|
If email is not configured, password reset, registration and notifications via
|
||||||
email will be disabled.
|
email will be disabled.
|
||||||
|
|
||||||
## Registering a user
|
### Registering a user
|
||||||
|
|
||||||
The easiest way to create a new user is to do so from a client like [Element](https://element.io/).
|
The easiest way to create a new user is to do so from a client like [Element](https://element.io/).
|
||||||
|
|
||||||
@@ -524,7 +544,7 @@ Alternatively you can do so from the command line if you have installed via pip.
|
|||||||
|
|
||||||
This can be done as follows:
|
This can be done as follows:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
$ source ~/synapse/env/bin/activate
|
$ source ~/synapse/env/bin/activate
|
||||||
$ synctl start # if not already running
|
$ synctl start # if not already running
|
||||||
$ register_new_matrix_user -c homeserver.yaml http://localhost:8008
|
$ register_new_matrix_user -c homeserver.yaml http://localhost:8008
|
||||||
@@ -542,12 +562,12 @@ value is generated by `--generate-config`), but it should be kept secret, as
|
|||||||
anyone with knowledge of it can register users, including admin accounts,
|
anyone with knowledge of it can register users, including admin accounts,
|
||||||
on your server even if `enable_registration` is `false`.
|
on your server even if `enable_registration` is `false`.
|
||||||
|
|
||||||
## Setting up a TURN server
|
### Setting up a TURN server
|
||||||
|
|
||||||
For reliable VoIP calls to be routed via this homeserver, you MUST configure
|
For reliable VoIP calls to be routed via this homeserver, you MUST configure
|
||||||
a TURN server. See [docs/turn-howto.md](docs/turn-howto.md) for details.
|
a TURN server. See [docs/turn-howto.md](docs/turn-howto.md) for details.
|
||||||
|
|
||||||
## URL previews
|
### URL previews
|
||||||
|
|
||||||
Synapse includes support for previewing URLs, which is disabled by default. To
|
Synapse includes support for previewing URLs, which is disabled by default. To
|
||||||
turn it on you must enable the `url_preview_enabled: True` config parameter
|
turn it on you must enable the `url_preview_enabled: True` config parameter
|
||||||
@@ -557,19 +577,18 @@ This is critical from a security perspective to stop arbitrary Matrix users
|
|||||||
spidering 'internal' URLs on your network. At the very least we recommend that
|
spidering 'internal' URLs on your network. At the very least we recommend that
|
||||||
your loopback and RFC1918 IP addresses are blacklisted.
|
your loopback and RFC1918 IP addresses are blacklisted.
|
||||||
|
|
||||||
This also requires the optional `lxml` and `netaddr` python dependencies to be
|
This also requires the optional `lxml` python dependency to be installed. This
|
||||||
installed. This in turn requires the `libxml2` library to be available - on
|
in turn requires the `libxml2` library to be available - on Debian/Ubuntu this
|
||||||
Debian/Ubuntu this means `apt-get install libxml2-dev`, or equivalent for
|
means `apt-get install libxml2-dev`, or equivalent for your OS.
|
||||||
your OS.
|
|
||||||
|
|
||||||
# Troubleshooting Installation
|
### Troubleshooting Installation
|
||||||
|
|
||||||
`pip` seems to leak *lots* of memory during installation. For instance, a Linux
|
`pip` seems to leak *lots* of memory during installation. For instance, a Linux
|
||||||
host with 512MB of RAM may run out of memory whilst installing Twisted. If this
|
host with 512MB of RAM may run out of memory whilst installing Twisted. If this
|
||||||
happens, you will have to individually install the dependencies which are
|
happens, you will have to individually install the dependencies which are
|
||||||
failing, e.g.:
|
failing, e.g.:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
pip install twisted
|
pip install twisted
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
39
README.rst
39
README.rst
@@ -243,6 +243,8 @@ Then update the ``users`` table in the database::
|
|||||||
Synapse Development
|
Synapse Development
|
||||||
===================
|
===================
|
||||||
|
|
||||||
|
Join our developer community on Matrix: `#synapse-dev:matrix.org <https://matrix.to/#/#synapse-dev:matrix.org>`_
|
||||||
|
|
||||||
Before setting up a development environment for synapse, make sure you have the
|
Before setting up a development environment for synapse, make sure you have the
|
||||||
system dependencies (such as the python header files) installed - see
|
system dependencies (such as the python header files) installed - see
|
||||||
`Installing from source <INSTALL.md#installing-from-source>`_.
|
`Installing from source <INSTALL.md#installing-from-source>`_.
|
||||||
@@ -261,18 +263,43 @@ to install using pip and a virtualenv::
|
|||||||
pip install -e ".[all,test]"
|
pip install -e ".[all,test]"
|
||||||
|
|
||||||
This will run a process of downloading and installing all the needed
|
This will run a process of downloading and installing all the needed
|
||||||
dependencies into a virtual env.
|
dependencies into a virtual env. If any dependencies fail to install,
|
||||||
|
try installing the failing modules individually::
|
||||||
|
|
||||||
Once this is done, you may wish to run Synapse's unit tests, to
|
pip install -e "module-name"
|
||||||
check that everything is installed as it should be::
|
|
||||||
|
Once this is done, you may wish to run Synapse's unit tests to
|
||||||
|
check that everything is installed correctly::
|
||||||
|
|
||||||
python -m twisted.trial tests
|
python -m twisted.trial tests
|
||||||
|
|
||||||
This should end with a 'PASSED' result::
|
This should end with a 'PASSED' result (note that exact numbers will
|
||||||
|
differ)::
|
||||||
|
|
||||||
|
Ran 1337 tests in 716.064s
|
||||||
|
|
||||||
|
PASSED (skips=15, successes=1322)
|
||||||
|
|
||||||
|
We recommend using the demo which starts 3 federated instances running on ports `8080` - `8082`
|
||||||
|
|
||||||
|
./demo/start.sh
|
||||||
|
|
||||||
|
(to stop, you can use `./demo/stop.sh`)
|
||||||
|
|
||||||
|
If you just want to start a single instance of the app and run it directly::
|
||||||
|
|
||||||
|
# Create the homeserver.yaml config once
|
||||||
|
python -m synapse.app.homeserver \
|
||||||
|
--server-name my.domain.name \
|
||||||
|
--config-path homeserver.yaml \
|
||||||
|
--generate-config \
|
||||||
|
--report-stats=[yes|no]
|
||||||
|
|
||||||
|
# Start the app
|
||||||
|
python -m synapse.app.homeserver --config-path homeserver.yaml
|
||||||
|
|
||||||
|
|
||||||
Ran 1266 tests in 643.930s
|
|
||||||
|
|
||||||
PASSED (skips=15, successes=1251)
|
|
||||||
|
|
||||||
Running the Integration Tests
|
Running the Integration Tests
|
||||||
=============================
|
=============================
|
||||||
|
|||||||
147
UPGRADE.rst
147
UPGRADE.rst
@@ -5,6 +5,16 @@ Before upgrading check if any special steps are required to upgrade from the
|
|||||||
version you currently have installed to the current version of Synapse. The extra
|
version you currently have installed to the current version of Synapse. The extra
|
||||||
instructions that may be required are listed later in this document.
|
instructions that may be required are listed later in this document.
|
||||||
|
|
||||||
|
* Check that your versions of Python and PostgreSQL are still supported.
|
||||||
|
|
||||||
|
Synapse follows upstream lifecycles for `Python`_ and `PostgreSQL`_, and
|
||||||
|
removes support for versions which are no longer maintained.
|
||||||
|
|
||||||
|
The website https://endoflife.date also offers convenient summaries.
|
||||||
|
|
||||||
|
.. _Python: https://devguide.python.org/devcycle/#end-of-life-branches
|
||||||
|
.. _PostgreSQL: https://www.postgresql.org/support/versioning/
|
||||||
|
|
||||||
* If Synapse was installed using `prebuilt packages
|
* If Synapse was installed using `prebuilt packages
|
||||||
<INSTALL.md#prebuilt-packages>`_, you will need to follow the normal process
|
<INSTALL.md#prebuilt-packages>`_, you will need to follow the normal process
|
||||||
for upgrading those packages.
|
for upgrading those packages.
|
||||||
@@ -75,6 +85,141 @@ for example:
|
|||||||
wget https://packages.matrix.org/debian/pool/main/m/matrix-synapse-py3/matrix-synapse-py3_1.3.0+stretch1_amd64.deb
|
wget https://packages.matrix.org/debian/pool/main/m/matrix-synapse-py3/matrix-synapse-py3_1.3.0+stretch1_amd64.deb
|
||||||
dpkg -i matrix-synapse-py3_1.3.0+stretch1_amd64.deb
|
dpkg -i matrix-synapse-py3_1.3.0+stretch1_amd64.deb
|
||||||
|
|
||||||
|
Upgrading to v1.26.0
|
||||||
|
====================
|
||||||
|
|
||||||
|
Rolling back to v1.25.0 after a failed upgrade
|
||||||
|
----------------------------------------------
|
||||||
|
|
||||||
|
v1.26.0 includes a lot of large changes. If something problematic occurs, you
|
||||||
|
may want to roll-back to a previous version of Synapse. Because v1.26.0 also
|
||||||
|
includes a new database schema version, reverting that version is also required
|
||||||
|
alongside the generic rollback instructions mentioned above. In short, to roll
|
||||||
|
back to v1.25.0 you need to:
|
||||||
|
|
||||||
|
1. Stop the server
|
||||||
|
2. Decrease the schema version in the database:
|
||||||
|
|
||||||
|
.. code:: sql
|
||||||
|
|
||||||
|
UPDATE schema_version SET version = 58;
|
||||||
|
|
||||||
|
3. Delete the ignored users & chain cover data:
|
||||||
|
|
||||||
|
.. code:: sql
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS ignored_users;
|
||||||
|
UPDATE rooms SET has_auth_chain_index = false;
|
||||||
|
|
||||||
|
For PostgreSQL run:
|
||||||
|
|
||||||
|
.. code:: sql
|
||||||
|
|
||||||
|
TRUNCATE event_auth_chain_links;
|
||||||
|
TRUNCATE event_auth_chains;
|
||||||
|
|
||||||
|
For SQLite run:
|
||||||
|
|
||||||
|
.. code:: sql
|
||||||
|
|
||||||
|
DELETE FROM event_auth_chain_links;
|
||||||
|
DELETE FROM event_auth_chains;
|
||||||
|
|
||||||
|
4. Mark the deltas as not run (so they will re-run on upgrade).
|
||||||
|
|
||||||
|
.. code:: sql
|
||||||
|
|
||||||
|
DELETE FROM applied_schema_deltas WHERE version = 59 AND file = "59/01ignored_user.py";
|
||||||
|
DELETE FROM applied_schema_deltas WHERE version = 59 AND file = "59/06chain_cover_index.sql";
|
||||||
|
|
||||||
|
5. Downgrade Synapse by following the instructions for your installation method
|
||||||
|
in the "Rolling back to older versions" section above.
|
||||||
|
|
||||||
|
Upgrading to v1.25.0
|
||||||
|
====================
|
||||||
|
|
||||||
|
Last release supporting Python 3.5
|
||||||
|
----------------------------------
|
||||||
|
|
||||||
|
This is the last release of Synapse which guarantees support with Python 3.5,
|
||||||
|
which passed its upstream End of Life date several months ago.
|
||||||
|
|
||||||
|
We will attempt to maintain support through March 2021, but without guarantees.
|
||||||
|
|
||||||
|
In the future, Synapse will follow upstream schedules for ending support of
|
||||||
|
older versions of Python and PostgreSQL. Please upgrade to at least Python 3.6
|
||||||
|
and PostgreSQL 9.6 as soon as possible.
|
||||||
|
|
||||||
|
Blacklisting IP ranges
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
Synapse v1.25.0 includes new settings, ``ip_range_blacklist`` and
|
||||||
|
``ip_range_whitelist``, for controlling outgoing requests from Synapse for federation,
|
||||||
|
identity servers, push, and for checking key validity for third-party invite events.
|
||||||
|
The previous setting, ``federation_ip_range_blacklist``, is deprecated. The new
|
||||||
|
``ip_range_blacklist`` defaults to private IP ranges if it is not defined.
|
||||||
|
|
||||||
|
If you have never customised ``federation_ip_range_blacklist`` it is recommended
|
||||||
|
that you remove that setting.
|
||||||
|
|
||||||
|
If you have customised ``federation_ip_range_blacklist`` you should update the
|
||||||
|
setting name to ``ip_range_blacklist``.
|
||||||
|
|
||||||
|
If you have a custom push server that is reached via private IP space you may
|
||||||
|
need to customise ``ip_range_blacklist`` or ``ip_range_whitelist``.
|
||||||
|
|
||||||
|
Upgrading to v1.24.0
|
||||||
|
====================
|
||||||
|
|
||||||
|
Custom OpenID Connect mapping provider breaking change
|
||||||
|
------------------------------------------------------
|
||||||
|
|
||||||
|
This release allows the OpenID Connect mapping provider to perform normalisation
|
||||||
|
of the localpart of the Matrix ID. This allows for the mapping provider to
|
||||||
|
specify different algorithms, instead of the [default way](https://matrix.org/docs/spec/appendices#mapping-from-other-character-sets).
|
||||||
|
|
||||||
|
If your Synapse configuration uses a custom mapping provider
|
||||||
|
(`oidc_config.user_mapping_provider.module` is specified and not equal to
|
||||||
|
`synapse.handlers.oidc_handler.JinjaOidcMappingProvider`) then you *must* ensure
|
||||||
|
that `map_user_attributes` of the mapping provider performs some normalisation
|
||||||
|
of the `localpart` returned. To match previous behaviour you can use the
|
||||||
|
`map_username_to_mxid_localpart` function provided by Synapse. An example is
|
||||||
|
shown below:
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
from synapse.types import map_username_to_mxid_localpart
|
||||||
|
|
||||||
|
class MyMappingProvider:
|
||||||
|
def map_user_attributes(self, userinfo, token):
|
||||||
|
# ... your custom logic ...
|
||||||
|
sso_user_id = ...
|
||||||
|
localpart = map_username_to_mxid_localpart(sso_user_id)
|
||||||
|
|
||||||
|
return {"localpart": localpart}
|
||||||
|
|
||||||
|
Removal historical Synapse Admin API
|
||||||
|
------------------------------------
|
||||||
|
|
||||||
|
Historically, the Synapse Admin API has been accessible under:
|
||||||
|
|
||||||
|
* ``/_matrix/client/api/v1/admin``
|
||||||
|
* ``/_matrix/client/unstable/admin``
|
||||||
|
* ``/_matrix/client/r0/admin``
|
||||||
|
* ``/_synapse/admin/v1``
|
||||||
|
|
||||||
|
The endpoints with ``/_matrix/client/*`` prefixes have been removed as of v1.24.0.
|
||||||
|
The Admin API is now only accessible under:
|
||||||
|
|
||||||
|
* ``/_synapse/admin/v1``
|
||||||
|
|
||||||
|
The only exception is the `/admin/whois` endpoint, which is
|
||||||
|
`also available via the client-server API <https://matrix.org/docs/spec/client_server/r0.6.1#get-matrix-client-r0-admin-whois-userid>`_.
|
||||||
|
|
||||||
|
The deprecation of the old endpoints was announced with Synapse 1.20.0 (released
|
||||||
|
on 2020-09-22) and makes it easier for homeserver admins to lock down external
|
||||||
|
access to the Admin API endpoints.
|
||||||
|
|
||||||
Upgrading to v1.23.0
|
Upgrading to v1.23.0
|
||||||
====================
|
====================
|
||||||
|
|
||||||
@@ -87,7 +232,7 @@ then it should be modified based on the `structured logging documentation
|
|||||||
<https://github.com/matrix-org/synapse/blob/master/docs/structured_logging.md>`_.
|
<https://github.com/matrix-org/synapse/blob/master/docs/structured_logging.md>`_.
|
||||||
|
|
||||||
The ``structured`` and ``drains`` logging options are now deprecated and should
|
The ``structured`` and ``drains`` logging options are now deprecated and should
|
||||||
be replaced by standard logging configuration of ``handlers`` and ``formatters`.
|
be replaced by standard logging configuration of ``handlers`` and ``formatters``.
|
||||||
|
|
||||||
A future will release of Synapse will make using ``structured: true`` an error.
|
A future will release of Synapse will make using ``structured: true`` an error.
|
||||||
|
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
Add a push rule that highlights when a jitsi conference is created in a room.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Fix fetching of E2E cross signing keys over federation when only one of the master key and device signing key is cached already.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Add an admin api to delete a single file or files were not used for a defined time from server. Contributed by @dklimpel.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Split admin API for reported events (`GET /_synapse/admin/v1/event_reports`) into detail and list endpoints. This is a breaking change to #8217 which was introduced in Synapse v1.21.0. Those who already use this API should check their scripts. Contributed by @dklimpel.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Optimise `/createRoom` with multiple invited users.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Fix a bug where Synapse would blindly forward bad responses from federation to clients when retrieving profile information.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Instructions for Azure AD in the OpenID Connect documentation. Contributed by peterk.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Implement and use an @lru_cache decorator.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Support generating structured logs via the standard logging configuration.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Add an admin APIs to allow server admins to list users' pushers. Contributed by @dklimpel.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Don't instansiate Requester directly.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Type hints for `RegistrationStore`.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Change schema to support access tokens belonging to one user but granting access to another.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Fix a bug where the account validity endpoint would silently fail if the user ID did not have an expiration time. It now returns a 400 error.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Remove unused OPTIONS handlers.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Fix email notifications for invites without local state.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Fix handling of invalid group IDs to return a 400 rather than log an exception and return a 500.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Fix handling of User-Agent headers that are invalid UTF-8, which caused user agents of users to not get correctly recorded.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Run `mypy` as part of the lint.sh script.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Correct Synapse's PyPI package name in the OpenID Connect installation instructions.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Improve the sample configuration for single sign-on providers.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Fix typos and spelling errors in the code.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Reduce number of OpenTracing spans started.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Fix a bug in the `joined_rooms` admin API if the user has never joined any rooms. The bug was introduced, along with the API, in v1.21.0.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Add field `total` to device list in admin API.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Add an admin API `GET /_synapse/admin/v1/users/<user_id>/media` to get information about uploaded media. Contributed by @dklimpel.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Add more type hints to the application services code.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Fix the filepath of Dex's example config and the link to Dex's Getting Started guide in the OpenID Connect docs.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Tell Black to format code for Python 3.5.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Note support for Python 3.9.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Minor updates to docs on running tests.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Interlink prometheus/grafana documentation.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Reduce number of OpenTracing spans started.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Don't pull event from DB when handling replication traffic.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Reduce number of OpenTracing spans started.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Abstract some invite-related code in preparation for landing knocking.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Clarify representation of events in logfiles.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Don't require `hiredis` package to be installed to run unit tests.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Fix exception during handling multiple concurrent requests for remote media when using multiple media repositories.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Fix typing info on cache call signature to accept `on_invalidate`.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Support generating structured logs via the standard logging configuration.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Abstract some invite-related code in preparation for landing knocking.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Add an admin APIs to allow server admins to list users' pushers. Contributed by @dklimpel.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Fail tests if they do not await coroutines.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Add more type hints to the application services code.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Improve start time by adding an index to `e2e_cross_signing_keys.stream_id`.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Re-organize the structured logging code to separate the TCP transport handling from the JSON formatting.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Use Python 3.8 in Docker images by default.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Add an admin API for local user media statistics. Contributed by @dklimpel.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Notes on SSO logins and media_repository worker.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Remove the "draft" status of the Room Details Admin API.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Improve the error returned when a non-string displayname or avatar_url is used when updating a user's profile.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Document experimental support for running multiple event persisters.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Block attempts by clients to send server ACLs, or redactions of server ACLs, that would result in the local server being blocked from the room.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Consolidate duplicated lists of purged tables that are checked in tests.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Add information regarding the various sources of, and expected contributions to, Synapse's documentation to `CONTRIBUTING.md`.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Add `displayname` to Shared-Secret Registration for admins.
|
|
||||||
1
changelog.d/9045.misc
Normal file
1
changelog.d/9045.misc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Add tests to `test_user.UsersListTestCase` for List Users Admin API.
|
||||||
1
changelog.d/9129.misc
Normal file
1
changelog.d/9129.misc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Various improvements to the federation client.
|
||||||
1
changelog.d/9135.doc
Normal file
1
changelog.d/9135.doc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Add link to Matrix VoIP tester for turn-howto.
|
||||||
1
changelog.d/9163.bugfix
Normal file
1
changelog.d/9163.bugfix
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Fix a long-standing bug where Synapse would return a 500 error when a thumbnail did not exist (and auto-generation of thumbnails was not enabled).
|
||||||
1
changelog.d/9176.misc
Normal file
1
changelog.d/9176.misc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Speed up chain cover calculation when persisting a batch of state events at once.
|
||||||
1
changelog.d/9180.misc
Normal file
1
changelog.d/9180.misc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Add a `long_description_type` to the package metadata.
|
||||||
1
changelog.d/9181.misc
Normal file
1
changelog.d/9181.misc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Speed up batch insertion when using PostgreSQL.
|
||||||
1
changelog.d/9184.misc
Normal file
1
changelog.d/9184.misc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Emit an error at startup if different Identity Providers are configured with the same `idp_id`.
|
||||||
1
changelog.d/9188.misc
Normal file
1
changelog.d/9188.misc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Speed up batch insertion when using PostgreSQL.
|
||||||
1
changelog.d/9189.misc
Normal file
1
changelog.d/9189.misc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Add an `oidc-` prefix to any `idp_id`s which are given in the `oidc_providers` configuration.
|
||||||
1
changelog.d/9190.misc
Normal file
1
changelog.d/9190.misc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Improve performance of concurrent use of `StreamIDGenerators`.
|
||||||
1
changelog.d/9191.misc
Normal file
1
changelog.d/9191.misc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Add some missing source directories to the automatic linting script.
|
||||||
1
changelog.d/9193.bugfix
Normal file
1
changelog.d/9193.bugfix
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Fix receipts or account data not being sent down sync. Introduced in v1.26.0rc1.
|
||||||
1
changelog.d/9195.bugfix
Normal file
1
changelog.d/9195.bugfix
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Fix receipts or account data not being sent down sync. Introduced in v1.26.0rc1.
|
||||||
@@ -20,6 +20,7 @@ Add a new job to the main prometheus.conf file:
|
|||||||
```
|
```
|
||||||
|
|
||||||
### for Prometheus v2
|
### for Prometheus v2
|
||||||
|
|
||||||
Add a new job to the main prometheus.yml file:
|
Add a new job to the main prometheus.yml file:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
@@ -29,14 +30,17 @@ Add a new job to the main prometheus.yml file:
|
|||||||
scheme: "https"
|
scheme: "https"
|
||||||
|
|
||||||
static_configs:
|
static_configs:
|
||||||
- targets: ['SERVER.LOCATION:PORT']
|
- targets: ["my.server.here:port"]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
An example of a Prometheus configuration with workers can be found in
|
||||||
|
[metrics-howto.md](https://github.com/matrix-org/synapse/blob/master/docs/metrics-howto.md).
|
||||||
|
|
||||||
To use `synapse.rules` add
|
To use `synapse.rules` add
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
rule_files:
|
rule_files:
|
||||||
- "/PATH/TO/synapse-v2.rules"
|
- "/PATH/TO/synapse-v2.rules"
|
||||||
```
|
```
|
||||||
|
|
||||||
Metrics are disabled by default when running synapse; they must be enabled
|
Metrics are disabled by default when running synapse; they must be enabled
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
new PromConsole.Graph({
|
new PromConsole.Graph({
|
||||||
node: document.querySelector("#process_resource_utime"),
|
node: document.querySelector("#process_resource_utime"),
|
||||||
expr: "rate(process_cpu_seconds_total[2m]) * 100",
|
expr: "rate(process_cpu_seconds_total[2m]) * 100",
|
||||||
name: "[[job]]",
|
name: "[[job]]-[[index]]",
|
||||||
min: 0,
|
min: 0,
|
||||||
max: 100,
|
max: 100,
|
||||||
renderer: "line",
|
renderer: "line",
|
||||||
@@ -22,12 +22,12 @@ new PromConsole.Graph({
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<h3>Memory</h3>
|
<h3>Memory</h3>
|
||||||
<div id="process_resource_maxrss"></div>
|
<div id="process_resident_memory_bytes"></div>
|
||||||
<script>
|
<script>
|
||||||
new PromConsole.Graph({
|
new PromConsole.Graph({
|
||||||
node: document.querySelector("#process_resource_maxrss"),
|
node: document.querySelector("#process_resident_memory_bytes"),
|
||||||
expr: "process_psutil_rss:max",
|
expr: "process_resident_memory_bytes",
|
||||||
name: "Maxrss",
|
name: "[[job]]-[[index]]",
|
||||||
min: 0,
|
min: 0,
|
||||||
renderer: "line",
|
renderer: "line",
|
||||||
height: 150,
|
height: 150,
|
||||||
@@ -43,8 +43,8 @@ new PromConsole.Graph({
|
|||||||
<script>
|
<script>
|
||||||
new PromConsole.Graph({
|
new PromConsole.Graph({
|
||||||
node: document.querySelector("#process_fds"),
|
node: document.querySelector("#process_fds"),
|
||||||
expr: "process_open_fds{job='synapse'}",
|
expr: "process_open_fds",
|
||||||
name: "FDs",
|
name: "[[job]]-[[index]]",
|
||||||
min: 0,
|
min: 0,
|
||||||
renderer: "line",
|
renderer: "line",
|
||||||
height: 150,
|
height: 150,
|
||||||
@@ -62,8 +62,8 @@ new PromConsole.Graph({
|
|||||||
<script>
|
<script>
|
||||||
new PromConsole.Graph({
|
new PromConsole.Graph({
|
||||||
node: document.querySelector("#reactor_total_time"),
|
node: document.querySelector("#reactor_total_time"),
|
||||||
expr: "rate(python_twisted_reactor_tick_time:total[2m]) / 1000",
|
expr: "rate(python_twisted_reactor_tick_time_sum[2m])",
|
||||||
name: "time",
|
name: "[[job]]-[[index]]",
|
||||||
max: 1,
|
max: 1,
|
||||||
min: 0,
|
min: 0,
|
||||||
renderer: "area",
|
renderer: "area",
|
||||||
@@ -80,8 +80,8 @@ new PromConsole.Graph({
|
|||||||
<script>
|
<script>
|
||||||
new PromConsole.Graph({
|
new PromConsole.Graph({
|
||||||
node: document.querySelector("#reactor_average_time"),
|
node: document.querySelector("#reactor_average_time"),
|
||||||
expr: "rate(python_twisted_reactor_tick_time:total[2m]) / rate(python_twisted_reactor_tick_time:count[2m]) / 1000",
|
expr: "rate(python_twisted_reactor_tick_time_sum[2m]) / rate(python_twisted_reactor_tick_time_count[2m])",
|
||||||
name: "time",
|
name: "[[job]]-[[index]]",
|
||||||
min: 0,
|
min: 0,
|
||||||
renderer: "line",
|
renderer: "line",
|
||||||
height: 150,
|
height: 150,
|
||||||
@@ -97,14 +97,14 @@ new PromConsole.Graph({
|
|||||||
<script>
|
<script>
|
||||||
new PromConsole.Graph({
|
new PromConsole.Graph({
|
||||||
node: document.querySelector("#reactor_pending_calls"),
|
node: document.querySelector("#reactor_pending_calls"),
|
||||||
expr: "rate(python_twisted_reactor_pending_calls:total[30s])/rate(python_twisted_reactor_pending_calls:count[30s])",
|
expr: "rate(python_twisted_reactor_pending_calls_sum[30s]) / rate(python_twisted_reactor_pending_calls_count[30s])",
|
||||||
name: "calls",
|
name: "[[job]]-[[index]]",
|
||||||
min: 0,
|
min: 0,
|
||||||
renderer: "line",
|
renderer: "line",
|
||||||
height: 150,
|
height: 150,
|
||||||
yAxisFormatter: PromConsole.NumberFormatter.humanize,
|
yAxisFormatter: PromConsole.NumberFormatter.humanize,
|
||||||
yHoverFormatter: PromConsole.NumberFormatter.humanize,
|
yHoverFormatter: PromConsole.NumberFormatter.humanize,
|
||||||
yTitle: "Pending Cals"
|
yTitle: "Pending Calls"
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -115,7 +115,7 @@ new PromConsole.Graph({
|
|||||||
<script>
|
<script>
|
||||||
new PromConsole.Graph({
|
new PromConsole.Graph({
|
||||||
node: document.querySelector("#synapse_storage_query_time"),
|
node: document.querySelector("#synapse_storage_query_time"),
|
||||||
expr: "rate(synapse_storage_query_time:count[2m])",
|
expr: "sum(rate(synapse_storage_query_time_count[2m])) by (verb)",
|
||||||
name: "[[verb]]",
|
name: "[[verb]]",
|
||||||
yAxisFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
|
yAxisFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
|
||||||
yHoverFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
|
yHoverFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
|
||||||
@@ -129,8 +129,8 @@ new PromConsole.Graph({
|
|||||||
<script>
|
<script>
|
||||||
new PromConsole.Graph({
|
new PromConsole.Graph({
|
||||||
node: document.querySelector("#synapse_storage_transaction_time"),
|
node: document.querySelector("#synapse_storage_transaction_time"),
|
||||||
expr: "rate(synapse_storage_transaction_time:count[2m])",
|
expr: "topk(10, rate(synapse_storage_transaction_time_count[2m]))",
|
||||||
name: "[[desc]]",
|
name: "[[job]]-[[index]] [[desc]]",
|
||||||
min: 0,
|
min: 0,
|
||||||
yAxisFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
|
yAxisFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
|
||||||
yHoverFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
|
yHoverFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
|
||||||
@@ -140,12 +140,12 @@ new PromConsole.Graph({
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<h3>Transaction execution time</h3>
|
<h3>Transaction execution time</h3>
|
||||||
<div id="synapse_storage_transactions_time_msec"></div>
|
<div id="synapse_storage_transactions_time_sec"></div>
|
||||||
<script>
|
<script>
|
||||||
new PromConsole.Graph({
|
new PromConsole.Graph({
|
||||||
node: document.querySelector("#synapse_storage_transactions_time_msec"),
|
node: document.querySelector("#synapse_storage_transactions_time_sec"),
|
||||||
expr: "rate(synapse_storage_transaction_time:total[2m]) / 1000",
|
expr: "rate(synapse_storage_transaction_time_sum[2m])",
|
||||||
name: "[[desc]]",
|
name: "[[job]]-[[index]] [[desc]]",
|
||||||
min: 0,
|
min: 0,
|
||||||
yAxisFormatter: PromConsole.NumberFormatter.humanize,
|
yAxisFormatter: PromConsole.NumberFormatter.humanize,
|
||||||
yHoverFormatter: PromConsole.NumberFormatter.humanize,
|
yHoverFormatter: PromConsole.NumberFormatter.humanize,
|
||||||
@@ -154,34 +154,33 @@ new PromConsole.Graph({
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<h3>Database scheduling latency</h3>
|
<h3>Average time waiting for database connection</h3>
|
||||||
<div id="synapse_storage_schedule_time"></div>
|
<div id="synapse_storage_avg_waiting_time"></div>
|
||||||
<script>
|
<script>
|
||||||
new PromConsole.Graph({
|
new PromConsole.Graph({
|
||||||
node: document.querySelector("#synapse_storage_schedule_time"),
|
node: document.querySelector("#synapse_storage_avg_waiting_time"),
|
||||||
expr: "rate(synapse_storage_schedule_time:total[2m]) / 1000",
|
expr: "rate(synapse_storage_schedule_time_sum[2m]) / rate(synapse_storage_schedule_time_count[2m])",
|
||||||
name: "Total latency",
|
name: "[[job]]-[[index]]",
|
||||||
min: 0,
|
min: 0,
|
||||||
yAxisFormatter: PromConsole.NumberFormatter.humanize,
|
yAxisFormatter: PromConsole.NumberFormatter.humanize,
|
||||||
yHoverFormatter: PromConsole.NumberFormatter.humanize,
|
yHoverFormatter: PromConsole.NumberFormatter.humanize,
|
||||||
yUnits: "s/s",
|
yUnits: "s",
|
||||||
yTitle: "Usage"
|
yTitle: "Time"
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<h3>Cache hit ratio</h3>
|
<h3>Cache request rate</h3>
|
||||||
<div id="synapse_cache_ratio"></div>
|
<div id="synapse_cache_request_rate"></div>
|
||||||
<script>
|
<script>
|
||||||
new PromConsole.Graph({
|
new PromConsole.Graph({
|
||||||
node: document.querySelector("#synapse_cache_ratio"),
|
node: document.querySelector("#synapse_cache_request_rate"),
|
||||||
expr: "rate(synapse_util_caches_cache:total[2m]) * 100",
|
expr: "rate(synapse_util_caches_cache:total[2m])",
|
||||||
name: "[[name]]",
|
name: "[[job]]-[[index]] [[name]]",
|
||||||
min: 0,
|
min: 0,
|
||||||
max: 100,
|
|
||||||
yAxisFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
|
yAxisFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
|
||||||
yHoverFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
|
yHoverFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
|
||||||
yUnits: "%",
|
yUnits: "rps",
|
||||||
yTitle: "Percentage"
|
yTitle: "Cache request rate"
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -191,7 +190,7 @@ new PromConsole.Graph({
|
|||||||
new PromConsole.Graph({
|
new PromConsole.Graph({
|
||||||
node: document.querySelector("#synapse_cache_size"),
|
node: document.querySelector("#synapse_cache_size"),
|
||||||
expr: "synapse_util_caches_cache:size",
|
expr: "synapse_util_caches_cache:size",
|
||||||
name: "[[name]]",
|
name: "[[job]]-[[index]] [[name]]",
|
||||||
yAxisFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
|
yAxisFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
|
||||||
yHoverFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
|
yHoverFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
|
||||||
yUnits: "",
|
yUnits: "",
|
||||||
@@ -206,8 +205,8 @@ new PromConsole.Graph({
|
|||||||
<script>
|
<script>
|
||||||
new PromConsole.Graph({
|
new PromConsole.Graph({
|
||||||
node: document.querySelector("#synapse_http_server_request_count_servlet"),
|
node: document.querySelector("#synapse_http_server_request_count_servlet"),
|
||||||
expr: "rate(synapse_http_server_request_count:servlet[2m])",
|
expr: "rate(synapse_http_server_in_flight_requests_count[2m])",
|
||||||
name: "[[servlet]]",
|
name: "[[job]]-[[index]] [[method]] [[servlet]]",
|
||||||
yAxisFormatter: PromConsole.NumberFormatter.humanize,
|
yAxisFormatter: PromConsole.NumberFormatter.humanize,
|
||||||
yHoverFormatter: PromConsole.NumberFormatter.humanize,
|
yHoverFormatter: PromConsole.NumberFormatter.humanize,
|
||||||
yUnits: "req/s",
|
yUnits: "req/s",
|
||||||
@@ -219,8 +218,8 @@ new PromConsole.Graph({
|
|||||||
<script>
|
<script>
|
||||||
new PromConsole.Graph({
|
new PromConsole.Graph({
|
||||||
node: document.querySelector("#synapse_http_server_request_count_servlet_minus_events"),
|
node: document.querySelector("#synapse_http_server_request_count_servlet_minus_events"),
|
||||||
expr: "rate(synapse_http_server_request_count:servlet{servlet!=\"EventStreamRestServlet\", servlet!=\"SyncRestServlet\"}[2m])",
|
expr: "rate(synapse_http_server_in_flight_requests_count{servlet!=\"EventStreamRestServlet\", servlet!=\"SyncRestServlet\"}[2m])",
|
||||||
name: "[[servlet]]",
|
name: "[[job]]-[[index]] [[method]] [[servlet]]",
|
||||||
yAxisFormatter: PromConsole.NumberFormatter.humanize,
|
yAxisFormatter: PromConsole.NumberFormatter.humanize,
|
||||||
yHoverFormatter: PromConsole.NumberFormatter.humanize,
|
yHoverFormatter: PromConsole.NumberFormatter.humanize,
|
||||||
yUnits: "req/s",
|
yUnits: "req/s",
|
||||||
@@ -233,8 +232,8 @@ new PromConsole.Graph({
|
|||||||
<script>
|
<script>
|
||||||
new PromConsole.Graph({
|
new PromConsole.Graph({
|
||||||
node: document.querySelector("#synapse_http_server_response_time_avg"),
|
node: document.querySelector("#synapse_http_server_response_time_avg"),
|
||||||
expr: "rate(synapse_http_server_response_time_seconds[2m]) / rate(synapse_http_server_response_count[2m]) / 1000",
|
expr: "rate(synapse_http_server_response_time_seconds_sum[2m]) / rate(synapse_http_server_response_count[2m])",
|
||||||
name: "[[servlet]]",
|
name: "[[job]]-[[index]] [[servlet]]",
|
||||||
yAxisFormatter: PromConsole.NumberFormatter.humanize,
|
yAxisFormatter: PromConsole.NumberFormatter.humanize,
|
||||||
yHoverFormatter: PromConsole.NumberFormatter.humanize,
|
yHoverFormatter: PromConsole.NumberFormatter.humanize,
|
||||||
yUnits: "s/req",
|
yUnits: "s/req",
|
||||||
@@ -277,7 +276,7 @@ new PromConsole.Graph({
|
|||||||
new PromConsole.Graph({
|
new PromConsole.Graph({
|
||||||
node: document.querySelector("#synapse_http_server_response_ru_utime"),
|
node: document.querySelector("#synapse_http_server_response_ru_utime"),
|
||||||
expr: "rate(synapse_http_server_response_ru_utime_seconds[2m])",
|
expr: "rate(synapse_http_server_response_ru_utime_seconds[2m])",
|
||||||
name: "[[servlet]]",
|
name: "[[job]]-[[index]] [[servlet]]",
|
||||||
yAxisFormatter: PromConsole.NumberFormatter.humanize,
|
yAxisFormatter: PromConsole.NumberFormatter.humanize,
|
||||||
yHoverFormatter: PromConsole.NumberFormatter.humanize,
|
yHoverFormatter: PromConsole.NumberFormatter.humanize,
|
||||||
yUnits: "s/s",
|
yUnits: "s/s",
|
||||||
@@ -292,7 +291,7 @@ new PromConsole.Graph({
|
|||||||
new PromConsole.Graph({
|
new PromConsole.Graph({
|
||||||
node: document.querySelector("#synapse_http_server_response_db_txn_duration"),
|
node: document.querySelector("#synapse_http_server_response_db_txn_duration"),
|
||||||
expr: "rate(synapse_http_server_response_db_txn_duration_seconds[2m])",
|
expr: "rate(synapse_http_server_response_db_txn_duration_seconds[2m])",
|
||||||
name: "[[servlet]]",
|
name: "[[job]]-[[index]] [[servlet]]",
|
||||||
yAxisFormatter: PromConsole.NumberFormatter.humanize,
|
yAxisFormatter: PromConsole.NumberFormatter.humanize,
|
||||||
yHoverFormatter: PromConsole.NumberFormatter.humanize,
|
yHoverFormatter: PromConsole.NumberFormatter.humanize,
|
||||||
yUnits: "s/s",
|
yUnits: "s/s",
|
||||||
@@ -306,8 +305,8 @@ new PromConsole.Graph({
|
|||||||
<script>
|
<script>
|
||||||
new PromConsole.Graph({
|
new PromConsole.Graph({
|
||||||
node: document.querySelector("#synapse_http_server_send_time_avg"),
|
node: document.querySelector("#synapse_http_server_send_time_avg"),
|
||||||
expr: "rate(synapse_http_server_response_time_second{servlet='RoomSendEventRestServlet'}[2m]) / rate(synapse_http_server_response_count{servlet='RoomSendEventRestServlet'}[2m]) / 1000",
|
expr: "rate(synapse_http_server_response_time_seconds_sum{servlet='RoomSendEventRestServlet'}[2m]) / rate(synapse_http_server_response_count{servlet='RoomSendEventRestServlet'}[2m])",
|
||||||
name: "[[servlet]]",
|
name: "[[job]]-[[index]] [[servlet]]",
|
||||||
yAxisFormatter: PromConsole.NumberFormatter.humanize,
|
yAxisFormatter: PromConsole.NumberFormatter.humanize,
|
||||||
yHoverFormatter: PromConsole.NumberFormatter.humanize,
|
yHoverFormatter: PromConsole.NumberFormatter.humanize,
|
||||||
yUnits: "s/req",
|
yUnits: "s/req",
|
||||||
@@ -323,7 +322,7 @@ new PromConsole.Graph({
|
|||||||
new PromConsole.Graph({
|
new PromConsole.Graph({
|
||||||
node: document.querySelector("#synapse_federation_client_sent"),
|
node: document.querySelector("#synapse_federation_client_sent"),
|
||||||
expr: "rate(synapse_federation_client_sent[2m])",
|
expr: "rate(synapse_federation_client_sent[2m])",
|
||||||
name: "[[type]]",
|
name: "[[job]]-[[index]] [[type]]",
|
||||||
yAxisFormatter: PromConsole.NumberFormatter.humanize,
|
yAxisFormatter: PromConsole.NumberFormatter.humanize,
|
||||||
yHoverFormatter: PromConsole.NumberFormatter.humanize,
|
yHoverFormatter: PromConsole.NumberFormatter.humanize,
|
||||||
yUnits: "req/s",
|
yUnits: "req/s",
|
||||||
@@ -337,7 +336,7 @@ new PromConsole.Graph({
|
|||||||
new PromConsole.Graph({
|
new PromConsole.Graph({
|
||||||
node: document.querySelector("#synapse_federation_server_received"),
|
node: document.querySelector("#synapse_federation_server_received"),
|
||||||
expr: "rate(synapse_federation_server_received[2m])",
|
expr: "rate(synapse_federation_server_received[2m])",
|
||||||
name: "[[type]]",
|
name: "[[job]]-[[index]] [[type]]",
|
||||||
yAxisFormatter: PromConsole.NumberFormatter.humanize,
|
yAxisFormatter: PromConsole.NumberFormatter.humanize,
|
||||||
yHoverFormatter: PromConsole.NumberFormatter.humanize,
|
yHoverFormatter: PromConsole.NumberFormatter.humanize,
|
||||||
yUnits: "req/s",
|
yUnits: "req/s",
|
||||||
@@ -367,7 +366,7 @@ new PromConsole.Graph({
|
|||||||
new PromConsole.Graph({
|
new PromConsole.Graph({
|
||||||
node: document.querySelector("#synapse_notifier_listeners"),
|
node: document.querySelector("#synapse_notifier_listeners"),
|
||||||
expr: "synapse_notifier_listeners",
|
expr: "synapse_notifier_listeners",
|
||||||
name: "listeners",
|
name: "[[job]]-[[index]]",
|
||||||
min: 0,
|
min: 0,
|
||||||
yAxisFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
|
yAxisFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
|
||||||
yHoverFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
|
yHoverFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
|
||||||
@@ -382,7 +381,7 @@ new PromConsole.Graph({
|
|||||||
new PromConsole.Graph({
|
new PromConsole.Graph({
|
||||||
node: document.querySelector("#synapse_notifier_notified_events"),
|
node: document.querySelector("#synapse_notifier_notified_events"),
|
||||||
expr: "rate(synapse_notifier_notified_events[2m])",
|
expr: "rate(synapse_notifier_notified_events[2m])",
|
||||||
name: "events",
|
name: "[[job]]-[[index]]",
|
||||||
yAxisFormatter: PromConsole.NumberFormatter.humanize,
|
yAxisFormatter: PromConsole.NumberFormatter.humanize,
|
||||||
yHoverFormatter: PromConsole.NumberFormatter.humanize,
|
yHoverFormatter: PromConsole.NumberFormatter.humanize,
|
||||||
yUnits: "events/s",
|
yUnits: "events/s",
|
||||||
|
|||||||
@@ -58,3 +58,21 @@ groups:
|
|||||||
labels:
|
labels:
|
||||||
type: "PDU"
|
type: "PDU"
|
||||||
expr: 'synapse_federation_transaction_queue_pending_pdus + 0'
|
expr: 'synapse_federation_transaction_queue_pending_pdus + 0'
|
||||||
|
|
||||||
|
- record: synapse_storage_events_persisted_by_source_type
|
||||||
|
expr: sum without(type, origin_type, origin_entity) (synapse_storage_events_persisted_events_sep{origin_type="remote"})
|
||||||
|
labels:
|
||||||
|
type: remote
|
||||||
|
- record: synapse_storage_events_persisted_by_source_type
|
||||||
|
expr: sum without(type, origin_type, origin_entity) (synapse_storage_events_persisted_events_sep{origin_entity="*client*",origin_type="local"})
|
||||||
|
labels:
|
||||||
|
type: local
|
||||||
|
- record: synapse_storage_events_persisted_by_source_type
|
||||||
|
expr: sum without(type, origin_type, origin_entity) (synapse_storage_events_persisted_events_sep{origin_entity!="*client*",origin_type="local"})
|
||||||
|
labels:
|
||||||
|
type: bridges
|
||||||
|
- record: synapse_storage_events_persisted_by_event_type
|
||||||
|
expr: sum without(origin_entity, origin_type) (synapse_storage_events_persisted_events_sep)
|
||||||
|
- record: synapse_storage_events_persisted_by_origin
|
||||||
|
expr: sum without(type) (synapse_storage_events_persisted_events_sep)
|
||||||
|
|
||||||
|
|||||||
35
debian/changelog
vendored
35
debian/changelog
vendored
@@ -1,3 +1,38 @@
|
|||||||
|
matrix-synapse-py3 (1.25.0ubuntu1) UNRELEASED; urgency=medium
|
||||||
|
|
||||||
|
* Remove dependency on `python3-distutils`.
|
||||||
|
|
||||||
|
-- Richard van der Hoff <richard@matrix.org> Fri, 15 Jan 2021 12:44:19 +0000
|
||||||
|
|
||||||
|
matrix-synapse-py3 (1.25.0) stable; urgency=medium
|
||||||
|
|
||||||
|
[ Dan Callahan ]
|
||||||
|
* Update dependencies to account for the removal of the transitional
|
||||||
|
dh-systemd package from Debian Bullseye.
|
||||||
|
|
||||||
|
[ Synapse Packaging team ]
|
||||||
|
* New synapse release 1.25.0.
|
||||||
|
|
||||||
|
-- Synapse Packaging team <packages@matrix.org> Wed, 13 Jan 2021 10:14:55 +0000
|
||||||
|
|
||||||
|
matrix-synapse-py3 (1.24.0) stable; urgency=medium
|
||||||
|
|
||||||
|
* New synapse release 1.24.0.
|
||||||
|
|
||||||
|
-- Synapse Packaging team <packages@matrix.org> Wed, 09 Dec 2020 10:14:30 +0000
|
||||||
|
|
||||||
|
matrix-synapse-py3 (1.23.1) stable; urgency=medium
|
||||||
|
|
||||||
|
* New synapse release 1.23.1.
|
||||||
|
|
||||||
|
-- Synapse Packaging team <packages@matrix.org> Wed, 09 Dec 2020 10:40:39 +0000
|
||||||
|
|
||||||
|
matrix-synapse-py3 (1.23.0) stable; urgency=medium
|
||||||
|
|
||||||
|
* New synapse release 1.23.0.
|
||||||
|
|
||||||
|
-- Synapse Packaging team <packages@matrix.org> Wed, 18 Nov 2020 11:41:28 +0000
|
||||||
|
|
||||||
matrix-synapse-py3 (1.22.1) stable; urgency=medium
|
matrix-synapse-py3 (1.22.1) stable; urgency=medium
|
||||||
|
|
||||||
* New synapse release 1.22.1.
|
* New synapse release 1.22.1.
|
||||||
|
|||||||
7
debian/control
vendored
7
debian/control
vendored
@@ -3,9 +3,11 @@ Section: contrib/python
|
|||||||
Priority: extra
|
Priority: extra
|
||||||
Maintainer: Synapse Packaging team <packages@matrix.org>
|
Maintainer: Synapse Packaging team <packages@matrix.org>
|
||||||
# keep this list in sync with the build dependencies in docker/Dockerfile-dhvirtualenv.
|
# keep this list in sync with the build dependencies in docker/Dockerfile-dhvirtualenv.
|
||||||
|
# TODO: Remove the dependency on dh-systemd after dropping support for Ubuntu xenial
|
||||||
|
# On all other supported releases, it's merely a transitional package which
|
||||||
|
# does nothing but depends on debhelper (> 9.20160709)
|
||||||
Build-Depends:
|
Build-Depends:
|
||||||
debhelper (>= 9),
|
debhelper (>= 9.20160709) | dh-systemd,
|
||||||
dh-systemd,
|
|
||||||
dh-virtualenv (>= 1.1),
|
dh-virtualenv (>= 1.1),
|
||||||
libsystemd-dev,
|
libsystemd-dev,
|
||||||
libpq-dev,
|
libpq-dev,
|
||||||
@@ -29,7 +31,6 @@ Pre-Depends: dpkg (>= 1.16.1)
|
|||||||
Depends:
|
Depends:
|
||||||
adduser,
|
adduser,
|
||||||
debconf,
|
debconf,
|
||||||
python3-distutils|libpython3-stdlib (<< 3.6),
|
|
||||||
${misc:Depends},
|
${misc:Depends},
|
||||||
${shlibs:Depends},
|
${shlibs:Depends},
|
||||||
${synapse:pydepends},
|
${synapse:pydepends},
|
||||||
|
|||||||
@@ -1,59 +0,0 @@
|
|||||||
import argparse
|
|
||||||
import BaseHTTPServer
|
|
||||||
import os
|
|
||||||
import SimpleHTTPServer
|
|
||||||
import cgi, logging
|
|
||||||
|
|
||||||
from daemonize import Daemonize
|
|
||||||
|
|
||||||
|
|
||||||
class SimpleHTTPRequestHandlerWithPOST(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
|
||||||
UPLOAD_PATH = "upload"
|
|
||||||
|
|
||||||
"""
|
|
||||||
Accept all post request as file upload
|
|
||||||
"""
|
|
||||||
|
|
||||||
def do_POST(self):
|
|
||||||
|
|
||||||
path = os.path.join(self.UPLOAD_PATH, os.path.basename(self.path))
|
|
||||||
length = self.headers["content-length"]
|
|
||||||
data = self.rfile.read(int(length))
|
|
||||||
|
|
||||||
with open(path, "wb") as fh:
|
|
||||||
fh.write(data)
|
|
||||||
|
|
||||||
self.send_response(200)
|
|
||||||
self.send_header("Content-Type", "application/json")
|
|
||||||
self.end_headers()
|
|
||||||
|
|
||||||
# Return the absolute path of the uploaded file
|
|
||||||
self.wfile.write('{"url":"/%s"}' % path)
|
|
||||||
|
|
||||||
|
|
||||||
def setup():
|
|
||||||
parser = argparse.ArgumentParser()
|
|
||||||
parser.add_argument("directory")
|
|
||||||
parser.add_argument("-p", "--port", dest="port", type=int, default=8080)
|
|
||||||
parser.add_argument("-P", "--pid-file", dest="pid", default="web.pid")
|
|
||||||
args = parser.parse_args()
|
|
||||||
|
|
||||||
# Get absolute path to directory to serve, as daemonize changes to '/'
|
|
||||||
os.chdir(args.directory)
|
|
||||||
dr = os.getcwd()
|
|
||||||
|
|
||||||
httpd = BaseHTTPServer.HTTPServer(("", args.port), SimpleHTTPRequestHandlerWithPOST)
|
|
||||||
|
|
||||||
def run():
|
|
||||||
os.chdir(dr)
|
|
||||||
httpd.serve_forever()
|
|
||||||
|
|
||||||
daemon = Daemonize(
|
|
||||||
app="synapse-webclient", pid=args.pid, action=run, auto_close_fds=False
|
|
||||||
)
|
|
||||||
|
|
||||||
daemon.start()
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
setup()
|
|
||||||
@@ -36,7 +36,8 @@ RUN pip install --prefix="/install" --no-warn-script-location \
|
|||||||
frozendict \
|
frozendict \
|
||||||
jaeger-client \
|
jaeger-client \
|
||||||
opentracing \
|
opentracing \
|
||||||
prometheus-client \
|
# Match the version constraints of Synapse
|
||||||
|
"prometheus_client>=0.4.0" \
|
||||||
psycopg2 \
|
psycopg2 \
|
||||||
pycparser \
|
pycparser \
|
||||||
pyrsistent \
|
pyrsistent \
|
||||||
|
|||||||
@@ -50,17 +50,22 @@ FROM ${distro}
|
|||||||
ARG distro=""
|
ARG distro=""
|
||||||
ENV distro ${distro}
|
ENV distro ${distro}
|
||||||
|
|
||||||
|
# Python < 3.7 assumes LANG="C" means ASCII-only and throws on printing unicode
|
||||||
|
# http://bugs.python.org/issue19846
|
||||||
|
ENV LANG C.UTF-8
|
||||||
|
|
||||||
# Install the build dependencies
|
# Install the build dependencies
|
||||||
#
|
#
|
||||||
# NB: keep this list in sync with the list of build-deps in debian/control
|
# NB: keep this list in sync with the list of build-deps in debian/control
|
||||||
# TODO: it would be nice to do that automatically.
|
# TODO: it would be nice to do that automatically.
|
||||||
|
# TODO: Remove the dh-systemd stanza after dropping support for Ubuntu xenial
|
||||||
|
# it's a transitional package on all other, more recent releases
|
||||||
RUN apt-get update -qq -o Acquire::Languages=none \
|
RUN apt-get update -qq -o Acquire::Languages=none \
|
||||||
&& env DEBIAN_FRONTEND=noninteractive apt-get install \
|
&& env DEBIAN_FRONTEND=noninteractive apt-get install \
|
||||||
-yqq --no-install-recommends -o Dpkg::Options::=--force-unsafe-io \
|
-yqq --no-install-recommends -o Dpkg::Options::=--force-unsafe-io \
|
||||||
build-essential \
|
build-essential \
|
||||||
debhelper \
|
debhelper \
|
||||||
devscripts \
|
devscripts \
|
||||||
dh-systemd \
|
|
||||||
libsystemd-dev \
|
libsystemd-dev \
|
||||||
lsb-release \
|
lsb-release \
|
||||||
pkg-config \
|
pkg-config \
|
||||||
@@ -69,7 +74,11 @@ RUN apt-get update -qq -o Acquire::Languages=none \
|
|||||||
python3-setuptools \
|
python3-setuptools \
|
||||||
python3-venv \
|
python3-venv \
|
||||||
sqlite3 \
|
sqlite3 \
|
||||||
libpq-dev
|
libpq-dev \
|
||||||
|
xmlsec1 \
|
||||||
|
&& ( env DEBIAN_FRONTEND=noninteractive apt-get install \
|
||||||
|
-yqq --no-install-recommends -o Dpkg::Options::=--force-unsafe-io \
|
||||||
|
dh-systemd || true )
|
||||||
|
|
||||||
COPY --from=builder /dh-virtualenv_1.2~dev-1_all.deb /
|
COPY --from=builder /dh-virtualenv_1.2~dev-1_all.deb /
|
||||||
|
|
||||||
|
|||||||
@@ -198,12 +198,10 @@ old_signing_keys: {}
|
|||||||
key_refresh_interval: "1d" # 1 Day.
|
key_refresh_interval: "1d" # 1 Day.
|
||||||
|
|
||||||
# The trusted servers to download signing keys from.
|
# The trusted servers to download signing keys from.
|
||||||
perspectives:
|
trusted_key_servers:
|
||||||
servers:
|
- server_name: matrix.org
|
||||||
"matrix.org":
|
verify_keys:
|
||||||
verify_keys:
|
"ed25519:auto": "Noi6WqcDj0QmPxCNQqgezwTlBKrfqehY1u2FyWP9uYw"
|
||||||
"ed25519:auto":
|
|
||||||
key: "Noi6WqcDj0QmPxCNQqgezwTlBKrfqehY1u2FyWP9uYw"
|
|
||||||
|
|
||||||
password_config:
|
password_config:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|||||||
172
docs/admin_api/event_reports.md
Normal file
172
docs/admin_api/event_reports.md
Normal file
@@ -0,0 +1,172 @@
|
|||||||
|
# Show reported events
|
||||||
|
|
||||||
|
This API returns information about reported events.
|
||||||
|
|
||||||
|
The api is:
|
||||||
|
```
|
||||||
|
GET /_synapse/admin/v1/event_reports?from=0&limit=10
|
||||||
|
```
|
||||||
|
To use it, you will need to authenticate by providing an `access_token` for a
|
||||||
|
server admin: see [README.rst](README.rst).
|
||||||
|
|
||||||
|
It returns a JSON body like the following:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"event_reports": [
|
||||||
|
{
|
||||||
|
"event_id": "$bNUFCwGzWca1meCGkjp-zwslF-GfVcXukvRLI1_FaVY",
|
||||||
|
"id": 2,
|
||||||
|
"reason": "foo",
|
||||||
|
"score": -100,
|
||||||
|
"received_ts": 1570897107409,
|
||||||
|
"canonical_alias": "#alias1:matrix.org",
|
||||||
|
"room_id": "!ERAgBpSOcCCuTJqQPk:matrix.org",
|
||||||
|
"name": "Matrix HQ",
|
||||||
|
"sender": "@foobar:matrix.org",
|
||||||
|
"user_id": "@foo:matrix.org"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"event_id": "$3IcdZsDaN_En-S1DF4EMCy3v4gNRKeOJs8W5qTOKj4I",
|
||||||
|
"id": 3,
|
||||||
|
"reason": "bar",
|
||||||
|
"score": -100,
|
||||||
|
"received_ts": 1598889612059,
|
||||||
|
"canonical_alias": "#alias2:matrix.org",
|
||||||
|
"room_id": "!eGvUQuTCkHGVwNMOjv:matrix.org",
|
||||||
|
"name": "Your room name here",
|
||||||
|
"sender": "@foobar:matrix.org",
|
||||||
|
"user_id": "@bar:matrix.org"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"next_token": 2,
|
||||||
|
"total": 4
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
To paginate, check for `next_token` and if present, call the endpoint again with `from`
|
||||||
|
set to the value of `next_token`. This will return a new page.
|
||||||
|
|
||||||
|
If the endpoint does not return a `next_token` then there are no more reports to
|
||||||
|
paginate through.
|
||||||
|
|
||||||
|
**URL parameters:**
|
||||||
|
|
||||||
|
* `limit`: integer - Is optional but is used for pagination, denoting the maximum number
|
||||||
|
of items to return in this call. Defaults to `100`.
|
||||||
|
* `from`: integer - Is optional but used for pagination, denoting the offset in the
|
||||||
|
returned results. This should be treated as an opaque value and not explicitly set to
|
||||||
|
anything other than the return value of `next_token` from a previous call. Defaults to `0`.
|
||||||
|
* `dir`: string - Direction of event report order. Whether to fetch the most recent
|
||||||
|
first (`b`) or the oldest first (`f`). Defaults to `b`.
|
||||||
|
* `user_id`: string - Is optional and filters to only return users with user IDs that
|
||||||
|
contain this value. This is the user who reported the event and wrote the reason.
|
||||||
|
* `room_id`: string - Is optional and filters to only return rooms with room IDs that
|
||||||
|
contain this value.
|
||||||
|
|
||||||
|
**Response**
|
||||||
|
|
||||||
|
The following fields are returned in the JSON response body:
|
||||||
|
|
||||||
|
* `id`: integer - ID of event report.
|
||||||
|
* `received_ts`: integer - The timestamp (in milliseconds since the unix epoch) when this
|
||||||
|
report was sent.
|
||||||
|
* `room_id`: string - The ID of the room in which the event being reported is located.
|
||||||
|
* `name`: string - The name of the room.
|
||||||
|
* `event_id`: string - The ID of the reported event.
|
||||||
|
* `user_id`: string - This is the user who reported the event and wrote the reason.
|
||||||
|
* `reason`: string - Comment made by the `user_id` in this report. May be blank.
|
||||||
|
* `score`: integer - Content is reported based upon a negative score, where -100 is
|
||||||
|
"most offensive" and 0 is "inoffensive".
|
||||||
|
* `sender`: string - This is the ID of the user who sent the original message/event that
|
||||||
|
was reported.
|
||||||
|
* `canonical_alias`: string - The canonical alias of the room. `null` if the room does not
|
||||||
|
have a canonical alias set.
|
||||||
|
* `next_token`: integer - Indication for pagination. See above.
|
||||||
|
* `total`: integer - Total number of event reports related to the query
|
||||||
|
(`user_id` and `room_id`).
|
||||||
|
|
||||||
|
# Show details of a specific event report
|
||||||
|
|
||||||
|
This API returns information about a specific event report.
|
||||||
|
|
||||||
|
The api is:
|
||||||
|
```
|
||||||
|
GET /_synapse/admin/v1/event_reports/<report_id>
|
||||||
|
```
|
||||||
|
To use it, you will need to authenticate by providing an `access_token` for a
|
||||||
|
server admin: see [README.rst](README.rst).
|
||||||
|
|
||||||
|
It returns a JSON body like the following:
|
||||||
|
|
||||||
|
```jsonc
|
||||||
|
{
|
||||||
|
"event_id": "$bNUFCwGzWca1meCGkjp-zwslF-GfVcXukvRLI1_FaVY",
|
||||||
|
"event_json": {
|
||||||
|
"auth_events": [
|
||||||
|
"$YK4arsKKcc0LRoe700pS8DSjOvUT4NDv0HfInlMFw2M",
|
||||||
|
"$oggsNXxzPFRE3y53SUNd7nsj69-QzKv03a1RucHu-ws"
|
||||||
|
],
|
||||||
|
"content": {
|
||||||
|
"body": "matrix.org: This Week in Matrix",
|
||||||
|
"format": "org.matrix.custom.html",
|
||||||
|
"formatted_body": "<strong>matrix.org</strong>:<br><a href=\"https://matrix.org/blog/\"><strong>This Week in Matrix</strong></a>",
|
||||||
|
"msgtype": "m.notice"
|
||||||
|
},
|
||||||
|
"depth": 546,
|
||||||
|
"hashes": {
|
||||||
|
"sha256": "xK1//xnmvHJIOvbgXlkI8eEqdvoMmihVDJ9J4SNlsAw"
|
||||||
|
},
|
||||||
|
"origin": "matrix.org",
|
||||||
|
"origin_server_ts": 1592291711430,
|
||||||
|
"prev_events": [
|
||||||
|
"$YK4arsKKcc0LRoe700pS8DSjOvUT4NDv0HfInlMFw2M"
|
||||||
|
],
|
||||||
|
"prev_state": [],
|
||||||
|
"room_id": "!ERAgBpSOcCCuTJqQPk:matrix.org",
|
||||||
|
"sender": "@foobar:matrix.org",
|
||||||
|
"signatures": {
|
||||||
|
"matrix.org": {
|
||||||
|
"ed25519:a_JaEG": "cs+OUKW/iHx5pEidbWxh0UiNNHwe46Ai9LwNz+Ah16aWDNszVIe2gaAcVZfvNsBhakQTew51tlKmL2kspXk/Dg"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "m.room.message",
|
||||||
|
"unsigned": {
|
||||||
|
"age_ts": 1592291711430,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"id": <report_id>,
|
||||||
|
"reason": "foo",
|
||||||
|
"score": -100,
|
||||||
|
"received_ts": 1570897107409,
|
||||||
|
"canonical_alias": "#alias1:matrix.org",
|
||||||
|
"room_id": "!ERAgBpSOcCCuTJqQPk:matrix.org",
|
||||||
|
"name": "Matrix HQ",
|
||||||
|
"sender": "@foobar:matrix.org",
|
||||||
|
"user_id": "@foo:matrix.org"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**URL parameters:**
|
||||||
|
|
||||||
|
* `report_id`: string - The ID of the event report.
|
||||||
|
|
||||||
|
**Response**
|
||||||
|
|
||||||
|
The following fields are returned in the JSON response body:
|
||||||
|
|
||||||
|
* `id`: integer - ID of event report.
|
||||||
|
* `received_ts`: integer - The timestamp (in milliseconds since the unix epoch) when this
|
||||||
|
report was sent.
|
||||||
|
* `room_id`: string - The ID of the room in which the event being reported is located.
|
||||||
|
* `name`: string - The name of the room.
|
||||||
|
* `event_id`: string - The ID of the reported event.
|
||||||
|
* `user_id`: string - This is the user who reported the event and wrote the reason.
|
||||||
|
* `reason`: string - Comment made by the `user_id` in this report. May be blank.
|
||||||
|
* `score`: integer - Content is reported based upon a negative score, where -100 is
|
||||||
|
"most offensive" and 0 is "inoffensive".
|
||||||
|
* `sender`: string - This is the ID of the user who sent the original message/event that
|
||||||
|
was reported.
|
||||||
|
* `canonical_alias`: string - The canonical alias of the room. `null` if the room does not
|
||||||
|
have a canonical alias set.
|
||||||
|
* `event_json`: object - Details of the original event that was reported.
|
||||||
@@ -1,165 +0,0 @@
|
|||||||
Show reported events
|
|
||||||
====================
|
|
||||||
|
|
||||||
This API returns information about reported events.
|
|
||||||
|
|
||||||
The api is::
|
|
||||||
|
|
||||||
GET /_synapse/admin/v1/event_reports?from=0&limit=10
|
|
||||||
|
|
||||||
To use it, you will need to authenticate by providing an ``access_token`` for a
|
|
||||||
server admin: see `README.rst <README.rst>`_.
|
|
||||||
|
|
||||||
It returns a JSON body like the following:
|
|
||||||
|
|
||||||
.. code:: jsonc
|
|
||||||
|
|
||||||
{
|
|
||||||
"event_reports": [
|
|
||||||
{
|
|
||||||
"event_id": "$bNUFCwGzWca1meCGkjp-zwslF-GfVcXukvRLI1_FaVY",
|
|
||||||
"id": 2,
|
|
||||||
"reason": "foo",
|
|
||||||
"score": -100,
|
|
||||||
"received_ts": 1570897107409,
|
|
||||||
"canonical_alias": "#alias1:matrix.org",
|
|
||||||
"room_id": "!ERAgBpSOcCCuTJqQPk:matrix.org",
|
|
||||||
"name": "Matrix HQ",
|
|
||||||
"sender": "@foobar:matrix.org",
|
|
||||||
"user_id": "@foo:matrix.org"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"event_id": "$3IcdZsDaN_En-S1DF4EMCy3v4gNRKeOJs8W5qTOKj4I",
|
|
||||||
"id": 3,
|
|
||||||
"reason": "bar",
|
|
||||||
"score": -100,
|
|
||||||
"received_ts": 1598889612059,
|
|
||||||
"canonical_alias": "#alias2:matrix.org",
|
|
||||||
"room_id": "!eGvUQuTCkHGVwNMOjv:matrix.org",
|
|
||||||
"name": "Your room name here",
|
|
||||||
"sender": "@foobar:matrix.org",
|
|
||||||
"user_id": "@bar:matrix.org"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"next_token": 2,
|
|
||||||
"total": 4
|
|
||||||
}
|
|
||||||
|
|
||||||
To paginate, check for ``next_token`` and if present, call the endpoint again
|
|
||||||
with ``from`` set to the value of ``next_token``. This will return a new page.
|
|
||||||
|
|
||||||
If the endpoint does not return a ``next_token`` then there are no more
|
|
||||||
reports to paginate through.
|
|
||||||
|
|
||||||
**URL parameters:**
|
|
||||||
|
|
||||||
- ``limit``: integer - Is optional but is used for pagination,
|
|
||||||
denoting the maximum number of items to return in this call. Defaults to ``100``.
|
|
||||||
- ``from``: integer - Is optional but used for pagination,
|
|
||||||
denoting the offset in the returned results. This should be treated as an opaque value and
|
|
||||||
not explicitly set to anything other than the return value of ``next_token`` from a previous call.
|
|
||||||
Defaults to ``0``.
|
|
||||||
- ``dir``: string - Direction of event report order. Whether to fetch the most recent first (``b``) or the
|
|
||||||
oldest first (``f``). Defaults to ``b``.
|
|
||||||
- ``user_id``: string - Is optional and filters to only return users with user IDs that contain this value.
|
|
||||||
This is the user who reported the event and wrote the reason.
|
|
||||||
- ``room_id``: string - Is optional and filters to only return rooms with room IDs that contain this value.
|
|
||||||
|
|
||||||
**Response**
|
|
||||||
|
|
||||||
The following fields are returned in the JSON response body:
|
|
||||||
|
|
||||||
- ``id``: integer - ID of event report.
|
|
||||||
- ``received_ts``: integer - The timestamp (in milliseconds since the unix epoch) when this report was sent.
|
|
||||||
- ``room_id``: string - The ID of the room in which the event being reported is located.
|
|
||||||
- ``name``: string - The name of the room.
|
|
||||||
- ``event_id``: string - The ID of the reported event.
|
|
||||||
- ``user_id``: string - This is the user who reported the event and wrote the reason.
|
|
||||||
- ``reason``: string - Comment made by the ``user_id`` in this report. May be blank.
|
|
||||||
- ``score``: integer - Content is reported based upon a negative score, where -100 is "most offensive" and 0 is "inoffensive".
|
|
||||||
- ``sender``: string - This is the ID of the user who sent the original message/event that was reported.
|
|
||||||
- ``canonical_alias``: string - The canonical alias of the room. ``null`` if the room does not have a canonical alias set.
|
|
||||||
- ``next_token``: integer - Indication for pagination. See above.
|
|
||||||
- ``total``: integer - Total number of event reports related to the query (``user_id`` and ``room_id``).
|
|
||||||
|
|
||||||
Show details of a specific event report
|
|
||||||
=======================================
|
|
||||||
|
|
||||||
This API returns information about a specific event report.
|
|
||||||
|
|
||||||
The api is::
|
|
||||||
|
|
||||||
GET /_synapse/admin/v1/event_reports/<report_id>
|
|
||||||
|
|
||||||
To use it, you will need to authenticate by providing an ``access_token`` for a
|
|
||||||
server admin: see `README.rst <README.rst>`_.
|
|
||||||
|
|
||||||
It returns a JSON body like the following:
|
|
||||||
|
|
||||||
.. code:: jsonc
|
|
||||||
|
|
||||||
{
|
|
||||||
"event_id": "$bNUFCwGzWca1meCGkjp-zwslF-GfVcXukvRLI1_FaVY",
|
|
||||||
"event_json": {
|
|
||||||
"auth_events": [
|
|
||||||
"$YK4arsKKcc0LRoe700pS8DSjOvUT4NDv0HfInlMFw2M",
|
|
||||||
"$oggsNXxzPFRE3y53SUNd7nsj69-QzKv03a1RucHu-ws"
|
|
||||||
],
|
|
||||||
"content": {
|
|
||||||
"body": "matrix.org: This Week in Matrix",
|
|
||||||
"format": "org.matrix.custom.html",
|
|
||||||
"formatted_body": "<strong>matrix.org</strong>:<br><a href=\"https://matrix.org/blog/\"><strong>This Week in Matrix</strong></a>",
|
|
||||||
"msgtype": "m.notice"
|
|
||||||
},
|
|
||||||
"depth": 546,
|
|
||||||
"hashes": {
|
|
||||||
"sha256": "xK1//xnmvHJIOvbgXlkI8eEqdvoMmihVDJ9J4SNlsAw"
|
|
||||||
},
|
|
||||||
"origin": "matrix.org",
|
|
||||||
"origin_server_ts": 1592291711430,
|
|
||||||
"prev_events": [
|
|
||||||
"$YK4arsKKcc0LRoe700pS8DSjOvUT4NDv0HfInlMFw2M"
|
|
||||||
],
|
|
||||||
"prev_state": [],
|
|
||||||
"room_id": "!ERAgBpSOcCCuTJqQPk:matrix.org",
|
|
||||||
"sender": "@foobar:matrix.org",
|
|
||||||
"signatures": {
|
|
||||||
"matrix.org": {
|
|
||||||
"ed25519:a_JaEG": "cs+OUKW/iHx5pEidbWxh0UiNNHwe46Ai9LwNz+Ah16aWDNszVIe2gaAcVZfvNsBhakQTew51tlKmL2kspXk/Dg"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"type": "m.room.message",
|
|
||||||
"unsigned": {
|
|
||||||
"age_ts": 1592291711430,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": <report_id>,
|
|
||||||
"reason": "foo",
|
|
||||||
"score": -100,
|
|
||||||
"received_ts": 1570897107409,
|
|
||||||
"canonical_alias": "#alias1:matrix.org",
|
|
||||||
"room_id": "!ERAgBpSOcCCuTJqQPk:matrix.org",
|
|
||||||
"name": "Matrix HQ",
|
|
||||||
"sender": "@foobar:matrix.org",
|
|
||||||
"user_id": "@foo:matrix.org"
|
|
||||||
}
|
|
||||||
|
|
||||||
**URL parameters:**
|
|
||||||
|
|
||||||
- ``report_id``: string - The ID of the event report.
|
|
||||||
|
|
||||||
**Response**
|
|
||||||
|
|
||||||
The following fields are returned in the JSON response body:
|
|
||||||
|
|
||||||
- ``id``: integer - ID of event report.
|
|
||||||
- ``received_ts``: integer - The timestamp (in milliseconds since the unix epoch) when this report was sent.
|
|
||||||
- ``room_id``: string - The ID of the room in which the event being reported is located.
|
|
||||||
- ``name``: string - The name of the room.
|
|
||||||
- ``event_id``: string - The ID of the reported event.
|
|
||||||
- ``user_id``: string - This is the user who reported the event and wrote the reason.
|
|
||||||
- ``reason``: string - Comment made by the ``user_id`` in this report. May be blank.
|
|
||||||
- ``score``: integer - Content is reported based upon a negative score, where -100 is "most offensive" and 0 is "inoffensive".
|
|
||||||
- ``sender``: string - This is the ID of the user who sent the original message/event that was reported.
|
|
||||||
- ``canonical_alias``: string - The canonical alias of the room. ``null`` if the room does not have a canonical alias set.
|
|
||||||
- ``event_json``: object - Details of the original event that was reported.
|
|
||||||
@@ -1,6 +1,19 @@
|
|||||||
|
# Contents
|
||||||
|
- [List all media in a room](#list-all-media-in-a-room)
|
||||||
|
- [Quarantine media](#quarantine-media)
|
||||||
|
* [Quarantining media by ID](#quarantining-media-by-id)
|
||||||
|
* [Quarantining media in a room](#quarantining-media-in-a-room)
|
||||||
|
* [Quarantining all media of a user](#quarantining-all-media-of-a-user)
|
||||||
|
* [Protecting media from being quarantined](#protecting-media-from-being-quarantined)
|
||||||
|
- [Delete local media](#delete-local-media)
|
||||||
|
* [Delete a specific local media](#delete-a-specific-local-media)
|
||||||
|
* [Delete local media by date or size](#delete-local-media-by-date-or-size)
|
||||||
|
- [Purge Remote Media API](#purge-remote-media-api)
|
||||||
|
|
||||||
# List all media in a room
|
# List all media in a room
|
||||||
|
|
||||||
This API gets a list of known media in a room.
|
This API gets a list of known media in a room.
|
||||||
|
However, it only shows media from unencrypted events or rooms.
|
||||||
|
|
||||||
The API is:
|
The API is:
|
||||||
```
|
```
|
||||||
@@ -10,16 +23,16 @@ To use it, you will need to authenticate by providing an `access_token` for a
|
|||||||
server admin: see [README.rst](README.rst).
|
server admin: see [README.rst](README.rst).
|
||||||
|
|
||||||
The API returns a JSON body like the following:
|
The API returns a JSON body like the following:
|
||||||
```
|
```json
|
||||||
{
|
{
|
||||||
"local": [
|
"local": [
|
||||||
"mxc://localhost/xwvutsrqponmlkjihgfedcba",
|
"mxc://localhost/xwvutsrqponmlkjihgfedcba",
|
||||||
"mxc://localhost/abcdefghijklmnopqrstuvwx"
|
"mxc://localhost/abcdefghijklmnopqrstuvwx"
|
||||||
],
|
],
|
||||||
"remote": [
|
"remote": [
|
||||||
"mxc://matrix.org/xwvutsrqponmlkjihgfedcba",
|
"mxc://matrix.org/xwvutsrqponmlkjihgfedcba",
|
||||||
"mxc://matrix.org/abcdefghijklmnopqrstuvwx"
|
"mxc://matrix.org/abcdefghijklmnopqrstuvwx"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -47,7 +60,7 @@ form of `abcdefg12345...`.
|
|||||||
|
|
||||||
Response:
|
Response:
|
||||||
|
|
||||||
```
|
```json
|
||||||
{}
|
{}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -67,14 +80,18 @@ Where `room_id` is in the form of `!roomid12345:example.org`.
|
|||||||
|
|
||||||
Response:
|
Response:
|
||||||
|
|
||||||
```
|
```json
|
||||||
{
|
{
|
||||||
"num_quarantined": 10 # The number of media items successfully quarantined
|
"num_quarantined": 10
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The following fields are returned in the JSON response body:
|
||||||
|
|
||||||
|
* `num_quarantined`: integer - The number of media items successfully quarantined
|
||||||
|
|
||||||
Note that there is a legacy endpoint, `POST
|
Note that there is a legacy endpoint, `POST
|
||||||
/_synapse/admin/v1/quarantine_media/<room_id >`, that operates the same.
|
/_synapse/admin/v1/quarantine_media/<room_id>`, that operates the same.
|
||||||
However, it is deprecated and may be removed in a future release.
|
However, it is deprecated and may be removed in a future release.
|
||||||
|
|
||||||
## Quarantining all media of a user
|
## Quarantining all media of a user
|
||||||
@@ -91,23 +108,52 @@ POST /_synapse/admin/v1/user/<user_id>/media/quarantine
|
|||||||
{}
|
{}
|
||||||
```
|
```
|
||||||
|
|
||||||
Where `user_id` is in the form of `@bob:example.org`.
|
URL Parameters
|
||||||
|
|
||||||
|
* `user_id`: string - User ID in the form of `@bob:example.org`
|
||||||
|
|
||||||
Response:
|
Response:
|
||||||
|
|
||||||
```
|
```json
|
||||||
{
|
{
|
||||||
"num_quarantined": 10 # The number of media items successfully quarantined
|
"num_quarantined": 10
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The following fields are returned in the JSON response body:
|
||||||
|
|
||||||
|
* `num_quarantined`: integer - The number of media items successfully quarantined
|
||||||
|
|
||||||
|
## Protecting media from being quarantined
|
||||||
|
|
||||||
|
This API protects a single piece of local media from being quarantined using the
|
||||||
|
above APIs. This is useful for sticker packs and other shared media which you do
|
||||||
|
not want to get quarantined, especially when
|
||||||
|
[quarantining media in a room](#quarantining-media-in-a-room).
|
||||||
|
|
||||||
|
Request:
|
||||||
|
|
||||||
|
```
|
||||||
|
POST /_synapse/admin/v1/media/protect/<media_id>
|
||||||
|
|
||||||
|
{}
|
||||||
|
```
|
||||||
|
|
||||||
|
Where `media_id` is in the form of `abcdefg12345...`.
|
||||||
|
|
||||||
|
Response:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{}
|
||||||
|
```
|
||||||
|
|
||||||
# Delete local media
|
# Delete local media
|
||||||
This API deletes the *local* media from the disk of your own server.
|
This API deletes the *local* media from the disk of your own server.
|
||||||
This includes any local thumbnails and copies of media downloaded from
|
This includes any local thumbnails and copies of media downloaded from
|
||||||
remote homeservers.
|
remote homeservers.
|
||||||
This API will not affect media that has been uploaded to external
|
This API will not affect media that has been uploaded to external
|
||||||
media repositories (e.g https://github.com/turt2live/matrix-media-repo/).
|
media repositories (e.g https://github.com/turt2live/matrix-media-repo/).
|
||||||
See also [purge_remote_media.rst](purge_remote_media.rst).
|
See also [Purge Remote Media API](#purge-remote-media-api).
|
||||||
|
|
||||||
## Delete a specific local media
|
## Delete a specific local media
|
||||||
Delete a specific `media_id`.
|
Delete a specific `media_id`.
|
||||||
@@ -128,12 +174,12 @@ URL Parameters
|
|||||||
Response:
|
Response:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"deleted_media": [
|
"deleted_media": [
|
||||||
"abcdefghijklmnopqrstuvwx"
|
"abcdefghijklmnopqrstuvwx"
|
||||||
],
|
],
|
||||||
"total": 1
|
"total": 1
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
The following fields are returned in the JSON response body:
|
The following fields are returned in the JSON response body:
|
||||||
@@ -166,16 +212,51 @@ If `false` these files will be deleted. Defaults to `true`.
|
|||||||
Response:
|
Response:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"deleted_media": [
|
"deleted_media": [
|
||||||
"abcdefghijklmnopqrstuvwx",
|
"abcdefghijklmnopqrstuvwx",
|
||||||
"abcdefghijklmnopqrstuvwz"
|
"abcdefghijklmnopqrstuvwz"
|
||||||
],
|
],
|
||||||
"total": 2
|
"total": 2
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
The following fields are returned in the JSON response body:
|
The following fields are returned in the JSON response body:
|
||||||
|
|
||||||
* `deleted_media`: an array of strings - List of deleted `media_id`
|
* `deleted_media`: an array of strings - List of deleted `media_id`
|
||||||
* `total`: integer - Total number of deleted `media_id`
|
* `total`: integer - Total number of deleted `media_id`
|
||||||
|
|
||||||
|
# Purge Remote Media API
|
||||||
|
|
||||||
|
The purge remote media API allows server admins to purge old cached remote media.
|
||||||
|
|
||||||
|
The API is:
|
||||||
|
|
||||||
|
```
|
||||||
|
POST /_synapse/admin/v1/purge_media_cache?before_ts=<unix_timestamp_in_ms>
|
||||||
|
|
||||||
|
{}
|
||||||
|
```
|
||||||
|
|
||||||
|
URL Parameters
|
||||||
|
|
||||||
|
* `unix_timestamp_in_ms`: string representing a positive integer - Unix timestamp in ms.
|
||||||
|
All cached media that was last accessed before this timestamp will be removed.
|
||||||
|
|
||||||
|
Response:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"deleted": 10
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
The following fields are returned in the JSON response body:
|
||||||
|
|
||||||
|
* `deleted`: integer - The number of media items successfully deleted
|
||||||
|
|
||||||
|
To use it, you will need to authenticate by providing an `access_token` for a
|
||||||
|
server admin: see [README.rst](README.rst).
|
||||||
|
|
||||||
|
If the user re-requests purged remote media, synapse will re-request the media
|
||||||
|
from the originating server.
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
Purge Remote Media API
|
|
||||||
======================
|
|
||||||
|
|
||||||
The purge remote media API allows server admins to purge old cached remote
|
|
||||||
media.
|
|
||||||
|
|
||||||
The API is::
|
|
||||||
|
|
||||||
POST /_synapse/admin/v1/purge_media_cache?before_ts=<unix_timestamp_in_ms>
|
|
||||||
|
|
||||||
{}
|
|
||||||
|
|
||||||
\... which will remove all cached media that was last accessed before
|
|
||||||
``<unix_timestamp_in_ms>``.
|
|
||||||
|
|
||||||
To use it, you will need to authenticate by providing an ``access_token`` for a
|
|
||||||
server admin: see `README.rst <README.rst>`_.
|
|
||||||
|
|
||||||
If the user re-requests purged remote media, synapse will re-request the media
|
|
||||||
from the originating server.
|
|
||||||
@@ -1,12 +1,13 @@
|
|||||||
Purge room API
|
Deprecated: Purge room API
|
||||||
==============
|
==========================
|
||||||
|
|
||||||
|
**The old Purge room API is deprecated and will be removed in a future release.
|
||||||
|
See the new [Delete Room API](rooms.md#delete-room-api) for more details.**
|
||||||
|
|
||||||
This API will remove all trace of a room from your database.
|
This API will remove all trace of a room from your database.
|
||||||
|
|
||||||
All local users must have left the room before it can be removed.
|
All local users must have left the room before it can be removed.
|
||||||
|
|
||||||
See also: [Delete Room API](rooms.md#delete-room-api)
|
|
||||||
|
|
||||||
The API is:
|
The API is:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -1,3 +1,15 @@
|
|||||||
|
# Contents
|
||||||
|
- [List Room API](#list-room-api)
|
||||||
|
* [Parameters](#parameters)
|
||||||
|
* [Usage](#usage)
|
||||||
|
- [Room Details API](#room-details-api)
|
||||||
|
- [Room Members API](#room-members-api)
|
||||||
|
- [Delete Room API](#delete-room-api)
|
||||||
|
* [Parameters](#parameters-1)
|
||||||
|
* [Response](#response)
|
||||||
|
* [Undoing room shutdowns](#undoing-room-shutdowns)
|
||||||
|
- [Make Room Admin API](#make-room-admin-api)
|
||||||
|
|
||||||
# List Room API
|
# List Room API
|
||||||
|
|
||||||
The List Room admin API allows server admins to get a list of rooms on their
|
The List Room admin API allows server admins to get a list of rooms on their
|
||||||
@@ -76,7 +88,7 @@ GET /_synapse/admin/v1/rooms
|
|||||||
|
|
||||||
Response:
|
Response:
|
||||||
|
|
||||||
```
|
```jsonc
|
||||||
{
|
{
|
||||||
"rooms": [
|
"rooms": [
|
||||||
{
|
{
|
||||||
@@ -128,7 +140,7 @@ GET /_synapse/admin/v1/rooms?search_term=TWIM
|
|||||||
|
|
||||||
Response:
|
Response:
|
||||||
|
|
||||||
```
|
```json
|
||||||
{
|
{
|
||||||
"rooms": [
|
"rooms": [
|
||||||
{
|
{
|
||||||
@@ -163,7 +175,7 @@ GET /_synapse/admin/v1/rooms?order_by=size
|
|||||||
|
|
||||||
Response:
|
Response:
|
||||||
|
|
||||||
```
|
```jsonc
|
||||||
{
|
{
|
||||||
"rooms": [
|
"rooms": [
|
||||||
{
|
{
|
||||||
@@ -219,14 +231,14 @@ GET /_synapse/admin/v1/rooms?order_by=size&from=100
|
|||||||
|
|
||||||
Response:
|
Response:
|
||||||
|
|
||||||
```
|
```jsonc
|
||||||
{
|
{
|
||||||
"rooms": [
|
"rooms": [
|
||||||
{
|
{
|
||||||
"room_id": "!mscvqgqpHYjBGDxNym:matrix.org",
|
"room_id": "!mscvqgqpHYjBGDxNym:matrix.org",
|
||||||
"name": "Music Theory",
|
"name": "Music Theory",
|
||||||
"canonical_alias": "#musictheory:matrix.org",
|
"canonical_alias": "#musictheory:matrix.org",
|
||||||
"joined_members": 127
|
"joined_members": 127,
|
||||||
"joined_local_members": 2,
|
"joined_local_members": 2,
|
||||||
"version": "1",
|
"version": "1",
|
||||||
"creator": "@foo:matrix.org",
|
"creator": "@foo:matrix.org",
|
||||||
@@ -243,7 +255,7 @@ Response:
|
|||||||
"room_id": "!twcBhHVdZlQWuuxBhN:termina.org.uk",
|
"room_id": "!twcBhHVdZlQWuuxBhN:termina.org.uk",
|
||||||
"name": "weechat-matrix",
|
"name": "weechat-matrix",
|
||||||
"canonical_alias": "#weechat-matrix:termina.org.uk",
|
"canonical_alias": "#weechat-matrix:termina.org.uk",
|
||||||
"joined_members": 137
|
"joined_members": 137,
|
||||||
"joined_local_members": 20,
|
"joined_local_members": 20,
|
||||||
"version": "4",
|
"version": "4",
|
||||||
"creator": "@foo:termina.org.uk",
|
"creator": "@foo:termina.org.uk",
|
||||||
@@ -278,6 +290,7 @@ The following fields are possible in the JSON response body:
|
|||||||
* `canonical_alias` - The canonical (main) alias address of the room.
|
* `canonical_alias` - The canonical (main) alias address of the room.
|
||||||
* `joined_members` - How many users are currently in the room.
|
* `joined_members` - How many users are currently in the room.
|
||||||
* `joined_local_members` - How many local users are currently in the room.
|
* `joined_local_members` - How many local users are currently in the room.
|
||||||
|
* `joined_local_devices` - How many local devices are currently in the room.
|
||||||
* `version` - The version of the room as a string.
|
* `version` - The version of the room as a string.
|
||||||
* `creator` - The `user_id` of the room creator.
|
* `creator` - The `user_id` of the room creator.
|
||||||
* `encryption` - Algorithm of end-to-end encryption of messages. Is `null` if encryption is not active.
|
* `encryption` - Algorithm of end-to-end encryption of messages. Is `null` if encryption is not active.
|
||||||
@@ -300,15 +313,16 @@ GET /_synapse/admin/v1/rooms/<room_id>
|
|||||||
|
|
||||||
Response:
|
Response:
|
||||||
|
|
||||||
```
|
```json
|
||||||
{
|
{
|
||||||
"room_id": "!mscvqgqpHYjBGDxNym:matrix.org",
|
"room_id": "!mscvqgqpHYjBGDxNym:matrix.org",
|
||||||
"name": "Music Theory",
|
"name": "Music Theory",
|
||||||
"avatar": "mxc://matrix.org/AQDaVFlbkQoErdOgqWRgiGSV",
|
"avatar": "mxc://matrix.org/AQDaVFlbkQoErdOgqWRgiGSV",
|
||||||
"topic": "Theory, Composition, Notation, Analysis",
|
"topic": "Theory, Composition, Notation, Analysis",
|
||||||
"canonical_alias": "#musictheory:matrix.org",
|
"canonical_alias": "#musictheory:matrix.org",
|
||||||
"joined_members": 127
|
"joined_members": 127,
|
||||||
"joined_local_members": 2,
|
"joined_local_members": 2,
|
||||||
|
"joined_local_devices": 2,
|
||||||
"version": "1",
|
"version": "1",
|
||||||
"creator": "@foo:matrix.org",
|
"creator": "@foo:matrix.org",
|
||||||
"encryption": null,
|
"encryption": null,
|
||||||
@@ -342,13 +356,13 @@ GET /_synapse/admin/v1/rooms/<room_id>/members
|
|||||||
|
|
||||||
Response:
|
Response:
|
||||||
|
|
||||||
```
|
```json
|
||||||
{
|
{
|
||||||
"members": [
|
"members": [
|
||||||
"@foo:matrix.org",
|
"@foo:matrix.org",
|
||||||
"@bar:matrix.org",
|
"@bar:matrix.org",
|
||||||
"@foobar:matrix.org
|
"@foobar:matrix.org"
|
||||||
],
|
],
|
||||||
"total": 3
|
"total": 3
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -357,8 +371,6 @@ Response:
|
|||||||
|
|
||||||
The Delete Room admin API allows server admins to remove rooms from server
|
The Delete Room admin API allows server admins to remove rooms from server
|
||||||
and block these rooms.
|
and block these rooms.
|
||||||
It is a combination and improvement of "[Shutdown room](shutdown_room.md)"
|
|
||||||
and "[Purge room](purge_room.md)" API.
|
|
||||||
|
|
||||||
Shuts down a room. Moves all local users and room aliases automatically to a
|
Shuts down a room. Moves all local users and room aliases automatically to a
|
||||||
new room if `new_room_user_id` is set. Otherwise local users only
|
new room if `new_room_user_id` is set. Otherwise local users only
|
||||||
@@ -382,7 +394,7 @@ the new room. Users on other servers will be unaffected.
|
|||||||
|
|
||||||
The API is:
|
The API is:
|
||||||
|
|
||||||
```json
|
```
|
||||||
POST /_synapse/admin/v1/rooms/<room_id>/delete
|
POST /_synapse/admin/v1/rooms/<room_id>/delete
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -439,6 +451,10 @@ The following JSON body parameters are available:
|
|||||||
future attempts to join the room. Defaults to `false`.
|
future attempts to join the room. Defaults to `false`.
|
||||||
* `purge` - Optional. If set to `true`, it will remove all traces of the room from your database.
|
* `purge` - Optional. If set to `true`, it will remove all traces of the room from your database.
|
||||||
Defaults to `true`.
|
Defaults to `true`.
|
||||||
|
* `force_purge` - Optional, and ignored unless `purge` is `true`. If set to `true`, it
|
||||||
|
will force a purge to go ahead even if there are local users still in the room. Do not
|
||||||
|
use this unless a regular `purge` operation fails, as it could leave those users'
|
||||||
|
clients in a confused state.
|
||||||
|
|
||||||
The JSON body must not be empty. The body must be at least `{}`.
|
The JSON body must not be empty. The body must be at least `{}`.
|
||||||
|
|
||||||
@@ -451,3 +467,47 @@ The following fields are returned in the JSON response body:
|
|||||||
* `local_aliases` - An array of strings representing the local aliases that were migrated from
|
* `local_aliases` - An array of strings representing the local aliases that were migrated from
|
||||||
the old room to the new.
|
the old room to the new.
|
||||||
* `new_room_id` - A string representing the room ID of the new room.
|
* `new_room_id` - A string representing the room ID of the new room.
|
||||||
|
|
||||||
|
|
||||||
|
## Undoing room shutdowns
|
||||||
|
|
||||||
|
*Note*: This guide may be outdated by the time you read it. By nature of room shutdowns being performed at the database level,
|
||||||
|
the structure can and does change without notice.
|
||||||
|
|
||||||
|
First, it's important to understand that a room shutdown is very destructive. Undoing a shutdown is not as simple as pretending it
|
||||||
|
never happened - work has to be done to move forward instead of resetting the past. In fact, in some cases it might not be possible
|
||||||
|
to recover at all:
|
||||||
|
|
||||||
|
* If the room was invite-only, your users will need to be re-invited.
|
||||||
|
* If the room no longer has any members at all, it'll be impossible to rejoin.
|
||||||
|
* The first user to rejoin will have to do so via an alias on a different server.
|
||||||
|
|
||||||
|
With all that being said, if you still want to try and recover the room:
|
||||||
|
|
||||||
|
1. For safety reasons, shut down Synapse.
|
||||||
|
2. In the database, run `DELETE FROM blocked_rooms WHERE room_id = '!example:example.org';`
|
||||||
|
* For caution: it's recommended to run this in a transaction: `BEGIN; DELETE ...;`, verify you got 1 result, then `COMMIT;`.
|
||||||
|
* The room ID is the same one supplied to the shutdown room API, not the Content Violation room.
|
||||||
|
3. Restart Synapse.
|
||||||
|
|
||||||
|
You will have to manually handle, if you so choose, the following:
|
||||||
|
|
||||||
|
* Aliases that would have been redirected to the Content Violation room.
|
||||||
|
* Users that would have been booted from the room (and will have been force-joined to the Content Violation room).
|
||||||
|
* Removal of the Content Violation room if desired.
|
||||||
|
|
||||||
|
|
||||||
|
# Make Room Admin API
|
||||||
|
|
||||||
|
Grants another user the highest power available to a local user who is in the room.
|
||||||
|
If the user is not in the room, and it is not publicly joinable, then invite the user.
|
||||||
|
|
||||||
|
By default the server admin (the caller) is granted power, but another user can
|
||||||
|
optionally be specified, e.g.:
|
||||||
|
|
||||||
|
```
|
||||||
|
POST /_synapse/admin/v1/rooms/<room_id_or_alias>/make_room_admin
|
||||||
|
{
|
||||||
|
"user_id": "@foo:example.com"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
# Shutdown room API
|
# Deprecated: Shutdown room API
|
||||||
|
|
||||||
|
**The old Shutdown room API is deprecated and will be removed in a future release.
|
||||||
|
See the new [Delete Room API](rooms.md#delete-room-api) for more details.**
|
||||||
|
|
||||||
Shuts down a room, preventing new joins and moves local users and room aliases automatically
|
Shuts down a room, preventing new joins and moves local users and room aliases automatically
|
||||||
to a new room. The new room will be created with the user specified by the
|
to a new room. The new room will be created with the user specified by the
|
||||||
@@ -10,8 +13,6 @@ disallow any further invites or joins.
|
|||||||
The local server will only have the power to move local user and room aliases to
|
The local server will only have the power to move local user and room aliases to
|
||||||
the new room. Users on other servers will be unaffected.
|
the new room. Users on other servers will be unaffected.
|
||||||
|
|
||||||
See also: [Delete Room API](rooms.md#delete-room-api)
|
|
||||||
|
|
||||||
## API
|
## API
|
||||||
|
|
||||||
You will need to authenticate with an access token for an admin user.
|
You will need to authenticate with an access token for an admin user.
|
||||||
|
|||||||
@@ -30,7 +30,12 @@ It returns a JSON body like the following:
|
|||||||
],
|
],
|
||||||
"avatar_url": "<avatar_url>",
|
"avatar_url": "<avatar_url>",
|
||||||
"admin": false,
|
"admin": false,
|
||||||
"deactivated": false
|
"deactivated": false,
|
||||||
|
"password_hash": "$2b$12$p9B4GkqYdRTPGD",
|
||||||
|
"creation_ts": 1560432506,
|
||||||
|
"appservice_id": null,
|
||||||
|
"consent_server_notice_sent": null,
|
||||||
|
"consent_version": null
|
||||||
}
|
}
|
||||||
|
|
||||||
URL parameters:
|
URL parameters:
|
||||||
@@ -93,6 +98,8 @@ Body parameters:
|
|||||||
|
|
||||||
- ``deactivated``, optional. If unspecified, deactivation state will be left
|
- ``deactivated``, optional. If unspecified, deactivation state will be left
|
||||||
unchanged on existing accounts and set to ``false`` for new accounts.
|
unchanged on existing accounts and set to ``false`` for new accounts.
|
||||||
|
A user cannot be erased by deactivating with this API. For details on deactivating users see
|
||||||
|
`Deactivate Account <#deactivate-account>`_.
|
||||||
|
|
||||||
If the user already exists then optional parameters default to the current value.
|
If the user already exists then optional parameters default to the current value.
|
||||||
|
|
||||||
@@ -139,7 +146,6 @@ A JSON body is returned with the following shape:
|
|||||||
"users": [
|
"users": [
|
||||||
{
|
{
|
||||||
"name": "<user_id1>",
|
"name": "<user_id1>",
|
||||||
"password_hash": "<password_hash1>",
|
|
||||||
"is_guest": 0,
|
"is_guest": 0,
|
||||||
"admin": 0,
|
"admin": 0,
|
||||||
"user_type": null,
|
"user_type": null,
|
||||||
@@ -148,7 +154,6 @@ A JSON body is returned with the following shape:
|
|||||||
"avatar_url": null
|
"avatar_url": null
|
||||||
}, {
|
}, {
|
||||||
"name": "<user_id2>",
|
"name": "<user_id2>",
|
||||||
"password_hash": "<password_hash2>",
|
|
||||||
"is_guest": 0,
|
"is_guest": 0,
|
||||||
"admin": 1,
|
"admin": 1,
|
||||||
"user_type": null,
|
"user_type": null,
|
||||||
@@ -176,6 +181,13 @@ The api is::
|
|||||||
|
|
||||||
GET /_synapse/admin/v1/whois/<user_id>
|
GET /_synapse/admin/v1/whois/<user_id>
|
||||||
|
|
||||||
|
and::
|
||||||
|
|
||||||
|
GET /_matrix/client/r0/admin/whois/<userId>
|
||||||
|
|
||||||
|
See also: `Client Server API Whois
|
||||||
|
<https://matrix.org/docs/spec/client_server/r0.6.1#get-matrix-client-r0-admin-whois-userid>`_
|
||||||
|
|
||||||
To use it, you will need to authenticate by providing an ``access_token`` for a
|
To use it, you will need to authenticate by providing an ``access_token`` for a
|
||||||
server admin: see `README.rst <README.rst>`_.
|
server admin: see `README.rst <README.rst>`_.
|
||||||
|
|
||||||
@@ -238,6 +250,25 @@ server admin: see `README.rst <README.rst>`_.
|
|||||||
The erase parameter is optional and defaults to ``false``.
|
The erase parameter is optional and defaults to ``false``.
|
||||||
An empty body may be passed for backwards compatibility.
|
An empty body may be passed for backwards compatibility.
|
||||||
|
|
||||||
|
The following actions are performed when deactivating an user:
|
||||||
|
|
||||||
|
- Try to unpind 3PIDs from the identity server
|
||||||
|
- Remove all 3PIDs from the homeserver
|
||||||
|
- Delete all devices and E2EE keys
|
||||||
|
- Delete all access tokens
|
||||||
|
- Delete the password hash
|
||||||
|
- Removal from all rooms the user is a member of
|
||||||
|
- Remove the user from the user directory
|
||||||
|
- Reject all pending invites
|
||||||
|
- Remove all account validity information related to the user
|
||||||
|
|
||||||
|
The following additional actions are performed during deactivation if``erase``
|
||||||
|
is set to ``true``:
|
||||||
|
|
||||||
|
- Remove the user's display name
|
||||||
|
- Remove the user's avatar URL
|
||||||
|
- Mark the user as erased
|
||||||
|
|
||||||
|
|
||||||
Reset password
|
Reset password
|
||||||
==============
|
==============
|
||||||
@@ -254,7 +285,7 @@ with a body of:
|
|||||||
|
|
||||||
{
|
{
|
||||||
"new_password": "<secret>",
|
"new_password": "<secret>",
|
||||||
"logout_devices": true,
|
"logout_devices": true
|
||||||
}
|
}
|
||||||
|
|
||||||
To use it, you will need to authenticate by providing an ``access_token`` for a
|
To use it, you will need to authenticate by providing an ``access_token`` for a
|
||||||
@@ -327,6 +358,10 @@ A response body like the following is returned:
|
|||||||
"total": 2
|
"total": 2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
The server returns the list of rooms of which the user and the server
|
||||||
|
are member. If the user is local, all the rooms of which the user is
|
||||||
|
member are returned.
|
||||||
|
|
||||||
**Parameters**
|
**Parameters**
|
||||||
|
|
||||||
The following parameters should be set in the URL:
|
The following parameters should be set in the URL:
|
||||||
@@ -424,6 +459,41 @@ The following fields are returned in the JSON response body:
|
|||||||
- ``next_token``: integer - Indication for pagination. See above.
|
- ``next_token``: integer - Indication for pagination. See above.
|
||||||
- ``total`` - integer - Total number of media.
|
- ``total`` - integer - Total number of media.
|
||||||
|
|
||||||
|
Login as a user
|
||||||
|
===============
|
||||||
|
|
||||||
|
Get an access token that can be used to authenticate as that user. Useful for
|
||||||
|
when admins wish to do actions on behalf of a user.
|
||||||
|
|
||||||
|
The API is::
|
||||||
|
|
||||||
|
POST /_synapse/admin/v1/users/<user_id>/login
|
||||||
|
{}
|
||||||
|
|
||||||
|
An optional ``valid_until_ms`` field can be specified in the request body as an
|
||||||
|
integer timestamp that specifies when the token should expire. By default tokens
|
||||||
|
do not expire.
|
||||||
|
|
||||||
|
A response body like the following is returned:
|
||||||
|
|
||||||
|
.. code:: json
|
||||||
|
|
||||||
|
{
|
||||||
|
"access_token": "<opaque_access_token_string>"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
This API does *not* generate a new device for the user, and so will not appear
|
||||||
|
their ``/devices`` list, and in general the target user should not be able to
|
||||||
|
tell they have been logged in as.
|
||||||
|
|
||||||
|
To expire the token call the standard ``/logout`` API with the token.
|
||||||
|
|
||||||
|
Note: The token will expire if the *admin* user calls ``/logout/all`` from any
|
||||||
|
of their devices, but the token will *not* expire if the target user does the
|
||||||
|
same.
|
||||||
|
|
||||||
|
|
||||||
User devices
|
User devices
|
||||||
============
|
============
|
||||||
|
|
||||||
|
|||||||
32
docs/auth_chain_diff.dot
Normal file
32
docs/auth_chain_diff.dot
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
digraph auth {
|
||||||
|
nodesep=0.5;
|
||||||
|
rankdir="RL";
|
||||||
|
|
||||||
|
C [label="Create (1,1)"];
|
||||||
|
|
||||||
|
BJ [label="Bob's Join (2,1)", color=red];
|
||||||
|
BJ2 [label="Bob's Join (2,2)", color=red];
|
||||||
|
BJ2 -> BJ [color=red, dir=none];
|
||||||
|
|
||||||
|
subgraph cluster_foo {
|
||||||
|
A1 [label="Alice's invite (4,1)", color=blue];
|
||||||
|
A2 [label="Alice's Join (4,2)", color=blue];
|
||||||
|
A3 [label="Alice's Join (4,3)", color=blue];
|
||||||
|
A3 -> A2 -> A1 [color=blue, dir=none];
|
||||||
|
color=none;
|
||||||
|
}
|
||||||
|
|
||||||
|
PL1 [label="Power Level (3,1)", color=darkgreen];
|
||||||
|
PL2 [label="Power Level (3,2)", color=darkgreen];
|
||||||
|
PL2 -> PL1 [color=darkgreen, dir=none];
|
||||||
|
|
||||||
|
{rank = same; C; BJ; PL1; A1;}
|
||||||
|
|
||||||
|
A1 -> C [color=grey];
|
||||||
|
A1 -> BJ [color=grey];
|
||||||
|
PL1 -> C [color=grey];
|
||||||
|
BJ2 -> PL1 [penwidth=2];
|
||||||
|
|
||||||
|
A3 -> PL2 [penwidth=2];
|
||||||
|
A1 -> PL1 -> BJ -> C [penwidth=2];
|
||||||
|
}
|
||||||
BIN
docs/auth_chain_diff.dot.png
Normal file
BIN
docs/auth_chain_diff.dot.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 41 KiB |
108
docs/auth_chain_difference_algorithm.md
Normal file
108
docs/auth_chain_difference_algorithm.md
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
# Auth Chain Difference Algorithm
|
||||||
|
|
||||||
|
The auth chain difference algorithm is used by V2 state resolution, where a
|
||||||
|
naive implementation can be a significant source of CPU and DB usage.
|
||||||
|
|
||||||
|
### Definitions
|
||||||
|
|
||||||
|
A *state set* is a set of state events; e.g. the input of a state resolution
|
||||||
|
algorithm is a collection of state sets.
|
||||||
|
|
||||||
|
The *auth chain* of a set of events are all the events' auth events and *their*
|
||||||
|
auth events, recursively (i.e. the events reachable by walking the graph induced
|
||||||
|
by an event's auth events links).
|
||||||
|
|
||||||
|
The *auth chain difference* of a collection of state sets is the union minus the
|
||||||
|
intersection of the sets of auth chains corresponding to the state sets, i.e an
|
||||||
|
event is in the auth chain difference if it is reachable by walking the auth
|
||||||
|
event graph from at least one of the state sets but not from *all* of the state
|
||||||
|
sets.
|
||||||
|
|
||||||
|
## Breadth First Walk Algorithm
|
||||||
|
|
||||||
|
A way of calculating the auth chain difference without calculating the full auth
|
||||||
|
chains for each state set is to do a parallel breadth first walk (ordered by
|
||||||
|
depth) of each state set's auth chain. By tracking which events are reachable
|
||||||
|
from each state set we can finish early if every pending event is reachable from
|
||||||
|
every state set.
|
||||||
|
|
||||||
|
This can work well for state sets that have a small auth chain difference, but
|
||||||
|
can be very inefficient for larger differences. However, this algorithm is still
|
||||||
|
used if we don't have a chain cover index for the room (e.g. because we're in
|
||||||
|
the process of indexing it).
|
||||||
|
|
||||||
|
## Chain Cover Index
|
||||||
|
|
||||||
|
Synapse computes auth chain differences by pre-computing a "chain cover" index
|
||||||
|
for the auth chain in a room, allowing efficient reachability queries like "is
|
||||||
|
event A in the auth chain of event B". This is done by assigning every event a
|
||||||
|
*chain ID* and *sequence number* (e.g. `(5,3)`), and having a map of *links*
|
||||||
|
between chains (e.g. `(5,3) -> (2,4)`) such that A is reachable by B (i.e. `A`
|
||||||
|
is in the auth chain of `B`) if and only if either:
|
||||||
|
|
||||||
|
1. A and B have the same chain ID and `A`'s sequence number is less than `B`'s
|
||||||
|
sequence number; or
|
||||||
|
2. there is a link `L` between `B`'s chain ID and `A`'s chain ID such that
|
||||||
|
`L.start_seq_no` <= `B.seq_no` and `A.seq_no` <= `L.end_seq_no`.
|
||||||
|
|
||||||
|
There are actually two potential implementations, one where we store links from
|
||||||
|
each chain to every other reachable chain (the transitive closure of the links
|
||||||
|
graph), and one where we remove redundant links (the transitive reduction of the
|
||||||
|
links graph) e.g. if we have chains `C3 -> C2 -> C1` then the link `C3 -> C1`
|
||||||
|
would not be stored. Synapse uses the former implementations so that it doesn't
|
||||||
|
need to recurse to test reachability between chains.
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
An example auth graph would look like the following, where chains have been
|
||||||
|
formed based on type/state_key and are denoted by colour and are labelled with
|
||||||
|
`(chain ID, sequence number)`. Links are denoted by the arrows (links in grey
|
||||||
|
are those that would be remove in the second implementation described above).
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Note that we don't include all links between events and their auth events, as
|
||||||
|
most of those links would be redundant. For example, all events point to the
|
||||||
|
create event, but each chain only needs the one link from it's base to the
|
||||||
|
create event.
|
||||||
|
|
||||||
|
## Using the Index
|
||||||
|
|
||||||
|
This index can be used to calculate the auth chain difference of the state sets
|
||||||
|
by looking at the chain ID and sequence numbers reachable from each state set:
|
||||||
|
|
||||||
|
1. For every state set lookup the chain ID/sequence numbers of each state event
|
||||||
|
2. Use the index to find all chains and the maximum sequence number reachable
|
||||||
|
from each state set.
|
||||||
|
3. The auth chain difference is then all events in each chain that have sequence
|
||||||
|
numbers between the maximum sequence number reachable from *any* state set and
|
||||||
|
the minimum reachable by *all* state sets (if any).
|
||||||
|
|
||||||
|
Note that steps 2 is effectively calculating the auth chain for each state set
|
||||||
|
(in terms of chain IDs and sequence numbers), and step 3 is calculating the
|
||||||
|
difference between the union and intersection of the auth chains.
|
||||||
|
|
||||||
|
### Worked Example
|
||||||
|
|
||||||
|
For example, given the above graph, we can calculate the difference between
|
||||||
|
state sets consisting of:
|
||||||
|
|
||||||
|
1. `S1`: Alice's invite `(4,1)` and Bob's second join `(2,2)`; and
|
||||||
|
2. `S2`: Alice's second join `(4,3)` and Bob's first join `(2,1)`.
|
||||||
|
|
||||||
|
Using the index we see that the following auth chains are reachable from each
|
||||||
|
state set:
|
||||||
|
|
||||||
|
1. `S1`: `(1,1)`, `(2,2)`, `(3,1)` & `(4,1)`
|
||||||
|
2. `S2`: `(1,1)`, `(2,1)`, `(3,2)` & `(4,3)`
|
||||||
|
|
||||||
|
And so, for each the ranges that are in the auth chain difference:
|
||||||
|
1. Chain 1: None, (since everything can reach the create event).
|
||||||
|
2. Chain 2: The range `(1, 2]` (i.e. just `2`), as `1` is reachable by all state
|
||||||
|
sets and the maximum reachable is `2` (corresponding to Bob's second join).
|
||||||
|
3. Chain 3: Similarly the range `(1, 2]` (corresponding to the second power
|
||||||
|
level).
|
||||||
|
4. Chain 4: The range `(1, 3]` (corresponding to both of Alice's joins).
|
||||||
|
|
||||||
|
So the final result is: Bob's second join `(2,2)`, the second power level
|
||||||
|
`(3,2)` and both of Alice's joins `(4,2)` & `(4,3)`.
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user