AgentGateway CEL Policy Bug: Separate Rules Act as OR, Not AND
A developer building a CEL authorization policy for agentgateway discovered that listing multiple expressions under matchExpressions applies OR logic, not AND, meaning a request is allowed if any single condition is satisfied. In testing, a caller from a restricted jurisdiction (Iran) was incorrectly granted access because the model check passed, while an unapproved model request also slipped through because the country check passed. Neither misconfiguration triggered an error, and the policy status showed as healthy in both cases. The fix is to combine all conditions into a single matchExpressions entry joined with && operators, rather than using separate list items. The behavior is documented but easy to misread, making the bug particularly risky since it silently permits traffic that should be denied.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in