Menu

Tomcat RemoteIpValve needs a trusted proxy boundary
📰

Tomcat RemoteIpValve needs a trusted proxy boundary

#devcommunity#dev#tomcat#proxy#address
Reading 0:00
15s threshold

Tomcat RemoteIpValve needs a trusted proxy boundary

Applications often use the client address for rate limits, audit records, access rules, and session decisions. Behind a reverse proxy, the socket peer is the proxy rather than the user. Tomcat's RemoteIpValve can recover an apparent client address from a forwarded header, but that transformation is safe only when Tomcat knows which proxies are allowed to supply it.

The valve reads a header such as X-Forwarded-For , identifies internal or trusted proxies, and updates request IP and protocol information. Its configuration includes an internalProxies expression and related trusted-proxy settings. A broad expression can classify an address as trusted when it should not be. An unreviewed default can also be wrong after a network redesign.

What the valve changes

The review should start with the network path. Enumerate every proxy, load balancer, and ingress controller that can connect to Tomcat.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.