Skip to content

Commit da6edc9

Browse files
committed
Add support for disabling Synapse's local database for user auth
This is a new feature of Synapse v1.1.0. Discussed in #145 (Github Pull Request).
1 parent 2b3865c commit da6edc9

File tree

5 files changed

+35
-3
lines changed

5 files changed

+35
-3
lines changed

docs/configuring-playbook-ldap-auth.md

+10-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,13 @@ matrix_synapse_ext_password_provider_ldap_attributes_name: "cn"
1717
matrix_synapse_ext_password_provider_ldap_bind_dn: ""
1818
matrix_synapse_ext_password_provider_ldap_bind_password: ""
1919
matrix_synapse_ext_password_provider_ldap_filter: ""
20-
```
20+
```
21+
22+
23+
## Authenticating only using a password provider
24+
25+
If you wish for users to **authenticate only against configured password providers** (like this one), **without consulting Synapse's local database**, feel free to disable it:
26+
27+
```yaml
28+
matrix_synapse_password_config_localdb_enabled: false
29+
```

docs/configuring-playbook-rest-auth.md

+9
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,12 @@ matrix_synapse_ext_password_provider_rest_auth_registration_enforce_lowercase: f
1313
matrix_synapse_ext_password_provider_rest_auth_registration_profile_name_autofill: true
1414
matrix_synapse_ext_password_provider_rest_auth_login_profile_name_autofill: false
1515
```
16+
17+
18+
## Authenticating only using a password provider
19+
20+
If you wish for users to **authenticate only against configured password providers** (like this one), **without consulting Synapse's local database**, feel free to disable it:
21+
22+
```yaml
23+
matrix_synapse_password_config_localdb_enabled: false
24+
```

docs/configuring-playbook-shared-secret-auth.md

+10-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,13 @@ If you decide that you'd like to let this playbook install it for you, you need
99
```yaml
1010
matrix_synapse_ext_password_provider_shared_secret_auth_enabled: true
1111
matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret: YOUR_SHARED_SECRET_GOES_HERE
12-
```
12+
```
13+
14+
15+
## Authenticating only using a password provider
16+
17+
If you wish for users to **authenticate only against configured password providers** (like this one), **without consulting Synapse's local database**, feel free to disable it:
18+
19+
```yaml
20+
matrix_synapse_password_config_localdb_enabled: false
21+
```

roles/matrix-synapse/defaults/main.yml

+5
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,11 @@ matrix_synapse_autocreate_auto_join_rooms: true
147147
# Controls password-peppering for Synapse. Not to be changed after initial setup.
148148
matrix_synapse_password_config_pepper: ""
149149

150+
# Controls if Synapse allows people to authenticate against its local database.
151+
# It may be useful to disable this if you've configured additional password providers
152+
# and only wish authentication to happen through them.
153+
matrix_synapse_password_config_localdb_enabled: false
154+
150155
# Controls the number of events that Synapse caches in memory.
151156
matrix_synapse_event_cache_size: "100K"
152157

roles/matrix-synapse/templates/synapse/homeserver.yaml.j2

+1-1
Original file line numberDiff line numberDiff line change
@@ -1099,7 +1099,7 @@ password_config:
10991099
# database. This is ignored if `enabled` is false, and is only useful
11001100
# if you have other password_providers.
11011101
#
1102-
#localdb_enabled: false
1102+
localdb_enabled: {{ matrix_synapse_password_config_localdb_enabled|to_json }}
11031103

11041104
# Uncomment and change to a secret random string for extra security.
11051105
# DO NOT CHANGE THIS AFTER INITIAL SETUP!

0 commit comments

Comments
 (0)