Exempt internal pod network (10.42.0.0/16) from the scanner-probe block#57
Merged
Conversation
…the scanner-probe block
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.
What
Exempt trusted internal networks from the scanner-probe block in
ha_api.security_middleware.The middleware path-allowlists requests and 404s everything else as a "scanner probe", keyed on
request.remote. In-cluster traffic arrives from the Rancher/Canal pod network (10.42.0.0/16) — the V3 cache, the frontend backend, and the post-release warmup tool — and was being caught and logged as probes._is_trusted_remote()+ aTRUSTED_NETWORKSallowlist (default10.42.0.0/16,127.0.0.0/8,::1/128, overridable via theTRUSTED_NETWORKSenv var).No change for external traffic — the allowlist + probe block still apply.
Verified
Unit-checked the matcher:
10.42.28.137,10.42.250.176,127.0.0.1,::1→ trusted;10.43.0.5,192.168.1.5,8.8.8.8, public IPs,None, and malformed strings → not trusted.