Support parsing IP from X-Forwarded-For header
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 24.2k
- Forks
- 7.9k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 239
Description
Summary
ArgoCD currently logs IPs based on the requesting client IP. This is problematic when a reverse proxy is in front of ArgoCD as the actual client IP gets hidden. With X-Forwarded-For the proxy attaches a header which contains the client IP which can later be used by the server to correctly log the clients IP.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Forwarded-For
Motivation
We require for compliance reasons that all requests are logged with the real client IP.
Proposal
The HTTP part should be relatively easy as there is already ProxyHeaders handler for gorilla.
I don't have enough gRPC knowledge to give advice how this could be implemented.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing Argo CD's HTTP and gRPC server entry points, then review gorilla/handlers ProxyHeaders for the HTTP path. Determine how both request types populate logged client IPs and verify that requests behind a reverse proxy record the X-Forwarded-For client address without losing direct-client behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, grpc
- Domain
- networking, observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100