gateway icon indicating copy to clipboard operation
gateway copied to clipboard

feat: add support to enable IP Transparency for TCP via Original Source listener filter

Open aoledk opened this issue 9 months ago • 8 comments

Description:

With current EG, in order to enable IP Transparency for TCP (not HTTP), Proxy Protocol is the only way, it requires upstream host should support Proxy Protocol too.

I propose to support another option that Envoy has already implemented to enable IP Transparency for TCP: Original Source listener filter. It doesn't require upstream host should support Proxy Protocol, but require appropriate network routing rules.

[optional Relevant Links:]

https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/other_features/ip_transparency https://www.envoyproxy.io/docs/envoy/latest/configuration/listeners/listener_filters/original_src_filter

aoledk avatar May 09 '24 07:05 aoledk

+1, this is enabled in Istio gateway, so we have 2 options to do IP whitelisting

  1. XFF
  2. source IP

@arkodg can we consider this?

zufardhiyaulhaq avatar May 18 '24 09:05 zufardhiyaulhaq

sure this makes sense, we enable this by default if listener protocol is TCP ?

arkodg avatar May 20 '24 17:05 arkodg

sure this makes sense, we enable this by default if listener protocol is TCP ?

That should be an opt-in feature for TCP listener, because Envoy requires user to setup appropriate route rules to make Original Source listener filter to work correctly ^1.

aoledk avatar May 22 '24 09:05 aoledk

@arkodg nvm, seems like RBAC remote_ip on Envoy doesn't required this plugin. https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/rbac/v3/rbac.proto#envoy-v3-api-msg-config-rbac-v3-principal

zufardhiyaulhaq avatar May 26 '24 09:05 zufardhiyaulhaq

/assign

bjlhlin avatar Jun 24 '24 05:06 bjlhlin

This issue has been automatically marked as stale because it has not had activity in the last 30 days.

github-actions[bot] avatar Jul 24 '24 08:07 github-actions[bot]

would this be to allow us to filter on source IP?

davem-git avatar Sep 19 '24 15:09 davem-git

This issue has been automatically marked as stale because it has not had activity in the last 30 days.

github-actions[bot] avatar Oct 19 '24 20:10 github-actions[bot]