From 76b360bb68bcd8749ad8f98d07b302a5a599c679 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Fri, 7 Nov 2025 20:55:14 -0800 Subject: [PATCH] matrixsynapse: Explicitly set the trusted key server to matrix.org The following message is shown when Matrix Synapse server is started. """ This server is configured to use 'matrix.org' as its trusted key server via the 'trusted_key_servers' config option. 'matrix.org' is a good choice for a key server since it is long-lived, stable and trusted. However, some admins may wish to use another server for this purpose. To suppress this warning and continue using 'matrix.org', admins should set 'suppress_key_server_warning' to 'true' in homeserver.yaml. """ Explicitly configure the server to use matrix.org as the trusted key server to avoid the warning. The value can be set to empty list of servers, however, our users are served best by this default. Tests: - On a testing container, when patch is applied after Matrix app installation, the configuration file is updated. - After the configuration is updated the warning is removed during Matrix Synapse startup. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- plinth/modules/matrixsynapse/__init__.py | 2 +- plinth/modules/matrixsynapse/privileged.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/plinth/modules/matrixsynapse/__init__.py b/plinth/modules/matrixsynapse/__init__.py index cdc35df3d..1241c9ff7 100644 --- a/plinth/modules/matrixsynapse/__init__.py +++ b/plinth/modules/matrixsynapse/__init__.py @@ -49,7 +49,7 @@ class MatrixSynapseApp(app_module.App): app_id = 'matrixsynapse' - _version = 10 + _version = 11 def __init__(self) -> None: """Create components for the app.""" diff --git a/plinth/modules/matrixsynapse/privileged.py b/plinth/modules/matrixsynapse/privileged.py index 8f29caaec..c6cd62fe0 100644 --- a/plinth/modules/matrixsynapse/privileged.py +++ b/plinth/modules/matrixsynapse/privileged.py @@ -29,8 +29,7 @@ FREEDOMBOX_ADMIN_USERNAME = 'freedombox-admin' ADMIN_API_BASE = 'http://localhost:8008/_synapse/admin/v1/' STATIC_CONFIG = { - 'max_upload_size': - '100M', + 'max_upload_size': '100M', 'password_providers': [{ 'module': 'ldap_auth_provider.LdapAuthProvider', 'config': { @@ -45,6 +44,10 @@ STATIC_CONFIG = { }, }, }, ], + 'suppress_key_server_warning': True, + 'trusted_key_servers': [{ + 'server_name': 'matrix.org' + }, ], }