Envoy configuration
Envoy Configuration
In order to enable Callout Enforcer, the following changes to Envoy configuration are required:
- adjust
http_filters
section - adjust
clusters
section
http_filters section
Parameters description (Envoy documentation):
- grpcservice -> envoygrpc -> cluster_name: the name of “callout” cluster in clusters section
- grpcservice -> envoygrpc -> timeout: (recommended 1-5 seconds) The timeout for the gRPC request
- failure_mode_allow: By default, if the gRPC stream cannot be established, or if it is closed prematurely with an error, the filter will fail. Specifically, if the response headers have not yet been delivered, then it will return a 500 error downstream
- allow_mode_override: (required True) If allow_mode_override is set to true, the filter config processing_mode can be overridden by the response message from the external processing server mode_override.
- message_timeout: (recommended 1-5 seconds) Specifies the timeout for each individual message sent on the stream
Processing mode:
- request_header_mode: (required SEND) Control how request headers are handled
- response_header_mode: (required SEND) Control how response headers are handled
- request_body_mode: (required NONE) Control how the request body is handled
- response_body_mode: (required NONE) Control how the response body is handled
- request_trailer_mode: (required SKIP) Control how request trailers are handled
- response_trailer_mode: (required SKIP) Control how response trailers are handled
clusters section
Parameters description (Envoy documentation):
- endpoints -> lb_endpoints -> endpoint -> address -> socket_address: (required) replace with the Callout Enforcer address
- health_checks: an optional section, can be ignored (see below “Health Check” paragraph)