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 <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2025-11-07 20:55:14 -08:00 committed by James Valleroy
parent 084c9c5a47
commit 76b360bb68
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
2 changed files with 6 additions and 3 deletions

View File

@ -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."""

View File

@ -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'
}, ],
}