Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ip-tagging filter: add support for an optional ip-tag-header field #36434

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

Radha13
Copy link
Contributor

@Radha13 Radha13 commented Oct 3, 2024

Description

This change adds support for specifying an optional header to ip-tagging filter instead of the default header that it uses (x-envoy-ip-tags).

example

   http_filters
     - name: ip.tagging
       typed_config:
         "@type": type.googleapis.com/envoy.extensions.filters.http.ip_tagging.v3.IPTagging
         request_type: BOTH
         ip_tag_header: "x-slack-foo-bar"
         ip_tags: []

Why

Currently, the ip-tagging filter always writes its output into the x-envoy-ip-tags header. When this filter is used for more than one purpose in the same filter chain which we do at Slack in our production environment, we do need to take care of cleaning up the header in between which has been proven a bit tricky sometimes. Leaking the values in between the filter chain is bad so we try to avoid that.

We would like this to be configurable. This way we can use the optional header instead of trying the use the same header however many times the same filter is used on the same filter chain in a listener.

Risk Level

this is a new feature, doesn't affect the existing functionality so guessing low but open to changing if I'm wrong.

Testing

added test

Docs Changes: For some reason (sorry), I can't find where to do this, would appreciate some help :/. I believe I need to change file that generates this: https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/filters/http/ip_tagging/v3/ip_tagging.proto#extensions-filters-http-ip-tagging-v3-iptagging

Co-authored-by: Ariane van der Steldt [email protected]
Signed-off-by: Radha Kumari [email protected]

Copy link

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to (api/envoy/|docs/root/api-docs/).
envoyproxy/api-shepherds assignee is @adisuissa
CC @envoyproxy/api-watchers: FYI only for changes made to (api/envoy/|docs/root/api-docs/).

🐱

Caused by: #36434 was opened by Radha13.

see: more, trace.

@Radha13 Radha13 changed the title ip-tagging filter: add support for an optional ip-tagging-header field ip-tagging filter: add support for an optional ip-tag-header field Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants