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

Attach connection dynamic metadata to request as HTTP header #12593

Closed
skambashi opened this issue Aug 11, 2020 · 4 comments
Closed

Attach connection dynamic metadata to request as HTTP header #12593

skambashi opened this issue Aug 11, 2020 · 4 comments
Labels
question Questions that are neither investigations, bugs, nor enhancements stale stalebot believes this issue/PR has not been touched recently

Comments

@skambashi
Copy link

skambashi commented Aug 11, 2020

Title: Attach connection dynamic metadata to request as HTTP header

Description:
We are currently using envoy v1.15.0

I am using a proxy protocol listener filter to extract TLV values, which I then want to attach as an HTTP header to the request. I'm hoping to use this request header in the external auth service to do some additional validation on the TLV value.

In particular this is for validating requests that pass through an AWS network balancer.

My current proxy protocol listener filter looks something like the following:

listener_filters: [
    {
      name: "envoy.filters.listener.proxy_protocol",
      typed_config: {
        "@type": "type.googleapis.com/envoy.extensions.filters.listener.proxy_protocol.v3.ProxyProtocol",
        rules: [
          {
            tlv_type: 234,
            on_tlv_present: {
              metadata_namespace: "my_namespace",
              key: "my_key",
            }
          },
        ],
      },
    }

and I am able to see the TLV value when I log it from the listener's access_log ("%DYNAMIC_METADATA(my_namespace:my_key)%"). Unfortunately I have not been successful in finding a way to attach this information to the request. The first place I looked at was the lua filter in the http conn manager for this listener, but it doesn't have access to the connection's dynamic metadata.

From what I understand, the dynamicMetadata object that is exposed in the lua handler is the one for the HTTP stream, and there's a separate dynamicMetadata that the lua filter does not have access to for the network connection. Is there any way to attach this TLV to the request as an HTTP header with the current version of Envoy?

Thanks,
Seikun Kambashi

[Relevant Links:]

@mattklein123 mattklein123 added the question Questions that are neither investigations, bugs, nor enhancements label Aug 11, 2020
@stale
Copy link

stale bot commented Sep 20, 2020

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions.

@stale stale bot added the stale stalebot believes this issue/PR has not been touched recently label Sep 20, 2020
@mattklein123 mattklein123 removed the stale stalebot believes this issue/PR has not been touched recently label Dec 9, 2020
@blang
Copy link

blang commented Dec 18, 2020

@skambashi could you please share your listeners access log? I'm facing the same problem an documentation is scarce.
Can @songhu please elaborate on how to use the extracted tlvs?
Thanks a lot and merry christmas

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale stalebot believes this issue/PR has not been touched recently label Jan 17, 2021
@github-actions
Copy link

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Questions that are neither investigations, bugs, nor enhancements stale stalebot believes this issue/PR has not been touched recently
Projects
None yet
Development

No branches or pull requests

3 participants