Thrift Proxy

This extension has the qualified name envoy.filters.network.thrift_proxy

Note

This extension is not hardened and should only be used in deployments where both the downstream and upstream are trusted.

Tip

This extension extends and can be used with the following extension category:

This extension must be configured with one of the following type URLs:

Thrift Proxy configuration overview.

extensions.filters.network.thrift_proxy.v3.Trds

[extensions.filters.network.thrift_proxy.v3.Trds proto]

{
  "config_source": "{...}",
  "route_config_name": "..."
}
config_source

(config.core.v3.ConfigSource, REQUIRED) Configuration source specifier. In case of api_config_source only aggregated api_type is supported.

route_config_name

(string) The name of the route configuration. This allows to use different route configurations. Tells which route configuration should be fetched from the configuration source. Leave unspecified is also valid and means the unnamed route configuration.

extensions.filters.network.thrift_proxy.v3.ThriftProxy

[extensions.filters.network.thrift_proxy.v3.ThriftProxy proto]

{
  "transport": "...",
  "protocol": "...",
  "stat_prefix": "...",
  "route_config": "{...}",
  "trds": "{...}",
  "thrift_filters": [],
  "payload_passthrough": "...",
  "max_requests_per_connection": "{...}",
  "access_log": [],
  "header_keys_preserve_case": "..."
}
transport

(extensions.filters.network.thrift_proxy.v3.TransportType) Supplies the type of transport that the Thrift proxy should use. Defaults to AUTO_TRANSPORT.

protocol

(extensions.filters.network.thrift_proxy.v3.ProtocolType) Supplies the type of protocol that the Thrift proxy should use. Defaults to AUTO_PROTOCOL.

stat_prefix

(string, REQUIRED) The human readable prefix to use when emitting statistics.

route_config

(extensions.filters.network.thrift_proxy.v3.RouteConfiguration) The route table for the connection manager is static and is specified in this property. It is invalid to define both route_config and trds.

trds

(extensions.filters.network.thrift_proxy.v3.Trds) Use xDS to fetch the route configuration. It is invalid to define both route_config and trds.

thrift_filters

(repeated extensions.filters.network.thrift_proxy.v3.ThriftFilter) A list of individual Thrift filters that make up the filter chain for requests made to the Thrift proxy. Order matters as the filters are processed sequentially. For backwards compatibility, if no thrift_filters are specified, a default Thrift router filter (envoy.filters.thrift.router) is used.

Tip

This extension category has the following known extensions:

payload_passthrough

(bool) If set to true, Envoy will try to skip decode data after metadata in the Thrift message. This mode will only work if the upstream and downstream protocols are the same and the transports are Framed or Header, and the protocol is not Twitter. Otherwise Envoy will fallback to decode the data.

max_requests_per_connection

(UInt32Value) Optional maximum requests for a single downstream connection. If not specified, there is no limit.

access_log

(repeated config.accesslog.v3.AccessLog) Configuration for access logs emitted by Thrift proxy.

header_keys_preserve_case

(bool) If set to true, Envoy will preserve the case of Thrift header keys instead of serializing them to lower case as per the default behavior. Note that NUL, CR and LF characters will also be preserved as mandated by the Thrift spec.

More info: https://github.com/apache/thrift/commit/e165fa3c85d00cb984f4d9635ed60909a1266ce1.

extensions.filters.network.thrift_proxy.v3.ThriftFilter

[extensions.filters.network.thrift_proxy.v3.ThriftFilter proto]

ThriftFilter configures a Thrift filter.

{
  "name": "...",
  "typed_config": "{...}"
}
name

(string, REQUIRED) The name of the filter to instantiate. The name must match a supported filter. The built-in filters are:

typed_config

(Any) Filter specific configuration which depends on the filter being instantiated. See the supported filters for further documentation.

extensions.filters.network.thrift_proxy.v3.ThriftProtocolOptions

[extensions.filters.network.thrift_proxy.v3.ThriftProtocolOptions proto]

ThriftProtocolOptions specifies Thrift upstream protocol options. This object is used in in typed_extension_protocol_options, keyed by the name envoy.filters.network.thrift_proxy.

{
  "transport": "...",
  "protocol": "..."
}
transport

(extensions.filters.network.thrift_proxy.v3.TransportType) Supplies the type of transport that the Thrift proxy should use for upstream connections. Selecting AUTO_TRANSPORT, which is the default, causes the proxy to use the same transport as the downstream connection.

protocol

(extensions.filters.network.thrift_proxy.v3.ProtocolType) Supplies the type of protocol that the Thrift proxy should use for upstream connections. Selecting AUTO_PROTOCOL, which is the default, causes the proxy to use the same protocol as the downstream connection.

Enum extensions.filters.network.thrift_proxy.v3.TransportType

[extensions.filters.network.thrift_proxy.v3.TransportType proto]

Thrift transport types supported by Envoy.

AUTO_TRANSPORT

(DEFAULT) ⁣For downstream connections, the Thrift proxy will attempt to determine which transport to use. For upstream connections, the Thrift proxy will use same transport as the downstream connection.

FRAMED

⁣The Thrift proxy will use the Thrift framed transport.

UNFRAMED

⁣The Thrift proxy will use the Thrift unframed transport.

HEADER

⁣The Thrift proxy will assume the client is using the Thrift header transport.

Enum extensions.filters.network.thrift_proxy.v3.ProtocolType

[extensions.filters.network.thrift_proxy.v3.ProtocolType proto]

Thrift Protocol types supported by Envoy.

AUTO_PROTOCOL

(DEFAULT) ⁣For downstream connections, the Thrift proxy will attempt to determine which protocol to use. Note that the older, non-strict (or lax) binary protocol is not included in automatic protocol detection. For upstream connections, the Thrift proxy will use the same protocol as the downstream connection.

BINARY

⁣The Thrift proxy will use the Thrift binary protocol.

LAX_BINARY

⁣The Thrift proxy will use Thrift non-strict binary protocol.

COMPACT

⁣The Thrift proxy will use the Thrift compact protocol.

TWITTER

⁣The Thrift proxy will use the Thrift “Twitter” protocol implemented by the finagle library.