Feat: optional proxy client authentication and rule-level scoping by proxy login and client source CIDR#184
Open
roman-shpp wants to merge 4 commits into
Open
Conversation
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
Adds optional proxy client authentication and rule-level scoping by proxy login and client source CIDR.
HTTP proxy requests and
CONNECTuseProxy-Authorization: Basic .... SOCKS5 uses username/password auth.The shared rule matcher now accepts optional
proxy_loginsandsource_cidrs, so existing transforms usingrulescan scope behavior by authenticated proxy user and client network.Why
Some deployments need one shared iron-proxy listener serving multiple workloads or tenants, but with different egress permissions.
Host/method/path rules are not enough for that. This adds two missing policy dimensions:
This keeps the allowlist default-deny model intact while avoiding separate proxy instances for every policy slice.
Behavior notes
proxy.auth.required: true.proxy_loginsorsource_cidrsmatch exactly as before.Proxy-Authorizationis consumed at the proxy boundary and is not forwarded upstream.proxy_loginandsource_ipare added to audit context when available.sni-onlyHTTPS connections cannot carry proxy auth metadata; when auth is required, clients should use the tunnel listener.Tests
go test ./...New coverage includes:
proxy_logins;source_cidrs;