From 12ca4d992a10687a700de9b51d2a29598467555a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?= Date: Fri, 22 Apr 2022 11:42:47 +0200 Subject: [PATCH] chore(synapse): update routing to worker endpoints --- roles/synapse/defaults/main.yml | 7 ++- roles/synapse/vars/main.yml | 95 ++++++++++++++++++--------------- 2 files changed, 57 insertions(+), 45 deletions(-) diff --git a/roles/synapse/defaults/main.yml b/roles/synapse/defaults/main.yml index 084f529..80d10fc 100644 --- a/roles/synapse/defaults/main.yml +++ b/roles/synapse/defaults/main.yml @@ -67,8 +67,13 @@ matrix_synapse_worker_client_endpoints: >- {{ matrix_synapse_worker_client_sync_endpoints + matrix_synapse_worker_client_api_endpoints - + matrix_synapse_worker_client_send_endpoints + + matrix_synapse_worker_client_encryption_endpoints + matrix_synapse_worker_client_login_endpoints + + matrix_synapse_worker_client_send_endpoints + + matrix_synapse_worker_client_device_endpoints + + matrix_synapse_worker_client_account_data_endpoints + + matrix_synapse_worker_client_receipts_endpoints + + matrix_synapse_worker_client_presence_endpoints }} # Certificate management diff --git a/roles/synapse/vars/main.yml b/roles/synapse/vars/main.yml index 9139680..6b09bee 100644 --- a/roles/synapse/vars/main.yml +++ b/roles/synapse/vars/main.yml @@ -175,43 +175,55 @@ matrix_synapse_worker_labels_base: "{{ matrix_synapse_docker_labels_base }}" # Control where which paths get routed matrix_synapse_worker_client_sync_endpoints: - - "/_matrix/client/(v2_alpha|r0)/sync$" - - "/_matrix/client/(api/v1|v2_alpha|r0)/events$" - - "/_matrix/client/(api/v1|r0)/initialSync$" - - "/_matrix/client/(api/v1|r0)/rooms/[^/]+/initialSync$" + - "/_matrix/client/(r0|v3)/sync$" + - "/_matrix/client/(api/v1|r0|v3)/events$" + - "/_matrix/client/(api/v1|r0|v3)/initialSync$" + - "/_matrix/client/(api/v1|r0|v3)/rooms/[^/]+/initialSync$" matrix_synapse_worker_client_api_endpoints: - - "/_matrix/client/(api/v1|r0|unstable)/createRoom$" - - "/_matrix/client/(api/v1|r0|unstable)/publicRooms$" - - "/_matrix/client/(api/v1|r0|unstable)/rooms/.*/joined_members$" - - "/_matrix/client/(api/v1|r0|unstable)/rooms/.*/context/.*$" - - "/_matrix/client/(api/v1|r0|unstable)/rooms/.*/members$" - - "/_matrix/client/(api/v1|r0|unstable)/rooms/.*/state$" - - "/_matrix/client/unstable/org.matrix.msc2946/rooms/.*/spaces$" - - "/_matrix/client/unstable/org.matrix.msc2946/rooms/.*/hierarchy$" + - "/_matrix/client/(api/v1|r0|v3|unstable)/createRoom$" + - "/_matrix/client/(api/v1|r0|v3|unstable)/publicRooms$" + - "/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/joined_members$" + - "/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/context/.*$" + - "/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/members$" + - "/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/state$" + - "/_matrix/client/(v1|unstable)/org.matrix.msc2946/rooms/.*/hierarchy$" - "/_matrix/client/unstable/im.nheko.summary/rooms/.*/summary$" - - "/_matrix/client/(api/v1|r0|unstable)/account/3pid$" - - "/_matrix/client/(api/v1|r0|unstable)/devices$" - - "/_matrix/client/(api/v1|r0|unstable)/keys/query$" - - "/_matrix/client/(api/v1|r0|unstable)/keys/changes$" + - "/_matrix/client/(api/v1|r0|v3|unstable)/account/3pid$" + - "/_matrix/client/(api/v1|r0|v3|unstable)/devices$" - "/_matrix/client/versions$" - - "/_matrix/client/(api/v1|r0|unstable)/voip/turnServer$" - - "/_matrix/client/(api/v1|r0|unstable)/joined_groups$" - - "/_matrix/client/(api/v1|r0|unstable)/publicised_groups$" - - "/_matrix/client/(api/v1|r0|unstable)/publicised_groups/" - - "/_matrix/client/(api/v1|r0|unstable)/rooms/.*/event/" - - "/_matrix/client/(api/v1|r0|unstable)/joined_rooms$" - - "/_matrix/client/(api/v1|r0|unstable)/search$" -matrix_synapse_worker_client_send_endpoints: - - "/_matrix/client/(api/v1|r0|unstable)/rooms/.*/redact" - - "/_matrix/client/(api/v1|r0|unstable)/rooms/.*/send" - - "/_matrix/client/(api/v1|r0|unstable)/rooms/.*/state/" - - "/_matrix/client/(api/v1|r0|unstable)/rooms/.*/(join|invite|leave|ban|unban|kick)$" - - "/_matrix/client/(api/v1|r0|unstable)/join/" - - "/_matrix/client/(api/v1|r0|unstable)/profile/" + - "/_matrix/client/(api/v1|r0|v3|unstable)/voip/turnServer$" + - "/_matrix/client/(r0|v3|unstable)/joined_groups$" + - "/_matrix/client/(r0|v3|unstable)/publicised_groups$" + - "/_matrix/client/(r0|v3|unstable)/publicised_groups/" + - "/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/event/" + - "/_matrix/client/(api/v1|r0|v3|unstable)/joined_rooms$" + - "/_matrix/client/(api/v1|r0|v3|unstable)/search$" +matrix_synapse_worker_client_encryption_endpoints: + - "/_matrix/client/(r0|v3|unstable)/keys/query$" + - "/_matrix/client/(r0|v3|unstable)/keys/changes$" + - "/_matrix/client/(r0|v3|unstable)/keys/claim$" + - "/_matrix/client/(r0|v3|unstable)/room_keys/" matrix_synapse_worker_client_login_endpoints: - - "/_matrix/client/(api/v1|r0|unstable)/login$" - - "/_matrix/client/(r0|unstable)/register$" - - "/_matrix/client/unstable/org.matrix.msc3231/register/org.matrix.msc3231.login.registration_token/validity$" + - "/_matrix/client/(api/v1|r0|v3|unstable)/login$" + - "/_matrix/client/(r0|v3|unstable)/register$" + - "/_matrix/client/v1/register/m.login.registration_token/validity$" +matrix_synapse_worker_client_send_endpoints: + - "/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/redact" + - "/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/send" + - "/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/state/" + - "/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/(join|invite|leave|ban|unban|kick)$" + - "/_matrix/client/(api/v1|r0|v3|unstable)/join/" + - "/_matrix/client/(api/v1|r0|v3|unstable)/profile/" +matrix_synapse_worker_client_device_endpoints: + - "/_matrix/client/(r0|v3|unstable)/sendToDevice/" +matrix_synapse_worker_client_account_data_endpoints: + - "/_matrix/client/(r0|v3|unstable)/.*/tags" + - "/_matrix/client/(r0|v3|unstable)/.*/account_data" +matrix_synapse_worker_client_receipts_endpoints: + - "/_matrix/client/(r0|v3|unstable)/rooms/.*/receipt" + - "/_matrix/client/(r0|v3|unstable)/rooms/.*/read_markers" +matrix_synapse_worker_client_presence_endpoints: + - "/_matrix/client/(api/v1|r0|v3|unstable)/presence/" matrix_synapse_worker_federation_endpoints: - "/_matrix/federation/v1/event/" - "/_matrix/federation/v1/state/" @@ -222,20 +234,15 @@ matrix_synapse_worker_federation_endpoints: - "/_matrix/federation/v1/query/" - "/_matrix/federation/v1/make_join/" - "/_matrix/federation/v1/make_leave/" - - "/_matrix/federation/v1/send_join/" - - "/_matrix/federation/v2/send_join/" - - "/_matrix/federation/v1/send_leave/" - - "/_matrix/federation/v2/send_leave/" - - "/_matrix/federation/v1/invite/" - - "/_matrix/federation/v2/invite/" - - "/_matrix/federation/v1/query_auth/" + - "/_matrix/federation/(v1|v2)/send_join/" + - "/_matrix/federation/(v1|v2)/send_leave/" + - "/_matrix/federation/(v1|v2)/invite/" - "/_matrix/federation/v1/event_auth/" - "/_matrix/federation/v1/exchange_third_party_invite/" - "/_matrix/federation/v1/user/devices/" - "/_matrix/federation/v1/get_groups_publicised$" - "/_matrix/key/v2/query" - - "/_matrix/federation/unstable/org.matrix.msc2946/spaces/" - - "/_matrix/federation/unstable/org.matrix.msc2946/hierarchy/" + - "/_matrix/federation/(v1|unstable)/org.matrix.msc2946/hierarchy/" - "/_matrix/federation/v1/send/" matrix_synapse_worker_media_endpoints: - "/_matrix/media/" @@ -247,11 +254,11 @@ matrix_synapse_worker_media_endpoints: matrix_synapse_worker_user_search_endpoints: - "/_matrix/client/(api/v1|r0|unstable)/user_directory/search$" matrix_synapse_worker_sso_generic_endpoints: - - "/_matrix/client/(api/v1|r0|unstable)/login/sso/redirect" + - "/_matrix/client/(api/v1|r0|v3|unstable)/login/sso/redirect" - "/_synapse/client/pick_idp$" - "/_synapse/client/pick_username" - "/_synapse/client/new_user_consent$" - "/_synapse/client/sso_register$" matrix_synapse_worker_sso_oidc_endpoints: "{{ matrix_synapse_worker_sso_generic_endpoints + [ '/_synapse/client/oidc/callback$' ] }}" matrix_synapse_worker_sso_saml_endpoints: "{{ matrix_synapse_worker_sso_generic_endpoints + [ '/_synapse/client/saml2/authn_response$' ] }}" -matrix_synapse_worker_sso_cas_endpoints: "{{ matrix_synapse_worker_sso_generic_endpoints + [ '/_matrix/client/(api/v1|r0|unstable)/login/cas/ticket$' ] }}" +matrix_synapse_worker_sso_cas_endpoints: "{{ matrix_synapse_worker_sso_generic_endpoints + [ '/_matrix/client/(api/v1|r0|v3|unstable)/login/cas/ticket$' ] }}"