feat(xds): Add configuration objects for ExtAuthz and GrpcService
This PR sits on top of #12491 , so only the last commit + any fixups need to be reviewed.
This commit introduces configuration objects for the external authorization (ExtAuthz) filter and the gRPC service it uses. These classes provide a structured, immutable representation of the subset of the configuration defined in the xDS protobuf messages.
The main new classes are:
ExtAuthzConfig: Represents the configuration for theExtAuthzfilter, including settings for the gRPC service, header mutation rules, and other filter behaviors.GrpcServiceConfig: Represents the configuration for a gRPC service, including the target URI, credentials, and other settings.HeaderMutationRulesConfig: Represents the configuration for header mutation rules.
This commit only bothers to deal with creating config objects from https://github.com/grpc/proposal/pull/510 and doesn't handle the rest of the parts about creating a secure channel. This instead opts to create an interface with an insecure implementation to unblock further development
The relevant sections of the spec are
- GrpcService: https://github.com/grpc/proposal/pull/510/files#diff-61e10e8b2092d4512b1a172765337bf2d50105e2cdc7b3385b40a2682d3f0dfcR143-R248
- ExtAuthz: https://github.com/grpc/proposal/pull/481/files#diff-6bb76a24aa142cc33db9218509688f01b30c8885d2fd8849f164244e68cd54eaR106-R190
This commit also includes parsers to create these configuration objects from the corresponding protobuf messages, as well as unit tests for the new classes.
Chain of dependent PRs
- [x] #12491 feat(xds): Update Envoy proto definitions and add ExtAuthz gRPC service
- [ ] #12492 feat(xds): Add configuration objects for ExtAuthz and GrpcService