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
The `matrix-authentication-service` is designed to be run alongside a Matrix homeserver.
4
-
It currently only supports [Synapse](https://github.com/element-hq/synapse)through the experimental OAuth delegation feature.
4
+
It currently only supports [Synapse](https://github.com/element-hq/synapse)version 1.136.0 or later.
5
5
The authentication service needs to be able to call the Synapse admin API to provision users through a shared secret, and Synapse needs to be able to call the service to verify access tokens using the OAuth 2.0 token introspection endpoint.
6
6
7
-
## Provision a client for the Homeserver to use
8
-
9
-
In the [`clients`](../reference/configuration.md#clients) section of the configuration file, add a new client with the following properties:
10
-
11
-
-`client_id`: a unique identifier for the client. It must be a valid [ULID](https://github.com/ulid/spec), and it happens that `0000000000000000000SYNAPSE` is a valid ULID.
12
-
-`client_auth_method`: set to `client_secret_basic`. Other methods are possible, but this is the easiest to set up.
13
-
-`client_secret`: a shared secret used for the homeserver to authenticate
14
-
15
-
```yaml
16
-
clients:
17
-
- client_id: 0000000000000000000SYNAPSE
18
-
client_auth_method: client_secret_basic
19
-
client_secret: "SomeRandomSecret"
20
-
```
21
-
22
-
**Don't forget to sync the configuration file** with the database after adding the client, using the [`config sync`](../reference/cli/config.md#config-sync---prune---dry-run) command.
23
-
24
7
## Configure the connection to the homeserver
25
8
26
9
In the [`matrix`](../reference/configuration.md#matrix) section of the configuration file, add the following properties:
27
10
11
+
-`kind`: the type of homeserver to connect to, currently only `synapse` is supported
28
12
-`homeserver`: corresponds to the `server_name` in the Synapse configuration file
29
-
- `secret`: a shared secret the service will use to call the homeserver admin API
13
+
-`secret`: a shared secret the service will use to call the homeserver MAS API
30
14
-`endpoint`: the URL to which the homeserver is accessible from the service
See the [reverse proxy configuration](./reverse-proxy.md) guide for more information.
56
+
57
+
58
+
## Migrating from the experimental MSC3861 feature
59
+
60
+
If you are migrating from the experimental MSC3861 feature in Synapse, you will need to migrate the `experimental_features.msc3861` section of the Synapse configuration to the `matrix_authentication_service` section.
61
+
62
+
To do so, you need to:
63
+
64
+
- Remove the `experimental_features.msc3861` section from the Synapse configuration
65
+
- Add the `matrix_authentication_service` section to the Synapse configuration with:
66
+
-`enabled: true`
67
+
-`endpoint` set to the URL of the authentication service
68
+
-`secret` set to the same secret as the `admin_token` that was set in the `msc3861` section
69
+
- Optionally, remove the client provisioned for Synapse in the `clients` section of the MAS configuration
0 commit comments