Skip to content

Secure WebSocket Connections (Mobile Auth) #54

@GiZano

Description

@GiZano

Description

We successfully implemented the /ws/alerts WebSocket endpoint for real-time notifications. However, it is currently fully open. While this is fine for a public alert broadcast, we should prepare to authenticate connected clients to ensure we aren't allowing millions of unauthorized zombie connections to drain our server memory.

Task List

  • Require mobile clients to pass an authentication token (e.g., JWT) when establishing the WebSocket connection.
  • Reject unauthorized WebSocket connection requests instantly.
  • Update tests/test_websocket_broadcast.py to include the required authentication headers/tokens.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions