StoreKeyFetcher seems to do nothing if not using a trusted key server #15171
Description
Suppose we try to fetch keys from some homeserver we've never heard of.
We'll first try to use StoreKeyFetcher, which calls
synapse/synapse/crypto/keyring.py
Line 513 in 9bb2eac
server_signature_keys
: synapse/synapse/storage/databases/main/keys.py
Lines 65 to 68 in b76f1a4
That will return no keys. So next we'll try the PerspectivesKeyFetcher, but that will do nothing because we have no trusted key server configured.
So next we try the ServerKeyFetcher. That will fetch keys via
synapse/synapse/crypto/keyring.py
Line 844 in 9bb2eac
and
synapse/synapse/crypto/keyring.py
Lines 901 to 905 in 9bb2eac
before caling
synapse/synapse/crypto/keyring.py
Line 605 in 9bb2eac
which writes to server_keys_json
.
If we try to re-fetch keys for that server, we'll try the StoreKeyFetcher. But as we saw above, that reads from a different table (server_signature_keys
). So we'll end up repeating the same steps and making another federation request via ServerKeyFetcher.