Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

sometimes the key notary endpoint doesn't give back the keys you asked for #5305

Closed
richvdh opened this issue May 31, 2019 · 2 comments
Closed

Comments

@richvdh
Copy link
Member

richvdh commented May 31, 2019

Example: https://matrix.org/_matrix/key/v2/query/sw1v.org/ed25519:a_BPNW: it returns sw1v.org/ed25519:auto, and not the key I want.

@richvdh
Copy link
Member Author

richvdh commented May 31, 2019

Turns out that the spec says that the server should ignore the keyId param for the GET endpoint (https://matrix.org/docs/spec/server_server/r0.1.1.html#get-matrix-key-v2-query-servername-keyid). However: (a) that's braindead, and (b) the same problem happens for the POST endpoint.

@richvdh
Copy link
Member Author

richvdh commented May 31, 2019

So, this happens when the notary server gets a request for a given key id, but the origin server doesn't return it. That would kinda be ok as a sort of indicator of the absence of the key, or a negative-cache record, but the real problem is that, if an origin server stops returning a (previously-valid) key, then we can also make the notary server forget about that key (and hence break any historical events signed with that key).

richvdh added a commit that referenced this issue May 31, 2019
Fix a bug where we would discard a key result which the origin server is no
longer returning. Fixes #5305.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants