protocol

package
v1.13.0-beta19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HttpProtocolOptions_HeadersWithUnderscoresAction_name = map[int32]string{
		0: "ALLOW",
		1: "REJECT_REQUEST",
		2: "DROP_HEADER",
	}
	HttpProtocolOptions_HeadersWithUnderscoresAction_value = map[string]int32{
		"ALLOW":          0,
		"REJECT_REQUEST": 1,
		"DROP_HEADER":    2,
	}
)

Enum value maps for HttpProtocolOptions_HeadersWithUnderscoresAction.

View Source
var File_github_com_solo_io_gloo_projects_gloo_api_v1_options_protocol_protocol_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Http1ProtocolOptions

type Http1ProtocolOptions struct {

	// Enables trailers for HTTP/1. By default the HTTP/1 codec drops proxied trailers.
	// Note: Trailers must also be enabled at the gateway level in order for this option to take effect.
	EnableTrailers bool `protobuf:"varint,1,opt,name=enable_trailers,json=enableTrailers,proto3" json:"enable_trailers,omitempty"`
	// Types that are assignable to HeaderFormat:
	//	*Http1ProtocolOptions_ProperCaseHeaderKeyFormat
	//	*Http1ProtocolOptions_PreserveCaseHeaderKeyFormat
	HeaderFormat isHttp1ProtocolOptions_HeaderFormat `protobuf_oneof:"header_format"`
	// Allows invalid HTTP messaging. When this option is false, then Envoy will terminate
	// HTTP/1.1 connections upon receiving an invalid HTTP message. However,
	// when this option is true, then Envoy will leave the HTTP/1.1 connection
	// open where possible.
	// If set, this overrides any HCM :ref:`stream_error_on_invalid_http_messaging
	// <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_error_on_invalid_http_message>`.
	OverrideStreamErrorOnInvalidHttpMessage *wrappers.BoolValue `` /* 188-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Http1ProtocolOptions) Clone

func (m *Http1ProtocolOptions) Clone() proto.Message

Clone function

func (*Http1ProtocolOptions) Descriptor deprecated

func (*Http1ProtocolOptions) Descriptor() ([]byte, []int)

Deprecated: Use Http1ProtocolOptions.ProtoReflect.Descriptor instead.

func (*Http1ProtocolOptions) Equal

func (m *Http1ProtocolOptions) Equal(that interface{}) bool

Equal function

func (*Http1ProtocolOptions) GetEnableTrailers

func (x *Http1ProtocolOptions) GetEnableTrailers() bool

func (*Http1ProtocolOptions) GetHeaderFormat

func (m *Http1ProtocolOptions) GetHeaderFormat() isHttp1ProtocolOptions_HeaderFormat

func (*Http1ProtocolOptions) GetOverrideStreamErrorOnInvalidHttpMessage

func (x *Http1ProtocolOptions) GetOverrideStreamErrorOnInvalidHttpMessage() *wrappers.BoolValue

func (*Http1ProtocolOptions) GetPreserveCaseHeaderKeyFormat

func (x *Http1ProtocolOptions) GetPreserveCaseHeaderKeyFormat() bool

func (*Http1ProtocolOptions) GetProperCaseHeaderKeyFormat

func (x *Http1ProtocolOptions) GetProperCaseHeaderKeyFormat() bool

func (*Http1ProtocolOptions) Hash

func (m *Http1ProtocolOptions) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*Http1ProtocolOptions) ProtoMessage

func (*Http1ProtocolOptions) ProtoMessage()

func (*Http1ProtocolOptions) ProtoReflect

func (x *Http1ProtocolOptions) ProtoReflect() protoreflect.Message

func (*Http1ProtocolOptions) Reset

func (x *Http1ProtocolOptions) Reset()

func (*Http1ProtocolOptions) String

func (x *Http1ProtocolOptions) String() string

type Http1ProtocolOptions_PreserveCaseHeaderKeyFormat

type Http1ProtocolOptions_PreserveCaseHeaderKeyFormat struct {
	// Generates configuration for a stateful formatter extension that allows using received headers to
	// affect the output of encoding headers. Specifically: preserving REQUEST HEADER case during proxying.
	PreserveCaseHeaderKeyFormat bool `protobuf:"varint,31,opt,name=preserve_case_header_key_format,json=preserveCaseHeaderKeyFormat,proto3,oneof"`
}

type Http1ProtocolOptions_ProperCaseHeaderKeyFormat

type Http1ProtocolOptions_ProperCaseHeaderKeyFormat struct {
	// Formats the REQUEST HEADER by proper casing words: the first character and any character following
	// a special character will be capitalized if it's an alpha character. For example,
	// "content-type" becomes "Content-Type", and "foo$b#$are" becomes "Foo$B#$Are".
	// Note that while this results in most headers following conventional casing, certain headers
	// are not covered. For example, the "TE" header will be formatted as "Te".
	ProperCaseHeaderKeyFormat bool `protobuf:"varint,22,opt,name=proper_case_header_key_format,json=properCaseHeaderKeyFormat,proto3,oneof"`
}

type Http2ProtocolOptions

type Http2ProtocolOptions struct {

	// `Maximum concurrent streams <https://httpwg.org/specs/rfc7540.html#rfc.section.5.1.2>`_
	// allowed for peer on one HTTP/2 connection. Valid values range from 1 to 2147483647 (2^31 - 1)
	// and defaults to 2147483647.
	//
	// For upstream connections, this also limits how many streams Envoy will initiate concurrently
	// on a single connection. If the limit is reached, Envoy may queue requests or establish
	// additional connections (as allowed per circuit breaker limits).
	//
	// This acts as an upper bound: Envoy will lower the max concurrent streams allowed on a given
	// connection based on upstream settings. Config dumps will reflect the configured upper bound,
	// not the per-connection negotiated limits.
	MaxConcurrentStreams *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=max_concurrent_streams,json=maxConcurrentStreams,proto3" json:"max_concurrent_streams,omitempty"`
	// `Initial stream-level flow-control window
	// <https://httpwg.org/specs/rfc7540.html#rfc.section.6.9.2>`_ size. Valid values range from 65535
	// (2^16 - 1, HTTP/2 default) to 2147483647 (2^31 - 1, HTTP/2 maximum) and defaults to 268435456
	// (256 * 1024 * 1024).
	//
	// NOTE: 65535 is the initial window size from HTTP/2 spec. We only support increasing the default
	// window size now, so it's also the minimum.
	//
	// This field also acts as a soft limit on the number of bytes Envoy will buffer per-stream in the
	// HTTP/2 codec buffers. Once the buffer reaches this pointer, watermark callbacks will fire to
	// stop the flow of data to the codec buffers.
	InitialStreamWindowSize *wrappers.UInt32Value `` /* 134-byte string literal not displayed */
	// Similar to *initial_stream_window_size*, but for connection-level flow-control
	// window. Currently, this has the same minimum/maximum/default as *initial_stream_window_size*.
	InitialConnectionWindowSize *wrappers.UInt32Value `` /* 146-byte string literal not displayed */
	// Allows invalid HTTP messaging and headers. When this option is disabled (default), then
	// the whole HTTP/2 connection is terminated upon receiving invalid HEADERS frame. However,
	// when this option is enabled, only the offending stream is terminated.
	//
	// This overrides any HCM :ref:`stream_error_on_invalid_http_messaging
	// <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_error_on_invalid_http_message>`
	//
	// See `RFC7540, sec. 8.1 <https://tools.ietf.org/html/rfc7540#section-8.1>`_ for details.
	OverrideStreamErrorOnInvalidHttpMessage *wrappers.BoolValue `` /* 189-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Http2ProtocolOptions) Clone

func (m *Http2ProtocolOptions) Clone() proto.Message

Clone function

func (*Http2ProtocolOptions) Descriptor deprecated

func (*Http2ProtocolOptions) Descriptor() ([]byte, []int)

Deprecated: Use Http2ProtocolOptions.ProtoReflect.Descriptor instead.

func (*Http2ProtocolOptions) Equal

func (m *Http2ProtocolOptions) Equal(that interface{}) bool

Equal function

func (*Http2ProtocolOptions) GetInitialConnectionWindowSize

func (x *Http2ProtocolOptions) GetInitialConnectionWindowSize() *wrappers.UInt32Value

func (*Http2ProtocolOptions) GetInitialStreamWindowSize

func (x *Http2ProtocolOptions) GetInitialStreamWindowSize() *wrappers.UInt32Value

func (*Http2ProtocolOptions) GetMaxConcurrentStreams

func (x *Http2ProtocolOptions) GetMaxConcurrentStreams() *wrappers.UInt32Value

func (*Http2ProtocolOptions) GetOverrideStreamErrorOnInvalidHttpMessage

func (x *Http2ProtocolOptions) GetOverrideStreamErrorOnInvalidHttpMessage() *wrappers.BoolValue

func (*Http2ProtocolOptions) Hash

func (m *Http2ProtocolOptions) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*Http2ProtocolOptions) ProtoMessage

func (*Http2ProtocolOptions) ProtoMessage()

func (*Http2ProtocolOptions) ProtoReflect

func (x *Http2ProtocolOptions) ProtoReflect() protoreflect.Message

func (*Http2ProtocolOptions) Reset

func (x *Http2ProtocolOptions) Reset()

func (*Http2ProtocolOptions) String

func (x *Http2ProtocolOptions) String() string

type HttpProtocolOptions

type HttpProtocolOptions struct {

	// The idle timeout for connections. The idle timeout is defined as the
	// period in which there are no active requests. When the
	// idle timeout is reached the connection will be closed. If the connection is an HTTP/2
	// downstream connection a drain sequence will occur prior to closing the connection, see
	// :ref:`drain_timeout
	// <envoy_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.drain_timeout>`.
	// Note that request based timeouts mean that HTTP/2 PINGs will not keep the connection alive.
	// If not specified, this defaults to 1 hour. To disable idle timeouts explicitly set this to 0.
	//
	// .. warning::
	//   Disabling this timeout has a highly likelihood of yielding connection leaks due to lost TCP
	//   FIN packets, etc.
	IdleTimeout *duration.Duration `protobuf:"bytes,1,opt,name=idle_timeout,json=idleTimeout,proto3" json:"idle_timeout,omitempty"`
	// The maximum number of headers. If unconfigured, the default
	// maximum number of request headers allowed is 100. Requests that exceed this limit will receive
	// a 431 response for HTTP/1.x and cause a stream reset for HTTP/2.
	MaxHeadersCount uint32 `protobuf:"varint,2,opt,name=max_headers_count,json=maxHeadersCount,proto3" json:"max_headers_count,omitempty"`
	// Total duration to keep alive an HTTP request/response stream. If the time limit is reached the stream will be
	// reset independent of any other timeouts. If not specified, this value is not set.
	MaxStreamDuration *duration.Duration `protobuf:"bytes,3,opt,name=max_stream_duration,json=maxStreamDuration,proto3" json:"max_stream_duration,omitempty"`
	// Action to take when a client request with a header name containing underscore characters is received.
	// If this setting is not specified, the value defaults to ALLOW.
	// Note: upstream responses are not affected by this setting.
	HeadersWithUnderscoresAction HttpProtocolOptions_HeadersWithUnderscoresAction `` /* 234-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*HttpProtocolOptions) Clone

func (m *HttpProtocolOptions) Clone() proto.Message

Clone function

func (*HttpProtocolOptions) Descriptor deprecated

func (*HttpProtocolOptions) Descriptor() ([]byte, []int)

Deprecated: Use HttpProtocolOptions.ProtoReflect.Descriptor instead.

func (*HttpProtocolOptions) Equal

func (m *HttpProtocolOptions) Equal(that interface{}) bool

Equal function

func (*HttpProtocolOptions) GetHeadersWithUnderscoresAction

func (x *HttpProtocolOptions) GetHeadersWithUnderscoresAction() HttpProtocolOptions_HeadersWithUnderscoresAction

func (*HttpProtocolOptions) GetIdleTimeout

func (x *HttpProtocolOptions) GetIdleTimeout() *duration.Duration

func (*HttpProtocolOptions) GetMaxHeadersCount

func (x *HttpProtocolOptions) GetMaxHeadersCount() uint32

func (*HttpProtocolOptions) GetMaxStreamDuration

func (x *HttpProtocolOptions) GetMaxStreamDuration() *duration.Duration

func (*HttpProtocolOptions) Hash

func (m *HttpProtocolOptions) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*HttpProtocolOptions) ProtoMessage

func (*HttpProtocolOptions) ProtoMessage()

func (*HttpProtocolOptions) ProtoReflect

func (x *HttpProtocolOptions) ProtoReflect() protoreflect.Message

func (*HttpProtocolOptions) Reset

func (x *HttpProtocolOptions) Reset()

func (*HttpProtocolOptions) String

func (x *HttpProtocolOptions) String() string

type HttpProtocolOptions_HeadersWithUnderscoresAction

type HttpProtocolOptions_HeadersWithUnderscoresAction int32

Action to take when Envoy receives client request with header names containing underscore characters. Underscore character is allowed in header names by the RFC-7230 and this behavior is implemented as a security measure due to systems that treat '_' and '-' as interchangeable. Envoy by default allows client request headers with underscore characters.

const (
	// Allow headers with underscores. This is the default behavior.
	HttpProtocolOptions_ALLOW HttpProtocolOptions_HeadersWithUnderscoresAction = 0
	// Reject client request. HTTP/1 requests are rejected with the 400 status. HTTP/2 requests
	// end with the stream reset. The "httpN.requests_rejected_with_underscores_in_headers" counter
	// is incremented for each rejected request.
	HttpProtocolOptions_REJECT_REQUEST HttpProtocolOptions_HeadersWithUnderscoresAction = 1
	// Drop the header with name containing underscores. The header is dropped before the filter chain is
	// invoked and as such filters will not see dropped headers. The
	// "httpN.dropped_headers_with_underscores" is incremented for each dropped header.
	HttpProtocolOptions_DROP_HEADER HttpProtocolOptions_HeadersWithUnderscoresAction = 2
)

func (HttpProtocolOptions_HeadersWithUnderscoresAction) Descriptor

func (HttpProtocolOptions_HeadersWithUnderscoresAction) Enum

func (HttpProtocolOptions_HeadersWithUnderscoresAction) EnumDescriptor deprecated

Deprecated: Use HttpProtocolOptions_HeadersWithUnderscoresAction.Descriptor instead.

func (HttpProtocolOptions_HeadersWithUnderscoresAction) Number

func (HttpProtocolOptions_HeadersWithUnderscoresAction) String

func (HttpProtocolOptions_HeadersWithUnderscoresAction) Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL