Skip to content

fix(provider): index all ExtAuth backendRefs for SecurityPolicy - #10674

Merged
zirain merged 2 commits into
envoyproxy:mainfrom
rishabhsai:fix-extauth-index-all-backends
Nov 26, 2026
Merged

zirain merged 2 commits into
envoyproxy:mainfrom
rishabhsai:fix-extauth-index-all-backends

Conversation

@rishabhsai

@rishabhsai rishabhsai commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

backendSecurityPolicyIndexFunc indexes only the first ExtAuth HTTP or gRPC backendRef, but the API allows up to 16 and the translator builds a destination for each one. So Service and EndpointSlice events for a backend referenced only as the second or later ExtAuth backendRef are dropped by the reconcile predicates, and Envoy keeps that backend's stale endpoint IPs until an unrelated reconcile. This PR indexes every ExtAuth backendRef, the same fix #10602 made for OIDC provider backendRefs (#10601). The two new TestValidateServiceForReconcile cases (HTTP and gRPC, asking about the second backendRef) fail without the change and pass with it.

Which issue(s) this PR fixes:

None filed; this is the ExtAuth half of #10601.


PR Checklist

  • Authorship & ownership: Coding agents / AI assistants are welcome, but I have reviewed every change, understand how and why it works, can explain and maintain it, and take full responsibility for this PR. I have not submitted generated output I do not understand.
  • DCO: All commits are signed off (git commit -s). See DCO: Sign your work.
  • API agreed first: N/A: no changes under /api.
  • Required checks pass: make generate gen-check, make lint, and the unit-test/coverage build pass. Locally: go test ./internal/provider/kubernetes/... and the envtest integration tests for the package pass, and golangci-lint (repo config), gofmt and go vet are clean on the package.
  • Tests added/updated: two new cases in TestValidateServiceForReconcile.
  • Docs: N/A: a bug fix with no user-facing configuration change.
  • Release notes: release-notes/current/bug_fixes/10674-extauth-backendrefs-index.md.
  • Generated files committed: N/A: no API, Helm or module changes.
  • Scope & compatibility: one index function and two test cases, backward compatible.
  • Codex review: Requested a Codex review and addressed all of its comments.
  • Copilot review: Requested a Copilot review and addressed all of its comments.

backendSecurityPolicyIndexFunc indexed only the first entry of
ExtAuth HTTP and gRPC backendRefs, although the API allows up to 16
and the translator builds a destination for each one. Service and
EndpointSlice events for a backend referenced only as the second or
later ExtAuth backendRef were dropped by the reconcile predicates, so
Envoy kept stale endpoint IPs for that backend until an unrelated
reconcile.

Index every ExtAuth backendRef, as was done for OIDC provider
backendRefs in envoyproxy#10602.

Signed-off-by: Rishabh <[email protected]>
Assisted-by: Claude
@rishabhsai
rishabhsai requested a review from a team as a code owner November 22, 2026 00:52
Assisted-by: Claude
Signed-off-by: Rishabh <[email protected]>
@netlify

netlify Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for cerulean-figolla-1f9435 ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit ff47731
🔍 Latest deploy log https://app.netlify.com/projects/cerulean-figolla-1f9435/deploys/6b023ce033411491457015ab
😎 Deploy Preview https://deploy-preview-10674--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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-22T00:54:21.336067Z b2a3927 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@netlify

netlify Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for cerulean-figolla-1f9435 ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit b2a3927
🔍 Latest deploy log https://app.netlify.com/projects/cerulean-figolla-1f9435/deploys/6b023ce3683df2378dc43b4a
😎 Deploy Preview https://deploy-preview-10674--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.

@zirain
zirain requested a review from zhaohuabing November 23, 2026 02:24
@codecov

codecov Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.83%. Comparing base (fca27e8) to head (b2a3927).
⚠️ Report is 16 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10674      +/-   ##
==========================================
- Coverage   82.86%   82.83%   -0.03%     
==========================================
  Files         278      278              
  Lines       44620    44620              
==========================================
- Hits        36976    36963      -13     
- Misses       7643     7656      +13     
  Partials        1        1              

☔ View full report in Codecov by Harness.
📢 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.

@rishabhsai

Copy link
Copy Markdown
Contributor Author

@zhaohuabing could you take a look when you get a chance? CI is green.

@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.

@zirain
zirain merged commit 0a198f6 into envoyproxy:main Nov 26, 2026
49 checks passed
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.

3 participants