-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Introduce new filters discovering peer metadata from baggage header #6771
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
Merged
istio-testing
merged 10 commits into
istio:experimental-ambient-multicluster-telemetry
from
krinkinmu:experimental-ambient-multicluster-telemetry
Jan 23, 2026
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
91766c0
Introduce new filters discovering peer metadata from baggage header
krinkinmu 0038c6a
Fix BUILD formatting
krinkinmu 70ac94b
Fix formatting of C++ code
krinkinmu da1b883
Update HTTP peer_metadata filter to consume filter state set by upstream
krinkinmu 0bcae63
Populate peer principal in the upstream workload metadata as well
krinkinmu 4813915
Support propagating baggage header to upstream and additional safety …
krinkinmu f0b9008
Only register UpstreamFilterState peer metadata discovery method for …
krinkinmu fae9952
Move peer_metadata filter proto config in the same directory
krinkinmu 8d28de6
Merge remote-tracking branch 'upstream/experimental-ambient-multiclus…
krinkinmu 423d488
Fix typo
krinkinmu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| # Copyright 2026 Istio Authors. All Rights Reserved. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
| ########################################################################## | ||
|
|
||
| # Ambient Peer Metadata filters | ||
| load( | ||
| "@envoy//bazel:envoy_build_system.bzl", | ||
| "envoy_cc_library", | ||
| ) | ||
| load( | ||
| "@envoy//bazel:envoy_library.bzl", | ||
| "envoy_proto_library", | ||
| ) | ||
|
|
||
| package(default_visibility = ["//visibility:public"]) | ||
|
|
||
| licenses(["notice"]) | ||
|
|
||
| envoy_proto_library( | ||
| name = "config", | ||
| srcs = ["config.proto"], | ||
| ) | ||
|
|
||
| envoy_cc_library( | ||
| name = "peer_metadata", | ||
| srcs = [ | ||
| "peer_metadata.cc", | ||
| ], | ||
| repository = "@envoy", | ||
| deps = [ | ||
| ":config_cc_proto", | ||
| "//extensions/common:metadata_object_lib", | ||
| "@envoy//envoy/buffer:buffer_interface", | ||
| "@envoy//envoy/network:address_interface", | ||
| "@envoy//envoy/network:filter_interface", | ||
| "@envoy//envoy/server:filter_config_interface", | ||
| "@envoy//source/common/common:minimal_logger_lib", | ||
| "@envoy//source/common/router:string_accessor_lib", | ||
| "@envoy//source/common/singleton:const_singleton", | ||
| "@envoy//source/common/stream_info:bool_accessor_lib", | ||
| "@envoy//source/common/tcp_proxy", | ||
| "@envoy//source/extensions/filters/common/expr:cel_state_lib", | ||
| "@envoy//source/extensions/filters/network/common:factory_base_lib", | ||
| ], | ||
| ) |
44 changes: 44 additions & 0 deletions
44
source/extensions/filters/network/peer_metadata/config.proto
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| /* Copyright 2026 Istio Authors. All Rights Reserved. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| syntax = "proto3"; | ||
|
|
||
| package envoy.extensions.network_filters.peer_metadata; | ||
|
|
||
| message Config { | ||
| // What filter state to use to save the baggage value that encodes the proxy | ||
| // workload. | ||
| // | ||
| // The upstream filter that will populate the baggage header in the HBONE | ||
| // request should be configured to use the same key. | ||
| // | ||
| // Why share baggage value via filter state instead of configruing upstream | ||
| // filter to use the baggage key value directly? | ||
| // | ||
| // ztunnel and waypoint have to be aware of the baggage header format, | ||
| // because they should be able to parse baggage headers to extract the | ||
| // metadata and report the metrics. However, pilot does not need to be aware | ||
| // of the baggage encoding yet. | ||
| // | ||
| // If instead of using custom filter to generate baggage header value we just | ||
| // let pilot generate it, it would spread the logic for generating baggage to | ||
| // the pilot as well. While not a big deal, if there is no clear reason to do | ||
| // it, let's not duplicate the implementation of baggage logic in pilot and | ||
| // just re-use the logic we already have in Envoy. | ||
| string baggage_key = 1; | ||
| } | ||
|
|
||
| message UpstreamConfig { | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.