Skip to content

Production-harden Socket.IO Redis adapter with auth room ACLs #494

Description

@josephchimebuka

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

  1. Validate JWT on connect and subscribe.
  2. Bind rooms to userId/wallet claims only.
  3. Reject cross-user room joins.
  4. Test adapter multi-node emit + ACL denial cases.
  5. Document required Redis config for multi-instance.

Acceptance criteria

  • Users cannot subscribe to another user's private room.
  • Multi-node emit still works with adapter.
  • Unauthorized connect rejected.
  • Security tests added.

Done when

Websocket delivery is authenticated and tenant-safe.

Metadata

Field Value
Difficulty advanced
Complexity high
Good first contribution? no

Metadata

Metadata

Assignees

No one assigned

    Labels

    GrantFox OSSGrantFox OSS campaignMaybe RewardedPotential reward for contributorsStellar WaveIssues in the Stellar wave programThird CampaignCampaign: Third CampaignbackendBackend engineeringobservabilityMonitoring, metrics, and loggingsecuritySecurity hardening and abuse resistance

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions