Matrix Docker Ansible eploy
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

685 строки
41 KiB

  1. # SPDX-FileCopyrightText: 2024 - 2025 Slavi Pantaleev
  2. # SPDX-FileCopyrightText: 2025 Suguru Hirahara
  3. #
  4. # SPDX-License-Identifier: AGPL-3.0-or-later
  5. ---
  6. # matrix-authentication-service (MAS) is an OAuth 2.0 and OpenID Provider server for Matrix.
  7. # Project source code URL: https://github.com/element-hq/matrix-authentication-service
  8. matrix_authentication_service_enabled: true
  9. matrix_authentication_service_hostname: ''
  10. # Controls the path prefix for the authentication service.
  11. # This value must either be `/` or not end with a slash (e.g. `/auth`).
  12. matrix_authentication_service_path_prefix: /
  13. matrix_authentication_service_container_image_self_build: false
  14. matrix_authentication_service_container_repo: "https://github.com/element-hq/matrix-authentication-service.git"
  15. matrix_authentication_service_container_repo_version: "{{ 'main' if matrix_authentication_service_version == 'latest' else ('v' + matrix_authentication_service_version) }}"
  16. matrix_authentication_service_container_src_files_path: "{{ matrix_base_data_path }}/matrix-authentication-service/container-src"
  17. # renovate: datasource=docker depName=ghcr.io/element-hq/matrix-authentication-service
  18. matrix_authentication_service_version: 1.13.0
  19. matrix_authentication_service_container_image_registry_prefix: "{{ 'localhost/' if matrix_authentication_service_container_image_self_build else matrix_authentication_service_container_image_registry_prefix_upstream }}"
  20. matrix_authentication_service_container_image_registry_prefix_upstream: "{{ matrix_authentication_service_container_image_registry_prefix_upstream_default }}"
  21. matrix_authentication_service_container_image_registry_prefix_upstream_default: "ghcr.io/"
  22. matrix_authentication_service_container_image: "{{ matrix_authentication_service_container_image_registry_prefix }}element-hq/matrix-authentication-service:{{ matrix_authentication_service_version }}"
  23. matrix_authentication_service_container_image_force_pull: "{{ matrix_authentication_service_container_image.endswith(':latest') }}"
  24. matrix_authentication_service_base_path: "{{ matrix_base_data_path }}/matrix-authentication-service"
  25. matrix_authentication_service_bin_path: "{{ matrix_authentication_service_base_path }}/bin"
  26. matrix_authentication_service_config_path: "{{ matrix_authentication_service_base_path }}/config"
  27. matrix_authentication_service_data_path: "{{ matrix_authentication_service_base_path }}/data"
  28. matrix_authentication_service_data_keys_path: "{{ matrix_authentication_service_data_path }}/keys"
  29. matrix_authentication_service_uid: "{{ matrix_user_uid }}"
  30. matrix_authentication_service_gid: "{{ matrix_user_gid }}"
  31. matrix_authentication_service_container_network: ""
  32. matrix_authentication_service_container_additional_networks: "{{ matrix_authentication_service_container_additional_networks_auto + matrix_authentication_service_container_additional_networks_custom }}"
  33. matrix_authentication_service_container_additional_networks_auto: []
  34. matrix_authentication_service_container_additional_networks_custom: []
  35. # A list of extra arguments to pass to the container
  36. matrix_authentication_service_container_extra_arguments: []
  37. # List of systemd services that matrix-authentication-service.service depends on
  38. matrix_authentication_service_systemd_required_services_list: "{{ matrix_authentication_service_systemd_required_services_list_default + matrix_authentication_service_systemd_required_services_list_auto + matrix_authentication_service_systemd_required_services_list_custom }}"
  39. matrix_authentication_service_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
  40. matrix_authentication_service_systemd_required_services_list_auto: []
  41. matrix_authentication_service_systemd_required_services_list_custom: []
  42. # List of systemd services that matrix-authentication-service.service wants
  43. matrix_authentication_service_systemd_wanted_services_list: "{{ matrix_authentication_service_systemd_wanted_services_list_auto + matrix_authentication_service_systemd_wanted_services_list_custom }}"
  44. matrix_authentication_service_systemd_wanted_services_list_auto: []
  45. matrix_authentication_service_systemd_wanted_services_list_custom: []
  46. ########################################################################################
  47. # #
  48. # Key management #
  49. # #
  50. ########################################################################################
  51. # Controls whether the playbook will manage the secrets keys for you.
  52. #
  53. # See:
  54. # - matrix_authentication_service_config_secrets_keys
  55. # - matrix_authentication_service_key_management_*
  56. matrix_authentication_service_key_management_enabled: true
  57. matrix_authentication_service_key_management_list: "{{ matrix_authentication_service_key_management_list_default + matrix_authentication_service_key_management_list_custom }}"
  58. matrix_authentication_service_key_management_list_default: |-
  59. {{
  60. (
  61. ([
  62. {
  63. "config": {
  64. "kid": matrix_authentication_service_key_management_rsa_2048_key_id,
  65. "key_file": ("/keys/" + matrix_authentication_service_key_management_rsa_2048_key_file),
  66. },
  67. "key_file": matrix_authentication_service_key_management_rsa_2048_key_file,
  68. "generation_command": matrix_authentication_service_key_management_rsa_2048_generation_command,
  69. }
  70. ] if matrix_authentication_service_key_management_rsa_2048_enabled else [])
  71. +
  72. ([
  73. {
  74. "config": {
  75. "kid": matrix_authentication_service_key_management_ecdsa_p256_key_id,
  76. "key_file": ("/keys/" + matrix_authentication_service_key_management_ecdsa_p256_key_file),
  77. },
  78. "key_file": matrix_authentication_service_key_management_ecdsa_p256_key_file,
  79. "generation_command": matrix_authentication_service_key_management_ecdsa_p256_generation_command,
  80. }
  81. ] if matrix_authentication_service_key_management_ecdsa_p256_enabled else [])
  82. +
  83. ([
  84. {
  85. "config": {
  86. "kid": matrix_authentication_service_key_management_ecdsa_p384_key_id,
  87. "key_file": ("/keys/" + matrix_authentication_service_key_management_ecdsa_p384_key_file),
  88. },
  89. "key_file": matrix_authentication_service_key_management_ecdsa_p384_key_file,
  90. "generation_command": matrix_authentication_service_key_management_ecdsa_p384_generation_command,
  91. }
  92. ] if matrix_authentication_service_key_management_ecdsa_p384_enabled else [])
  93. +
  94. ([
  95. {
  96. "config": {
  97. "kid": matrix_authentication_service_key_management_ecdsa_k256_key_id,
  98. "key_file": ("/keys/" + matrix_authentication_service_key_management_ecdsa_k256_key_file),
  99. },
  100. "key_file": matrix_authentication_service_key_management_ecdsa_k256_key_file,
  101. "generation_command": matrix_authentication_service_key_management_ecdsa_k256_generation_command,
  102. }
  103. ] if matrix_authentication_service_key_management_ecdsa_k256_enabled else [])
  104. )
  105. if matrix_authentication_service_key_management_enabled
  106. else []
  107. }}
  108. matrix_authentication_service_key_management_list_custom: []
  109. matrix_authentication_service_key_management_rsa_2048_enabled: true
  110. matrix_authentication_service_key_management_rsa_2048_key_id: default-rsa
  111. matrix_authentication_service_key_management_rsa_2048_key_file: rsa-2048.priv.pem
  112. matrix_authentication_service_key_management_rsa_2048_generation_command: "openssl genpkey -algorithm RSA -out __KEY_FILE_PATH__ -pkeyopt rsa_keygen_bits:2048"
  113. matrix_authentication_service_key_management_ecdsa_p256_enabled: true
  114. matrix_authentication_service_key_management_ecdsa_p256_key_id: default-ecdsa-p256
  115. matrix_authentication_service_key_management_ecdsa_p256_key_file: ecdsa-p256.priv.pem
  116. matrix_authentication_service_key_management_ecdsa_p256_generation_command: "openssl genpkey -algorithm EC -pkeyopt ec_paramgen_curve:prime256v1 -out __KEY_FILE_PATH__ -outform PEM"
  117. matrix_authentication_service_key_management_ecdsa_p384_enabled: true
  118. matrix_authentication_service_key_management_ecdsa_p384_key_id: default-ecdsa-p384
  119. matrix_authentication_service_key_management_ecdsa_p384_key_file: ecdsa-p384.priv.pem
  120. matrix_authentication_service_key_management_ecdsa_p384_generation_command: "openssl genpkey -algorithm EC -pkeyopt ec_paramgen_curve:secp384r1 -out __KEY_FILE_PATH__ -outform PEM"
  121. matrix_authentication_service_key_management_ecdsa_k256_enabled: true
  122. matrix_authentication_service_key_management_ecdsa_k256_key_id: default-ecdsa-k256
  123. matrix_authentication_service_key_management_ecdsa_k256_key_file: ecdsa-k256.priv.pem
  124. matrix_authentication_service_key_management_ecdsa_k256_generation_command: "openssl genpkey -algorithm EC -pkeyopt ec_paramgen_curve:secp256k1 -out __KEY_FILE_PATH__ -outform PEM"
  125. ########################################################################################
  126. # #
  127. # /Key management #
  128. # #
  129. ########################################################################################
  130. ########################################################################################
  131. # #
  132. # Email configuration #
  133. # #
  134. ########################################################################################
  135. # Controls the `email.from` configuration setting.
  136. matrix_authentication_service_config_email_from: '"{{ matrix_authentication_service_config_email_from_name }}" <{{ matrix_authentication_service_config_email_from_address }}>'
  137. matrix_authentication_service_config_email_from_name: 'Matrix Authentication Service'
  138. matrix_authentication_service_config_email_from_address: "matrix@{{ matrix_domain }}"
  139. # Controls the `email.reply_to` configuration setting.
  140. matrix_authentication_service_config_email_reply_to: '"{{ matrix_authentication_service_config_email_reply_to_name }}" <{{ matrix_authentication_service_config_email_reply_to_address }}>'
  141. matrix_authentication_service_config_email_reply_to_name: "{{ matrix_authentication_service_config_email_from_name }}"
  142. matrix_authentication_service_config_email_reply_to_address: "{{ matrix_authentication_service_config_email_from_address }}"
  143. # Controls the `email.transport` configuration setting.
  144. #
  145. # Valid values: blackhole, smtp, aws_ses
  146. # Upstream reports that `sendmail` is supported as well,
  147. # but this is not true when running it in a container image due to the `sendmail` binary not being included.
  148. matrix_authentication_service_config_email_transport: blackhole
  149. # Controls the `email.mode` configuration setting for SMTP.
  150. # Valid values: plain, tls, starttls
  151. matrix_authentication_service_config_email_mode: plain
  152. # Controls the `email.hostname` configuration setting for SMTP.
  153. matrix_authentication_service_config_email_hostname: ""
  154. # Controls the `email.port` configuration setting for SMTP.
  155. matrix_authentication_service_config_email_port: 587
  156. # Controls the `email.username` configuration setting for SMTP.
  157. matrix_authentication_service_config_email_username: ""
  158. # Controls the `email.password` configuration setting for SMTP.
  159. matrix_authentication_service_config_email_password: ""
  160. ########################################################################################
  161. # #
  162. # /Email configuration #
  163. # #
  164. ########################################################################################
  165. ########################################################################################
  166. # #
  167. # Account configuration #
  168. # #
  169. ########################################################################################
  170. # Controls the `account.email_change_allowed` configuration setting.
  171. #
  172. # Whether users are allowed to change their email addresses.
  173. matrix_authentication_service_config_account_email_change_allowed: true
  174. # Controls the `account.displayname_change_allowed` configuration setting.
  175. #
  176. # Whether users are allowed to change their display names.
  177. # This should be in sync with the policy in the homeserver configuration.
  178. matrix_authentication_service_config_account_displayname_change_allowed: true
  179. # Controls the `account.password_registration_enabled` configuration setting.
  180. #
  181. # Whether to enable self-service password registration.
  182. # This has no effect if password login is disabled.
  183. matrix_authentication_service_config_account_password_registration_enabled: false
  184. # Controls the `account.password_registration_email_required` configuration setting.
  185. #
  186. # Whether self-service password registrations require a valid email.
  187. matrix_authentication_service_config_account_password_registration_email_required: true
  188. # Controls the `account.password_change_allowed` configuration setting.
  189. #
  190. # Whether users are allowed to change their passwords.
  191. # This has no effect if password login is disabled.
  192. matrix_authentication_service_config_account_password_change_allowed: true
  193. # Controls the `account.password_recovery_enabled` configuration setting.
  194. #
  195. # Whether email-based password recovery is enabled.
  196. # This has no effect if password login is disabled.
  197. matrix_authentication_service_config_account_password_recovery_enabled: false
  198. # Controls the `account.account_deactivation_allowed` configuration setting.
  199. #
  200. # Whether users are allowed to delete their own account
  201. matrix_authentication_service_config_account_account_deactivation_allowed: true
  202. # Controls the `account.login_with_email_allowed` configuration setting.
  203. #
  204. # Whether users can log in with their email address.
  205. # This has no effect if password login is disabled.
  206. matrix_authentication_service_config_account_login_with_email_allowed: false
  207. # Controls the `account.registration_token_required` configuration setting.
  208. #
  209. # Whether registration tokens are required for password registrations.
  210. # When enabled, users must provide a valid registration token during password
  211. # registration. This has no effect if password registration is disabled.
  212. matrix_authentication_service_config_account_registration_token_required: false
  213. ########################################################################################
  214. # #
  215. # /Account configuration #
  216. # #
  217. ########################################################################################
  218. ########################################################################################
  219. # #
  220. # Database configuration #
  221. # #
  222. ########################################################################################
  223. # Controls the `database.username` configuration setting.
  224. matrix_authentication_service_config_database_username: 'matrix_authentication_service'
  225. # Controls the `database.password` configuration setting.
  226. matrix_authentication_service_config_database_password: ''
  227. # Controls the `database.host` configuration setting.
  228. matrix_authentication_service_config_database_host: ''
  229. # Controls the `database.port` configuration setting.
  230. matrix_authentication_service_config_database_port: 5432
  231. # Controls the `database.database` configuration setting.
  232. matrix_authentication_service_config_database_database: 'matrix_authentication_service'
  233. # Controls the `database.ssl_mode` configuration setting.
  234. matrix_authentication_service_config_database_ssl_mode: disable
  235. # Controls the `database.max_connections` configuration setting.
  236. matrix_authentication_service_config_database_max_connections: 10
  237. # Controls the `database.min_connections` configuration setting.
  238. matrix_authentication_service_config_database_min_connections: 0
  239. # Controls the `database.connect_timeout` configuration setting.
  240. matrix_authentication_service_config_database_connect_timeout: 30
  241. # Controls the `database.idle_timeout` configuration setting.
  242. matrix_authentication_service_config_database_idle_timeout: 600
  243. # Controls the `database.max_lifetime` configuration setting.
  244. matrix_authentication_service_config_database_max_lifetime: 1800
  245. # Controls whether the database connection is made via a UNIX socket.
  246. matrix_authentication_service_config_database_socket_enabled: false
  247. # The path to the Postgres socket's parent directory inside the MAS container.
  248. matrix_authentication_service_config_database_socket_path: "/run-postgres"
  249. # The path to the Postgres socket directory on the host (bind-mount source).
  250. matrix_authentication_service_config_database_socket_path_host: ""
  251. ########################################################################################
  252. # #
  253. # /Database configuration #
  254. # #
  255. ########################################################################################
  256. ########################################################################################
  257. # #
  258. # Secrets configuration #
  259. # #
  260. ########################################################################################
  261. # Controls the `secrets.encryption` configuration setting.
  262. matrix_authentication_service_config_secrets_encryption: ''
  263. # Controls the `secrets.keys` configuration setting.
  264. matrix_authentication_service_config_secrets_keys: |-
  265. {{
  266. matrix_authentication_service_key_management_list | map(attribute='config') | list
  267. if matrix_authentication_service_key_management_enabled
  268. else []
  269. }}
  270. ########################################################################################
  271. # #
  272. # /Secrets configuration #
  273. # #
  274. ########################################################################################
  275. ########################################################################################
  276. # #
  277. # HTTP configuration #
  278. # #
  279. ########################################################################################
  280. # Controls the resources exposed by the `web` HTTP listener.
  281. matrix_authentication_service_config_http_listener_web_resources: "{{ matrix_authentication_service_config_http_listener_web_resources_default + matrix_authentication_service_config_http_listener_web_resources_auto + matrix_authentication_service_config_http_listener_web_resources_custom }}"
  282. matrix_authentication_service_config_http_listener_web_resources_default: |-
  283. {{
  284. [
  285. {'name': 'discovery'},
  286. {'name': 'human'},
  287. {'name': 'oauth'},
  288. {'name': 'compat'},
  289. {'name': 'graphql'},
  290. {'name': 'assets'},
  291. ]
  292. +
  293. ([{'name': 'adminapi'}] if matrix_authentication_service_admin_api_enabled else [])
  294. }}
  295. matrix_authentication_service_config_http_listener_web_resources_auto: []
  296. matrix_authentication_service_config_http_listener_web_resources_custom: []
  297. # Controls the `http.public_base` configuration setting.
  298. matrix_authentication_service_config_http_public_base: "https://{{ matrix_authentication_service_hostname }}{{ '/' if matrix_authentication_service_path_prefix == '/' else (matrix_authentication_service_path_prefix + '/') }}"
  299. # Controls the `http.issuer` configuration setting.
  300. matrix_authentication_service_config_http_issuer: "{{ matrix_authentication_service_config_http_public_base }}"
  301. # Controls the `http.trusted_proxies` configuration setting.
  302. matrix_authentication_service_config_http_trusted_proxies:
  303. - 192.168.0.0/16
  304. - 172.16.0.0/12
  305. - 10.0.0.0/10
  306. - 127.0.0.1/8
  307. - fd00::/8
  308. - ::1/128
  309. ########################################################################################
  310. # #
  311. # /HTTP configuration #
  312. # #
  313. ########################################################################################
  314. ########################################################################################
  315. # #
  316. # Matrix configuration #
  317. # #
  318. ########################################################################################
  319. # Controls the `matrix.homeserver` configuration setting.
  320. # The homeserver name, as per the `server_name` in the Synapse configuration file.
  321. matrix_authentication_service_config_matrix_homeserver: ""
  322. # Controls the `matrix.endpoint` configuration setting.
  323. # URL to which the homeserver is accessible from the service.
  324. matrix_authentication_service_config_matrix_endpoint: ""
  325. # Controls the `matrix.secret` configuration setting.
  326. matrix_authentication_service_config_matrix_secret: ""
  327. ########################################################################################
  328. # #
  329. # /Matrix configuration #
  330. # #
  331. ########################################################################################
  332. ########################################################################################
  333. # #
  334. # Passwords configuration #
  335. # #
  336. ########################################################################################
  337. # Controls the `passwords.enabled` configuration setting.
  338. # Whether to enable the password database.
  339. # If disabled, users will only be able to log in using upstream OIDC providers.
  340. matrix_authentication_service_config_passwords_enabled: true
  341. # Controls the `passwords.schemes` configuration setting.
  342. # List of password hashing schemes being used.
  343. # Only change this if you know what you're doing.
  344. matrix_authentication_service_config_passwords_schemes:
  345. - version: 1
  346. algorithm: argon2id
  347. # Controls the `passwords.minimum_complexity` configuration setting.
  348. # Minimum complexity required for passwords, estimated by the zxcvbn algorithm.
  349. # Must be between 0 and 4. Default is 3.
  350. # See https://github.com/dropbox/zxcvbn#usage for more information.
  351. matrix_authentication_service_config_passwords_minimum_complexity: 3
  352. ########################################################################################
  353. # #
  354. # /Passwords configuration #
  355. # #
  356. ########################################################################################
  357. ########################################################################################
  358. # #
  359. # Clients configuration #
  360. # #
  361. ########################################################################################
  362. # Controls the `clients` configuration setting.
  363. # List of clients to be used by the authentication service.
  364. #
  365. # See:
  366. # - https://element-hq.github.io/matrix-authentication-service/reference/configuration.html#clients
  367. # - https://element-hq.github.io/matrix-authentication-service/setup/homeserver.html#provision-a-client-for-the-homeserver-to-use
  368. #
  369. # To define your own, use `matrix_authentication_service_config_clients_custom`.
  370. matrix_authentication_service_config_clients: "{{ matrix_authentication_service_config_clients_auto + matrix_authentication_service_config_clients_custom }}"
  371. matrix_authentication_service_config_clients_auto: []
  372. matrix_authentication_service_config_clients_custom: []
  373. ########################################################################################
  374. # #
  375. # /Clients configuration #
  376. # #
  377. ########################################################################################
  378. ########################################################################################
  379. # #
  380. # Upstream OAuth2 configuration #
  381. # #
  382. ########################################################################################
  383. # Controls the `upstream_oauth2.providers` configuration setting.
  384. # See:
  385. # - https://element-hq.github.io/matrix-authentication-service/reference/configuration.html#upstream_oauth2providers
  386. matrix_authentication_service_config_upstream_oauth2_providers: []
  387. ########################################################################################
  388. # #
  389. # /Upstream OAuth2 configuration #
  390. # #
  391. ########################################################################################
  392. # Holds the final Matrix Authentication Service configuration (a combination of the default and its extension).
  393. # You most likely don't need to touch this variable. Instead, see `matrix_authentication_service_configuration_yaml` or `matrix_authentication_service_configuration_extension_yaml`.
  394. matrix_authentication_service_configuration: "{{ matrix_authentication_service_configuration_yaml | from_yaml | combine(matrix_authentication_service_configuration_extension, recursive=True) }}"
  395. # Default Matrix Authentication Service configuration template which covers the generic use case.
  396. # You can customize it by controlling the various variables inside it.
  397. #
  398. # For a more advanced customization, you can extend the default (see `matrix_authentication_service_configuration_extension_yaml`)
  399. # or completely replace this variable with your own template.
  400. matrix_authentication_service_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}"
  401. matrix_authentication_service_configuration_extension_yaml: |
  402. # Your custom YAML configuration for Matrix Authentication Service goes here.
  403. # This configuration extends the default starting configuration (`matrix_authentication_service_configuration_yaml`).
  404. #
  405. # You can override individual variables from the default configuration, or introduce new ones.
  406. #
  407. # If you need something more special, you can take full control by
  408. # completely redefining `matrix_authentication_service_configuration_yaml`.
  409. #
  410. # Example configuration extension follows:
  411. #
  412. # user:
  413. # password: something
  414. matrix_authentication_service_configuration_extension: "{{ matrix_authentication_service_configuration_extension_yaml | from_yaml if matrix_authentication_service_configuration_extension_yaml | from_yaml is mapping else {} }}"
  415. # Additional environment variables to pass to the Matrix Authentication Service container.
  416. #
  417. # Environment variables take priority over settings in the configuration file.
  418. #
  419. # Example:
  420. # matrix_authentication_service_environment_variables_extension: |
  421. # KEY=value
  422. matrix_authentication_service_environment_variables_extension: ''
  423. ########################################################################################
  424. # #
  425. # Labels #
  426. # #
  427. ########################################################################################
  428. # matrix_authentication_service_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container.
  429. # See `../templates/labels.j2` for details.
  430. #
  431. # To inject your own other container labels, see `matrix_authentication_service_container_labels_additional_labels`.
  432. matrix_authentication_service_container_labels_traefik_enabled: true
  433. matrix_authentication_service_container_labels_traefik_docker_network: "{{ matrix_authentication_service_container_network }}"
  434. matrix_authentication_service_container_labels_traefik_entrypoints: web-secure
  435. matrix_authentication_service_container_labels_traefik_tls_certResolver: default # noqa var-naming
  436. matrix_authentication_service_container_labels_public_main_hostname: "{{ matrix_authentication_service_hostname }}"
  437. # The path prefix must either be `/` or not end with a slash (e.g. `/auth`).
  438. matrix_authentication_service_container_labels_public_main_path_prefix: "{{ matrix_authentication_service_path_prefix }}"
  439. matrix_authentication_service_container_labels_public_main_rule: "Host(`{{ matrix_authentication_service_container_labels_public_main_hostname }}`){% if matrix_authentication_service_container_labels_public_main_path_prefix != '/' %} && PathPrefix(`{{ matrix_authentication_service_container_labels_public_main_path_prefix }}`){% endif %}"
  440. matrix_authentication_service_container_labels_public_main_priority: 0
  441. matrix_authentication_service_container_labels_public_main_entrypoints: "{{ matrix_authentication_service_container_labels_traefik_entrypoints }}"
  442. matrix_authentication_service_container_labels_public_main_tls: "{{ matrix_authentication_service_container_labels_public_main_entrypoints != 'web' }}"
  443. matrix_authentication_service_container_labels_public_main_tls_certResolver: "{{ matrix_authentication_service_container_labels_traefik_tls_certResolver }}" # noqa var-naming
  444. # Controls whether labels will be added to expose the compatibility layer publicly.
  445. #
  446. # The service exposes a compatibility layer to allow legacy clients to authenticate using the service.
  447. # This works by exposing a few Matrix endpoints that should be proxied to the service.
  448. # The following Matrix Client-Server API endpoints need to be handled by the authentication service:
  449. # - /_matrix/client/*/login
  450. # - /_matrix/client/*/logout
  451. # - /_matrix/client/*/refresh
  452. #
  453. # See:
  454. # - https://element-hq.github.io/matrix-authentication-service/setup/homeserver.html#set-up-the-compatibility-layer
  455. # - https://element-hq.github.io/matrix-authentication-service/setup/reverse-proxy.html#compatibility-layer
  456. #
  457. # Regardless of whether this is enabled, it may or may not take effect due to the value of other variables.
  458. # See `matrix_authentication_service_container_labels_traefik_enabled`.
  459. matrix_authentication_service_container_labels_public_compatibility_layer_enabled: false
  460. matrix_authentication_service_container_labels_public_compatibility_layer_hostname: ""
  461. matrix_authentication_service_container_labels_public_compatibility_layer_path_regexp: "^/_matrix/client/(?P<version>([^/]+))/(?P<endpoint>(login|logout|refresh))"
  462. matrix_authentication_service_container_labels_public_compatibility_layer_rule: "Host(`{{ matrix_authentication_service_container_labels_public_compatibility_layer_hostname }}`) && PathRegexp(`{{ matrix_authentication_service_container_labels_public_compatibility_layer_path_regexp }}`)"
  463. matrix_authentication_service_container_labels_public_compatibility_layer_priority: 0
  464. matrix_authentication_service_container_labels_public_compatibility_layer_entrypoints: "{{ matrix_authentication_service_container_labels_traefik_entrypoints }}"
  465. matrix_authentication_service_container_labels_public_compatibility_layer_tls: "{{ matrix_authentication_service_container_labels_public_compatibility_layer_entrypoints != 'web' }}"
  466. matrix_authentication_service_container_labels_public_compatibility_layer_tls_certResolver: "{{ matrix_authentication_service_container_labels_traefik_tls_certResolver }}" # noqa var-naming
  467. # Controls whether labels will be added to expose the compatibility layer on the internal Traefik entrypoint.
  468. # This is similar to `matrix_authentication_service_container_labels_public_compatibility_layer_enabled`, but the entrypoint and intent is different.
  469. # Regardless of whether this is enabled, it may or may not take effect due to the value of other variables.
  470. # See `matrix_authentication_service_container_labels_traefik_enabled`
  471. matrix_authentication_service_container_labels_internal_compatibility_layer_enabled: false
  472. matrix_authentication_service_container_labels_internal_compatibility_layer_path_regexp: "{{ matrix_authentication_service_container_labels_public_compatibility_layer_path_regexp }}"
  473. matrix_authentication_service_container_labels_internal_compatibility_layer_rule: "PathRegexp(`{{ matrix_authentication_service_container_labels_internal_compatibility_layer_path_regexp }}`)"
  474. matrix_authentication_service_container_labels_internal_compatibility_layer_priority: 0
  475. matrix_authentication_service_container_labels_internal_compatibility_layer_entrypoints: ""
  476. # Controls which additional headers to attach to all HTTP responses.
  477. # To add your own headers, use `matrix_authentication_service_container_labels_traefik_additional_response_headers_custom`
  478. matrix_authentication_service_container_labels_traefik_additional_response_headers: "{{ matrix_authentication_service_container_labels_traefik_additional_response_headers_auto | combine(matrix_authentication_service_container_labels_traefik_additional_response_headers_custom) }}"
  479. matrix_authentication_service_container_labels_traefik_additional_response_headers_auto: {}
  480. matrix_authentication_service_container_labels_traefik_additional_response_headers_custom: {}
  481. # matrix_authentication_service_container_labels_additional_labels contains a multiline string with additional labels to add to the container label file.
  482. # See `../templates/labels.j2` for details.
  483. #
  484. # Example:
  485. # matrix_authentication_service_container_labels_additional_labels: |
  486. # my.label=1
  487. # another.label="here"
  488. matrix_authentication_service_container_labels_additional_labels: ''
  489. ########################################################################################
  490. # #
  491. # /Labels #
  492. # #
  493. ########################################################################################
  494. ########################################################################################
  495. # #
  496. # syn2mas configuration #
  497. # #
  498. ########################################################################################
  499. matrix_authentication_service_syn2mas_start_wait_time_seconds: 5
  500. # The syn2mas sub-command to run.
  501. # Valid values: migrate, check
  502. matrix_authentication_service_syn2mas_subcommand: migrate
  503. # Whether to pass a `--dry-run` flag to the 'migrate' sub-command.
  504. # See `matrix_authentication_service_syn2mas_subcommand`
  505. matrix_authentication_service_syn2mas_migrate_dry_run: false
  506. # Path to Synapse's homeserver.yaml configuration file.
  507. matrix_authentication_service_syn2mas_synapse_homeserver_config_path: ""
  508. matrix_authentication_service_syn2mas_container_network: "{{ matrix_authentication_service_container_network }}"
  509. matrix_authentication_service_syn2mas_synapse_database_socket_enabled: false
  510. matrix_authentication_service_syn2mas_synapse_database_socket_path: ""
  511. matrix_authentication_service_syn2mas_synapse_database_socket_path_host: ""
  512. # Additional options passed to the syn2mas sub-command (e.g. `mas-cli syn2mas [OPTIONS] migrate|check`).
  513. # Also see: `matrix_authentication_service_syn2mas_subcommand_extra_options`
  514. #
  515. # Example:
  516. # matrix_authentication_service_syn2mas_command_extra_options:
  517. # - "--something"
  518. matrix_authentication_service_syn2mas_command_extra_options: []
  519. # Additional options passed to the syn2mas sub-command (e.g. `mas-cli syn2mas migrate|check [OPTIONS]`).
  520. # Also see: `matrix_authentication_service_syn2mas_command_extra_options`
  521. #
  522. # Example:
  523. # matrix_authentication_service_syn2mas_subcommand_extra_options:
  524. # - "--dry-run"
  525. matrix_authentication_service_syn2mas_subcommand_extra_options: []
  526. ########################################################################################
  527. # #
  528. # /syn2mas configuration #
  529. # #
  530. ########################################################################################
  531. ########################################################################################
  532. # #
  533. # Misc #
  534. # #
  535. ########################################################################################
  536. # Controls whether a migration from a homeserver user database to Matrix Authentication Service is in progress.
  537. #
  538. # When this is set to `true`, the playbook will:
  539. #
  540. # - disable the integration between the homeserver and Matrix Authentication Service
  541. # - avoid setting up the "compatibility layer" (that is, avoid installing container labels that capture login endpoints like `/_matrix/client/*/login`, etc.)
  542. matrix_authentication_service_migration_in_progress: false
  543. # Controls whether the admin API is enabled.
  544. # Ref: https://element-hq.github.io/matrix-authentication-service/topics/admin-api.html#enabling-the-api
  545. matrix_authentication_service_admin_api_enabled: false
  546. # matrix_authentication_service_restart_necessary controls whether the service
  547. # will be restarted (when true) or merely started (when false) by the
  548. # systemd service manager role (when conditional restart is enabled).
  549. #
  550. # This value is automatically computed during installation based on whether
  551. # any configuration files, the systemd service file, or the container image changed.
  552. # The default of `false` means "no restart needed" — appropriate when the role's
  553. # installation tasks haven't run (e.g., due to --tags skipping them).
  554. matrix_authentication_service_restart_necessary: false
  555. ########################################################################################
  556. # #
  557. # /Misc #
  558. # #
  559. ########################################################################################