Skip to content

fix: add unary interceptor and fix fail-open auth in GatewayNamespaceMode#8986

Merged
jukie merged 2 commits into
envoyproxy:mainfrom
cnvergence:fix-gnm-interceptor
May 13, 2026
Merged

fix: add unary interceptor and fix fail-open auth in GatewayNamespaceMode#8986
jukie merged 2 commits into
envoyproxy:mainfrom
cnvergence:fix-gnm-interceptor

Conversation

@cnvergence

@cnvergence cnvergence commented May 13, 2026

Copy link
Copy Markdown
Member

What type of PR is this?

What this PR does / why we need it:

The xDS gRPC server in GatewayNamespaceMode had no UnaryInterceptor, leaving all unary RPCs completely unauthenticated. The go-control-plane xDS server exposes both streaming and unary methods for all registered discovery services. Additionally, the stream interceptor only validated DeltaDiscoveryRequest messages.

This PR adds UnaryInterceptor, handles SotW requests as well and validates message types.
I have cleaned the code as well and added unit tests for interceptors.

Which issue(s) this PR fixes:

Fixes #

Release Notes: Yes

@netlify

netlify Bot commented May 13, 2026

Copy link
Copy Markdown

Deploy Preview for cerulean-figolla-1f9435 ready!

Name Link
🔨 Latest commit 0cb288d
🔍 Latest deploy log https://app.netlify.com/projects/cerulean-figolla-1f9435/deploys/6a044620e92c2200089638ac
😎 Deploy Preview https://deploy-preview-8986--cerulean-figolla-1f9435.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@cnvergence cnvergence force-pushed the fix-gnm-interceptor branch from bf2f381 to 39585d7 Compare May 13, 2026 09:32
Signed-off-by: Karol Szwaj <[email protected]>
@cnvergence cnvergence marked this pull request as ready for review May 13, 2026 09:40
@cnvergence cnvergence requested a review from a team as a code owner May 13, 2026 09:40
@cnvergence cnvergence added this to the v1.8.0 Release milestone May 13, 2026
@cnvergence

Copy link
Copy Markdown
Member Author

@codex

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@codecov

codecov Bot commented May 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 72.97297% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.79%. Comparing base (c159098) to head (0cb288d).

Files with missing lines Patch % Lines
internal/xds/server/kubejwt/jwtinterceptor.go 75.00% 8 Missing and 1 partial ⚠️
internal/xds/runner/runner.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8986      +/-   ##
==========================================
+ Coverage   74.76%   74.79%   +0.02%     
==========================================
  Files         251      251              
  Lines       40397    40417      +20     
==========================================
+ Hits        30204    30229      +25     
+ Misses       8128     8119       -9     
- Partials     2065     2069       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rudrakhp rudrakhp requested review from a team May 13, 2026 09:53

@zhaohuabing zhaohuabing left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for the quick fix!

@cnvergence

Copy link
Copy Markdown
Member Author

/retest

@jukie jukie merged commit f1f9829 into envoyproxy:main May 13, 2026
86 of 91 checks passed
jukie pushed a commit to jukie/gateway that referenced this pull request May 13, 2026
rudrakhp pushed a commit to rudrakhp/gateway that referenced this pull request May 14, 2026
nguyenptk pushed a commit to nguyenptk/gateway that referenced this pull request May 15, 2026
cnvergence added a commit to cnvergence/gateway that referenced this pull request May 29, 2026
cnvergence added a commit that referenced this pull request May 29, 2026
…atewayNamespaceMode (#8986) (#9116)

fix: add unary interceptor and fix fail-open auth in GatewayNamespaceMode (#8986)

Signed-off-by: Karol Szwaj <[email protected]>
cnvergence added a commit that referenced this pull request May 30, 2026
…atewayNamespaceMode (#8986) (#9118)

fix: add unary interceptor and fix fail-open auth in GatewayNamespaceMode (#8986)

Signed-off-by: Karol Szwaj <[email protected]>
cleman95 pushed a commit to cleman95/gateway that referenced this pull request Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants