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

Server-server authentication doesn't specify what happens when auth fails #1570

Open
turt2live opened this issue Jun 14, 2023 · 1 comment
Open
Labels
A-S2S Server-to-Server API (federation) spec-omission implemented but not currently specified

Comments

@turt2live
Copy link
Member

Link to problem area: https://spec.matrix.org/v1.7/server-server-api/#authentication

Issue
I believe it's a 401 M_FORBIDDEN error, but we need to specify that.

@turt2live turt2live added spec-bug Something which is in the spec, but is wrong A-S2S Server-to-Server API (federation) labels Jun 14, 2023
@richvdh
Copy link
Member

richvdh commented Jun 14, 2023

Synapse raises a 401 M_UNAUTHORIZED in the event of an invalid signature (https://github.com/matrix-org/synapse/blob/v1.84.1/synapse/crypto/keyring.py#L345-L355) and in other situations such as a missing Authorization: X-Matrix header.

(It seems to me it should be a 401 for a missing header, and a 403 for an incorrect signature)

@richvdh richvdh added spec-omission implemented but not currently specified and removed spec-bug Something which is in the spec, but is wrong labels Jun 14, 2023
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) spec-omission implemented but not currently specified
Projects
None yet
Development

No branches or pull requests

2 participants