fix: Proper extraction of client IP addresses from the request#3134
Merged
fix: Proper extraction of client IP addresses from the request#3134
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release #3134 +/- ##
===========================================
+ Coverage 91.28% 91.31% +0.02%
===========================================
Files 281 281
Lines 10799 10799
===========================================
+ Hits 9858 9861 +3
+ Misses 680 679 -1
+ Partials 261 259 -2 ☔ View full report in Codecov by Sentry. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue(s)
closes #3133
Checklist
Description
This PR fixes a regression introduced with #3014 and present since heimdall v0.17.9.
The actual issue (as described in #3133) is not related to the
celauthorizer itself, but to how client IP addresses are extracted from incoming requests. When theForwardedheader is not present, heimdall falls back to theX-Forwarded-Forheader. Due to an incorrect condition, this fallback was no longer triggered, resulting in missing client IPs. This in turn caused CEL expressions likeRequest.ClientIPAddresses[0] in networks(...)to fail.