Repository navigation
fix(ip): treat an empty global whitelist as absent - #57
Merged
Merged
Conversation
This was referenced Oct 15, 2026
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.
Closes #56
I treat an empty global whitelist like an absent one in
AccessControl.kt(checkWhitelist,checkIpListsDetail,checkUnknownIdentityAccess), matching the reference'sif config.whitelist:truthiness. Before,whitelist = emptyList()denied every client with a 403.The list precedence itself (a configured whitelist decides alone, the blacklist applies only without a whitelist) and the route-level path (
ChecksHelpers.checkRouteIpAccess, plus a route whitelist skipping the global lists) already matched the reference. I addedIpListPrecedenceTestwith tables generated by running the reference: 120 rows for the global (check_ip_access) and route (check_route_ip_access) checks, and 243 rows composing route and global lists throughRouteConfigCheckandIpSecurityCheck. IPv4-mapped clients are evaluated after the canonical identity resolution the pipeline performs. On master the global test fails for 22 rows (all with an explicit empty whitelist).This PR also carries the client IP resolution regression guard tests from the earlier parity work (
ClientIpParityTest,client_ip_cases.json,client_ip_lists.json, 104 + 78 reference rows), which pass unchanged.spotlessApply detekt,buildandfullCorpusGatepass locally.