mutation_rulesv3

package
v1.36.3-20240416201304... Latest Latest
Warning

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

Go to latest
Published: unknown License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const HeaderMutation_Action_not_set_case case_HeaderMutation_Action = 0
View Source
const HeaderMutation_Append_case case_HeaderMutation_Action = 2
View Source
const HeaderMutation_Remove_case case_HeaderMutation_Action = 1

Variables

View Source
var File_envoy_config_common_mutation_rules_v3_mutation_rules_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type HeaderMutation

type HeaderMutation struct {

	// Types that are valid to be assigned to Action:
	//
	//	*HeaderMutation_Remove
	//	*HeaderMutation_Append
	Action isHeaderMutation_Action `protobuf_oneof:"action"`
	// contains filtered or unexported fields
}

The HeaderMutation structure specifies an action that may be taken on HTTP headers.

func (*HeaderMutation) ClearAction

func (x *HeaderMutation) ClearAction()

func (*HeaderMutation) ClearAppend

func (x *HeaderMutation) ClearAppend()

func (*HeaderMutation) ClearRemove

func (x *HeaderMutation) ClearRemove()

func (*HeaderMutation) GetAction

func (x *HeaderMutation) GetAction() isHeaderMutation_Action

func (*HeaderMutation) GetAppend

func (x *HeaderMutation) GetAppend() *v31.HeaderValueOption

func (*HeaderMutation) GetRemove

func (x *HeaderMutation) GetRemove() string

func (*HeaderMutation) HasAction

func (x *HeaderMutation) HasAction() bool

func (*HeaderMutation) HasAppend

func (x *HeaderMutation) HasAppend() bool

func (*HeaderMutation) HasRemove

func (x *HeaderMutation) HasRemove() bool

func (*HeaderMutation) ProtoMessage

func (*HeaderMutation) ProtoMessage()

func (*HeaderMutation) ProtoReflect

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

func (*HeaderMutation) Reset

func (x *HeaderMutation) Reset()

func (*HeaderMutation) SetAppend

func (x *HeaderMutation) SetAppend(v *v31.HeaderValueOption)

func (*HeaderMutation) SetRemove

func (x *HeaderMutation) SetRemove(v string)

func (*HeaderMutation) String

func (x *HeaderMutation) String() string

func (*HeaderMutation) WhichAction

func (x *HeaderMutation) WhichAction() case_HeaderMutation_Action

type HeaderMutationRules

type HeaderMutationRules struct {

	// By default, certain headers that could affect processing of subsequent
	// filters or request routing cannot be modified. These headers are
	// “host“, “:authority“, “:scheme“, and “:method“. Setting this parameter
	// to true allows these headers to be modified as well.
	AllowAllRouting *wrapperspb.BoolValue `protobuf:"bytes,1,opt,name=allow_all_routing,json=allowAllRouting,proto3" json:"allow_all_routing,omitempty"`
	// If true, allow modification of envoy internal headers. By default, these
	// start with “x-envoy“ but this may be overridden in the “Bootstrap“
	// configuration using the
	// :ref:`header_prefix <envoy_v3_api_field_config.bootstrap.v3.Bootstrap.header_prefix>`
	// field. Default is false.
	AllowEnvoy *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=allow_envoy,json=allowEnvoy,proto3" json:"allow_envoy,omitempty"`
	// If true, prevent modification of any system header, defined as a header
	// that starts with a “:“ character, regardless of any other settings.
	// A processing server may still override the “:status“ of an HTTP response
	// using an “ImmediateResponse“ message. Default is false.
	DisallowSystem *wrapperspb.BoolValue `protobuf:"bytes,3,opt,name=disallow_system,json=disallowSystem,proto3" json:"disallow_system,omitempty"`
	// If true, prevent modifications of all header values, regardless of any
	// other settings. A processing server may still override the “:status“
	// of an HTTP response using an “ImmediateResponse“ message. Default is false.
	DisallowAll *wrapperspb.BoolValue `protobuf:"bytes,4,opt,name=disallow_all,json=disallowAll,proto3" json:"disallow_all,omitempty"`
	// If set, specifically allow any header that matches this regular
	// expression. This overrides all other settings except for
	// “disallow_expression“.
	AllowExpression *v3.RegexMatcher `protobuf:"bytes,5,opt,name=allow_expression,json=allowExpression,proto3" json:"allow_expression,omitempty"`
	// If set, specifically disallow any header that matches this regular
	// expression regardless of any other settings.
	DisallowExpression *v3.RegexMatcher `protobuf:"bytes,6,opt,name=disallow_expression,json=disallowExpression,proto3" json:"disallow_expression,omitempty"`
	// If true, and if the rules in this list cause a header mutation to be
	// disallowed, then the filter using this configuration will terminate the
	// request with a 500 error. In addition, regardless of the setting of this
	// parameter, any attempt to set, add, or modify a disallowed header will
	// cause the “rejected_header_mutations“ counter to be incremented.
	// Default is false.
	DisallowIsError *wrapperspb.BoolValue `protobuf:"bytes,7,opt,name=disallow_is_error,json=disallowIsError,proto3" json:"disallow_is_error,omitempty"`
	// contains filtered or unexported fields
}

The HeaderMutationRules structure specifies what headers may be manipulated by a processing filter. This set of rules makes it possible to control which modifications a filter may make.

By default, an external processing server may add, modify, or remove any header except for an "Envoy internal" header (which is typically denoted by an x-envoy prefix) or specific headers that may affect further filter processing:

* “host“ * “:authority“ * “:scheme“ * “:method“

Every attempt to add, change, append, or remove a header will be tested against the rules here. Disallowed header mutations will be ignored unless “disallow_is_error“ is set to true.

Attempts to remove headers are further constrained -- regardless of the settings, system-defined headers (that start with “:“) and the “host“ header may never be removed.

In addition, a counter will be incremented whenever a mutation is rejected. In the ext_proc filter, that counter is named “rejected_header_mutations“. [#next-free-field: 8]

func (*HeaderMutationRules) ClearAllowAllRouting

func (x *HeaderMutationRules) ClearAllowAllRouting()

func (*HeaderMutationRules) ClearAllowEnvoy

func (x *HeaderMutationRules) ClearAllowEnvoy()

func (*HeaderMutationRules) ClearAllowExpression

func (x *HeaderMutationRules) ClearAllowExpression()

func (*HeaderMutationRules) ClearDisallowAll

func (x *HeaderMutationRules) ClearDisallowAll()

func (*HeaderMutationRules) ClearDisallowExpression

func (x *HeaderMutationRules) ClearDisallowExpression()

func (*HeaderMutationRules) ClearDisallowIsError

func (x *HeaderMutationRules) ClearDisallowIsError()

func (*HeaderMutationRules) ClearDisallowSystem

func (x *HeaderMutationRules) ClearDisallowSystem()

func (*HeaderMutationRules) GetAllowAllRouting

func (x *HeaderMutationRules) GetAllowAllRouting() *wrapperspb.BoolValue

func (*HeaderMutationRules) GetAllowEnvoy

func (x *HeaderMutationRules) GetAllowEnvoy() *wrapperspb.BoolValue

func (*HeaderMutationRules) GetAllowExpression

func (x *HeaderMutationRules) GetAllowExpression() *v3.RegexMatcher

func (*HeaderMutationRules) GetDisallowAll

func (x *HeaderMutationRules) GetDisallowAll() *wrapperspb.BoolValue

func (*HeaderMutationRules) GetDisallowExpression

func (x *HeaderMutationRules) GetDisallowExpression() *v3.RegexMatcher

func (*HeaderMutationRules) GetDisallowIsError

func (x *HeaderMutationRules) GetDisallowIsError() *wrapperspb.BoolValue

func (*HeaderMutationRules) GetDisallowSystem

func (x *HeaderMutationRules) GetDisallowSystem() *wrapperspb.BoolValue

func (*HeaderMutationRules) HasAllowAllRouting

func (x *HeaderMutationRules) HasAllowAllRouting() bool

func (*HeaderMutationRules) HasAllowEnvoy

func (x *HeaderMutationRules) HasAllowEnvoy() bool

func (*HeaderMutationRules) HasAllowExpression

func (x *HeaderMutationRules) HasAllowExpression() bool

func (*HeaderMutationRules) HasDisallowAll

func (x *HeaderMutationRules) HasDisallowAll() bool

func (*HeaderMutationRules) HasDisallowExpression

func (x *HeaderMutationRules) HasDisallowExpression() bool

func (*HeaderMutationRules) HasDisallowIsError

func (x *HeaderMutationRules) HasDisallowIsError() bool

func (*HeaderMutationRules) HasDisallowSystem

func (x *HeaderMutationRules) HasDisallowSystem() bool

func (*HeaderMutationRules) ProtoMessage

func (*HeaderMutationRules) ProtoMessage()

func (*HeaderMutationRules) ProtoReflect

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

func (*HeaderMutationRules) Reset

func (x *HeaderMutationRules) Reset()

func (*HeaderMutationRules) SetAllowAllRouting

func (x *HeaderMutationRules) SetAllowAllRouting(v *wrapperspb.BoolValue)

func (*HeaderMutationRules) SetAllowEnvoy

func (x *HeaderMutationRules) SetAllowEnvoy(v *wrapperspb.BoolValue)

func (*HeaderMutationRules) SetAllowExpression

func (x *HeaderMutationRules) SetAllowExpression(v *v3.RegexMatcher)

func (*HeaderMutationRules) SetDisallowAll

func (x *HeaderMutationRules) SetDisallowAll(v *wrapperspb.BoolValue)

func (*HeaderMutationRules) SetDisallowExpression

func (x *HeaderMutationRules) SetDisallowExpression(v *v3.RegexMatcher)

func (*HeaderMutationRules) SetDisallowIsError

func (x *HeaderMutationRules) SetDisallowIsError(v *wrapperspb.BoolValue)

func (*HeaderMutationRules) SetDisallowSystem

func (x *HeaderMutationRules) SetDisallowSystem(v *wrapperspb.BoolValue)

func (*HeaderMutationRules) String

func (x *HeaderMutationRules) String() string

type HeaderMutationRules_builder

type HeaderMutationRules_builder struct {

	// By default, certain headers that could affect processing of subsequent
	// filters or request routing cannot be modified. These headers are
	// “host“, “:authority“, “:scheme“, and “:method“. Setting this parameter
	// to true allows these headers to be modified as well.
	AllowAllRouting *wrapperspb.BoolValue
	// If true, allow modification of envoy internal headers. By default, these
	// start with “x-envoy“ but this may be overridden in the “Bootstrap“
	// configuration using the
	// :ref:`header_prefix <envoy_v3_api_field_config.bootstrap.v3.Bootstrap.header_prefix>`
	// field. Default is false.
	AllowEnvoy *wrapperspb.BoolValue
	// If true, prevent modification of any system header, defined as a header
	// that starts with a “:“ character, regardless of any other settings.
	// A processing server may still override the “:status“ of an HTTP response
	// using an “ImmediateResponse“ message. Default is false.
	DisallowSystem *wrapperspb.BoolValue
	// If true, prevent modifications of all header values, regardless of any
	// other settings. A processing server may still override the “:status“
	// of an HTTP response using an “ImmediateResponse“ message. Default is false.
	DisallowAll *wrapperspb.BoolValue
	// If set, specifically allow any header that matches this regular
	// expression. This overrides all other settings except for
	// “disallow_expression“.
	AllowExpression *v3.RegexMatcher
	// If set, specifically disallow any header that matches this regular
	// expression regardless of any other settings.
	DisallowExpression *v3.RegexMatcher
	// If true, and if the rules in this list cause a header mutation to be
	// disallowed, then the filter using this configuration will terminate the
	// request with a 500 error. In addition, regardless of the setting of this
	// parameter, any attempt to set, add, or modify a disallowed header will
	// cause the “rejected_header_mutations“ counter to be incremented.
	// Default is false.
	DisallowIsError *wrapperspb.BoolValue
	// contains filtered or unexported fields
}

func (HeaderMutationRules_builder) Build

type HeaderMutation_Append

type HeaderMutation_Append struct {
	// Append new header by the specified HeaderValueOption.
	Append *v31.HeaderValueOption `protobuf:"bytes,2,opt,name=append,proto3,oneof"`
}

type HeaderMutation_Remove

type HeaderMutation_Remove struct {
	// Remove the specified header if it exists.
	Remove string `protobuf:"bytes,1,opt,name=remove,proto3,oneof"`
}

type HeaderMutation_builder

type HeaderMutation_builder struct {

	// Fields of oneof Action:
	// Remove the specified header if it exists.
	Remove *string
	// Append new header by the specified HeaderValueOption.
	Append *v31.HeaderValueOption
	// contains filtered or unexported fields
}

func (HeaderMutation_builder) Build

Jump to

Keyboard shortcuts

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