Skip to content

fix(gateway): require ReferenceGrant for cross-namespace backends in filterconfig - #2750

Open
nacx wants to merge 1 commit into
mainfrom
reference-grant
Open

nacx wants to merge 1 commit into
mainfrom
reference-grant

Conversation

@nacx

@nacx nacx commented Sep 27, 2026

Copy link
Copy Markdown
Member

Description

GatewayController resolved cross-namespace AIServiceBackend/InferencePool backends (and their BackendSecurityPolicy credentials) into the shared extproc filter-config Secret without checking a ReferenceGrant, even though AIGatewayRouteController already enforces one for HTTPRoute generation. Gate both backend kinds on the same check.

Also reconcile BackendSecurityPolicy on grant changes. ReferenceGrantController only requeued AIGatewayRoutes when a ReferenceGrant changed, so a BackendSecurityPolicy left NotAccepted for lacking a grant to its Secret wouldn't re-reconcile until something else touched it. Requeue affected BackendSecurityPolicies too.

Related Issues/PRs (if applicable)

N/A

Special notes for reviewers (if applicable)

N/A

…filter config

GatewayController resolved cross-namespace AIServiceBackend/InferencePool
backends (and their BackendSecurityPolicy credentials) into the shared
extproc filter-config Secret without checking a ReferenceGrant, even
though AIGatewayRouteController already enforces one for HTTPRoute
generation. Gate both backend kinds on the same check.

Also reconcile BackendSecurityPolicy on grant changes.
ReferenceGrantController only requeued AIGatewayRoutes when a
ReferenceGrant changed, so a BackendSecurityPolicy left NotAccepted for
lacking a grant to its Secret wouldn't re-reconcile until something
else touched it. Requeue affected BackendSecurityPolicies too.

Signed-off-by: Ignasi Barrera <ignasi@tetrate.io>
@nacx
nacx requested a review from a team as a code owner September 27, 2026 17:52
@netlify

netlify Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for theagentrouter canceled.

Name Link
🔨 Latest commit ac11214
🔍 Latest deploy log https://app.netlify.com/projects/theagentrouter/deploys/6ab957c76aa52900085d73d0

@codecov

codecov Bot commented Sep 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.66667% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/controller/referencegrant_controller.go 85.71% 4 Missing ⚠️

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant