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

Clarify authentication for /_matrix/identity/v2/3pid/unbind #847

Open
Frinksy opened this issue Jun 16, 2021 · 2 comments
Open

Clarify authentication for /_matrix/identity/v2/3pid/unbind #847

Frinksy opened this issue Jun 16, 2021 · 2 comments
Labels
clarification An area where the expected behaviour is understood, but the spec could do with being more explicit

Comments

@Frinksy
Copy link

Frinksy commented Jun 16, 2021

Link to problem area:
https://matrix.org/docs/spec/identity_service/r0.3.0#post-matrix-identity-v2-3pid-unbind

Issue
The spec says:

The identity server should authenticate the request in one of two ways:

  1. The request is signed by the homeserver which controls the user_id.
  2. The request includes the sid and client_secret parameters, as per /3pid/bind, which proves ownership of the 3PID.

Is this a second level of authentication, meaning that you still need an Identity Service API access token?

Also, concerning the first method of authentication: should the request be signed using the same scheme as the federation API? Or should it be as mentioned in the spec appendices?

@Frinksy Frinksy added the clarification An area where the expected behaviour is understood, but the spec could do with being more explicit label Jun 16, 2021
@iinuwa
Copy link
Contributor

iinuwa commented Jun 27, 2021

This is blocking us from implementing this endpoint in Ruma (ruma/ruma#627). Is it possible to get clarification on this?

@richvdh
Copy link
Member

richvdh commented Jul 6, 2021

Is this a second level of authentication, meaning that you still need an Identity Service API access token?

it looks like Sydent doesn't require an access_token for this endpoint (despite the swagger for the API saying it does). I'm not entirely sure if that means that it's Sydent or the spec that is wrong.

That bit of swagger was added in matrix-org/matrix-spec-proposals#2254, with reference to MSC2140. The MSC says "Any request to any endpoint within /_matrix/identity/v2 ... MAY return an error with M_UNAUTHORIZED errcode with HTTP status code 401. This indicates that the user must authenticate with OpenID and supply a valid access_token" (my emphasis). So perhaps it's intended to be implementation-specific.

@dbkr as the author of MSC2140, any help here?

Also, concerning the first method of authentication:

yes it's the same as the federation API. See #498.

@richvdh richvdh transferred this issue from matrix-org/matrix-spec-proposals Mar 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

3 participants