Skip to content

Enhance and extend the Header-to-Metadata filter #7771

@yangminzhu

Description

@yangminzhu

Title: Enhance and extend the Header-to-Metadata filter

Description:
The dynamic metadata is the key component for exchanging information between filters in Envoy, but the limitation is it's hard to exchange information across envoy.

The Header-To-Metadata filter makes this easier as it could convert the header to metadata. But it still has some limitations:

  • It doesn't support to convert to protobuf.Struct as the value type
  • It doesn't support to convert metadata to header which could be useful in corss envoy information exchange

The limitation could be resolved with relative small changes:

  • Add a "STRUCT" ValueType, it reads from a base64 encoded header and deserialize to the protobuf Struct message.
  • Add a new filter Metadata-To-Header which does the opposite operation compared to the Header-To-Metadata filter.

One use case in Istio is we could configure a "Metadata-To-Header" filter in client side to write some metadata to the header before sending the request. On server side, the "Header-To-Metadata" filter will then decode the metadata from the header which will be used by following filters for various purposes.

Does this feature request sounds reasonable to be added? I'm happy to send out some PRs to implement it if so. Thank you.

cc @mattklein123 @rgs1 @zuercher

[optional Relevant Links:]
The feature request for supporting exchanging arbitrary metadata between sidecars: #6532

Metadata

Metadata

Assignees

Labels

enhancementFeature requests. Not bugs or questions.stalestalebot believes this issue/PR has not been touched recently

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions