bundles/matrix-synapse: auto-trust all own servers as keyservers

This commit is contained in:
Franzi 2023-07-14 05:45:00 +02:00
parent f12d19fec6
commit 54d0c42da6
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -156,3 +156,20 @@ def nginx(metadata):
'vhosts': vhosts 'vhosts': vhosts
}, },
} }
@metadata_reactor.provides(
'matrix-synapse/trusted_key_servers',
)
def autotrust_our_own_servers(metadata):
domains = set()
for rnode in repo.nodes:
if not rnode.has_bundle('matrix-synapse'):
continue
domains.add(rnode.metadata.get('matrix-synapse/server_name'))
return {
'matrix-synapse': {
'trusted_key_servers': domains,
},
}