Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

841 lines
28 KiB

  1. # vim:ft=yaml
  2. # PEM-encoded X509 certificate for TLS.
  3. # This certificate, as of Synapse 1.0, will need to be a valid and verifiable
  4. # certificate, signed by a recognised Certificate Authority.
  5. #
  6. # See 'ACME support' below to enable auto-provisioning this certificate via
  7. # Let's Encrypt.
  8. #
  9. tls_certificate_path: "{{ matrix_synapse_tls_certificate_path }}"
  10. # PEM-encoded private key for TLS
  11. tls_private_key_path: "{{ matrix_synapse_tls_private_key_path }}"
  12. # ACME support: This will configure Synapse to request a valid TLS certificate
  13. # for your configured `server_name` via Let's Encrypt.
  14. #
  15. # Note that provisioning a certificate in this way requires port 80 to be
  16. # routed to Synapse so that it can complete the http-01 ACME challenge.
  17. # By default, if you enable ACME support, Synapse will attempt to listen on
  18. # port 80 for incoming http-01 challenges - however, this will likely fail
  19. # with 'Permission denied' or a similar error.
  20. #
  21. # There are a couple of potential solutions to this:
  22. #
  23. # * If you already have an Apache, Nginx, or similar listening on port 80,
  24. # you can configure Synapse to use an alternate port, and have your web
  25. # server forward the requests. For example, assuming you set 'port: 8009'
  26. # below, on Apache, you would write:
  27. #
  28. # ProxyPass /.well-known/acme-challenge http://localhost:8009/.well-known/acme-challenge
  29. #
  30. # * Alternatively, you can use something like `authbind` to give Synapse
  31. # permission to listen on port 80.
  32. #
  33. acme:
  34. # ACME support is disabled by default. Uncomment the following line
  35. # to enable it.
  36. #
  37. # enabled: true
  38. # Endpoint to use to request certificates. If you only want to test,
  39. # use Let's Encrypt's staging url:
  40. # https://acme-staging.api.letsencrypt.org/directory
  41. #
  42. # url: https://acme-v01.api.letsencrypt.org/directory
  43. # Port number to listen on for the HTTP-01 challenge. Change this if
  44. # you are forwarding connections through Apache/Nginx/etc.
  45. #
  46. # port: 80
  47. # Local addresses to listen on for incoming connections.
  48. # Again, you may want to change this if you are forwarding connections
  49. # through Apache/Nginx/etc.
  50. #
  51. # bind_addresses: ['::', '0.0.0.0']
  52. # How many days remaining on a certificate before it is renewed.
  53. #
  54. # reprovision_threshold: 30
  55. # If your server runs behind a reverse-proxy which terminates TLS connections
  56. # (for both client and federation connections), it may be useful to disable
  57. # All TLS support for incoming connections. Setting no_tls to True will
  58. # do so (and avoid the need to give synapse a TLS private key).
  59. #
  60. no_tls: {{ matrix_synapse_no_tls|to_json }}
  61. ## Server ##
  62. # The domain name of the server, with optional explicit port.
  63. # This is used by remote servers to connect to this server,
  64. # e.g. matrix.org, localhost:8080, etc.
  65. # This is also the last part of your UserID.
  66. server_name: "{{ hostname_identity }}"
  67. # When running as a daemon, the file to store the pid in
  68. pid_file: /homeserver.pid
  69. # CPU affinity mask. Setting this restricts the CPUs on which the
  70. # process will be scheduled. It is represented as a bitmask, with the
  71. # lowest order bit corresponding to the first logical CPU and the
  72. # highest order bit corresponding to the last logical CPU. Not all CPUs
  73. # may exist on a given system but a mask may specify more CPUs than are
  74. # present.
  75. #
  76. # For example:
  77. # 0x00000001 is processor #0,
  78. # 0x00000003 is processors #0 and #1,
  79. # 0xFFFFFFFF is all processors (#0 through #31).
  80. #
  81. # Pinning a Python process to a single CPU is desirable, because Python
  82. # is inherently single-threaded due to the GIL, and can suffer a
  83. # 30-40% slowdown due to cache blow-out and thread context switching
  84. # if the scheduler happens to schedule the underlying threads across
  85. # different cores. See
  86. # https://www.mirantis.com/blog/improve-performance-python-programs-restricting-single-cpu/.
  87. #
  88. # This setting requires the affinity package to be installed!
  89. #
  90. # cpu_affinity: 0xFFFFFFFF
  91. # Whether to serve a web client from the HTTP/HTTPS root resource.
  92. web_client: False
  93. # The root directory to server for the above web client.
  94. # If left undefined, synapse will serve the matrix-angular-sdk web client.
  95. # Make sure matrix-angular-sdk is installed with pip if web_client is True
  96. # and web_client_location is undefined
  97. # web_client_location: "/path/to/web/root"
  98. # The public-facing base URL for the client API (not including _matrix/...)
  99. public_baseurl: https://{{ hostname_matrix }}/
  100. # Set the soft limit on the number of file descriptors synapse can use
  101. # Zero is used to indicate synapse should set the soft limit to the
  102. # hard limit.
  103. soft_file_limit: 0
  104. # Set to false to disable presence tracking on this homeserver.
  105. use_presence: {{ matrix_synapse_use_presence|to_json }}
  106. # The GC threshold parameters to pass to `gc.set_threshold`, if defined
  107. # gc_thresholds: [700, 10, 10]
  108. # Set the limit on the returned events in the timeline in the get
  109. # and sync operations. The default value is -1, means no upper limit.
  110. # filter_timeline_limit: 5000
  111. # Whether room invites to users on this server should be blocked
  112. # (except those sent by local server admins). The default is False.
  113. # block_non_admin_invites: True
  114. # Restrict federation to the following whitelist of domains.
  115. # N.B. we recommend also firewalling your federation listener to limit
  116. # inbound federation traffic as early as possible, rather than relying
  117. # purely on this application-layer restriction. If not specified, the
  118. # default is to whitelist everything.
  119. #
  120. # federation_domain_whitelist:
  121. # - lon.example.com
  122. # - nyc.example.com
  123. # - syd.example.com
  124. {% if matrix_synapse_federation_domain_whitelist is not none %}
  125. {# Cannot use `|to_nice_yaml` here, as an empty list does not get serialized properly by it. #}
  126. federation_domain_whitelist: {{ matrix_synapse_federation_domain_whitelist|to_json }}
  127. {% endif %}
  128. # List of ports that Synapse should listen on, their purpose and their
  129. # configuration.
  130. listeners:
  131. {% if matrix_synapse_metrics_enabled %}
  132. - type: metrics
  133. port: {{ matrix_synapse_metrics_port }}
  134. bind_addresses:
  135. - '0.0.0.0'
  136. {% endif %}
  137. {% if matrix_synapse_federation_enabled and matrix_synapse_tls_federation_listener_enabled %}
  138. # Main HTTPS listener
  139. # For when matrix traffic is sent directly to synapse.
  140. -
  141. # The port to listen for HTTPS requests on.
  142. port: 8448
  143. # Local addresses to listen on.
  144. # On Linux and Mac OS, `::` will listen on all IPv4 and IPv6
  145. # addresses by default. For most other OSes, this will only listen
  146. # on IPv6.
  147. bind_addresses: ['::']
  148. # This is a 'http' listener, allows us to specify 'resources'.
  149. type: http
  150. tls: true
  151. # Use the X-Forwarded-For (XFF) header as the client IP and not the
  152. # actual client IP.
  153. x_forwarded: false
  154. # List of HTTP resources to serve on this listener.
  155. resources:
  156. - names: [federation] # Federation APIs
  157. compress: false
  158. # optional list of additional endpoints which can be loaded via
  159. # dynamic modules
  160. # additional_resources:
  161. # "/_matrix/my/custom/endpoint":
  162. # module: my_module.CustomRequestHandler
  163. # config: {}
  164. {% endif %}
  165. # Unsecure HTTP listener for the Client API,
  166. # For when matrix traffic passes through loadbalancer that unwraps TLS.
  167. - port: 8008
  168. tls: false
  169. bind_addresses: ['::']
  170. type: http
  171. x_forwarded: true
  172. resources:
  173. - names: [client]
  174. compress: false
  175. {% if matrix_synapse_federation_enabled %}
  176. # Unsecure HTTP listener for the Federation API,
  177. # For when matrix traffic passes through loadbalancer that unwraps TLS.
  178. - port: 8048
  179. tls: false
  180. bind_addresses: ['::']
  181. type: http
  182. x_forwarded: true
  183. resources:
  184. - names: [federation]
  185. compress: false
  186. {% endif %}
  187. # Turn on the twisted ssh manhole service on localhost on the given
  188. # port.
  189. # - port: 9000
  190. # bind_addresses: ['::1', '127.0.0.1']
  191. # type: manhole
  192. # Homeserver blocking
  193. #
  194. # How to reach the server admin, used in ResourceLimitError
  195. # admin_contact: 'mailto:admin@server.com'
  196. #
  197. # Global block config
  198. #
  199. # hs_disabled: False
  200. # hs_disabled_message: 'Human readable reason for why the HS is blocked'
  201. # hs_disabled_limit_type: 'error code(str), to help clients decode reason'
  202. #
  203. # Monthly Active User Blocking
  204. #
  205. # Enables monthly active user checking
  206. # limit_usage_by_mau: False
  207. # max_mau_value: 50
  208. # mau_trial_days: 2
  209. #
  210. # Sometimes the server admin will want to ensure certain accounts are
  211. # never blocked by mau checking. These accounts are specified here.
  212. #
  213. # mau_limit_reserved_threepids:
  214. # - medium: 'email'
  215. # address: 'reserved_user@example.com'
  216. # Database configuration
  217. database:
  218. # The database engine name
  219. name: "psycopg2"
  220. args:
  221. user: {{ matrix_synapse_database_user|to_json }}
  222. password: {{ matrix_synapse_database_password|to_json }}
  223. database: "{{ matrix_synapse_database_database }}"
  224. host: "{{ matrix_synapse_database_host }}"
  225. cp_min: 5
  226. cp_max: 10
  227. # Number of events to cache in memory.
  228. event_cache_size: "{{ matrix_synapse_event_cache_size }}"
  229. # A yaml python logging config file
  230. log_config: "/data/{{ hostname_matrix }}.log.config"
  231. ## Ratelimiting ##
  232. # Number of messages a client can send per second
  233. rc_messages_per_second: {{ matrix_synapse_rc_messages_per_second }}
  234. # Number of message a client can send before being throttled
  235. rc_message_burst_count: {{ matrix_synapse_rc_message_burst_count }}
  236. # The federation window size in milliseconds
  237. federation_rc_window_size: 1000
  238. # The number of federation requests from a single server in a window
  239. # before the server will delay processing the request.
  240. federation_rc_sleep_limit: 10
  241. # The duration in milliseconds to delay processing events from
  242. # remote servers by if they go over the sleep limit.
  243. federation_rc_sleep_delay: 500
  244. # The maximum number of concurrent federation requests allowed
  245. # from a single server
  246. federation_rc_reject_limit: 50
  247. # The number of federation requests to concurrently process from a
  248. # single server
  249. federation_rc_concurrent: 3
  250. # Directory where uploaded images and attachments are stored.
  251. media_store_path: "/matrix-media-store-parent/{{ matrix_synapse_media_store_directory_name }}"
  252. # Media storage providers allow media to be stored in different
  253. # locations.
  254. # media_storage_providers:
  255. # - module: file_system
  256. # # Whether to write new local files.
  257. # store_local: false
  258. # # Whether to write new remote media
  259. # store_remote: false
  260. # # Whether to block upload requests waiting for write to this
  261. # # provider to complete
  262. # store_synchronous: false
  263. # config:
  264. # directory: /mnt/some/other/directory
  265. # Directory where in-progress uploads are stored.
  266. uploads_path: "/matrix-run/uploads"
  267. # The largest allowed upload size in bytes
  268. max_upload_size: "{{ matrix_synapse_max_upload_size_mb }}M"
  269. # Maximum number of pixels that will be thumbnailed
  270. max_image_pixels: "32M"
  271. # Whether to generate new thumbnails on the fly to precisely match
  272. # the resolution requested by the client. If true then whenever
  273. # a new resolution is requested by the client the server will
  274. # generate a new thumbnail. If false the server will pick a thumbnail
  275. # from a precalculated list.
  276. dynamic_thumbnails: false
  277. # List of thumbnail to precalculate when an image is uploaded.
  278. thumbnail_sizes:
  279. - width: 32
  280. height: 32
  281. method: crop
  282. - width: 96
  283. height: 96
  284. method: crop
  285. - width: 320
  286. height: 240
  287. method: scale
  288. - width: 640
  289. height: 480
  290. method: scale
  291. - width: 800
  292. height: 600
  293. method: scale
  294. # Is the preview URL API enabled? If enabled, you *must* specify
  295. # an explicit url_preview_ip_range_blacklist of IPs that the spider is
  296. # denied from accessing.
  297. url_preview_enabled: True
  298. # List of IP address CIDR ranges that the URL preview spider is denied
  299. # from accessing. There are no defaults: you must explicitly
  300. # specify a list for URL previewing to work. You should specify any
  301. # internal services in your network that you do not want synapse to try
  302. # to connect to, otherwise anyone in any Matrix room could cause your
  303. # synapse to issue arbitrary GET requests to your internal services,
  304. # causing serious security issues.
  305. #
  306. url_preview_ip_range_blacklist:
  307. - '127.0.0.0/8'
  308. - '10.0.0.0/8'
  309. - '172.16.0.0/12'
  310. - '192.168.0.0/16'
  311. - '100.64.0.0/10'
  312. - '169.254.0.0/16'
  313. - '::1/128'
  314. - 'fe80::/64'
  315. - 'fc00::/7'
  316. #
  317. # List of IP address CIDR ranges that the URL preview spider is allowed
  318. # to access even if they are specified in url_preview_ip_range_blacklist.
  319. # This is useful for specifying exceptions to wide-ranging blacklisted
  320. # target IP ranges - e.g. for enabling URL previews for a specific private
  321. # website only visible in your network.
  322. #
  323. # url_preview_ip_range_whitelist:
  324. # - '192.168.1.1'
  325. # Optional list of URL matches that the URL preview spider is
  326. # denied from accessing. You should use url_preview_ip_range_blacklist
  327. # in preference to this, otherwise someone could define a public DNS
  328. # entry that points to a private IP address and circumvent the blacklist.
  329. # This is more useful if you know there is an entire shape of URL that
  330. # you know that will never want synapse to try to spider.
  331. #
  332. # Each list entry is a dictionary of url component attributes as returned
  333. # by urlparse.urlsplit as applied to the absolute form of the URL. See
  334. # https://docs.python.org/2/library/urlparse.html#urlparse.urlsplit
  335. # The values of the dictionary are treated as an filename match pattern
  336. # applied to that component of URLs, unless they start with a ^ in which
  337. # case they are treated as a regular expression match. If all the
  338. # specified component matches for a given list item succeed, the URL is
  339. # blacklisted.
  340. #
  341. # url_preview_url_blacklist:
  342. # # blacklist any URL with a username in its URI
  343. # - username: '*'
  344. #
  345. # # blacklist all *.google.com URLs
  346. # - netloc: 'google.com'
  347. # - netloc: '*.google.com'
  348. #
  349. # # blacklist all plain HTTP URLs
  350. # - scheme: 'http'
  351. #
  352. # # blacklist http(s)://www.acme.com/foo
  353. # - netloc: 'www.acme.com'
  354. # path: '/foo'
  355. #
  356. # # blacklist any URL with a literal IPv4 address
  357. # - netloc: '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'
  358. # The largest allowed URL preview spidering size in bytes
  359. max_spider_size: "10M"
  360. ## Captcha ##
  361. # See docs/CAPTCHA_SETUP for full details of configuring this.
  362. # This Home Server's ReCAPTCHA public key.
  363. recaptcha_public_key: "YOUR_PUBLIC_KEY"
  364. # This Home Server's ReCAPTCHA private key.
  365. recaptcha_private_key: "YOUR_PRIVATE_KEY"
  366. # Enables ReCaptcha checks when registering, preventing signup
  367. # unless a captcha is answered. Requires a valid ReCaptcha
  368. # public/private key.
  369. enable_registration_captcha: False
  370. # A secret key used to bypass the captcha test entirely.
  371. #captcha_bypass_secret: "YOUR_SECRET_HERE"
  372. # The API endpoint to use for verifying m.login.recaptcha responses.
  373. recaptcha_siteverify_api: "https://www.google.com/recaptcha/api/siteverify"
  374. ## Turn ##
  375. # The public URIs of the TURN server to give to clients
  376. turn_uris: {{ matrix_synapse_turn_uris|to_json }}
  377. # The shared secret used to compute passwords for the TURN server
  378. turn_shared_secret: {{ matrix_synapse_turn_shared_secret|to_json }}
  379. # The Username and password if the TURN server needs them and
  380. # does not use a token
  381. #turn_username: "TURNSERVER_USERNAME"
  382. #turn_password: "TURNSERVER_PASSWORD"
  383. # How long generated TURN credentials last
  384. turn_user_lifetime: "1h"
  385. # Whether guests should be allowed to use the TURN server.
  386. # This defaults to True, otherwise VoIP will be unreliable for guests.
  387. # However, it does introduce a slight security risk as it allows users to
  388. # connect to arbitrary endpoints without having first signed up for a
  389. # valid account (e.g. by passing a CAPTCHA).
  390. turn_allow_guests: False
  391. ## Registration ##
  392. # Enable registration for new users.
  393. enable_registration: {{ matrix_synapse_enable_registration|to_json }}
  394. # The user must provide all of the below types of 3PID when registering.
  395. #
  396. # registrations_require_3pid:
  397. # - email
  398. # - msisdn
  399. # Mandate that users are only allowed to associate certain formats of
  400. # 3PIDs with accounts on this server.
  401. #
  402. # allowed_local_3pids:
  403. # - medium: email
  404. # pattern: ".*@matrix\.org"
  405. # - medium: email
  406. # pattern: ".*@vector\.im"
  407. # - medium: msisdn
  408. # pattern: "\+44"
  409. # If set, allows registration by anyone who also has the shared
  410. # secret, even if registration is otherwise disabled.
  411. registration_shared_secret: {{ matrix_synapse_registration_shared_secret|to_json }}
  412. # Set the number of bcrypt rounds used to generate password hash.
  413. # Larger numbers increase the work factor needed to generate the hash.
  414. # The default number is 12 (which equates to 2^12 rounds).
  415. # N.B. that increasing this will exponentially increase the time required
  416. # to register or login - e.g. 24 => 2^24 rounds which will take >20 mins.
  417. bcrypt_rounds: 12
  418. # Allows users to register as guests without a password/email/etc, and
  419. # participate in rooms hosted on this server which have been made
  420. # accessible to anonymous users.
  421. allow_guest_access: False
  422. # The list of identity servers trusted to verify third party
  423. # identifiers by this server.
  424. {% if matrix_synapse_trusted_third_party_id_servers|length > 0 %}
  425. trusted_third_party_id_servers:
  426. {{ matrix_synapse_trusted_third_party_id_servers|to_nice_yaml }}
  427. {% endif %}
  428. # Users who register on this homeserver will automatically be joined
  429. # to these rooms
  430. #auto_join_rooms:
  431. # - "#example:example.com"
  432. {% if matrix_synapse_auto_join_rooms|length > 0 %}
  433. auto_join_rooms:
  434. {{ matrix_synapse_auto_join_rooms|to_nice_yaml }}
  435. {% endif %}
  436. # Where auto_join_rooms are specified, setting this flag ensures that the
  437. # the rooms exist by creating them when the first user on the
  438. # homeserver registers.
  439. # Setting to false means that if the rooms are not manually created,
  440. # users cannot be auto-joined since they do not exist.
  441. autocreate_auto_join_rooms: {{ matrix_synapse_autocreate_auto_join_rooms }}
  442. ## Metrics ###
  443. # Enable collection and rendering of performance metrics
  444. enable_metrics: {{ matrix_synapse_metrics_enabled }}
  445. report_stats: {{ matrix_synapse_report_stats|to_json }}
  446. ## API Configuration ##
  447. # A list of event types that will be included in the room_invite_state
  448. room_invite_state_types:
  449. - "m.room.join_rules"
  450. - "m.room.canonical_alias"
  451. - "m.room.avatar"
  452. - "m.room.name"
  453. # A list of application service config file to use
  454. app_service_config_files: {{ matrix_synapse_app_service_config_files }}
  455. macaroon_secret_key: {{ matrix_synapse_macaroon_secret_key|to_json }}
  456. # Used to enable access token expiration.
  457. expire_access_token: False
  458. # a secret which is used to calculate HMACs for form values, to stop
  459. # falsification of values
  460. form_secret: {{ matrix_synapse_form_secret|to_json }}
  461. ## Signing Keys ##
  462. # Path to the signing key to sign messages with
  463. signing_key_path: "/data/{{ hostname_matrix }}.signing.key"
  464. # The keys that the server used to sign messages with but won't use
  465. # to sign new messages. E.g. it has lost its private key
  466. old_signing_keys: {}
  467. # "ed25519:auto":
  468. # # Base64 encoded public key
  469. # key: "The public part of your old signing key."
  470. # # Millisecond POSIX timestamp when the key expired.
  471. # expired_ts: 123456789123
  472. # How long key response published by this server is valid for.
  473. # Used to set the valid_until_ts in /key/v2 APIs.
  474. # Determines how quickly servers will query to check which keys
  475. # are still valid.
  476. key_refresh_interval: "1d" # 1 Day.
  477. # The trusted servers to download signing keys from.
  478. perspectives:
  479. servers:
  480. "matrix.org":
  481. verify_keys:
  482. "ed25519:auto":
  483. key: "Noi6WqcDj0QmPxCNQqgezwTlBKrfqehY1u2FyWP9uYw"
  484. # Enable SAML2 for registration and login. Uses pysaml2
  485. # config_path: Path to the sp_conf.py configuration file
  486. # idp_redirect_url: Identity provider URL which will redirect
  487. # the user back to /login/saml2 with proper info.
  488. # See pysaml2 docs for format of config.
  489. #saml2_config:
  490. # enabled: true
  491. # config_path: "/data/sp_conf.py"
  492. # idp_redirect_url: "http://{{ hostname_matrix }}/idp"
  493. # Enable CAS for registration and login.
  494. #cas_config:
  495. # enabled: true
  496. # server_url: "https://cas-server.com"
  497. # service_url: "https://homeserver.domain.com:8448"
  498. # #required_attributes:
  499. # # name: value
  500. # The JWT needs to contain a globally unique "sub" (subject) claim.
  501. #
  502. # jwt_config:
  503. # enabled: true
  504. # secret: "a secret"
  505. # algorithm: "HS256"
  506. # Enable password for login.
  507. password_config:
  508. enabled: true
  509. # Uncomment and change to a secret random string for extra security.
  510. # DO NOT CHANGE THIS AFTER INITIAL SETUP!
  511. pepper: {{ matrix_synapse_password_config_pepper|to_json }}
  512. # Enable sending emails for notification events
  513. # Defining a custom URL for Riot is only needed if email notifications
  514. # should contain links to a self-hosted installation of Riot; when set
  515. # the "app_name" setting is ignored.
  516. #
  517. # If your SMTP server requires authentication, the optional smtp_user &
  518. # smtp_pass variables should be used
  519. #
  520. {% if matrix_synapse_email_enabled %}
  521. email:
  522. enable_notifs: true
  523. smtp_host: {{ matrix_synapse_email_smtp_host|to_json }}
  524. smtp_port: {{ matrix_synapse_email_smtp_port|to_json }}
  525. require_transport_security: {{ matrix_synapse_email_smtp_require_transport_security|to_json }}
  526. notif_from: {{ matrix_synapse_email_notif_from|to_json }}
  527. app_name: Matrix
  528. notif_template_html: notif_mail.html
  529. notif_template_text: notif_mail.txt
  530. notif_for_new_users: True
  531. riot_base_url: {{ matrix_synapse_email_riot_base_url|to_json }}
  532. {% endif %}
  533. # password_providers:
  534. # - module: "ldap_auth_provider.LdapAuthProvider"
  535. # config:
  536. # enabled: true
  537. # uri: "ldap://ldap.example.com:389"
  538. # start_tls: true
  539. # base: "ou=users,dc=example,dc=com"
  540. # attributes:
  541. # uid: "cn"
  542. # mail: "email"
  543. # name: "givenName"
  544. # #bind_dn:
  545. # #bind_password:
  546. # #filter: "(objectClass=posixAccount)"
  547. {% if matrix_synapse_password_providers_enabled %}
  548. password_providers:
  549. {% if matrix_synapse_ext_password_provider_shared_secret_auth_enabled %}
  550. - module: "shared_secret_authenticator.SharedSecretAuthenticator"
  551. config:
  552. sharedSecret: {{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret|to_json }}
  553. {% endif %}
  554. {% if matrix_synapse_ext_password_provider_rest_auth_enabled %}
  555. - module: "rest_auth_provider.RestAuthProvider"
  556. config:
  557. endpoint: {{ matrix_synapse_ext_password_provider_rest_auth_endpoint|to_json }}
  558. policy:
  559. registration:
  560. username:
  561. enforceLowercase: {{ matrix_synapse_ext_password_provider_rest_auth_registration_enforce_lowercase }}
  562. profile:
  563. name: {{ matrix_synapse_ext_password_provider_rest_auth_registration_profile_name_autofill }}
  564. login:
  565. profile:
  566. name: {{ matrix_synapse_ext_password_provider_rest_auth_login_profile_name_autofill }}
  567. {% endif %}
  568. {% if matrix_synapse_ext_password_provider_ldap_enabled %}
  569. - module: "ldap_auth_provider.LdapAuthProvider"
  570. config:
  571. enabled: true
  572. uri: {{ matrix_synapse_ext_password_provider_ldap_uri|to_json }}
  573. start_tls: {{ matrix_synapse_ext_password_provider_ldap_start_tls|to_json }}
  574. base: {{ matrix_synapse_ext_password_provider_ldap_base|to_json }}
  575. attributes:
  576. uid: {{ matrix_synapse_ext_password_provider_ldap_attributes_uid|to_json }}
  577. mail: {{ matrix_synapse_ext_password_provider_ldap_attributes_mail|to_json }}
  578. name: {{ matrix_synapse_ext_password_provider_ldap_attributes_name|to_json }}
  579. bind_dn: {{ matrix_synapse_ext_password_provider_ldap_bind_dn|to_json }}
  580. bind_password: {{ matrix_synapse_ext_password_provider_ldap_bind_password|to_json }}
  581. filter: {{ matrix_synapse_ext_password_provider_ldap_filter|to_json }}
  582. {% endif %}
  583. {% endif %}
  584. # Clients requesting push notifications can either have the body of
  585. # the message sent in the notification poke along with other details
  586. # like the sender, or just the event ID and room ID (`event_id_only`).
  587. # If clients choose the former, this option controls whether the
  588. # notification request includes the content of the event (other details
  589. # like the sender are still included). For `event_id_only` push, it
  590. # has no effect.
  591. # For modern android devices the notification content will still appear
  592. # because it is loaded by the app. iPhone, however will send a
  593. # notification saying only that a message arrived and who it came from.
  594. #
  595. #push:
  596. # include_content: true
  597. # spam_checker:
  598. # module: "my_custom_project.SuperSpamChecker"
  599. # config:
  600. # example_option: 'things'
  601. # Whether to allow non server admins to create groups on this server
  602. enable_group_creation: false
  603. # If enabled, non server admins can only create groups with local parts
  604. # starting with this prefix
  605. # group_creation_prefix: "unofficial/"
  606. # User Directory configuration
  607. #
  608. # 'search_all_users' defines whether to search all users visible to your HS
  609. # when searching the user directory, rather than limiting to users visible
  610. # in public rooms. Defaults to false. If you set it True, you'll have to run
  611. # UPDATE user_directory_stream_pos SET stream_id = NULL;
  612. # on your database to tell it to rebuild the user_directory search indexes.
  613. #
  614. #user_directory:
  615. # search_all_users: false
  616. # User Consent configuration
  617. #
  618. # for detailed instructions, see
  619. # https://github.com/matrix-org/synapse/blob/master/docs/consent_tracking.md
  620. #
  621. # Parts of this section are required if enabling the 'consent' resource under
  622. # 'listeners', in particular 'template_dir' and 'version'.
  623. #
  624. # 'template_dir' gives the location of the templates for the HTML forms.
  625. # This directory should contain one subdirectory per language (eg, 'en', 'fr'),
  626. # and each language directory should contain the policy document (named as
  627. # '<version>.html') and a success page (success.html).
  628. #
  629. # 'version' specifies the 'current' version of the policy document. It defines
  630. # the version to be served by the consent resource if there is no 'v'
  631. # parameter.
  632. #
  633. # 'server_notice_content', if enabled, will send a user a "Server Notice"
  634. # asking them to consent to the privacy policy. The 'server_notices' section
  635. # must also be configured for this to work. Notices will *not* be sent to
  636. # guest users unless 'send_server_notice_to_guests' is set to true.
  637. #
  638. # 'block_events_error', if set, will block any attempts to send events
  639. # until the user consents to the privacy policy. The value of the setting is
  640. # used as the text of the error.
  641. #
  642. # 'require_at_registration', if enabled, will add a step to the registration
  643. # process, similar to how captcha works. Users will be required to accept the
  644. # policy before their account is created.
  645. #
  646. # 'policy_name' is the display name of the policy users will see when registering
  647. # for an account. Has no effect unless `require_at_registration` is enabled.
  648. # Defaults to "Privacy Policy".
  649. #
  650. # user_consent:
  651. # template_dir: res/templates/privacy
  652. # version: 1.0
  653. # server_notice_content:
  654. # msgtype: m.text
  655. # body: >-
  656. # To continue using this homeserver you must review and agree to the
  657. # terms and conditions at %(consent_uri)s
  658. # send_server_notice_to_guests: True
  659. # block_events_error: >-
  660. # To continue using this homeserver you must review and agree to the
  661. # terms and conditions at %(consent_uri)s
  662. # require_at_registration: False
  663. # policy_name: Privacy Policy
  664. #
  665. # Server Notices room configuration
  666. #
  667. # Uncomment this section to enable a room which can be used to send notices
  668. # from the server to users. It is a special room which cannot be left; notices
  669. # come from a special "notices" user id.
  670. #
  671. # If you uncomment this section, you *must* define the system_mxid_localpart
  672. # setting, which defines the id of the user which will be used to send the
  673. # notices.
  674. #
  675. # It's also possible to override the room name, the display name of the
  676. # "notices" user, and the avatar for the user.
  677. #
  678. # server_notices:
  679. # system_mxid_localpart: notices
  680. # system_mxid_display_name: "Server Notices"
  681. # system_mxid_avatar_url: "mxc://server.com/oumMVlgDnLYFaPVkExemNVVZ"
  682. # room_name: "Server Notices"
  683. # The `alias_creation` option controls who's allowed to create aliases
  684. # on this server.
  685. #
  686. # The format of this option is a list of rules that contain globs that
  687. # match against user_id and the new alias (fully qualified with server
  688. # name). The action in the first rule that matches is taken, which can
  689. # currently either be "allow" or "deny".
  690. #
  691. # If no rules match the request is denied.
  692. alias_creation_rules:
  693. - user_id: "*"
  694. alias: "*"
  695. action: allow