diff --git a/roles/web-app-matrix/meta/services.yml b/roles/web-app-matrix/meta/services.yml index 1b9c8afaa6..7994426cb1 100644 --- a/roles/web-app-matrix/meta/services.yml +++ b/roles/web-app-matrix/meta/services.yml @@ -106,6 +106,7 @@ element: version: v1.12.33 image: vectorim/element-web name: matrix-element + force_verification: true ports: local: http: 8022 diff --git a/roles/web-app-matrix/meta/variants.yml b/roles/web-app-matrix/meta/variants.yml index 8dcc4217e7..537076f63d 100644 --- a/roles/web-app-matrix/meta/variants.yml +++ b/roles/web-app-matrix/meta/variants.yml @@ -3,6 +3,8 @@ - services: container_backup: enabled: true + element: + force_verification: false matrix: flavor: ansible coturn: @@ -93,6 +95,8 @@ container_backup: enabled: false shared: false # nocheck: variants-static-override backup shared stays literally true + element: + force_verification: false matrix: flavor: compose seaweedfs: diff --git a/roles/web-app-matrix/templates/flavor/ansible/vars.yml.j2 b/roles/web-app-matrix/templates/flavor/ansible/vars.yml.j2 index 6e5777573e..efdba83962 100644 --- a/roles/web-app-matrix/templates/flavor/ansible/vars.yml.j2 +++ b/roles/web-app-matrix/templates/flavor/ansible/vars.yml.j2 @@ -137,6 +137,7 @@ matrix_synapse_ext_password_provider_ldap_attributes_name: givenName matrix_client_element_enabled: true matrix_client_element_default_hs_url: "{{ MATRIX_SYNAPSE_URL }}" +matrix_client_element_configuration_extension_json: {{ {'force_verification': MATRIX_ELEMENT_FORCE_VERIFICATION | bool} | to_json | to_json }} matrix_bridge_appservice_irc_enabled: {{ MATRIX_BRIDGE.appservice_irc | string | lower }} matrix_bridge_heisenbridge_enabled: {{ MATRIX_BRIDGE.heisenbridge | string | lower }} diff --git a/roles/web-app-matrix/templates/flavor/compose/element.config.json.j2 b/roles/web-app-matrix/templates/flavor/compose/element.config.json.j2 index 22d54d13bd..4fb5c405a3 100644 --- a/roles/web-app-matrix/templates/flavor/compose/element.config.json.j2 +++ b/roles/web-app-matrix/templates/flavor/compose/element.config.json.j2 @@ -21,6 +21,7 @@ "bug_report_endpoint_url": "https://element.io/bugreports/submit", {# nocheck: url #} "uisi_autorageshake_app": "element-auto-uisi", "show_labs_settings": true, + "force_verification": {{ MATRIX_ELEMENT_FORCE_VERIFICATION | bool | to_json }}, "room_directory": { "servers": ["matrix.org", "gitter.im", "libera.chat"] }, diff --git a/roles/web-app-matrix/vars/main.yml b/roles/web-app-matrix/vars/main.yml index 76a12de101..409e79dd60 100644 --- a/roles/web-app-matrix/vars/main.yml +++ b/roles/web-app-matrix/vars/main.yml @@ -58,6 +58,7 @@ MATRIX_ELEMENT_DOMAIN: "{{ lookup('domains', application_id).element }}" MATRIX_ELEMENT_PORT: "{{ lookup('config', 'web-app-matrix', 'services.element.ports.local.http') }}" MATRIX_ELEMENT_CONTAINER_PORT: "{{ lookup('config', application_id, 'services.element.ports.internal.http') }}" MATRIX_ELEMENT_CONFIG_PATH_HOST: "{{ [ lookup('container', application_id, 'directories.config'), 'element-config.json' ] | path_join }}" +MATRIX_ELEMENT_FORCE_VERIFICATION: "{{ lookup('config', application_id, 'services.element.force_verification') | bool }}" MATRIX_MDAD_DIR: "{{ lookup('container', application_id, 'directories.instance') }}mdad" MATRIX_MDAD_RUNNER_BUILD_DIR: "{{ [ lookup('container', application_id, 'directories.instance'), 'runner' ] | path_join }}"