Skip to content

v0.3.5

Choose a tag to compare

@panyam panyam released this 08 Nov 23:21
· 11 commits to main since this release

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}/deny revokes a token subject. Each of its
      open connections leaves its rooms (peers see PeerLeft with reason
      denied) and gets SessionEnded{denied}. A new upgrade gets 403, and a
      ReAuthAction is refused. CollabClient reports
      onSessionEnded("denied") and doesn't reconnect. Answers 204.
    • DELETE /admin/subjects/{sub}/deny allows the subject again (204).
    • GET /admin/subjects/denied lists 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) and DeniedSubs() (PR 74). DenySub
    calls each OnDeny listener, and the relay registers one that ends the
    subject's connections. So an embedder that calls DenySub directly 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-prod runs it too.

Changed

  • oneauth v0.3.1 (issue 37, PR 76). RelayAuthenticator.ValidateToken
    now uses oneauth's ValidateBearer, and RelayClaims comes from its
    TokenInfo, exp and iat included. 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 ReAuthAction is now refused, since a bare
      token has no proof to check. massrelay only takes plain bearer tokens,
      so no working setup changes.

Upgrading

  • mcpkit's Go side pins massrelay exactly. Bumping it to v0.3.5 also bumps
    oneauth to v0.3.1 through massrelay's go.mod.