whiteducksoftware / whiteducksoftware/flock
[1.0] Authenticate WebSockets and enforce per-recipient visibility
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 120
- Forks
- 14
- Avg merge
- 19h 32m
- Merged PRs (30d)
- 8
Description
The HTTP authentication middleware skips WebSocket scopes, the socket accepts connections, and broadcast sends the same artifact-bearing event to all clients.
Scope
- Bind each connection to the authenticated identity from the supported access path.
- Authorize each outgoing artifact, diagnostic and streaming event for its recipient, including graph/count metadata that could reveal protected work.
- Make reconnect and identity/permission changes invalidate stale authorization rather than retaining previous access.
Acceptance criteria
- A deny-all authentication setup rejects a real WebSocket handshake as well as HTTP requests.
- Two differently authorized connected clients receive only their permitted payloads and metadata; anonymous clients cannot observe protected work.
- Reconnect and changed permissions cannot preserve an earlier identity's access; authorized live updates still work.
Boundaries
No new streaming transport or workflow engine.
References
- Parent topic: #280.
- Implementation dependencies: #430.
- src/flock/components/server/websocket/websocket_component.py
- src/flock/api/websocket.py
- src/flock/api/collector.py
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading src/flock/components/server/websocket/websocket_component.py, src/flock/api/websocket.py, and src/flock/api/collector.py, along with dependency #430 and parent topic #280. Trace the supported authentication path, connection identity, and broadcast payloads before running or adding tests for denied handshakes, differently authorized clients, reconnects, and permission changes. Done means protected artifacts, diagnostics, streams, and metadata are visible only to permitted recipients.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- authentication, authorization, backend-api-design, security
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100