Skip to content

Commit 3001b2d

Browse files
authored
Merge branch 'spantaleev:master' into default_room_version_9
2 parents a1cbd54 + 5be1310 commit 3001b2d

File tree

183 files changed

+2161
-625
lines changed

Some content is hidden

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

183 files changed

+2161
-625
lines changed

CHANGELOG.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1+
# 2021-12-14
2+
3+
## (Security) Users of the Signal bridge may wish to upgrade it to work around log4j vulnerability
4+
5+
Recently, a security vulnerability affecting the Java logging package `log4j` [has been discovered](https://www.huntress.com/blog/rapid-response-critical-rce-vulnerability-is-affecting-java). Software that uses this Java package is potentially vulnerable.
6+
7+
One such piece of software that is part of the playbook is the [mautrix-signal bridge](./docs/configuring-playbook-bridge-mautrix-signal.md), which [has been patched already](https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/1452). If you're running this bridge, you may wish to [upgrade](./docs/maintenance-upgrading-services.md).
8+
9+
10+
# 2021-11-11
11+
12+
## Dropped support for Postgres v9.6
13+
14+
Postgres v9.6 reached its end of life today, so the playbook will refuse to run for you if you're still on that version.
15+
16+
Synapse still supports v9.6 (for now), but we're retiring support for it early, to avoid having to maintain support for so many Postgres versions. Users that are still on Postgres v9.6 can easily [upgrade Postgres](docs/maintenance-postgres.md#upgrading-postgresql) via the playbook.
17+
18+
19+
# 2021-10-23
20+
21+
## Hangouts bridge no longer updated, superseded by a Googlechat bridge
22+
23+
The mautrix-hangouts bridge is no longer receiving updates upstream and is likely to stop working in the future.
24+
We still retain support for this bridge in the playbook, but you're encouraged to switch away from it.
25+
26+
There's a new [mautrix-googlechat](https://github.com/mautrix/googlechat) bridge that you can [install using the playbook](docs/configuring-playbook-bridge-mautrix-googlechat.md).
27+
Your **Hangouts bridge data will not be migrated**, however. You need to start fresh with the new bridge.
28+
29+
130
# 2021-08-23
231

332
## LinkedIn bridging support via beeper-linkedin
@@ -233,6 +262,8 @@ The fact that we've renamed Synapse's database from `homeserver` to `synapse` (i
233262

234263
## (Breaking Change) The mautrix-facebook bridge now requires a Postgres database
235264

265+
**Update from 2021-11-15**: SQLite support has been re-added to the mautrix-facebook bridge in [v0.3.2](https://github.com/mautrix/facebook/releases/tag/v0.3.2). You can ignore this changelog entry.
266+
236267
A new version of the [mautrix-facebook](https://github.com/tulir/mautrix-facebook) bridge has been released. It's a full rewrite of its backend and the bridge now requires Postgres. New versions of the bridge can no longer run on SQLite.
237268

238269
**TLDR**: if you're NOT using an [external Postgres server](docs/configuring-playbook-external-postgres.md) and have NOT forcefully kept the bridge on SQLite during [The big move to all-on-Postgres (potentially dangerous)](#the-big-move-to-all-on-postgres-potentially-dangerous), you will be automatically upgraded without manual intervention. All you need to do is send a `login` message to the Facebook bridge bot again.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ Using this playbook, you can get the following services configured on your serve
5353

5454
- (optional) the [mautrix-hangouts](https://github.com/mautrix/hangouts) bridge for bridging your Matrix server to [Google Hangouts](https://en.wikipedia.org/wiki/Google_Hangouts)
5555

56+
- (optional) the [mautrix-googlechat](https://github.com/mautrix/googlechat) bridge for bridging your Matrix server to [Google Chat](https://en.wikipedia.org/wiki/Google_Chat)
57+
5658
- (optional) the [mautrix-instagram](https://github.com/mautrix/instagram) bridge for bridging your Matrix server to [Instagram](https://instagram.com/)
5759

5860
- (optional) the [mautrix-signal](https://github.com/mautrix/signal) bridge for bridging your Matrix server to [Signal](https://www.signal.org/)

collections/requirements.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
collections:
3+
- name: community.general
4+
- name: community.docker

docs/alternative-architectures.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ matrix_architecture: "arm32"
2121

2222
## Implementation details
2323

24-
For `amd64`, prebuilt container images (see the [container images we use](container-images.md)) are used everywhere, because all images are available for this architecture.
24+
For `amd64`, prebuilt container images (see the [container images we use](container-images.md)) are used for all components (except [Hydrogen](configuring-playbook-client-hydrogen.md), which goes through self-building).
2525

2626
For other architectures, components which have a prebuilt image make use of it. If the component is not available for the specific architecture, [self-building](self-building.md) will be used. Not all components support self-building though, so your mileage may vary.

docs/ansible.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ docker run -it --rm \
5151
-v `pwd`:/work \
5252
-v $HOME/.ssh/id_rsa:/root/.ssh/id_rsa:ro \
5353
--entrypoint=/bin/sh \
54-
docker.io/devture/ansible:2.9.14-r0
54+
docker.io/devture/ansible:2.10.7-r0
5555
```
5656

5757
The above command tries to mount an SSH key (`$HOME/.ssh/id_rsa`) into the container (at `/root/.ssh/id_rsa`).
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Setting up Mautrix Google Chat (optional)
2+
3+
The playbook can install and configure [mautrix-googlechat](https://github.com/mautrix/googlechat) for you.
4+
5+
See the project's [documentation](https://docs.mau.fi/bridges/python/googlechat/index.html) to learn what it does and why it might be useful to you.
6+
7+
To enable the [Google Chat](https://chat.google.com/) bridge just use the following playbook configuration:
8+
9+
10+
```yaml
11+
matrix_mautrix_googlechat_enabled: true
12+
```
13+
14+
15+
## Set up Double Puppeting
16+
17+
If you'd like to use [Double Puppeting](https://docs.mau.fi/bridges/general/double-puppeting.html) (hint: you most likely do), you have 2 ways of going about it.
18+
19+
### Method 1: automatically, by enabling Shared Secret Auth
20+
21+
The bridge will automatically perform Double Puppeting if you enable [Shared Secret Auth](configuring-playbook-shared-secret-auth.md) for this playbook.
22+
23+
This is the recommended way of setting up Double Puppeting, as it's easier to accomplish, works for all your users automatically, and has less of a chance of breaking in the future.
24+
25+
26+
### Method 2: manually, by asking each user to provide a working access token
27+
28+
**Note**: This method for enabling Double Puppeting can be configured only after you've already set up bridging (see [Usage](#usage)).
29+
30+
When using this method, **each user** that wishes to enable Double Puppeting needs to follow the following steps:
31+
32+
- retrieve a Matrix access token for yourself. You can use the following command:
33+
34+
```
35+
curl \
36+
--data '{"identifier": {"type": "m.id.user", "user": "YOUR_MATRIX_USERNAME" }, "password": "YOUR_MATRIX_PASSWORD", "type": "m.login.password", "device_id": "Mautrix-googlechat", "initial_device_display_name": "Mautrix-googlechat"}' \
37+
https://matrix.DOMAIN/_matrix/client/r0/login
38+
```
39+
40+
- send the access token to the bot. Example: `login-matrix MATRIX_ACCESS_TOKEN_HERE`
41+
42+
- make sure you don't log out the `Mautrix-googlechat` device some time in the future, as that would break the Double Puppeting feature
43+
44+
45+
## Usage
46+
47+
Once the bot is enabled you need to start a chat with `googlechat bridge bot` with handle `@googlechatbot:YOUR_DOMAIN` (where `YOUR_DOMAIN` is your base domain, not the `matrix.` domain).
48+
49+
Send `login` to the bridge bot to receive a link to the portal from which you can enable the bridging. Open the link sent by the bot and follow the instructions.
50+
51+
Automatic login may not work. If it does not, reload the page and select the "Manual login" checkbox before starting. Manual login involves logging into your Google account normally and then manually getting the OAuth token from browser cookies with developer tools.
52+
53+
Once logged in, recent chats should show up as new conversations automatically. Other chats will get portals as you receive messages.
54+
55+
You can learn more about authentication from the bridge's [official documentation on Authentication](https://docs.mau.fi/bridges/python/googlechat/authentication.html).
56+
57+
After successfully enabling bridging, you may wish to [set up Double Puppeting](#set-up-double-puppeting), if you haven't already done so.
58+

docs/configuring-playbook-bridge-mautrix-hangouts.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# The [Mautrix Hangouts Bridge](https://mau.dev/mautrix/hangouts) is no longer maintained. It has changed to a [Google Chat Bridge](https://github.com/mautrix/googlechat). Setup instructions for the Google Chat Bridge can be [found here](configuring-playbook-bridge-mautrix-googlechat.md).
2+
13
# Setting up Mautrix Hangouts (optional)
24

35
The playbook can install and configure [mautrix-hangouts](https://github.com/mautrix/hangouts) for you.

docs/configuring-playbook-bridge-mautrix-whatsapp.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,25 @@ Use the following playbook configuration:
88

99
```yaml
1010
matrix_mautrix_whatsapp_enabled: true
11-
```
11+
```
12+
Whatsapp multidevice beta is required, now it is enough if Whatsapp is connected to the Internet every 2 weeks.
13+
14+
## Enable backfilling history
15+
This requires a server with MSC2716 support, which is currently an experimental feature in synapse.
16+
Note that as of Synapse 1.46, there are still some bugs with the implementation, especially if using event persistence workers.
17+
Use the following playbook configuration:
1218
19+
```yaml
20+
matrix_synapse_configuration_extension_yaml: |
21+
experimental_features:
22+
msc2716_enabled: true
23+
```
24+
```yaml
25+
matrix_mautrix_whatsapp_configuration_extension_yaml:
26+
bridge:
27+
history_sync:
28+
backfill: true
29+
```
1330
1431
## Set up Double Puppeting
1532

docs/configuring-playbook-jitsi.md

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,23 @@ If you're fine with such an open Jitsi instance, please skip to [Apply changes](
4141
4242
If you would like to control who is allowed to open meetings on your new Jitsi instance, then please follow this step to enable Jitsi's authentication and guests mode. With authentication enabled, all meeting rooms have to be opened by a registered user, after which guests are free to join. If a registered host is not yet present, guests are put on hold in individual waiting rooms.
4343
44-
Add these two lines to your `inventory/host_vars/matrix.DOMAIN/vars.yml` configuration:
44+
Add these lines to your `inventory/host_vars/matrix.DOMAIN/vars.yml` configuration:
4545

4646
```yaml
4747
matrix_jitsi_enable_auth: true
4848
matrix_jitsi_enable_guests: true
49+
matrix_jitsi_prosody_auth_internal_accounts:
50+
- username: "jitsi-moderator"
51+
password: "secret-password"
52+
- username: "another-user"
53+
password: "another-password"
4954
```
5055

56+
**Caution:** Accounts added here and subsquently removed will not be automatically removed from the Prosody server until user account cleaning is integrated into the playbook.
57+
58+
**If you get an error** like this: "Error: Account creation/modification not supported.", it's likely that you had previously installed Jitsi without auth/guest support. In such a case, you should look into [Rebuilding your Jitsi installation](#rebuilding-your-jitsi-installation).
59+
60+
5161
### (Optional) LDAP authentication
5262

5363
The default authentication mode of Jitsi is `internal`, however LDAP is also supported. An example LDAP configuration could be:
@@ -122,19 +132,6 @@ You may want to **limit the maximum video resolution**, to save up resources on
122132

123133
Then re-run the playbook: `ansible-playbook -i inventory/hosts setup.yml --tags=setup-all,start`
124134

125-
## Required if configuring Jitsi with internal authentication: register new users
126-
127-
Until this gets integrated into the playbook, we need to register new users / meeting hosts for Jitsi manually.
128-
Please SSH into your matrix host machine and execute the following command targeting the `matrix-jitsi-prosody` container:
129-
130-
```bash
131-
docker exec matrix-jitsi-prosody prosodyctl --config /config/prosody.cfg.lua register <USERNAME> meet.jitsi <PASSWORD>
132-
```
133-
134-
Run this command for each user you would like to create, replacing `<USERNAME>` and `<PASSWORD>` accordingly. After you've finished, please exit the host.
135-
136-
**If you get an error** like this: "Error: Account creation/modification not supported.", it's likely that you had previously installed Jitsi without auth/guest support. In such a case, you should look into [Rebuilding your Jitsi installation](#rebuilding-your-jitsi-installation).
137-
138135

139136
## Usage
140137

docs/configuring-playbook-matrix-corporal.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ matrix_synapse_ext_password_provider_rest_auth_endpoint: "http://matrix-corporal
3737

3838
matrix_corporal_enabled: true
3939

40+
# See below for an example of how to use a locally-stored static policy
4041
matrix_corporal_policy_provider_config: |
4142
{
4243
"Type": "http",
@@ -74,10 +75,48 @@ Matrix Corporal operates with a specific Matrix user on your server.
7475
By default, it's `matrix-corporal` (controllable by the `matrix_corporal_reconciliation_user_id_local_part` setting, see above).
7576
No matter what Matrix user id you configure to run it with, make sure that:
7677

77-
- the Matrix Corporal user is created by [registering it](registering-users.md). Use a password you remember, as you'll need to log in from time to time to create or join rooms
78+
- the Matrix Corporal user is created by [registering it](registering-users.md) **with administrator privileges**. Use a password you remember, as you'll need to log in from time to time to create or join rooms
7879

7980
- the Matrix Corporal user is joined and has Admin/Moderator-level access to any rooms you want it to manage
8081

82+
### Using a locally-stored static policy
83+
84+
If you'd like to use a [static policy file](https://github.com/devture/matrix-corporal/blob/master/docs/policy-providers.md#static-file-pull-style-policy-provider), you can use a configuration like this:
85+
86+
```yaml
87+
matrix_corporal_policy_provider_config: |
88+
{
89+
"Type": "static_file",
90+
"Path": "/etc/matrix-corporal/policy.json"
91+
}
92+
93+
# Modify the policy below as you see fit
94+
matrix_aux_file_definitions:
95+
- dest: "{{ matrix_corporal_config_dir_path }}/policy.json"
96+
content: |
97+
{
98+
"schemaVersion": 1,
99+
"identificationStamp": "stamp-1",
100+
"flags": {
101+
"allowCustomUserDisplayNames": false,
102+
"allowCustomUserAvatars": false,
103+
"forbidRoomCreation": false,
104+
"forbidEncryptedRoomCreation": true,
105+
"forbidUnencryptedRoomCreation": false,
106+
"allowCustomPassthroughUserPasswords": true,
107+
"allowUnauthenticatedPasswordResets": false,
108+
"allow3pidLogin": false
109+
},
110+
"managedCommunityIds": [],
111+
"managedRoomIds": [],
112+
"users": []
113+
}
114+
```
115+
116+
To learn more about what the policy configuration, see the matrix-corporal documentation on [policy](https://github.com/devture/matrix-corporal/blob/master/docs/policy.md).
117+
118+
Each time you update the policy in your `vars.yml` file, you'd need to re-run the playbook and restart matrix-corporal (`--tags=setup-all,start` or `--tags=setup-aux-files,setup-corporal,start`).
119+
81120

82121
## Matrix Corporal files
83122

0 commit comments

Comments
 (0)