feat: implement TACACS+ configuration filters to prevent proxy self-loop scenarios - #222
Merged
Merged
Conversation
Rod-Persky
enabled auto-merge (squash)
July 8, 2026 02:07
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.
This pull request introduces a runtime configuration filter to prevent the TACACS+ proxy from creating a self-loop by accidentally sending client traffic back into itself. The new filter removes any upstream TACACS+ server entries that resolve to the same address and port as the local TCP proxy endpoint, including loopback addresses and hostnames like
localhost. The implementation is modular, allowing the filter to be enabled only when the proxy is active, and includes comprehensive unit tests.Key changes:
Proxy Self-Loop Protection:
ProxySelfLoopFilterinconfig_filter.rsthat removes upstream TACACS+ servers matching the local TCP proxy endpoint, preventing proxy self-loops and potential packet storms. This includes resolving hostnames and handling both IPv4 and IPv6 loopbacks.README.mdto warn users against configuring the proxy endpoint as an upstream server and to describe the new automatic filtering behavior.Integration with Daemon:
main.rs, ensuring that filtered configurations are applied both at startup and during runtime reloads. [1] [2] [3] [4] [5] [6] [7]Testing: