Skip to content

feat: implement TACACS+ configuration filters to prevent proxy self-loop scenarios - #222

Merged
Rod-Persky merged 1 commit into
mainfrom
dev/rodpersky/filter-proxy-loopback-scenario
Jul 8, 2026
Merged

feat: implement TACACS+ configuration filters to prevent proxy self-loop scenarios#222
Rod-Persky merged 1 commit into
mainfrom
dev/rodpersky/filter-proxy-loopback-scenario

Conversation

@Rod-Persky

Copy link
Copy Markdown
Contributor

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:

  • Added a new ProxySelfLoopFilter in config_filter.rs that 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.
  • Updated the documentation in README.md to warn users against configuring the proxy endpoint as an upstream server and to describe the new automatic filtering behavior.

Integration with Daemon:

  • Integrated the configuration filter into the daemon's startup and configuration reload paths in main.rs, ensuring that filtered configurations are applied both at startup and during runtime reloads. [1] [2] [3] [4] [5] [6] [7]

Testing:

  • Added extensive unit tests for the configuration filter, covering various scenarios including loopback addresses, hostnames, different ports, and proxy-disabled modes.
  • Added a specific test to verify that configuration reloads correctly filter out self-looping proxy endpoints. [1] [2]

@Rod-Persky
Rod-Persky enabled auto-merge (squash) July 8, 2026 02:07
@Rod-Persky
Rod-Persky merged commit 3851b73 into main Jul 8, 2026
21 checks passed
@Rod-Persky
Rod-Persky deleted the dev/rodpersky/filter-proxy-loopback-scenario branch July 8, 2026 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant