@@ -1873,8 +1873,8 @@ See [here](../../CAPTCHA_SETUP.md) for full details on setting up captcha.
1873
1873
---
1874
1874
# ## `recaptcha_public_key`
1875
1875
1876
- This homeserver's ReCAPTCHA public key. Must be specified if `enable_registration_captcha` is
1877
- enabled.
1876
+ This homeserver's ReCAPTCHA public key. Must be specified if
1877
+ [`enable_registration_captcha`](#enable_registration_captcha) is enabled.
1878
1878
1879
1879
Example configuration :
1880
1880
` ` ` yaml
@@ -1883,7 +1883,8 @@ recaptcha_public_key: "YOUR_PUBLIC_KEY"
1883
1883
---
1884
1884
# ## `recaptcha_private_key`
1885
1885
1886
- This homeserver's ReCAPTCHA private key. Must be specified if `enable_registration_captcha` is
1886
+ This homeserver's ReCAPTCHA private key. Must be specified if
1887
+ [`enable_registration_captcha`](#enable_registration_captcha) is
1887
1888
enabled.
1888
1889
1889
1890
Example configuration :
@@ -1893,9 +1894,11 @@ recaptcha_private_key: "YOUR_PRIVATE_KEY"
1893
1894
---
1894
1895
# ## `enable_registration_captcha`
1895
1896
1896
- Set to true to enable ReCaptcha checks when registering, preventing signup
1897
- unless a captcha is answered. Requires a valid ReCaptcha public/private key.
1898
- Defaults to false.
1897
+ Set to `true` to require users to complete a CAPTCHA test when registering an account.
1898
+ Requires a valid ReCaptcha public/private key.
1899
+ Defaults to `false`.
1900
+
1901
+ Note that [`enable_registration`](#enable_registration) must also be set to allow account registration.
1899
1902
1900
1903
Example configuration :
1901
1904
` ` ` yaml
@@ -1971,98 +1974,43 @@ Registration can be rate-limited using the parameters in the [Ratelimiting](#rat
1971
1974
---
1972
1975
# ## `enable_registration`
1973
1976
1974
- Enable registration for new users. Defaults to false. It is highly recommended that if you enable registration,
1975
- you use either captcha, email, or token-based verification to verify that new users are not bots. In order to enable registration
1976
- without any verification, you must also set `enable_registration_without_verification` to true.
1977
-
1978
- Example configuration :
1979
- ` ` ` yaml
1980
- enable_registration: true
1981
- ` ` `
1982
- ---
1983
- # ## `enable_registration_without_verification`
1984
- Enable registration without email or captcha verification. Note : this option is *not* recommended,
1985
- as registration without verification is a known vector for spam and abuse. Defaults to false. Has no effect
1986
- unless `enable_registration` is also enabled.
1987
-
1988
- Example configuration :
1989
- ` ` ` yaml
1990
- enable_registration_without_verification: true
1991
- ` ` `
1992
- ---
1993
- # ## `session_lifetime`
1994
-
1995
- Time that a user's session remains valid for, after they log in.
1996
-
1997
- Note that this is not currently compatible with guest logins.
1998
-
1999
- Note also that this is calculated at login time : changes are not applied retrospectively to users who have already
2000
- logged in.
2001
-
2002
- By default, this is infinite.
2003
-
2004
- Example configuration :
2005
- ` ` ` yaml
2006
- session_lifetime: 24h
2007
- ` ` `
2008
- ----
2009
- # ## `refresh_access_token_lifetime`
2010
-
2011
- Time that an access token remains valid for, if the session is using refresh tokens.
2012
-
2013
- For more information about refresh tokens, please see the [manual](user_authentication/refresh_tokens.md).
2014
-
2015
- Note that this only applies to clients which advertise support for refresh tokens.
2016
-
2017
- Note also that this is calculated at login time and refresh time : changes are not applied to
2018
- existing sessions until they are refreshed.
2019
-
2020
- By default, this is 5 minutes.
1977
+ Enable registration for new users. Defaults to `false`.
2021
1978
2022
- Example configuration :
2023
- ` ` ` yaml
2024
- refreshable_access_token_lifetime: 10m
2025
- ` ` `
2026
- ---
2027
- # ## `refresh_token_lifetime: 24h`
1979
+ It is highly recommended that if you enable registration, you set one or more
1980
+ or the following options, to avoid abuse of your server by "bots" :
2028
1981
2029
- Time that a refresh token remains valid for (provided that it is not
2030
- exchanged for another one first).
2031
- This option can be used to automatically log-out inactive sessions.
2032
- Please see the manual for more information.
1982
+ * [`enable_registration_captcha`](#enable_registration_captcha)
1983
+ * [`registrations_require_3pid`](#registrations_require_3pid)
1984
+ * [`registration_requires_token`](#registration_requires_token)
2033
1985
2034
- Note also that this is calculated at login time and refresh time :
2035
- changes are not applied to existing sessions until they are refreshed.
1986
+ (In order to enable registration without any verification, you must also set
1987
+ [`enable_registration_without_verification`](#enable_registration_without_verification).)
2036
1988
2037
- By default, this is infinite.
1989
+ Note that even if this setting is disabled, new accounts can still be created
1990
+ via the admin API if
1991
+ [`registration_shared_secret`](#registration_shared_secret) is set.
2038
1992
2039
1993
Example configuration :
2040
1994
` ` ` yaml
2041
- refresh_token_lifetime: 24h
1995
+ enable_registration: true
2042
1996
` ` `
2043
1997
---
2044
- # ## `nonrefreshable_access_token_lifetime`
2045
-
2046
- Time that an access token remains valid for, if the session is NOT
2047
- using refresh tokens.
2048
-
2049
- Please note that not all clients support refresh tokens, so setting
2050
- this to a short value may be inconvenient for some users who will
2051
- then be logged out frequently.
2052
-
2053
- Note also that this is calculated at login time : changes are not applied
2054
- retrospectively to existing sessions for users that have already logged in.
1998
+ # ## `enable_registration_without_verification`
2055
1999
2056
- By default, this is infinite.
2000
+ Enable registration without email or captcha verification. Note : this option is *not* recommended,
2001
+ as registration without verification is a known vector for spam and abuse. Defaults to false. Has no effect
2002
+ unless [`enable_registration`](#enable_registration) is also enabled.
2057
2003
2058
2004
Example configuration :
2059
2005
` ` ` yaml
2060
- nonrefreshable_access_token_lifetime: 24h
2006
+ enable_registration_without_verification: true
2061
2007
` ` `
2062
2008
---
2063
2009
# ## `registrations_require_3pid`
2064
2010
2065
- If this is set, the user must provide all of the specified types of 3PID when registering.
2011
+ If this is set, users must provide all of the specified types of 3PID when registering an account.
2012
+
2013
+ Note that [`enable_registration`](#enable_registration) must also be set to allow account registration.
2066
2014
2067
2015
Example configuration :
2068
2016
` ` ` yaml
@@ -2110,9 +2058,11 @@ enable_3pid_lookup: false
2110
2058
2111
2059
Require users to submit a token during registration.
2112
2060
Tokens can be managed using the admin [API](../administration/admin_api/registration_tokens.md).
2113
- Note that `enable_registration` must be set to true.
2114
2061
Disabling this option will not delete any tokens previously generated.
2115
- Defaults to false. Set to true to enable.
2062
+ Defaults to `false`. Set to `true` to enable.
2063
+
2064
+
2065
+ Note that [`enable_registration`](#enable_registration) must also be set to allow account registration.
2116
2066
2117
2067
Example configuration :
2118
2068
` ` ` yaml
@@ -2121,8 +2071,13 @@ registration_requires_token: true
2121
2071
---
2122
2072
# ## `registration_shared_secret`
2123
2073
2124
- If set, allows registration of standard or admin accounts by anyone who
2125
- has the shared secret, even if registration is otherwise disabled.
2074
+ If set, allows registration of standard or admin accounts by anyone who has the
2075
+ shared secret, even if [`enable_registration`](#enable_registration) is not
2076
+ set.
2077
+
2078
+ This is primarily intended for use with the `register_new_matrix_user` script
2079
+ (see [Registering a user](../../setup/installation.md#registering-a-user));
2080
+ however, the interface is [documented](../admin_api/register_api.html).
2126
2081
2127
2082
See also [`registration_shared_secret_path`](#registration_shared_secret_path).
2128
2083
@@ -2376,6 +2331,79 @@ Example configuration:
2376
2331
` ` ` yaml
2377
2332
inhibit_user_in_use_error: true
2378
2333
` ` `
2334
+ ---
2335
+ # # User session management
2336
+ ---
2337
+ # ## `session_lifetime`
2338
+
2339
+ Time that a user's session remains valid for, after they log in.
2340
+
2341
+ Note that this is not currently compatible with guest logins.
2342
+
2343
+ Note also that this is calculated at login time : changes are not applied retrospectively to users who have already
2344
+ logged in.
2345
+
2346
+ By default, this is infinite.
2347
+
2348
+ Example configuration :
2349
+ ` ` ` yaml
2350
+ session_lifetime: 24h
2351
+ ` ` `
2352
+ ----
2353
+ # ## `refresh_access_token_lifetime`
2354
+
2355
+ Time that an access token remains valid for, if the session is using refresh tokens.
2356
+
2357
+ For more information about refresh tokens, please see the [manual](user_authentication/refresh_tokens.md).
2358
+
2359
+ Note that this only applies to clients which advertise support for refresh tokens.
2360
+
2361
+ Note also that this is calculated at login time and refresh time : changes are not applied to
2362
+ existing sessions until they are refreshed.
2363
+
2364
+ By default, this is 5 minutes.
2365
+
2366
+ Example configuration :
2367
+ ` ` ` yaml
2368
+ refreshable_access_token_lifetime: 10m
2369
+ ` ` `
2370
+ ---
2371
+ # ## `refresh_token_lifetime: 24h`
2372
+
2373
+ Time that a refresh token remains valid for (provided that it is not
2374
+ exchanged for another one first).
2375
+ This option can be used to automatically log-out inactive sessions.
2376
+ Please see the manual for more information.
2377
+
2378
+ Note also that this is calculated at login time and refresh time :
2379
+ changes are not applied to existing sessions until they are refreshed.
2380
+
2381
+ By default, this is infinite.
2382
+
2383
+ Example configuration :
2384
+ ` ` ` yaml
2385
+ refresh_token_lifetime: 24h
2386
+ ` ` `
2387
+ ---
2388
+ # ## `nonrefreshable_access_token_lifetime`
2389
+
2390
+ Time that an access token remains valid for, if the session is NOT
2391
+ using refresh tokens.
2392
+
2393
+ Please note that not all clients support refresh tokens, so setting
2394
+ this to a short value may be inconvenient for some users who will
2395
+ then be logged out frequently.
2396
+
2397
+ Note also that this is calculated at login time : changes are not applied
2398
+ retrospectively to existing sessions for users that have already logged in.
2399
+
2400
+ By default, this is infinite.
2401
+
2402
+ Example configuration :
2403
+ ` ` ` yaml
2404
+ nonrefreshable_access_token_lifetime: 24h
2405
+ ` ` `
2406
+
2379
2407
---
2380
2408
# # Metrics ###
2381
2409
Config options related to metrics.
@@ -2660,13 +2688,10 @@ key_server_signing_keys_path: "key_server_signing_keys.key"
2660
2688
The following settings can be used to make Synapse use a single sign-on
2661
2689
provider for authentication, instead of its internal password database.
2662
2690
2663
- You will probably also want to set the following options to false to
2691
+ You will probably also want to set the following options to ` false` to
2664
2692
disable the regular login/registration flows :
2665
- * `enable_registration`
2666
- * `password_config.enabled`
2667
-
2668
- You will also want to investigate the settings under the "sso" configuration
2669
- section below.
2693
+ * [`enable_registration`](#enable_registration)
2694
+ * [`password_config.enabled`](#password_config)
2670
2695
2671
2696
---
2672
2697
# ## `saml2_config`
0 commit comments