Skip to content

original_dst_cluster: add override by filter state#22155

Merged
kyessenov merged 6 commits intoenvoyproxy:mainfrom
kyessenov:original_dst_tunnel_address
Jul 19, 2022
Merged

original_dst_cluster: add override by filter state#22155
kyessenov merged 6 commits intoenvoyproxy:mainfrom
kyessenov:original_dst_tunnel_address

Conversation

@kyessenov
Copy link
Contributor

@kyessenov kyessenov commented Jul 13, 2022

Commit Message: Add an override by filter state to ORIGINAL_DST cluster (which takes priority over header override and restored local address).

Additional Description: ORIGINAL_DST cluster is used as a generic tunnel upstream for an internal listener (e.g. encoding TCP streams into HTTP/2). When used this way, there are two actual destination addresses. The first address is the logical address for which, for example, an RBAC policy must be applied on the internal listener. The second address is the physical address of the tunnel host. This change allows us to set the destination address for ORIGINAL_DST at the very last step in processing while doing the host selection, so that everything before that can use the logical address. Prior art couples the same behavior with HTTP/1.1 CONNECT transport, which would be confusing to re-use for ORIGINAL_DST.

One internal limitation is that the filter state is only read from the connection filter state. That works fine for tcp_proxy. There is no reason why it can't be done per-request, but that requires changing LoadBalancerContext throughout.

Risk Level: low (opt-in)
Testing: unit
Docs Changes: none (filter states are not documented in general, maybe they should be).
Release Notes: none

Signed-off-by: Kuat Yessenov <kuat@google.com>
Signed-off-by: Kuat Yessenov <kuat@google.com>
@kyessenov kyessenov requested a review from alyssawilk July 13, 2022 00:10
@kyessenov
Copy link
Contributor Author

/retest

@repokitteh-read-only
Copy link

Retrying Azure Pipelines:
Check envoy-presubmit didn't fail.

🐱

Caused by: a #22155 (comment) was created by @kyessenov.

see: more, trace.

@adisuissa
Copy link
Contributor

/assign-from @envoyproxy/maintainers

@repokitteh-read-only
Copy link

@envoyproxy/maintainers assignee is @None

🐱

Caused by: a #22155 (comment) was created by @adisuissa.

see: more, trace.

@adisuissa
Copy link
Contributor

/assign-from @envoyproxy/envoy-maintainers

@repokitteh-read-only
Copy link

@envoyproxy/envoy-maintainers assignee is @mattklein123

🐱

Caused by: a #22155 (comment) was created by @adisuissa.

see: more, trace.

Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add some limited documentation about this to the original_dst filter docs and also a release note? Thank you.

/wait

Signed-off-by: Kuat Yessenov <kuat@google.com>
Signed-off-by: Kuat Yessenov <kuat@google.com>
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@kyessenov kyessenov merged commit 6a44f97 into envoyproxy:main Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants