feat: add API-key-gated WebSocket support#122
Conversation
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
| } | ||
|
|
||
| func (p *PreparedProject) SupportsMethod(method string) (bool, error) { | ||
| allowed := true |
There was a problem hiding this comment.
SupportsMethod never blocks non-matching methods when AllowMethods is set alone; allowed starts true and is never turned false on allow-list misses.
| allowed := true | |
| allowed := len(p.Config.AllowMethods) == 0 |
Details
✨ AI Reasoning
The new method appears to enforce project-level method filtering, but its control flow cannot deny methods when only an allow-list is configured. It starts in an allowed state, only toggles false inside ignore matches, and allow checks only ever set true. So a non-matching method still remains allowed, which contradicts the intended meaning of an allow-list gate.
Reply @AikidoSec feedback: [FEEDBACK] to get better review comments in the future.
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info
Adds opt-in WebSocket transport to eRPC.
allowWebsocket: true; HTTP-only API keys stay deniedwebsocketEndpointeth_subscribeupstreams in policy order and fails over on bounded dial failuresValidation:
Requested by: @DevAtom (Slack)