// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.10
// 	protoc        v6.33.2
// source: envoy/extensions/filters/http/basic_auth/v3/basic_auth.proto

package basic_authv3

import (
	_ "github.com/cncf/xds/go/udpa/annotations"
	v3 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
	_ "github.com/envoyproxy/protoc-gen-validate/validate"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	reflect "reflect"
	sync "sync"
	unsafe "unsafe"
)

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

// Basic HTTP authentication.
//
// Example:
//
// .. code-block:: yaml
//
//	users:
//	  inline_string: |-
//	    user1:{SHA}hashed_user1_password
//	    user2:{SHA}hashed_user2_password
type BasicAuth struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Username-password pairs used to verify user credentials in the "Authorization" header.
	// The value needs to be the htpasswd format.
	// Reference to https://httpd.apache.org/docs/2.4/programs/htpasswd.html
	Users *v3.DataSource `protobuf:"bytes,1,opt,name=users,proto3" json:"users,omitempty"`
	// This field specifies the header name to forward a successfully authenticated user to
	// the backend. The header will be added to the request with the username as the value.
	//
	// If it is not specified, the username will not be forwarded.
	ForwardUsernameHeader string `protobuf:"bytes,2,opt,name=forward_username_header,json=forwardUsernameHeader,proto3" json:"forward_username_header,omitempty"`
	// This field specifies the request header to load the basic credential from.
	//
	// If it is not specified, the filter loads the credential from  the "Authorization" header.
	AuthenticationHeader string `protobuf:"bytes,3,opt,name=authentication_header,json=authenticationHeader,proto3" json:"authentication_header,omitempty"`
	unknownFields        protoimpl.UnknownFields
	sizeCache            protoimpl.SizeCache
}

func (x *BasicAuth) Reset() {
	*x = BasicAuth{}
	mi := &file_envoy_extensions_filters_http_basic_auth_v3_basic_auth_proto_msgTypes[0]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *BasicAuth) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*BasicAuth) ProtoMessage() {}

func (x *BasicAuth) ProtoReflect() protoreflect.Message {
	mi := &file_envoy_extensions_filters_http_basic_auth_v3_basic_auth_proto_msgTypes[0]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use BasicAuth.ProtoReflect.Descriptor instead.
func (*BasicAuth) Descriptor() ([]byte, []int) {
	return file_envoy_extensions_filters_http_basic_auth_v3_basic_auth_proto_rawDescGZIP(), []int{0}
}

func (x *BasicAuth) GetUsers() *v3.DataSource {
	if x != nil {
		return x.Users
	}
	return nil
}

func (x *BasicAuth) GetForwardUsernameHeader() string {
	if x != nil {
		return x.ForwardUsernameHeader
	}
	return ""
}

func (x *BasicAuth) GetAuthenticationHeader() string {
	if x != nil {
		return x.AuthenticationHeader
	}
	return ""
}

// Extra settings that may be added to per-route configuration for
// a virtual host or a cluster.
type BasicAuthPerRoute struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Username-password pairs for this route.
	Users         *v3.DataSource `protobuf:"bytes,1,opt,name=users,proto3" json:"users,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *BasicAuthPerRoute) Reset() {
	*x = BasicAuthPerRoute{}
	mi := &file_envoy_extensions_filters_http_basic_auth_v3_basic_auth_proto_msgTypes[1]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *BasicAuthPerRoute) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*BasicAuthPerRoute) ProtoMessage() {}

func (x *BasicAuthPerRoute) ProtoReflect() protoreflect.Message {
	mi := &file_envoy_extensions_filters_http_basic_auth_v3_basic_auth_proto_msgTypes[1]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use BasicAuthPerRoute.ProtoReflect.Descriptor instead.
func (*BasicAuthPerRoute) Descriptor() ([]byte, []int) {
	return file_envoy_extensions_filters_http_basic_auth_v3_basic_auth_proto_rawDescGZIP(), []int{1}
}

func (x *BasicAuthPerRoute) GetUsers() *v3.DataSource {
	if x != nil {
		return x.Users
	}
	return nil
}

var File_envoy_extensions_filters_http_basic_auth_v3_basic_auth_proto protoreflect.FileDescriptor

const file_envoy_extensions_filters_http_basic_auth_v3_basic_auth_proto_rawDesc = "" +
	"\n" +
	"<envoy/extensions/filters/http/basic_auth/v3/basic_auth.proto\x12+envoy.extensions.filters.http.basic_auth.v3\x1a\x1fenvoy/config/core/v3/base.proto\x1a udpa/annotations/sensitive.proto\x1a\x1dudpa/annotations/status.proto\x1a\x17validate/validate.proto\"\xd2\x01\n" +
	"\tBasicAuth\x12>\n" +
	"\x05users\x18\x01 \x01(\v2 .envoy.config.core.v3.DataSourceB\x06\xb8\xb7\x8b\xa4\x02\x01R\x05users\x12C\n" +
	"\x17forward_username_header\x18\x02 \x01(\tB\v\xfaB\br\x06\xc8\x01\x00\xc0\x01\x01R\x15forwardUsernameHeader\x12@\n" +
	"\x15authentication_header\x18\x03 \x01(\tB\v\xfaB\br\x06\xc8\x01\x00\xc0\x01\x01R\x14authenticationHeader\"[\n" +
	"\x11BasicAuthPerRoute\x12F\n" +
	"\x05users\x18\x01 \x01(\v2 .envoy.config.core.v3.DataSourceB\x0e\xfaB\x05\x8a\x01\x02\x10\x01\xb8\xb7\x8b\xa4\x02\x01R\x05usersB\xb6\x01\xba\x80\xc8\xd1\x06\x02\x10\x02\n" +
	"9io.envoyproxy.envoy.extensions.filters.http.basic_auth.v3B\x0eBasicAuthProtoP\x01Z_github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/basic_auth/v3;basic_authv3b\x06proto3"

var (
	file_envoy_extensions_filters_http_basic_auth_v3_basic_auth_proto_rawDescOnce sync.Once
	file_envoy_extensions_filters_http_basic_auth_v3_basic_auth_proto_rawDescData []byte
)

func file_envoy_extensions_filters_http_basic_auth_v3_basic_auth_proto_rawDescGZIP() []byte {
	file_envoy_extensions_filters_http_basic_auth_v3_basic_auth_proto_rawDescOnce.Do(func() {
		file_envoy_extensions_filters_http_basic_auth_v3_basic_auth_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_envoy_extensions_filters_http_basic_auth_v3_basic_auth_proto_rawDesc), len(file_envoy_extensions_filters_http_basic_auth_v3_basic_auth_proto_rawDesc)))
	})
	return file_envoy_extensions_filters_http_basic_auth_v3_basic_auth_proto_rawDescData
}

var file_envoy_extensions_filters_http_basic_auth_v3_basic_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_envoy_extensions_filters_http_basic_auth_v3_basic_auth_proto_goTypes = []any{
	(*BasicAuth)(nil),         // 0: envoy.extensions.filters.http.basic_auth.v3.BasicAuth
	(*BasicAuthPerRoute)(nil), // 1: envoy.extensions.filters.http.basic_auth.v3.BasicAuthPerRoute
	(*v3.DataSource)(nil),     // 2: envoy.config.core.v3.DataSource
}
var file_envoy_extensions_filters_http_basic_auth_v3_basic_auth_proto_depIdxs = []int32{
	2, // 0: envoy.extensions.filters.http.basic_auth.v3.BasicAuth.users:type_name -> envoy.config.core.v3.DataSource
	2, // 1: envoy.extensions.filters.http.basic_auth.v3.BasicAuthPerRoute.users:type_name -> envoy.config.core.v3.DataSource
	2, // [2:2] is the sub-list for method output_type
	2, // [2:2] is the sub-list for method input_type
	2, // [2:2] is the sub-list for extension type_name
	2, // [2:2] is the sub-list for extension extendee
	0, // [0:2] is the sub-list for field type_name
}

func init() { file_envoy_extensions_filters_http_basic_auth_v3_basic_auth_proto_init() }
func file_envoy_extensions_filters_http_basic_auth_v3_basic_auth_proto_init() {
	if File_envoy_extensions_filters_http_basic_auth_v3_basic_auth_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_envoy_extensions_filters_http_basic_auth_v3_basic_auth_proto_rawDesc), len(file_envoy_extensions_filters_http_basic_auth_v3_basic_auth_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_envoy_extensions_filters_http_basic_auth_v3_basic_auth_proto_goTypes,
		DependencyIndexes: file_envoy_extensions_filters_http_basic_auth_v3_basic_auth_proto_depIdxs,
		MessageInfos:      file_envoy_extensions_filters_http_basic_auth_v3_basic_auth_proto_msgTypes,
	}.Build()
	File_envoy_extensions_filters_http_basic_auth_v3_basic_auth_proto = out.File
	file_envoy_extensions_filters_http_basic_auth_v3_basic_auth_proto_goTypes = nil
	file_envoy_extensions_filters_http_basic_auth_v3_basic_auth_proto_depIdxs = nil
}
