ext_authzv2

package
v1.36.11-2026041321000... Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const ExtAuthzPerRoute_CheckSettings_case case_ExtAuthzPerRoute_Override = 2
View Source
const ExtAuthzPerRoute_Disabled_case case_ExtAuthzPerRoute_Override = 1
View Source
const ExtAuthzPerRoute_Override_not_set_case case_ExtAuthzPerRoute_Override = 0
View Source
const ExtAuthz_GrpcService_case case_ExtAuthz_Services = 1
View Source
const ExtAuthz_HttpService_case case_ExtAuthz_Services = 3
View Source
const ExtAuthz_Services_not_set_case case_ExtAuthz_Services = 0

Variables

View Source
var File_envoy_config_filter_http_ext_authz_v2_ext_authz_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type AuthorizationRequest

type AuthorizationRequest struct {

	// Authorization request will include the client request headers that have a correspondent match
	// in the :ref:`list <envoy_api_msg_type.matcher.ListStringMatcher>`. Note that in addition to the
	// user's supplied matchers:
	//
	// 1. *Host*, *Method*, *Path* and *Content-Length* are automatically included to the list.
	//
	// 2. *Content-Length* will be set to 0 and the request to the authorization service will not have
	// a message body. However, the authorization request can include the buffered client request body
	// (controlled by :ref:`with_request_body
	// <envoy_api_field_config.filter.http.ext_authz.v2.ExtAuthz.with_request_body>` setting),
	// consequently the value of *Content-Length* of the authorization request reflects the size of
	// its payload size.
	AllowedHeaders *matcher.ListStringMatcher `protobuf:"bytes,1,opt,name=allowed_headers,json=allowedHeaders,proto3" json:"allowed_headers,omitempty"`
	// Sets a list of headers that will be included to the request to authorization service. Note that
	// client request of the same key will be overridden.
	HeadersToAdd []*core.HeaderValue `protobuf:"bytes,2,rep,name=headers_to_add,json=headersToAdd,proto3" json:"headers_to_add,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthorizationRequest) ClearAllowedHeaders

func (x *AuthorizationRequest) ClearAllowedHeaders()

func (*AuthorizationRequest) GetAllowedHeaders

func (x *AuthorizationRequest) GetAllowedHeaders() *matcher.ListStringMatcher

func (*AuthorizationRequest) GetHeadersToAdd

func (x *AuthorizationRequest) GetHeadersToAdd() []*core.HeaderValue

func (*AuthorizationRequest) HasAllowedHeaders

func (x *AuthorizationRequest) HasAllowedHeaders() bool

func (*AuthorizationRequest) ProtoMessage

func (*AuthorizationRequest) ProtoMessage()

func (*AuthorizationRequest) ProtoReflect

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

func (*AuthorizationRequest) Reset

func (x *AuthorizationRequest) Reset()

func (*AuthorizationRequest) SetAllowedHeaders

func (x *AuthorizationRequest) SetAllowedHeaders(v *matcher.ListStringMatcher)

func (*AuthorizationRequest) SetHeadersToAdd

func (x *AuthorizationRequest) SetHeadersToAdd(v []*core.HeaderValue)

func (*AuthorizationRequest) String

func (x *AuthorizationRequest) String() string

type AuthorizationRequest_builder

type AuthorizationRequest_builder struct {

	// Authorization request will include the client request headers that have a correspondent match
	// in the :ref:`list <envoy_api_msg_type.matcher.ListStringMatcher>`. Note that in addition to the
	// user's supplied matchers:
	//
	// 1. *Host*, *Method*, *Path* and *Content-Length* are automatically included to the list.
	//
	// 2. *Content-Length* will be set to 0 and the request to the authorization service will not have
	// a message body. However, the authorization request can include the buffered client request body
	// (controlled by :ref:`with_request_body
	// <envoy_api_field_config.filter.http.ext_authz.v2.ExtAuthz.with_request_body>` setting),
	// consequently the value of *Content-Length* of the authorization request reflects the size of
	// its payload size.
	AllowedHeaders *matcher.ListStringMatcher
	// Sets a list of headers that will be included to the request to authorization service. Note that
	// client request of the same key will be overridden.
	HeadersToAdd []*core.HeaderValue
	// contains filtered or unexported fields
}

func (AuthorizationRequest_builder) Build

type AuthorizationResponse

type AuthorizationResponse struct {

	// When this :ref:`list <envoy_api_msg_type.matcher.ListStringMatcher>` is set, authorization
	// response headers that have a correspondent match will be added to the original client request.
	// Note that coexistent headers will be overridden.
	AllowedUpstreamHeaders *matcher.ListStringMatcher `` /* 129-byte string literal not displayed */
	// When this :ref:`list <envoy_api_msg_type.matcher.ListStringMatcher>` is set, authorization
	// response headers that have a correspondent match will be added to the client's response. Note
	// that when this list is *not* set, all the authorization response headers, except *Authority
	// (Host)* will be in the response to the client. When a header is included in this list, *Path*,
	// *Status*, *Content-Length*, *WWWAuthenticate* and *Location* are automatically added.
	AllowedClientHeaders *matcher.ListStringMatcher `protobuf:"bytes,2,opt,name=allowed_client_headers,json=allowedClientHeaders,proto3" json:"allowed_client_headers,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthorizationResponse) ClearAllowedClientHeaders

func (x *AuthorizationResponse) ClearAllowedClientHeaders()

func (*AuthorizationResponse) ClearAllowedUpstreamHeaders

func (x *AuthorizationResponse) ClearAllowedUpstreamHeaders()

func (*AuthorizationResponse) GetAllowedClientHeaders

func (x *AuthorizationResponse) GetAllowedClientHeaders() *matcher.ListStringMatcher

func (*AuthorizationResponse) GetAllowedUpstreamHeaders

func (x *AuthorizationResponse) GetAllowedUpstreamHeaders() *matcher.ListStringMatcher

func (*AuthorizationResponse) HasAllowedClientHeaders

func (x *AuthorizationResponse) HasAllowedClientHeaders() bool

func (*AuthorizationResponse) HasAllowedUpstreamHeaders

func (x *AuthorizationResponse) HasAllowedUpstreamHeaders() bool

func (*AuthorizationResponse) ProtoMessage

func (*AuthorizationResponse) ProtoMessage()

func (*AuthorizationResponse) ProtoReflect

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

func (*AuthorizationResponse) Reset

func (x *AuthorizationResponse) Reset()

func (*AuthorizationResponse) SetAllowedClientHeaders

func (x *AuthorizationResponse) SetAllowedClientHeaders(v *matcher.ListStringMatcher)

func (*AuthorizationResponse) SetAllowedUpstreamHeaders

func (x *AuthorizationResponse) SetAllowedUpstreamHeaders(v *matcher.ListStringMatcher)

func (*AuthorizationResponse) String

func (x *AuthorizationResponse) String() string

type AuthorizationResponse_builder

type AuthorizationResponse_builder struct {

	// When this :ref:`list <envoy_api_msg_type.matcher.ListStringMatcher>` is set, authorization
	// response headers that have a correspondent match will be added to the original client request.
	// Note that coexistent headers will be overridden.
	AllowedUpstreamHeaders *matcher.ListStringMatcher
	// When this :ref:`list <envoy_api_msg_type.matcher.ListStringMatcher>` is set, authorization
	// response headers that have a correspondent match will be added to the client's response. Note
	// that when this list is *not* set, all the authorization response headers, except *Authority
	// (Host)* will be in the response to the client. When a header is included in this list, *Path*,
	// *Status*, *Content-Length*, *WWWAuthenticate* and *Location* are automatically added.
	AllowedClientHeaders *matcher.ListStringMatcher
	// contains filtered or unexported fields
}

func (AuthorizationResponse_builder) Build

type BufferSettings

type BufferSettings struct {

	// Sets the maximum size of a message body that the filter will hold in memory. Envoy will return
	// *HTTP 413* and will *not* initiate the authorization process when buffer reaches the number
	// set in this field. Note that this setting will have precedence over :ref:`failure_mode_allow
	// <envoy_api_field_config.filter.http.ext_authz.v2.ExtAuthz.failure_mode_allow>`.
	MaxRequestBytes uint32 `protobuf:"varint,1,opt,name=max_request_bytes,json=maxRequestBytes,proto3" json:"max_request_bytes,omitempty"`
	// When this field is true, Envoy will buffer the message until *max_request_bytes* is reached.
	// The authorization request will be dispatched and no 413 HTTP error will be returned by the
	// filter.
	AllowPartialMessage bool `protobuf:"varint,2,opt,name=allow_partial_message,json=allowPartialMessage,proto3" json:"allow_partial_message,omitempty"`
	// contains filtered or unexported fields
}

Configuration for buffering the request data.

func (*BufferSettings) GetAllowPartialMessage

func (x *BufferSettings) GetAllowPartialMessage() bool

func (*BufferSettings) GetMaxRequestBytes

func (x *BufferSettings) GetMaxRequestBytes() uint32

func (*BufferSettings) ProtoMessage

func (*BufferSettings) ProtoMessage()

func (*BufferSettings) ProtoReflect

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

func (*BufferSettings) Reset

func (x *BufferSettings) Reset()

func (*BufferSettings) SetAllowPartialMessage

func (x *BufferSettings) SetAllowPartialMessage(v bool)

func (*BufferSettings) SetMaxRequestBytes

func (x *BufferSettings) SetMaxRequestBytes(v uint32)

func (*BufferSettings) String

func (x *BufferSettings) String() string

type BufferSettings_builder

type BufferSettings_builder struct {

	// Sets the maximum size of a message body that the filter will hold in memory. Envoy will return
	// *HTTP 413* and will *not* initiate the authorization process when buffer reaches the number
	// set in this field. Note that this setting will have precedence over :ref:`failure_mode_allow
	// <envoy_api_field_config.filter.http.ext_authz.v2.ExtAuthz.failure_mode_allow>`.
	MaxRequestBytes uint32
	// When this field is true, Envoy will buffer the message until *max_request_bytes* is reached.
	// The authorization request will be dispatched and no 413 HTTP error will be returned by the
	// filter.
	AllowPartialMessage bool
	// contains filtered or unexported fields
}

func (BufferSettings_builder) Build

type CheckSettings

type CheckSettings struct {

	// Context extensions to set on the CheckRequest's
	// :ref:`AttributeContext.context_extensions<envoy_api_field_service.auth.v2.AttributeContext.context_extensions>`
	//
	// Merge semantics for this field are such that keys from more specific configs override.
	//
	// .. note::
	//
	//	These settings are only applied to a filter configured with a
	//	:ref:`grpc_service<envoy_api_field_config.filter.http.ext_authz.v2.ExtAuthz.grpc_service>`.
	ContextExtensions map[string]string `` /* 186-byte string literal not displayed */
	// contains filtered or unexported fields
}

Extra settings for the check request. You can use this to provide extra context for the external authorization server on specific virtual hosts \ routes. For example, adding a context extension on the virtual host level can give the ext-authz server information on what virtual host is used without needing to parse the host header. If CheckSettings is specified in multiple per-filter-configs, they will be merged in order, and the result will be used.

func (*CheckSettings) GetContextExtensions

func (x *CheckSettings) GetContextExtensions() map[string]string

func (*CheckSettings) ProtoMessage

func (*CheckSettings) ProtoMessage()

func (*CheckSettings) ProtoReflect

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

func (*CheckSettings) Reset

func (x *CheckSettings) Reset()

func (*CheckSettings) SetContextExtensions

func (x *CheckSettings) SetContextExtensions(v map[string]string)

func (*CheckSettings) String

func (x *CheckSettings) String() string

type CheckSettings_builder

type CheckSettings_builder struct {

	// Context extensions to set on the CheckRequest's
	// :ref:`AttributeContext.context_extensions<envoy_api_field_service.auth.v2.AttributeContext.context_extensions>`
	//
	// Merge semantics for this field are such that keys from more specific configs override.
	//
	// .. note::
	//
	//	These settings are only applied to a filter configured with a
	//	:ref:`grpc_service<envoy_api_field_config.filter.http.ext_authz.v2.ExtAuthz.grpc_service>`.
	ContextExtensions map[string]string
	// contains filtered or unexported fields
}

func (CheckSettings_builder) Build

type ExtAuthz

type ExtAuthz struct {

	// External authorization service configuration.
	//
	// Types that are valid to be assigned to Services:
	//
	//	*ExtAuthz_GrpcService
	//	*ExtAuthz_HttpService
	Services isExtAuthz_Services `protobuf_oneof:"services"`
	//	Changes filter's behaviour on errors:
	//
	//	1. When set to true, the filter will *accept* client request even if the communication with
	//	the authorization service has failed, or if the authorization service has returned a HTTP 5xx
	//	error.
	//
	//	2. When set to false, ext-authz will *reject* client requests and return a *Forbidden*
	//	response if the communication with the authorization service has failed, or if the
	//	authorization service has returned a HTTP 5xx error.
	//
	// Note that errors can be *always* tracked in the :ref:`stats
	// <config_http_filters_ext_authz_stats>`.
	FailureModeAllow bool `protobuf:"varint,2,opt,name=failure_mode_allow,json=failureModeAllow,proto3" json:"failure_mode_allow,omitempty"`
	// [#not-implemented-hide: Support for this field has been removed.]
	//
	// Deprecated: Marked as deprecated in envoy/config/filter/http/ext_authz/v2/ext_authz.proto.
	UseAlpha bool `protobuf:"varint,4,opt,name=use_alpha,json=useAlpha,proto3" json:"use_alpha,omitempty"`
	// Enables filter to buffer the client request body and send it within the authorization request.
	// A “x-envoy-auth-partial-body: false|true“ metadata header will be added to the authorization
	// request message indicating if the body data is partial.
	WithRequestBody *BufferSettings `protobuf:"bytes,5,opt,name=with_request_body,json=withRequestBody,proto3" json:"with_request_body,omitempty"`
	// Clears route cache in order to allow the external authorization service to correctly affect
	// routing decisions. Filter clears all cached routes when:
	//
	// 1. The field is set to *true*.
	//
	// 2. The status returned from the authorization service is a HTTP 200 or gRPC 0.
	//
	// 3. At least one *authorization response header* is added to the client request, or is used for
	// altering another client request header.
	ClearRouteCache bool `protobuf:"varint,6,opt,name=clear_route_cache,json=clearRouteCache,proto3" json:"clear_route_cache,omitempty"`
	// Sets the HTTP status that is returned to the client when there is a network error between the
	// filter and the authorization server. The default status is HTTP 403 Forbidden.
	StatusOnError *_type.HttpStatus `protobuf:"bytes,7,opt,name=status_on_error,json=statusOnError,proto3" json:"status_on_error,omitempty"`
	// Specifies a list of metadata namespaces whose values, if present, will be passed to the
	// ext_authz service as an opaque *protobuf::Struct*.
	//
	// For example, if the *jwt_authn* filter is used and :ref:`payload_in_metadata
	// <envoy_api_field_config.filter.http.jwt_authn.v2alpha.JwtProvider.payload_in_metadata>` is set,
	// then the following will pass the jwt payload to the authorization server.
	//
	// .. code-block:: yaml
	//
	//	metadata_context_namespaces:
	//	- envoy.filters.http.jwt_authn
	MetadataContextNamespaces []string `` /* 138-byte string literal not displayed */
	// Specifies if the filter is enabled.
	//
	// If :ref:`runtime_key <envoy_api_field_core.RuntimeFractionalPercent.runtime_key>` is specified,
	// Envoy will lookup the runtime key to get the percentage of requests to filter.
	//
	// If this field is not specified, the filter will be enabled for all requests.
	FilterEnabled *core.RuntimeFractionalPercent `protobuf:"bytes,9,opt,name=filter_enabled,json=filterEnabled,proto3" json:"filter_enabled,omitempty"`
	// Specifies whether to deny the requests, when the filter is disabled.
	// If :ref:`runtime_key <envoy_api_field_core.RuntimeFeatureFlag.runtime_key>` is specified,
	// Envoy will lookup the runtime key to determine whether to deny request for
	// filter protected path at filter disabling. If filter is disabled in
	// typed_per_filter_config for the path, requests will not be denied.
	//
	// If this field is not specified, all requests will be allowed when disabled.
	DenyAtDisable *core.RuntimeFeatureFlag `protobuf:"bytes,11,opt,name=deny_at_disable,json=denyAtDisable,proto3" json:"deny_at_disable,omitempty"`
	// Specifies if the peer certificate is sent to the external service.
	//
	// When this field is true, Envoy will include the peer X.509 certificate, if available, in the
	// :ref:`certificate<envoy_api_field_service.auth.v2.AttributeContext.Peer.certificate>`.
	IncludePeerCertificate bool `` /* 131-byte string literal not displayed */
	// contains filtered or unexported fields
}

[#next-free-field: 12]

func (*ExtAuthz) ClearDenyAtDisable

func (x *ExtAuthz) ClearDenyAtDisable()

func (*ExtAuthz) ClearFilterEnabled

func (x *ExtAuthz) ClearFilterEnabled()

func (*ExtAuthz) ClearGrpcService

func (x *ExtAuthz) ClearGrpcService()

func (*ExtAuthz) ClearHttpService

func (x *ExtAuthz) ClearHttpService()

func (*ExtAuthz) ClearServices

func (x *ExtAuthz) ClearServices()

func (*ExtAuthz) ClearStatusOnError

func (x *ExtAuthz) ClearStatusOnError()

func (*ExtAuthz) ClearWithRequestBody

func (x *ExtAuthz) ClearWithRequestBody()

func (*ExtAuthz) GetClearRouteCache

func (x *ExtAuthz) GetClearRouteCache() bool

func (*ExtAuthz) GetDenyAtDisable

func (x *ExtAuthz) GetDenyAtDisable() *core.RuntimeFeatureFlag

func (*ExtAuthz) GetFailureModeAllow

func (x *ExtAuthz) GetFailureModeAllow() bool

func (*ExtAuthz) GetFilterEnabled

func (x *ExtAuthz) GetFilterEnabled() *core.RuntimeFractionalPercent

func (*ExtAuthz) GetGrpcService

func (x *ExtAuthz) GetGrpcService() *core.GrpcService

func (*ExtAuthz) GetHttpService

func (x *ExtAuthz) GetHttpService() *HttpService

func (*ExtAuthz) GetIncludePeerCertificate

func (x *ExtAuthz) GetIncludePeerCertificate() bool

func (*ExtAuthz) GetMetadataContextNamespaces

func (x *ExtAuthz) GetMetadataContextNamespaces() []string

func (*ExtAuthz) GetServices

func (x *ExtAuthz) GetServices() isExtAuthz_Services

func (*ExtAuthz) GetStatusOnError

func (x *ExtAuthz) GetStatusOnError() *_type.HttpStatus

func (*ExtAuthz) GetUseAlpha deprecated

func (x *ExtAuthz) GetUseAlpha() bool

Deprecated: Marked as deprecated in envoy/config/filter/http/ext_authz/v2/ext_authz.proto.

func (*ExtAuthz) GetWithRequestBody

func (x *ExtAuthz) GetWithRequestBody() *BufferSettings

func (*ExtAuthz) HasDenyAtDisable

func (x *ExtAuthz) HasDenyAtDisable() bool

func (*ExtAuthz) HasFilterEnabled

func (x *ExtAuthz) HasFilterEnabled() bool

func (*ExtAuthz) HasGrpcService

func (x *ExtAuthz) HasGrpcService() bool

func (*ExtAuthz) HasHttpService

func (x *ExtAuthz) HasHttpService() bool

func (*ExtAuthz) HasServices

func (x *ExtAuthz) HasServices() bool

func (*ExtAuthz) HasStatusOnError

func (x *ExtAuthz) HasStatusOnError() bool

func (*ExtAuthz) HasWithRequestBody

func (x *ExtAuthz) HasWithRequestBody() bool

func (*ExtAuthz) ProtoMessage

func (*ExtAuthz) ProtoMessage()

func (*ExtAuthz) ProtoReflect

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

func (*ExtAuthz) Reset

func (x *ExtAuthz) Reset()

func (*ExtAuthz) SetClearRouteCache

func (x *ExtAuthz) SetClearRouteCache(v bool)

func (*ExtAuthz) SetDenyAtDisable

func (x *ExtAuthz) SetDenyAtDisable(v *core.RuntimeFeatureFlag)

func (*ExtAuthz) SetFailureModeAllow

func (x *ExtAuthz) SetFailureModeAllow(v bool)

func (*ExtAuthz) SetFilterEnabled

func (x *ExtAuthz) SetFilterEnabled(v *core.RuntimeFractionalPercent)

func (*ExtAuthz) SetGrpcService

func (x *ExtAuthz) SetGrpcService(v *core.GrpcService)

func (*ExtAuthz) SetHttpService

func (x *ExtAuthz) SetHttpService(v *HttpService)

func (*ExtAuthz) SetIncludePeerCertificate

func (x *ExtAuthz) SetIncludePeerCertificate(v bool)

func (*ExtAuthz) SetMetadataContextNamespaces

func (x *ExtAuthz) SetMetadataContextNamespaces(v []string)

func (*ExtAuthz) SetStatusOnError

func (x *ExtAuthz) SetStatusOnError(v *_type.HttpStatus)

func (*ExtAuthz) SetUseAlpha deprecated

func (x *ExtAuthz) SetUseAlpha(v bool)

Deprecated: Marked as deprecated in envoy/config/filter/http/ext_authz/v2/ext_authz.proto.

func (*ExtAuthz) SetWithRequestBody

func (x *ExtAuthz) SetWithRequestBody(v *BufferSettings)

func (*ExtAuthz) String

func (x *ExtAuthz) String() string

func (*ExtAuthz) WhichServices

func (x *ExtAuthz) WhichServices() case_ExtAuthz_Services

type ExtAuthzPerRoute

type ExtAuthzPerRoute struct {

	// Types that are valid to be assigned to Override:
	//
	//	*ExtAuthzPerRoute_Disabled
	//	*ExtAuthzPerRoute_CheckSettings
	Override isExtAuthzPerRoute_Override `protobuf_oneof:"override"`
	// contains filtered or unexported fields
}

Extra settings on a per virtualhost/route/weighted-cluster level.

func (*ExtAuthzPerRoute) ClearCheckSettings

func (x *ExtAuthzPerRoute) ClearCheckSettings()

func (*ExtAuthzPerRoute) ClearDisabled

func (x *ExtAuthzPerRoute) ClearDisabled()

func (*ExtAuthzPerRoute) ClearOverride

func (x *ExtAuthzPerRoute) ClearOverride()

func (*ExtAuthzPerRoute) GetCheckSettings

func (x *ExtAuthzPerRoute) GetCheckSettings() *CheckSettings

func (*ExtAuthzPerRoute) GetDisabled

func (x *ExtAuthzPerRoute) GetDisabled() bool

func (*ExtAuthzPerRoute) GetOverride

func (x *ExtAuthzPerRoute) GetOverride() isExtAuthzPerRoute_Override

func (*ExtAuthzPerRoute) HasCheckSettings

func (x *ExtAuthzPerRoute) HasCheckSettings() bool

func (*ExtAuthzPerRoute) HasDisabled

func (x *ExtAuthzPerRoute) HasDisabled() bool

func (*ExtAuthzPerRoute) HasOverride

func (x *ExtAuthzPerRoute) HasOverride() bool

func (*ExtAuthzPerRoute) ProtoMessage

func (*ExtAuthzPerRoute) ProtoMessage()

func (*ExtAuthzPerRoute) ProtoReflect

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

func (*ExtAuthzPerRoute) Reset

func (x *ExtAuthzPerRoute) Reset()

func (*ExtAuthzPerRoute) SetCheckSettings

func (x *ExtAuthzPerRoute) SetCheckSettings(v *CheckSettings)

func (*ExtAuthzPerRoute) SetDisabled

func (x *ExtAuthzPerRoute) SetDisabled(v bool)

func (*ExtAuthzPerRoute) String

func (x *ExtAuthzPerRoute) String() string

func (*ExtAuthzPerRoute) WhichOverride

func (x *ExtAuthzPerRoute) WhichOverride() case_ExtAuthzPerRoute_Override

type ExtAuthzPerRoute_CheckSettings

type ExtAuthzPerRoute_CheckSettings struct {
	// Check request settings for this route.
	CheckSettings *CheckSettings `protobuf:"bytes,2,opt,name=check_settings,json=checkSettings,proto3,oneof"`
}

type ExtAuthzPerRoute_Disabled

type ExtAuthzPerRoute_Disabled struct {
	// Disable the ext auth filter for this particular vhost or route.
	// If disabled is specified in multiple per-filter-configs, the most specific one will be used.
	Disabled bool `protobuf:"varint,1,opt,name=disabled,proto3,oneof"`
}

type ExtAuthzPerRoute_builder

type ExtAuthzPerRoute_builder struct {

	// Fields of oneof Override:
	// Disable the ext auth filter for this particular vhost or route.
	// If disabled is specified in multiple per-filter-configs, the most specific one will be used.
	Disabled *bool
	// Check request settings for this route.
	CheckSettings *CheckSettings
	// contains filtered or unexported fields
}

func (ExtAuthzPerRoute_builder) Build

type ExtAuthz_GrpcService

type ExtAuthz_GrpcService struct {
	// gRPC service configuration (default timeout: 200ms).
	GrpcService *core.GrpcService `protobuf:"bytes,1,opt,name=grpc_service,json=grpcService,proto3,oneof"`
}

type ExtAuthz_HttpService

type ExtAuthz_HttpService struct {
	// HTTP service configuration (default timeout: 200ms).
	HttpService *HttpService `protobuf:"bytes,3,opt,name=http_service,json=httpService,proto3,oneof"`
}

type ExtAuthz_builder

type ExtAuthz_builder struct {

	// Fields of oneof Services:
	// gRPC service configuration (default timeout: 200ms).
	GrpcService *core.GrpcService
	// HTTP service configuration (default timeout: 200ms).
	HttpService *HttpService
	// -- end of Services
	//
	//	Changes filter's behaviour on errors:
	//
	//	1. When set to true, the filter will *accept* client request even if the communication with
	//	the authorization service has failed, or if the authorization service has returned a HTTP 5xx
	//	error.
	//
	//	2. When set to false, ext-authz will *reject* client requests and return a *Forbidden*
	//	response if the communication with the authorization service has failed, or if the
	//	authorization service has returned a HTTP 5xx error.
	//
	// Note that errors can be *always* tracked in the :ref:`stats
	// <config_http_filters_ext_authz_stats>`.
	FailureModeAllow bool
	// [#not-implemented-hide: Support for this field has been removed.]
	//
	// Deprecated: Marked as deprecated in envoy/config/filter/http/ext_authz/v2/ext_authz.proto.
	UseAlpha bool
	// Enables filter to buffer the client request body and send it within the authorization request.
	// A “x-envoy-auth-partial-body: false|true“ metadata header will be added to the authorization
	// request message indicating if the body data is partial.
	WithRequestBody *BufferSettings
	// Clears route cache in order to allow the external authorization service to correctly affect
	// routing decisions. Filter clears all cached routes when:
	//
	// 1. The field is set to *true*.
	//
	// 2. The status returned from the authorization service is a HTTP 200 or gRPC 0.
	//
	// 3. At least one *authorization response header* is added to the client request, or is used for
	// altering another client request header.
	ClearRouteCache bool
	// Sets the HTTP status that is returned to the client when there is a network error between the
	// filter and the authorization server. The default status is HTTP 403 Forbidden.
	StatusOnError *_type.HttpStatus
	// Specifies a list of metadata namespaces whose values, if present, will be passed to the
	// ext_authz service as an opaque *protobuf::Struct*.
	//
	// For example, if the *jwt_authn* filter is used and :ref:`payload_in_metadata
	// <envoy_api_field_config.filter.http.jwt_authn.v2alpha.JwtProvider.payload_in_metadata>` is set,
	// then the following will pass the jwt payload to the authorization server.
	//
	// .. code-block:: yaml
	//
	//	metadata_context_namespaces:
	//	- envoy.filters.http.jwt_authn
	MetadataContextNamespaces []string
	// Specifies if the filter is enabled.
	//
	// If :ref:`runtime_key <envoy_api_field_core.RuntimeFractionalPercent.runtime_key>` is specified,
	// Envoy will lookup the runtime key to get the percentage of requests to filter.
	//
	// If this field is not specified, the filter will be enabled for all requests.
	FilterEnabled *core.RuntimeFractionalPercent
	// Specifies whether to deny the requests, when the filter is disabled.
	// If :ref:`runtime_key <envoy_api_field_core.RuntimeFeatureFlag.runtime_key>` is specified,
	// Envoy will lookup the runtime key to determine whether to deny request for
	// filter protected path at filter disabling. If filter is disabled in
	// typed_per_filter_config for the path, requests will not be denied.
	//
	// If this field is not specified, all requests will be allowed when disabled.
	DenyAtDisable *core.RuntimeFeatureFlag
	// Specifies if the peer certificate is sent to the external service.
	//
	// When this field is true, Envoy will include the peer X.509 certificate, if available, in the
	// :ref:`certificate<envoy_api_field_service.auth.v2.AttributeContext.Peer.certificate>`.
	IncludePeerCertificate bool
	// contains filtered or unexported fields
}

func (ExtAuthz_builder) Build

func (b0 ExtAuthz_builder) Build() *ExtAuthz

type HttpService

type HttpService struct {

	// Sets the HTTP server URI which the authorization requests must be sent to.
	ServerUri *core.HttpUri `protobuf:"bytes,1,opt,name=server_uri,json=serverUri,proto3" json:"server_uri,omitempty"`
	// Sets a prefix to the value of authorization request header *Path*.
	PathPrefix string `protobuf:"bytes,2,opt,name=path_prefix,json=pathPrefix,proto3" json:"path_prefix,omitempty"`
	// Settings used for controlling authorization request metadata.
	AuthorizationRequest *AuthorizationRequest `protobuf:"bytes,7,opt,name=authorization_request,json=authorizationRequest,proto3" json:"authorization_request,omitempty"`
	// Settings used for controlling authorization response metadata.
	AuthorizationResponse *AuthorizationResponse `protobuf:"bytes,8,opt,name=authorization_response,json=authorizationResponse,proto3" json:"authorization_response,omitempty"`
	// contains filtered or unexported fields
}

HttpService is used for raw HTTP communication between the filter and the authorization service. When configured, the filter will parse the client request and use these attributes to call the authorization server. Depending on the response, the filter may reject or accept the client request. Note that in any of these events, metadata can be added, removed or overridden by the filter:

*On authorization request*, a list of allowed request headers may be supplied. See :ref:`allowed_headers <envoy_api_field_config.filter.http.ext_authz.v2.AuthorizationRequest.allowed_headers>` for details. Additional headers metadata may be added to the authorization request. See :ref:`headers_to_add <envoy_api_field_config.filter.http.ext_authz.v2.AuthorizationRequest.headers_to_add>` for details.

On authorization response status HTTP 200 OK, the filter will allow traffic to the upstream and additional headers metadata may be added to the original client request. See :ref:`allowed_upstream_headers <envoy_api_field_config.filter.http.ext_authz.v2.AuthorizationResponse.allowed_upstream_headers>` for details.

On other authorization response statuses, the filter will not allow traffic. Additional headers metadata as well as body may be added to the client's response. See :ref:`allowed_client_headers <envoy_api_field_config.filter.http.ext_authz.v2.AuthorizationResponse.allowed_client_headers>` for details. [#next-free-field: 9]

func (*HttpService) ClearAuthorizationRequest

func (x *HttpService) ClearAuthorizationRequest()

func (*HttpService) ClearAuthorizationResponse

func (x *HttpService) ClearAuthorizationResponse()

func (*HttpService) ClearServerUri

func (x *HttpService) ClearServerUri()

func (*HttpService) GetAuthorizationRequest

func (x *HttpService) GetAuthorizationRequest() *AuthorizationRequest

func (*HttpService) GetAuthorizationResponse

func (x *HttpService) GetAuthorizationResponse() *AuthorizationResponse

func (*HttpService) GetPathPrefix

func (x *HttpService) GetPathPrefix() string

func (*HttpService) GetServerUri

func (x *HttpService) GetServerUri() *core.HttpUri

func (*HttpService) HasAuthorizationRequest

func (x *HttpService) HasAuthorizationRequest() bool

func (*HttpService) HasAuthorizationResponse

func (x *HttpService) HasAuthorizationResponse() bool

func (*HttpService) HasServerUri

func (x *HttpService) HasServerUri() bool

func (*HttpService) ProtoMessage

func (*HttpService) ProtoMessage()

func (*HttpService) ProtoReflect

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

func (*HttpService) Reset

func (x *HttpService) Reset()

func (*HttpService) SetAuthorizationRequest

func (x *HttpService) SetAuthorizationRequest(v *AuthorizationRequest)

func (*HttpService) SetAuthorizationResponse

func (x *HttpService) SetAuthorizationResponse(v *AuthorizationResponse)

func (*HttpService) SetPathPrefix

func (x *HttpService) SetPathPrefix(v string)

func (*HttpService) SetServerUri

func (x *HttpService) SetServerUri(v *core.HttpUri)

func (*HttpService) String

func (x *HttpService) String() string

type HttpService_builder

type HttpService_builder struct {

	// Sets the HTTP server URI which the authorization requests must be sent to.
	ServerUri *core.HttpUri
	// Sets a prefix to the value of authorization request header *Path*.
	PathPrefix string
	// Settings used for controlling authorization request metadata.
	AuthorizationRequest *AuthorizationRequest
	// Settings used for controlling authorization response metadata.
	AuthorizationResponse *AuthorizationResponse
	// contains filtered or unexported fields
}

func (HttpService_builder) Build

func (b0 HttpService_builder) Build() *HttpService

Source Files

  • ext_authz.pb.go

Jump to

Keyboard shortcuts

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