grpc-java icon indicating copy to clipboard operation
grpc-java copied to clipboard

feat(xds): Add header mutations library

Open sauravzg opened this issue 1 month ago • 0 comments

This PR sits on top of https://github.com/grpc/grpc-java/pull/12493, so only the last commit + any fixups need to be reviewed.

This commit introduces a library for handling header mutations as specified by the xDS protocol. This library provides the core functionality for modifying request and response headers based on a set of rules.

The main components of this library are:

  • HeaderMutator: Applies header mutations to Metadata objects.
  • HeaderMutationFilter: Filters header mutations based on a set of configurable rules, such as disallowing mutations of system headers.
  • HeaderMutations: A value class that represents the set of mutations to be applied to request and response headers.
  • HeaderMutationDisallowedException: An exception that is thrown when a disallowed header mutation is attempted.

This commit also includes comprehensive unit tests for the new library.

  • [] #12491 feat(xds): Update Envoy proto definitions and add ExtAuthz gRPC service
  • [] #12492 feat(xds): Add configuration objects for ExtAuthz and GrpcService
  • [] #12493 feat(xds): Implement request builder for external authorization
  • [x] #12494 feat(xds): Add header mutations library
  • [] TBD: PR_LINK feat(xds): Implement response handling for external authorization
  • [] TBD: PR_LINK feat(xds): Add ExtAuthzClientInterceptor and related components
  • [] TBD: PR_LINK feat(xds): Add ExtAuthzServerInterceptor and tests
  • [] TBD: PR_LINK feat(xds): Add ExternalAuthorizationFilter

sauravzg avatar Nov 11 '25 08:11 sauravzg