external_processor.proto

Package: solo.io.envoy.service.ext_proc.v3

Types:

Source File: github.com/solo-io/gloo/projects/gloo/api/external/envoy/service/ext_proc/v3/external_processor.proto

ProcessingRequest

This represents the different types of messages that Envoy can send to an external processing server. [#next-free-field: 11]

"requestHeaders": .solo.io.envoy.service.ext_proc.v3.HttpHeaders
"responseHeaders": .solo.io.envoy.service.ext_proc.v3.HttpHeaders
"requestBody": .solo.io.envoy.service.ext_proc.v3.HttpBody
"responseBody": .solo.io.envoy.service.ext_proc.v3.HttpBody
"requestTrailers": .solo.io.envoy.service.ext_proc.v3.HttpTrailers
"responseTrailers": .solo.io.envoy.service.ext_proc.v3.HttpTrailers
"metadataContext": .solo.io.envoy.config.core.v3.Metadata
"attributes": map<string, .google.protobuf.Struct>
"observabilityMode": bool

Field Type Description
requestHeaders .solo.io.envoy.service.ext_proc.v3.HttpHeaders Information about the HTTP request headers, as well as peer info and additional properties. Unless observability_mode is true, the server must send back a HeaderResponse message, an ImmediateResponse message, or close the stream. Only one of requestHeaders, responseHeaders, requestBody, responseBody, requestTrailers, or responseTrailers can be set.
responseHeaders .solo.io.envoy.service.ext_proc.v3.HttpHeaders Information about the HTTP response headers, as well as peer info and additional properties. Unless observability_mode is true, the server must send back a HeaderResponse message or close the stream. Only one of responseHeaders, requestHeaders, requestBody, responseBody, requestTrailers, or responseTrailers can be set.
requestBody .solo.io.envoy.service.ext_proc.v3.HttpBody A chunk of the HTTP request body. Unless observability_mode is true, the server must send back a BodyResponse message, an ImmediateResponse message, or close the stream. Only one of requestBody, requestHeaders, responseHeaders, responseBody, requestTrailers, or responseTrailers can be set.
responseBody .solo.io.envoy.service.ext_proc.v3.HttpBody A chunk of the HTTP response body. Unless observability_mode is true, the server must send back a BodyResponse message or close the stream. Only one of responseBody, requestHeaders, responseHeaders, requestBody, requestTrailers, or responseTrailers can be set.
requestTrailers .solo.io.envoy.service.ext_proc.v3.HttpTrailers The HTTP trailers for the request path. Unless observability_mode is true, the server must send back a TrailerResponse message or close the stream. This message is only sent if the trailers processing mode is set to SEND and the original downstream request has trailers. Only one of requestTrailers, requestHeaders, responseHeaders, requestBody, responseBody, or responseTrailers can be set.
responseTrailers .solo.io.envoy.service.ext_proc.v3.HttpTrailers The HTTP trailers for the response path. Unless observability_mode is true, the server must send back a TrailerResponse message or close the stream. This message is only sent if the trailers processing mode is set to SEND and the original upstream response has trailers. Only one of responseTrailers, requestHeaders, responseHeaders, requestBody, responseBody, or requestTrailers can be set.
metadataContext .solo.io.envoy.config.core.v3.Metadata Dynamic metadata associated with the request.
attributes map<string, .google.protobuf.Struct> The values of properties selected by the request_attributes or response_attributes list in the configuration. Each entry in the list is populated from the standard :ref:attributes <arch_overview_attributes> supported across Envoy.
observabilityMode bool Specify whether the filter that sent this request is running in :ref:observability_mode <envoy_v3_api_field_extensions.filters.http.ext_proc.v3.ExternalProcessor.observability_mode> and defaults to false. * A value of false indicates that the server must respond to this message by either sending back a matching ProcessingResponse message, or by closing the stream. * A value of true indicates that the server should not respond to this message, as any responses will be ignored. However, it may still close the stream to indicate that no more messages are needed.

ProcessingResponse

For every ProcessingRequest received by the server with the observability_mode field set to false, the server must send back exactly one ProcessingResponse message. [#next-free-field: 11]

"requestHeaders": .solo.io.envoy.service.ext_proc.v3.HeadersResponse
"responseHeaders": .solo.io.envoy.service.ext_proc.v3.HeadersResponse
"requestBody": .solo.io.envoy.service.ext_proc.v3.BodyResponse
"responseBody": .solo.io.envoy.service.ext_proc.v3.BodyResponse
"requestTrailers": .solo.io.envoy.service.ext_proc.v3.TrailersResponse
"responseTrailers": .solo.io.envoy.service.ext_proc.v3.TrailersResponse
"immediateResponse": .solo.io.envoy.service.ext_proc.v3.ImmediateResponse
"dynamicMetadata": .google.protobuf.Struct
"modeOverride": .solo.io.envoy.extensions.filters.http.ext_proc.v3.ProcessingMode
"overrideMessageTimeout": .google.protobuf.Duration

Field Type Description
requestHeaders .solo.io.envoy.service.ext_proc.v3.HeadersResponse The server must send back this message in response to a message with the request_headers field set. Only one of requestHeaders, responseHeaders, requestBody, responseBody, requestTrailers, responseTrailers, or immediateResponse can be set.
responseHeaders .solo.io.envoy.service.ext_proc.v3.HeadersResponse The server must send back this message in response to a message with the response_headers field set. Only one of responseHeaders, requestHeaders, requestBody, responseBody, requestTrailers, responseTrailers, or immediateResponse can be set.
requestBody .solo.io.envoy.service.ext_proc.v3.BodyResponse The server must send back this message in response to a message with the request_body field set. Only one of requestBody, requestHeaders, responseHeaders, responseBody, requestTrailers, responseTrailers, or immediateResponse can be set.
responseBody .solo.io.envoy.service.ext_proc.v3.BodyResponse The server must send back this message in response to a message with the response_body field set. Only one of responseBody, requestHeaders, responseHeaders, requestBody, requestTrailers, responseTrailers, or immediateResponse can be set.
requestTrailers .solo.io.envoy.service.ext_proc.v3.TrailersResponse The server must send back this message in response to a message with the request_trailers field set. Only one of requestTrailers, requestHeaders, responseHeaders, requestBody, responseBody, responseTrailers, or immediateResponse can be set.
responseTrailers .solo.io.envoy.service.ext_proc.v3.TrailersResponse The server must send back this message in response to a message with the response_trailers field set. Only one of responseTrailers, requestHeaders, responseHeaders, requestBody, responseBody, requestTrailers, or immediateResponse can be set.
immediateResponse .solo.io.envoy.service.ext_proc.v3.ImmediateResponse If specified, attempt to create a locally generated response, send it downstream, and stop processing additional filters and ignore any additional messages received from the remote server for this request or response. If a response has already started – for example, if this message is sent response to a response_body message – then this will either ship the reply directly to the downstream codec, or reset the stream. Only one of immediateResponse, requestHeaders, responseHeaders, requestBody, responseBody, requestTrailers, or responseTrailers can be set.
dynamicMetadata .google.protobuf.Struct Optional metadata that will be emitted as dynamic metadata to be consumed by following filters. This metadata will be placed in the namespace(s) specified by the top-level field name(s) of the struct.
modeOverride .solo.io.envoy.extensions.filters.http.ext_proc.v3.ProcessingMode Override how parts of the HTTP request and response are processed for the duration of this particular request/response only. Servers may use this to intelligently control how requests are processed based on the headers and other metadata that they see. This field is only applicable when servers responding to the header requests. If it is set in the response to the body or trailer requests, it will be ignored by Envoy. It is also ignored by Envoy when the ext_proc filter config :ref:allow_mode_override <envoy_v3_api_field_extensions.filters.http.ext_proc.v3.ExternalProcessor.allow_mode_override> is set to false.
overrideMessageTimeout .google.protobuf.Duration When ext_proc server receives a request message, in case it needs more time to process the message, it sends back a ProcessingResponse message with a new timeout value. When Envoy receives this response message, it ignores other fields in the response, just stop the original timer, which has the timeout value specified in :ref:message_timeout <envoy_v3_api_field_extensions.filters.http.ext_proc.v3.ExternalProcessor.message_timeout> and start a new timer with this override_message_timeout value and keep the Envoy ext_proc filter state machine intact. Has to be >= 1ms and <= :ref:max_message_timeout <envoy_v3_api_field_extensions.filters.http.ext_proc.v3.ExternalProcessor.max_message_timeout> Such message can be sent at most once in a particular Envoy ext_proc filter processing state. To enable this API, one has to set max_message_timeout to a number >= 1ms.

HttpHeaders

This message is sent to the external server when the HTTP request and responses are first received.

"headers": .solo.io.envoy.config.core.v3.HeaderMap
"attributes": map<string, .google.protobuf.Struct>
"endOfStream": bool

Field Type Description
headers .solo.io.envoy.config.core.v3.HeaderMap The HTTP request headers. All header keys will be lower-cased, because HTTP header keys are case-insensitive. The headers encoding is based on the runtime guard envoy_reloadable_features_send_header_raw_value setting. When it is true, the header value is encoded in the :ref:raw_value <envoy_v3_api_field_solo.io.envoy.config.core.v3.HeaderValue.raw_value> field. When it is false, the header value is encoded in the :ref:value <envoy_v3_api_field_solo.io.envoy.config.core.v3.HeaderValue.value> field.
attributes map<string, .google.protobuf.Struct> [#not-implemented-hide:] This field is deprecated and not implemented. Attributes will be sent in the top-level :ref:attributes <envoy_v3_api_field_service.ext_proc.v3.ProcessingRequest.attributes field.
endOfStream bool If true, then there is no message body associated with this request or response.

HttpBody

This message contains the message body that Envoy sends to the external server.

"body": bytes
"endOfStream": bool

Field Type Description
body bytes
endOfStream bool

HttpTrailers

This message contains the trailers.

"trailers": .solo.io.envoy.config.core.v3.HeaderMap

Field Type Description
trailers .solo.io.envoy.config.core.v3.HeaderMap The trailers encoding is based on the runtime guard envoy_reloadable_features_send_header_raw_value setting. When it is true, the header value is encoded in the :ref:raw_value <envoy_v3_api_field_solo.io.envoy.config.core.v3.HeaderValue.raw_value> field. When it is false, the header value is encoded in the :ref:value <envoy_v3_api_field_solo.io.envoy.config.core.v3.HeaderValue.value> field.

HeadersResponse

This message must be sent in response to an HttpHeaders message.

"response": .solo.io.envoy.service.ext_proc.v3.CommonResponse

Field Type Description
response .solo.io.envoy.service.ext_proc.v3.CommonResponse

TrailersResponse

This message must be sent in response to an HttpTrailers message.

"headerMutation": .solo.io.envoy.service.ext_proc.v3.HeaderMutation

Field Type Description
headerMutation .solo.io.envoy.service.ext_proc.v3.HeaderMutation Instructions on how to manipulate the trailers.

BodyResponse

This message must be sent in response to an HttpBody message.

"response": .solo.io.envoy.service.ext_proc.v3.CommonResponse

Field Type Description
response .solo.io.envoy.service.ext_proc.v3.CommonResponse

CommonResponse

This message contains common fields between header and body responses. [#next-free-field: 6]

"status": .solo.io.envoy.service.ext_proc.v3.CommonResponse.ResponseStatus
"headerMutation": .solo.io.envoy.service.ext_proc.v3.HeaderMutation
"bodyMutation": .solo.io.envoy.service.ext_proc.v3.BodyMutation
"trailers": .solo.io.envoy.config.core.v3.HeaderMap
"clearRouteCache": bool

Field Type Description
status .solo.io.envoy.service.ext_proc.v3.CommonResponse.ResponseStatus If set, provide additional direction on how the Envoy proxy should handle the rest of the HTTP filter chain.
headerMutation .solo.io.envoy.service.ext_proc.v3.HeaderMutation Instructions on how to manipulate the headers. When responding to an HttpBody request, header mutations will only take effect if the current processing mode for the body is BUFFERED.
bodyMutation .solo.io.envoy.service.ext_proc.v3.BodyMutation Replace the body of the last message sent to the remote server on this stream. If responding to an HttpBody request, simply replace or clear the body chunk that was sent with that request. Body mutations may take effect in response either to header or body messages. When it is in response to header messages, it only take effect if the :ref:status <envoy_v3_api_field_service.ext_proc.v3.CommonResponse.status> is set to CONTINUE_AND_REPLACE.
trailers .solo.io.envoy.config.core.v3.HeaderMap [#not-implemented-hide:] Add new trailers to the message. This may be used when responding to either a HttpHeaders or HttpBody message, but only if this message is returned along with the CONTINUE_AND_REPLACE status. The trailers encoding is based on the runtime guard envoy_reloadable_features_send_header_raw_value setting. When it is true, the header value is encoded in the :ref:raw_value <envoy_v3_api_field_solo.io.envoy.config.core.v3.HeaderValue.raw_value> field. When it is false, the header value is encoded in the :ref:value <envoy_v3_api_field_solo.io.envoy.config.core.v3.HeaderValue.value> field.
clearRouteCache bool Clear the route cache for the current client request. This is necessary if the remote server modified headers that are used to calculate the route. This field is ignored in the response direction. This field is also ignored if the Envoy ext_proc filter is in the upstream filter chain.

ResponseStatus

Name Description
CONTINUE Apply the mutation instructions in this message to the request or response, and then continue processing the filter stream as normal. This is the default.
CONTINUE_AND_REPLACE Apply the specified header mutation, replace the body with the body specified in the body mutation (if present), and do not send any further messages for this request or response even if the processing mode is configured to do so. When used in response to a request_headers or response_headers message, this status makes it possible to either completely replace the body while discarding the original body, or to add a body to a message that formerly did not have one. In other words, this response makes it possible to turn an HTTP GET into a POST, PUT, or PATCH.

ImmediateResponse

This message causes the filter to attempt to create a locally generated response, send it downstream, stop processing additional filters, and ignore any additional messages received from the remote server for this request or response. If a response has already started, then this will either ship the reply directly to the downstream codec, or reset the stream. [#next-free-field: 6]

"status": .solo.io.envoy.type.v3.HttpStatus
"headers": .solo.io.envoy.service.ext_proc.v3.HeaderMutation
"body": bytes
"grpcStatus": .solo.io.envoy.service.ext_proc.v3.GrpcStatus
"details": string

Field Type Description
status .solo.io.envoy.type.v3.HttpStatus The response code to return.
headers .solo.io.envoy.service.ext_proc.v3.HeaderMutation Apply changes to the default headers, which will include content-type.
body bytes The message body to return with the response which is sent using the text/plain content type, or encoded in the grpc-message header.
grpcStatus .solo.io.envoy.service.ext_proc.v3.GrpcStatus If set, then include a gRPC status trailer.
details string A string detailing why this local reply was sent, which may be included in log and debug output (e.g. this populates the %RESPONSE_CODE_DETAILS% command operator field for use in access logging).

GrpcStatus

This message specifies a gRPC status for an ImmediateResponse message.

"status": int

Field Type Description
status int The actual gRPC status.

HeaderMutation

Change HTTP headers or trailers by appending, replacing, or removing headers.

"setHeaders": []solo.io.envoy.config.core.v3.HeaderValueOption
"removeHeaders": []string

Field Type Description
setHeaders []solo.io.envoy.config.core.v3.HeaderValueOption Add or replace HTTP headers. Attempts to set the value of any x-envoy header, and attempts to set the :method, :authority, :scheme, or host headers will be ignored. The set_headers encoding is based on the runtime guard envoy_reloadable_features_send_header_raw_value setting. When it is true, the header value is encoded in the :ref:raw_value <envoy_v3_api_field_solo.io.envoy.config.core.v3.HeaderValue.raw_value> field. When it is false, the header value is encoded in the :ref:value <envoy_v3_api_field_solo.io.envoy.config.core.v3.HeaderValue.value> field.
removeHeaders []string Remove these HTTP headers. Attempts to remove system headers – any header starting with :, plus host – will be ignored.

BodyMutation

Replace the entire message body chunk received in the corresponding HttpBody message with this new body, or clear the body.

"body": bytes
"clearBody": bool

Field Type Description
body bytes The entire body to replace. Only one of body or clearBody can be set.
clearBody bool Clear the corresponding body chunk. Only one of clearBody or body can be set.