Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Request authentication' section needs clarification #479

Open
richvdh opened this issue Jun 4, 2019 · 1 comment
Open

'Request authentication' section needs clarification #479

richvdh opened this issue Jun 4, 2019 · 1 comment
Labels
A-S2S Server-to-Server API (federation) clarification An area where the expected behaviour is understood, but the spec could do with being more explicit

Comments

@richvdh
Copy link
Member

richvdh commented Jun 4, 2019

https://matrix.org/docs/spec/server_server/r0.1.1.html#request-authentication says that requests are 'authenticated using public key digital signatures', but does not say how the receiving server should get the key.

In short: it should obtain the key from the calling server via the /_matrix/key/v2/server endpoint. Once the valid_until_ts expires, it must re-check the key before accepting further requests.

@richvdh richvdh added clarification An area where the expected behaviour is understood, but the spec could do with being more explicit A-S2S Server-to-Server API (federation) labels Jun 4, 2019
@richvdh
Copy link
Member Author

richvdh commented Jun 4, 2019

I've just spotted that https://matrix.org/docs/spec/appendices.html#checking-for-a-signature says:

Looks up verification keys for the remaining signing key identifiers either from a local cache or by consulting a trusted key server. If it cannot find a verification key then the check fails

The trouble with that (except for the fact that I forgot to look there) is that the rules for how you get a key depend on whether you are checking a federation request or an event.

In this case:

  • There is no need to use a "trusted key server" in this case - rather we should go to the origin server, which we know must be online because it is sending us a request.
  • The key must be valid as of "now".

@richvdh richvdh transferred this issue from matrix-org/matrix-spec-proposals Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-S2S Server-to-Server API (federation) clarification An area where the expected behaviour is understood, but the spec could do with being more explicit
Projects
None yet
Development

No branches or pull requests

1 participant