You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Automatically enable openid listeners when ma1sd enabled
ma1sd requires the openid endpoints for certain functionality.
Example: https://github.com/ma1uta/ma1sd/blob/90b2b5301c34168346fdc5e7eccc09d6958e999f/src/main/java/io/kamax/mxisd/auth/AccountManager.java#L67-L99
If federation is disabled, we still need to expose these openid APIs on the
federation port.
Previously, we were doing similar magic for Dimension.
As per its documentation, when running unfederated, one is to enable
the openid listener as well. As per their recommendation, people
are advised to do enable it on the Client-Server API port
and use the `federationUrl` variable to override where the federation
port is (making federation requests go to the Client-Server API).
Because ma1sd always uses the federation port (unless you do some
DNS overwriting magic using its configuration -- which we'd rather not
do), it's better if we just default to putting the `openid` listener
where it belongs - on the federation port.
With this commit, we retain the "automatically enable openid APIs" thing
we've been doing for Dimension, but move it to the federation port instead.
We also now do the same thing when ma1sd is enabled.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+12
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,15 @@
1
+
# 2020-12-08
2
+
3
+
## openid APIs exposed by default on the federation port when federation disabled
4
+
5
+
We've changed some defaults. People running with our default configuration (federation enabled), are not affected at all.
6
+
7
+
If you are running an unfederated server (`matrix_synapse_federation_enabled: false`), this may be of interest to you.
8
+
9
+
When federation is disabled, but ma1sd or Dimension are enabled, we'll now expose the `openid` APIs on the federation port.
10
+
These APIs are necessary for some ma1sd features to work. If you'd like to prevent this, you can: `matrix_synapse_federation_port_openid_resource_required: false`.
11
+
12
+
1
13
# 2020-11-27
2
14
3
15
## Recent Jitsi updates may require configuration changes
Copy file name to clipboardExpand all lines: docs/configuring-playbook-dimension.md
+4-1
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,9 @@
3
3
**[Dimension](https://dimension.t2bot.io) can only be installed after Matrix services are installed and running.**
4
4
If you're just installing Matrix services for the first time, please continue with the [Configuration](configuring-playbook.md) / [Installation](installing.md) flow and come back here later.
5
5
6
+
**Note**: enabling Dimension, means that the `openid` API endpoints will be exposed on the Matrix Federation port (usually `8448`), even if [federation](configuring-playbook-federation.md) is disabled. It's something to be aware of, especially in terms of firewall whitelisting (make sure port `8448` is accessible).
7
+
8
+
6
9
## Prerequisites
7
10
8
11
This playbook now supports running [Dimension](https://dimension.t2bot.io) in both a federated and an [unfederated](https://github.com/turt2live/matrix-dimension/blob/master/docs/unfederated.md) environment. This is handled automatically based on the value of `matrix_synapse_federation_enabled`.
@@ -48,7 +51,7 @@ To get an access token for the Dimension user, you can follow one of two options
48
51
3. Copy the highlighted text to your configuration.
49
52
4. Close the private browsing session. **Do not log out**. Logging out will invalidate the token, making it not work.
50
53
51
-
*With CURL*
54
+
*With CURL*
52
55
53
56
```
54
57
curl -X POST --header 'Content-Type: application/json' -d '{
With that, your server's users will only be able to talk among themselves, but not to anyone who is on another server.
40
+
41
+
**Disabling federation does not necessarily disable the federation port** (`8448`). Services like [Dimension](configuring-playbook-dimension.md) and [ma1sd](configuring-playbook-ma1sd.md) normally rely on `openid` APIs exposed on that port. Even if you disable federation and only if necessary, we may still be exposing the federation port and serving the `openid` APIs there. To override this and completely disable Synapse's federation port use:
42
+
43
+
```yaml
44
+
# This stops the federation port on the Synapse side (normally `matrix-synapse:8048` on the container network).
45
+
matrix_synapse_federation_port_enabled: false
46
+
47
+
# This removes the `8448` virtual host from the matrix-nginx-proxy reverse-proxy server.
Copy file name to clipboardExpand all lines: docs/configuring-playbook-ma1sd.md
+6-1
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,9 @@ By default, this playbook configures an [ma1sd](https://github.com/ma1uta/ma1sd)
4
4
5
5
This server is private by default, potentially at the expense of user discoverability.
6
6
7
-
ma1sd is a fork of [mxisd](https://github.com/kamax-io/mxisd) which was pronounced end of life 2019-06-21.
7
+
*ma1sd is a fork of [mxisd](https://github.com/kamax-io/mxisd) which was pronounced end of life 2019-06-21.*
8
+
9
+
**Note**: enabling ma1sd (which is also the default), means that the `openid` API endpoints will be exposed on the Matrix Federation port (usually `8448`), even if [federation](configuring-playbook-federation.md) is disabled. It's something to be aware of, especially in terms of firewall whitelisting (make sure port `8448` is accessible).
8
10
9
11
10
12
## Disabling ma1sd
@@ -50,6 +52,9 @@ To use the [Registration](https://github.com/ma1uta/ma1sd/blob/master/docs/featu
50
52
51
53
- `matrix_ma1sd_configuration_extension_yaml`- to configure ma1sd as required. See the [Registration feature's docs](https://github.com/ma1uta/ma1sd/blob/master/docs/features/registration.md) for inspiration. Also see the [Additional features](#additional-features) section below to learn more about how to use `matrix_ma1sd_configuration_extension_yaml`.
52
54
55
+
**Note**: For this to work, either the homeserver needs to [federate](configuring-playbook-federation.md) or the `openid` APIs need to exposed on the federation port. When federation is disabled and ma1sd is enabled, we automatically expose the `openid` APIs (only!) on the federation port. Make sure the federation port (usually `https://matrix.DOMAIN:8448`) is whitelisted in your firewall (even if you don't actually use/need federation).
56
+
57
+
53
58
## Authentication
54
59
55
60
[Authentication](https://github.com/ma1uta/ma1sd/blob/master/docs/features/authentication.md) provides the possibility to use your own [Identity Stores](https://github.com/ma1uta/ma1sd/blob/master/docs/stores/README.md) (for example LDAP) to authenticate users on your Homeserver. The following configuration can be used to authenticate against an LDAP server:
Copy file name to clipboardExpand all lines: docs/prerequisites.md
+12-1
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,17 @@ This playbook doesn't support running on ARM (see [this issue](https://github.co
22
22
23
23
- Properly configured DNS records for `<your-domain>` (details in [Configuring DNS](configuring-dns.md)).
24
24
25
-
- Some TCP/UDP ports open. This playbook configures the server's internal firewall for you. In most cases, you don't need to do anything special. But **if your server is running behind another firewall**, you'd need to open these ports: `80/tcp` (HTTP webserver), `443/tcp` (HTTPS webserver), `3478/tcp` (TURN over TCP), `3478/udp` (TURN over UDP), `5349/tcp` (TURN over TCP), `5349/udp` (TURN over UDP), `8448/tcp` (Matrix Federation API HTTPS webserver), the range `49152-49172/udp` (TURN over UDP), `4443/tcp` (Jitsi Harvester fallback), `10000/udp` (Jitsi video RTP). Depending on your firewall/NAT setup, incoming RTP packets on port 10000 may have the external IP of your firewall as destination address, due to the usage of STUN in JVB (see [`matrix_jitsi_jvb_stun_servers`](../roles/matrix-jitsi/defaults/main.yml)).
25
+
- Some TCP/UDP ports open. This playbook configures the server's internal firewall for you. In most cases, you don't need to do anything special. But **if your server is running behind another firewall**, you'd need to open these ports:
26
+
27
+
-`80/tcp`: HTTP webserver
28
+
-`443/tcp`: HTTPS webserver
29
+
-`3478/tcp`: TURN over TCP (used by Coturn)
30
+
-`3478/udp`: TURN over UDP (used by Coturn)
31
+
-`5349/tcp`: TURN over TCP (used by Coturn)
32
+
-`5349/udp`: TURN over UDP (used by Coturn)
33
+
-`8448/tcp`: Matrix Federation API HTTPS webserver. In some cases, this **may necessary even with federation disabled**. Integration Servers (like Dimension) and Identity Servers (like ma1sd) may need to access `openid` APIs on the federation port.
34
+
- the range `49152-49172/udp`: TURN over UDP
35
+
-`4443/tcp`: Jitsi Harvester fallback
36
+
-`10000/udp`: Jitsi video RTP. Depending on your firewall/NAT setup, incoming RTP packets on port `10000` may have the external IP of your firewall as destination address, due to the usage of STUN in JVB (see [`matrix_jitsi_jvb_stun_servers`](../roles/matrix-jitsi/defaults/main.yml)).
26
37
27
38
When ready to proceed, continue with [Configuring DNS](configuring-dns.md).
# Unless this is handled there OR Synapse's federation listener port is disabled, we'll reverse-proxy.
818
+
matrix_nginx_proxy_proxy_matrix_federation_api_enabled: "{{ matrix_synapse_federation_port_enabled and not matrix_synapse_tls_federation_listener_enabled }}"
( ["openid"] if matrix_dimension_enabled and not matrix_synapse_federation_enabled else [] )
998
-
}}
992
+
matrix_synapse_federation_port_openid_resource_required: "{{ not matrix_synapse_federation_enabled and (matrix_dimension_enabled or matrix_ma1sd_enabled) }}"
0 commit comments