Security hardening: auth, RBAC, CORS, rate limiting, validation#8
Security hardening: auth, RBAC, CORS, rate limiting, validation#8sebastientaggart merged 1 commit intomainfrom
Conversation
…handshake, input validation - Make API key required (auto-generate on first run if unconfigured) - Add RBAC with read/write scopes (GET=read, POST=write, 403 on insufficient scope) - Add CORS middleware locked to localhost/127.0.0.1 origins - Add fixed-window rate limiting per client IP (configurable rpm) - Move WebSocket auth from query param to first-message handshake - Validate action/signal payloads against registered schemas before handler execution - Update OpenDeck bridge client for new WS auth protocol - Fix pre-existing lint issues (unused vars, missing imports, f-string) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Review SummaryVerdict: APPROVE Findings
|
Implements all 6 security hardening tasks from issue #1:
read, POST routes requirewrite; read-only keys get 403 on write endpoints; supports multiple keys via configlocalhost/127.0.0.1origins (any port)[rate_limit] rpmorDECKHAND_RATE_LIMIT_RPM{type: "auth", token: "..."}after connect, server respondsauth_okor closes with 4001payload_schemabefore reaching handler code; returns 422 with specific errorsAlso fixes pre-existing lint issues (unused vars, stale imports) and updates bridge client + tests.
Closes #1