Repository navigation
Conversation
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
5769520 to
fd17d14
Compare
There was a problem hiding this comment.
Implementation requirements:
- Client (ideally multiple)
- Server
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
zecakeh
left a comment
There was a problem hiding this comment.
Just a couple of nits on the wording.
Co-authored-by: Kévin Commaille <76261501+zecakeh@users.noreply.github.com>
Co-authored-by: Kévin Commaille <76261501+zecakeh@users.noreply.github.com>
Co-authored-by: Hugh Nimmo-Smith <hughns@users.noreply.github.com>
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
| ### Cross-signing key reset | ||
|
|
||
| Implementations MAY use this proposal to replace UIA when the client has obtained its access token | ||
| via the OAuth APIs. The only endpoint currently using UIA for which this is relevant is | ||
| [/_matrix/client/v3/keys/device_signing/upload]. |
There was a problem hiding this comment.
We could consider introducing a dedicated scope to support this. Though I think it is not strictly needed. The only advantage I can think of is that clients could request the scope ahead of hitting the endpoint.
|
|
||
| ### Cross-signing key reset | ||
|
|
||
| Implementations MAY use this proposal to replace UIA when the client has obtained its access token |
There was a problem hiding this comment.
Problem: when the homeserver receives a request to POST /_matrix/client/v3/keys/device_signing/upload, how does it know whether it should respond with the m.oauth flow stage from MSC4312, or the new M_INSUFFICIENT_USER_AUTHENTICATION errcode?
We would want the server to be backwards compatible with older clients, so I think the server needs to know what the client supports.
So, basically some kind of versioning:
- query param?
- body param?
/_matrix/client/v3/keys/device_signing/upload->/_matrix/client/v4/keys/device_signing/upload?
There was a problem hiding this comment.
There is also the possibility of returning both MSCs fields in the body of the response, since there are no conflicts with the keys.
A client that doesn't support this MSC should be able to handle the UIA fields, and a client that supports this MSC will prefer to handle these new fields.
| include any scopes, the client SHOULD use the same scopes it used during login on the authorization | ||
| request. | ||
|
|
||
| Following successful authorization, the client's previous access token SHOULD be invalidated and a |
There was a problem hiding this comment.
I can't figure out how the homeserver is supposed to tell that an existing client is authenticating again, and not a new client. Is the client supposed to supply its access token in the OAuth request somehow?
There was a problem hiding this comment.
Hm, I think it technically doesn't need to because the client_id should identify the client? The AS should, however, be able to identify a possibly existing session based on cookies, I assume.
There was a problem hiding this comment.
Hm, I think it technically doesn't need to because the
client_idshould identify the client?
The client_id may not be unique for each device. Continuwuity derives the client_id from a hash of the client registration to avoid filling the database up with thousands of identical registrations.
The AS should, however, be able to identify a possibly existing session based on cookies, I assume.
Continuwuity's session cookie only uniquely identifies a single login to the web dashboard; it doesn't have any relation to Matrix devices. The only thing that identifies a Matrix device is its access token.
There was a problem hiding this comment.
I'm asking about this because MSC4484 needs some sort of temporary privilege escalation mechanism to be ergonomically usable by clients. Since registering a device is a hard requirement under the current OAuth scheme, a client that wants to use the server administration OAuth scope can't obtain a temporary privileged token without creating a useless new device. Therefore some way for the client to obtain more privileges on its existing token is necessary.
There was a problem hiding this comment.
If it's necessary to track the device ID, then the homeserver could just add the urn:matrix:client:device:<device_id> scope token to the scope field in the error response. If there is no scope field in the error the MSC says that the client should use the same as during login so it should also include the device ID of the session in theory?
There was a problem hiding this comment.
That would probably work for identifying the device, yes.
| include any scopes, the client SHOULD use the same scopes it used during login on the authorization | ||
| request. | ||
|
|
||
| Following successful authorization, the client's previous access token SHOULD be invalidated and a |
There was a problem hiding this comment.
Should a new refresh token be issued as well, or should the old one be reused?
Rendered