feat: Change proxy shared secret support for TACACS+ proxy clients to be based on loopback or cli config not upstream#224
Merged
Conversation
- Introduced `proxy_shared_secret` argument in CLI for specifying the shared secret expected from raw TACACS+ proxy clients. - Enhanced `TacacsPlusFilter` to handle proxy downstream obfuscation based on the shared secret. - Updated `NoopTacacsPlusFilter` and `ProxySelfLoopFilter` to manage proxy downstream obfuscation policies. - Modified `TacacsClientService` to reload TACACS+ configuration with the new proxy downstream obfuscation policy. - Adjusted `UpstreamBridge` to utilize the downstream obfuscation policy when handling proxy connections. - Updated tests to validate the new proxy shared secret functionality and its interactions with existing configurations.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the raw TACACS+ proxy path so the downstream (client→proxy) obfuscation policy is configured locally (via filtered loopback proxy rows or a new --proxy-shared-secret flag) rather than implicitly inheriting the upstream server shared secret. It also refactors the agentd config filtering pipeline to propagate this downstream policy into the running proxy service and extends tests/docs accordingly.
Changes:
- Add a downstream obfuscation policy (
ProxyDownstreamObfuscation) to agent service configuration, keep it hot-reloadable, and wire it into the raw proxy bridge. - Refactor
tacacsrs-agentdTACACS+ config filtering to return both filtered upstream config and downstream proxy obfuscation policy; add--proxy-shared-secretCLI support. - Update docs/tests; additionally, SONiC ConfigDB mapping changes server priority ordering (review comments note a likely semantic regression vs repo docs).
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| libraries/tacacsrs_sonic/src/mapping.rs | Changes SONiC server ordering / default priority behavior and updates mapping tests. |
| libraries/tacacsrs_agent/src/services/tacacs_proxy/upstream_bridge/mod.rs | Uses shared downstream obfuscation policy when reading/writing raw proxy packets. |
| libraries/tacacsrs_agent/src/services/tacacs_proxy/service.rs | Plumbs shared downstream obfuscation state into the proxy service/bridge. |
| libraries/tacacsrs_agent/src/runtime/client_service.rs | Stores downstream obfuscation policy in shared state and updates reload flow to apply it. |
| libraries/tacacsrs_agent/src/lib.rs | Re-exports ProxyDownstreamObfuscation. |
| libraries/tacacsrs_agent/src/config.rs | Introduces ProxyDownstreamObfuscation and adds it to ServiceConfig. |
| executables/tacacsrs_agentd/src/main.rs | Integrates new filter output and applies downstream obfuscation policy on initial load + reload. |
| executables/tacacsrs_agentd/src/config_filter.rs | Refactors filtering to return FilteredTacacsPlus including downstream obfuscation policy. |
| executables/tacacsrs_agentd/src/cli.rs | Adds --proxy-shared-secret flag with clap constraints. |
| executables/tacacsrs_agentd/README.md | Documents downstream proxy obfuscation selection rules and CLI behavior. |
Rod-Persky
enabled auto-merge (squash)
July 9, 2026 05:13
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 adds support for configuring the expected obfuscation policy for downstream TACACS+ proxy traffic, based on either the highest-priority filtered local proxy endpoint or a new
--proxy-shared-secretCLI flag. It also refactors the configuration filter logic to propagate this policy and updates related tests accordingly.Configuration and Obfuscation Policy Handling:
--proxy-shared-secretincli.rs, allowing operators to specify a shared secret for raw TACACS+ proxy clients when not in SONiC mode. This flag is required if--proxy-endpointis set and conflicts with--sonic.config_filter.rsto:ProxyDownstreamObfuscation) alongside the filtered TACACS+ configuration, using a newFilteredTacacsPlusstruct.Documentation:
README.mdto clarify how the proxy obfuscation policy is selected, how the new CLI flag interacts with configuration, and what is expected from local clients under various scenarios.Testing:
config_filter.rsto verify that the correct obfuscation policy is applied and propagated for various configurations, including edge cases where no shared secret is present. [1] [2] [3] [4] [5] [6] [7]