Summary
Ensure websocket rooms for user notifications/chat enforce JWT identity ACLs and survive Redis adapter failover without leaking events across users.
Why this matters
Realtime is mounted on both modes; forged or mis-routed room joins are a privacy/security risk at hackathon scale.
Where to work
src/socket.ts
src/services/websocket.service.ts
src/utils/socket-adapter.ts
- auth middleware for sockets
What to implement
- Validate JWT on connect and subscribe.
- Bind rooms to
userId/wallet claims only.
- Reject cross-user room joins.
- Test adapter multi-node emit + ACL denial cases.
- Document required Redis config for multi-instance.
Acceptance criteria
Done when
Websocket delivery is authenticated and tenant-safe.
Metadata
| Field |
Value |
| Difficulty |
advanced |
| Complexity |
high |
| Good first contribution? |
no |
Summary
Ensure websocket rooms for user notifications/chat enforce JWT identity ACLs and survive Redis adapter failover without leaking events across users.
Why this matters
Realtime is mounted on both modes; forged or mis-routed room joins are a privacy/security risk at hackathon scale.
Where to work
src/socket.tssrc/services/websocket.service.tssrc/utils/socket-adapter.tsWhat to implement
userId/wallet claims only.Acceptance criteria
Done when
Websocket delivery is authenticated and tenant-safe.
Metadata