package envoy.extensions.filters.http.ext_proc.v3

Mouse Melon logoGet desktop application:
View/edit binary Protocol Buffers messages

message ExtProcHttpService

ext_proc.proto:345

ExtProcHttpService is used for HTTP communication between the filter and the external processing service.

Used in: ExternalProcessor

message ExtProcOverrides

ext_proc.proto:417

Overrides that may be set on a per-route basis [#next-free-field: 8]

Used in: ExtProcPerRoute

message ExtProcPerRoute

ext_proc.proto:400

Extra settings that may be added to per-route configuration for a virtual host or cluster.

message ExternalProcessor

ext_proc.proto:101

The filter communicates with an external gRPC service called an "external processor" that can do a variety of things with the request and response: * Access and modify the HTTP headers on the request, response, or both * Access and modify the HTTP request and response bodies * Access and modify the dynamic stream metadata * Immediately send an HTTP response downstream and terminate other processing The filter communicates with the server using a gRPC bidirectional stream. After the initial request, the external server is in control over what additional data is sent to it and how it should be processed. By implementing the protocol specified by the stream, the external server can choose: * Whether it receives the response message at all * Whether it receives the message body at all, in separate chunks, or as a single buffer * Whether subsequent HTTP requests are transmitted synchronously or whether they are sent asynchronously. * To modify request or response trailers if they already exist The filter supports up to six different processing steps. Each is represented by a gRPC stream message that is sent to the external processor. For each message, the processor must send a matching response. * Request headers: Contains the headers from the original HTTP request. * Request body: Delivered if they are present and sent in a single message if the BUFFERED or BUFFERED_PARTIAL mode is chosen, in multiple messages if the STREAMED mode is chosen, and not at all otherwise. * Request trailers: Delivered if they are present and if the trailer mode is set to SEND. * Response headers: Contains the headers from the HTTP response. Keep in mind that if the upstream system sends them before processing the request body that this message may arrive before the complete body. * Response body: Sent according to the processing mode like the request body. * Response trailers: Delivered according to the processing mode like the request trailers. By default, the processor sends only the request and response headers messages. This may be changed to include any of the six steps by changing the processing_mode setting of the filter configuration, or by setting the mode_override of any response from the external processor. The latter is only enabled if allow_mode_override is set to true. This way, a processor may, for example, use information in the request header to determine whether the message body must be examined, or whether the proxy should simply stream it straight through. All of this together allows a server to process the filter traffic in fairly sophisticated ways. For example: * A server may choose to examine all or part of the HTTP message bodies depending on the content of the headers. * A server may choose to immediately reject some messages based on their HTTP headers (or other dynamic metadata) and more carefully examine others. * A server may asynchronously monitor traffic coming through the filter by inspecting headers, bodies, or both, and then decide to switch to a synchronous processing mode, either permanently or temporarily. The protocol itself is based on a bidirectional gRPC stream. Envoy will send the server :ref:`ProcessingRequest <envoy_v3_api_msg_service.ext_proc.v3.ProcessingRequest>` messages, and the server must reply with :ref:`ProcessingResponse <envoy_v3_api_msg_service.ext_proc.v3.ProcessingResponse>`. Stats about each gRPC call are recorded in a :ref:`dynamic filter state <arch_overview_advanced_filter_state_sharing>` object in a namespace matching the filter name. [#next-free-field: 24]

enum ExternalProcessor.RouteCacheAction

ext_proc.proto:104

Describes the route cache action to be taken when an external processor response is received in response to request headers.

Used in: ExternalProcessor

message HeaderForwardingRules

ext_proc.proto:388

The HeaderForwardingRules structure specifies what headers are allowed to be forwarded to the external processing server. This works as below: 1. If neither ``allowed_headers`` nor ``disallowed_headers`` is set, all headers are forwarded. 2. If both ``allowed_headers`` and ``disallowed_headers`` are set, only headers in the ``allowed_headers`` but not in the ``disallowed_headers`` are forwarded. 3. If ``allowed_headers`` is set, and ``disallowed_headers`` is not set, only headers in the ``allowed_headers`` are forwarded. 4. If ``disallowed_headers`` is set, and ``allowed_headers`` is not set, all headers except headers in the ``disallowed_headers`` are forwarded.

Used in: ExternalProcessor

message MetadataOptions

ext_proc.proto:353

The MetadataOptions structure defines options for the sending and receiving of dynamic metadata. Specifically, which namespaces to send to the server, whether metadata returned by the server may be written, and how that metadata may be written.

Used in: ExtProcOverrides, ExternalProcessor

message MetadataOptions.MetadataNamespaces

ext_proc.proto:354

Used in: MetadataOptions

message ProcessingMode

processing_mode.proto:22

[#next-free-field: 7]

Used in: ExtProcOverrides, ExternalProcessor, service.ext_proc.v3.ProcessingResponse

enum ProcessingMode.BodySendMode

processing_mode.proto:64

Control how the request and response bodies are handled When body mutation by external processor is enabled, ext_proc filter will always remove the content length header in four cases below because content length can not be guaranteed to be set correctly: 1) STREAMED BodySendMode: header processing completes before body mutation comes back. 2) BUFFERED_PARTIAL BodySendMode: body is buffered and could be injected in different phases. 3) BUFFERED BodySendMode + SKIP HeaderSendMode: header processing (e.g., update content-length) is skipped. 4) FULL_DUPLEX_STREAMED BodySendMode: header processing completes before body mutation comes back. In Envoy's http1 codec implementation, removing content length will enable chunked transfer encoding whenever feasible. The recipient (either client or server) must be able to parse and decode the chunked transfer coding. (see `details in RFC9112 <https://tools.ietf.org/html/rfc9112#section-7.1>`_). In BUFFERED BodySendMode + SEND HeaderSendMode, content length header is allowed but it is external processor's responsibility to set the content length correctly matched to the length of mutated body. If they don't match, the corresponding body mutation will be rejected and local reply will be sent with an error message.

Used in: ProcessingMode, service.ext_proc.v3.ProtocolConfiguration

enum ProcessingMode.HeaderSendMode

processing_mode.proto:24

Control how headers and trailers are handled

Used in: ProcessingMode