A session cannot enumerate the sessions of the identity it is, and the surface may be MAS rather than Synapse #147
Labels
No labels
blocked
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
waiting-on-julian
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jlxq0/matrix-mcp#147
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A server that authenticates as a user cannot enumerate that user's sessions.
matrix-mcpexposes 62 tools and none lists or deletes a device: there is nodevicestool, nologout, and nothing insrc/mcp.rscalls the/devicesendpoint.verify_statusreads the caller's own device and nothing else.So a request to prune stale devices for
@julian:kampong.socialcould not be answered by any session holding any mount of this server, including the ones that authenticate as him. The task went back unstarted for want of a route rather than for want of authorisation.The class, which is the part worth keeping
Third instance this week of something no session can ask about itself, and the other two are unrelated systems:
tmux display-messagewithout-tanswers about the calling pane's session, so a pane asking which window it is in gets a durable, wrong id.last_used_atnever moves, so nothing distinguishes a live token from a dead one.A missing endpoint is a gap; three of these is a shape. Each is a real state with no instrument on the side that holds it, which is why each was found by somebody outside noticing rather than by the thing itself reporting.
The surface is probably MAS, not Synapse
The obvious route is Synapse's admin API:
But this deployment delegates authentication to MAS via the stable
matrix_authentication_serviceintegration rather than the experimentalmsc3861block, which Synapse 1.157 removed. MAS owns every session and every token, so the Synapse view is at best partial, and a device pruned there may leave its OAuth session alive.This is corroborated from inside this repository without reading any homeserver config:
MATRIX_MCP_AUTHORIZATION_SERVERpoints at MAS, andsrc/mas.rsreads the device binding out of the MSC2967urn:matrix:org.matrix.msc2967.client:device:<id>scope, which is MAS minting it.And the MAS admin surface was confirmed on the running instance earlier, during the device-key work, as MAS 1.23:
That confirmation is Alan's rather than mine and I have not run either call. It is named here so the next person does not repeat the search, and because it makes the answer to "which surface owns a session" checkable rather than open.
What this issue is asking for
Not necessarily a tool. The decision is whether this server should be able to answer "which sessions exist for the identity I am" at all, given that:
A
whoamithat could say how many sessions this identity has, and when each was last seen, would have answered the original request without any admin access. That is the narrow version and it is consistent with thewhoami-carries-the-allowlist proposal in #129.Related
whoami.