Repository navigation
v0.3.5
v0.3.5
An operator can now revoke a user. Until this release RelayAuthenticator.DenySub
existed but nothing called it, and even if something had, a denied user stayed
in their rooms until their token's exp. Now one admin call ends every
connection the user has open, and a new connection gets a 403 until the
operator allows them again.
Mission 72 closed with this release. Its exercise, make exercise-revoke,
runs in CI against the relay binary and through the make prod-up stack.
Nothing changes on the wire. A v0.3.3 or v0.3.4 client keeps working, and a
denied client sees SessionEnded{denied}, which those clients already treat
as the end of the session.
Added
- Admin deny endpoints (issues 73 and 63, PR 74). Behind
RELAY_ADMIN_TOKEN:POST /admin/subjects/{sub}/denyrevokes a token subject. Each of its
open connections leaves its rooms (peers seePeerLeftwith reason
denied) and getsSessionEnded{denied}. A new upgrade gets 403, and a
ReAuthActionis refused.CollabClientreports
onSessionEnded("denied")and doesn't reconnect. Answers 204.DELETE /admin/subjects/{sub}/denyallows the subject again (204).GET /admin/subjects/deniedlists the deny list.- The deny routes answer 409 when the relay runs without auth. The list is
in memory, so a restarted relay forgets it. Pair revocation with
short-lived tokens.
RelayAuthenticator.OnDeny(fn)andDeniedSubs()(PR 74).DenySub
calls eachOnDenylistener, and the relay registers one that ends the
subject's connections. So an embedder that callsDenySubdirectly gets
the same effect as the admin route.make exercise-revoke(PR 74). A subject with two connections is
denied, then allowed again.make exercise-prodruns it too.
Changed
- oneauth v0.3.1 (issue 37, PR 76).
RelayAuthenticator.ValidateToken
now uses oneauth'sValidateBearer, andRelayClaimscomes from its
TokenInfo,expandiatincluded. That replaces a synthetic request
and a second parse of every token. The Go floor stays at 1.26.9.- A DPoP-bound token sent in a
ReAuthActionis now refused, since a bare
token has no proof to check. massrelay only takes plain bearer tokens,
so no working setup changes.
- A DPoP-bound token sent in a
Upgrading
- mcpkit's Go side pins massrelay exactly. Bumping it to v0.3.5 also bumps
oneauth to v0.3.1 through massrelay'sgo.mod.