// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.4
// 	protoc        v5.29.0
// source: app/v1/middleware/csrf.proto

package v1

import (
	_ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate"
	v1 "github.com/aileron-gateway/aileron-gateway/apis/core/v1"
	kernel "github.com/aileron-gateway/aileron-gateway/apis/kernel"
	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)
)

// TokenSource is the csrf token source type.
// CSRF tokens are looked for from the specified source.
type TokenSource int32

const (
	TokenSource_Header TokenSource = 0 // Get a csrf token from HTTP header.
	TokenSource_Form   TokenSource = 1 // Get a csrf token from form request parameter.
	TokenSource_JSON   TokenSource = 2 // Get a csrf token from json body.
)

// Enum value maps for TokenSource.
var (
	TokenSource_name = map[int32]string{
		0: "Header",
		1: "Form",
		2: "JSON",
	}
	TokenSource_value = map[string]int32{
		"Header": 0,
		"Form":   1,
		"JSON":   2,
	}
)

func (x TokenSource) Enum() *TokenSource {
	p := new(TokenSource)
	*p = x
	return p
}

func (x TokenSource) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (TokenSource) Descriptor() protoreflect.EnumDescriptor {
	return file_app_v1_middleware_csrf_proto_enumTypes[0].Descriptor()
}

func (TokenSource) Type() protoreflect.EnumType {
	return &file_app_v1_middleware_csrf_proto_enumTypes[0]
}

func (x TokenSource) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use TokenSource.Descriptor instead.
func (TokenSource) EnumDescriptor() ([]byte, []int) {
	return file_app_v1_middleware_csrf_proto_rawDescGZIP(), []int{0}
}

// CSRFMiddleware resource definition.
// apiVersion="app/v1", kind="CSRFMiddleware".
type CSRFMiddleware struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	APIVersion    string                 `protobuf:"bytes,1,opt,name=APIVersion,json=apiVersion,proto3" json:"APIVersion,omitempty"`
	Kind          string                 `protobuf:"bytes,2,opt,name=Kind,json=kind,proto3" json:"Kind,omitempty"`
	Metadata      *kernel.Metadata       `protobuf:"bytes,3,opt,name=Metadata,json=metadata,proto3" json:"Metadata,omitempty"`
	Spec          *CSRFMiddlewareSpec    `protobuf:"bytes,4,opt,name=Spec,json=spec,proto3" json:"Spec,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*CSRFMiddleware) ProtoMessage() {}

func (x *CSRFMiddleware) ProtoReflect() protoreflect.Message {
	mi := &file_app_v1_middleware_csrf_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 CSRFMiddleware.ProtoReflect.Descriptor instead.
func (*CSRFMiddleware) Descriptor() ([]byte, []int) {
	return file_app_v1_middleware_csrf_proto_rawDescGZIP(), []int{0}
}

func (x *CSRFMiddleware) GetAPIVersion() string {
	if x != nil {
		return x.APIVersion
	}
	return ""
}

func (x *CSRFMiddleware) GetKind() string {
	if x != nil {
		return x.Kind
	}
	return ""
}

func (x *CSRFMiddleware) GetMetadata() *kernel.Metadata {
	if x != nil {
		return x.Metadata
	}
	return nil
}

func (x *CSRFMiddleware) GetSpec() *CSRFMiddlewareSpec {
	if x != nil {
		return x.Spec
	}
	return nil
}

// CSRFMiddlewareSpec is the specifications for the CSRFMiddleware object.
type CSRFMiddlewareSpec struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// [OPTIONAL]
	// Pattern is the URL path pattern that csrf token issue handler accepts.
	// Token issue handler is the endpoint that issue csrf token to the client.
	// This endpoint must be protected with CORS policy.
	// Default is "/token".
	Patterns []string `protobuf:"bytes,1,rep,name=Patterns,json=patterns,proto3" json:"Patterns,omitempty"`
	// [OPTIONAL]
	// Methods is the list of HTTP methods that CSRF token issue handler can receive.
	// Token issue handler is the endpoint that issue csrf token to the client.
	// This endpoint must be protected with CORS policy.
	// All methods are allowed when not set.
	Methods []v1.HTTPMethod `protobuf:"varint,2,rep,packed,name=Methods,json=methods,proto3,enum=core.v1.HTTPMethod" json:"Methods,omitempty"`
	// [OPTIONAL]
	// SkipMethods is the list of HTTP methods that skip token validation.
	// By default GET, HEAD, TRACE, OPTIONS are skipped because
	// they are the methods that should not modify the server side state.
	// Default is [GET, HEAD, TRACE, OPTIONS].
	SkipMethods []v1.HTTPMethod `protobuf:"varint,3,rep,packed,name=SkipMethods,json=skipMethods,proto3,enum=core.v1.HTTPMethod" json:"SkipMethods,omitempty"`
	// [OPTIONAL]
	// ProxyHeaderName is the header name to send a valid CSRF token to upstream.
	// This should be set when using DoubleSubmitCookies pattern or SynchronizerToken pattern.
	ProxyHeaderName string `protobuf:"bytes,4,opt,name=ProxyHeaderName,json=proxyHeaderName,proto3" json:"ProxyHeaderName,omitempty"`
	// [OPTIONAL]
	// IssueNew is the flag to always generate new csrf token
	// in the csrf token issue handler this resource provides.
	// If false, the handler try to find existing csrf token
	// bounded to the request.
	// Default is [false].
	IssueNew bool `protobuf:"varint,5,opt,name=IssueNew,json=issueNew,proto3" json:"IssueNew,omitempty"`
	// [OPTIONAL]
	// Secret is the base64 encoded secret used for generating
	// csrf tokens by the csrf token issue handler which this resource provides.
	// The secret should have at least 64 bytes.
	// Online generator such as https://generate.plus/en/base64 can be used.
	// DO NOT use the default value.
	// Default value is Base64(sha512(hostname)).
	Secret string `protobuf:"bytes,6,opt,name=Secret,json=secret,proto3" json:"Secret,omitempty"`
	// [OPTIONAL]
	// SeedSize is the random bytes length of CSRF token.
	// Larger number is safer but results in bigger size of token.
	// 15 bytes (120 bits) at minimum is recommended by OWASP.
	// Default is [20].
	SeedSize int32 `protobuf:"varint,7,opt,name=SeedSize,json=seedSize,proto3" json:"SeedSize,omitempty"`
	// [OPTIONAL]
	// HashAlg is the type of hash algorithm used for generating csrf token.
	// The hash algorithm must be cryptographic one.
	// Do not use this field otherwise you understand what you are doing.
	// Default is [SHA256] which means to use HMAC-SHA256.
	HashAlg kernel.HashAlg `protobuf:"varint,8,opt,name=HashAlg,json=hashAlg,proto3,enum=kernel.HashAlg" json:"HashAlg,omitempty"`
	// Types that are valid to be assigned to CSRFPatterns:
	//
	//	*CSRFMiddlewareSpec_CustomRequestHeader
	//	*CSRFMiddlewareSpec_DoubleSubmitCookies
	//	*CSRFMiddlewareSpec_SynchronizerToken
	CSRFPatterns  isCSRFMiddlewareSpec_CSRFPatterns `protobuf_oneof:"CSRFPatterns"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*CSRFMiddlewareSpec) ProtoMessage() {}

func (x *CSRFMiddlewareSpec) ProtoReflect() protoreflect.Message {
	mi := &file_app_v1_middleware_csrf_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 CSRFMiddlewareSpec.ProtoReflect.Descriptor instead.
func (*CSRFMiddlewareSpec) Descriptor() ([]byte, []int) {
	return file_app_v1_middleware_csrf_proto_rawDescGZIP(), []int{1}
}

func (x *CSRFMiddlewareSpec) GetPatterns() []string {
	if x != nil {
		return x.Patterns
	}
	return nil
}

func (x *CSRFMiddlewareSpec) GetMethods() []v1.HTTPMethod {
	if x != nil {
		return x.Methods
	}
	return nil
}

func (x *CSRFMiddlewareSpec) GetSkipMethods() []v1.HTTPMethod {
	if x != nil {
		return x.SkipMethods
	}
	return nil
}

func (x *CSRFMiddlewareSpec) GetProxyHeaderName() string {
	if x != nil {
		return x.ProxyHeaderName
	}
	return ""
}

func (x *CSRFMiddlewareSpec) GetIssueNew() bool {
	if x != nil {
		return x.IssueNew
	}
	return false
}

func (x *CSRFMiddlewareSpec) GetSecret() string {
	if x != nil {
		return x.Secret
	}
	return ""
}

func (x *CSRFMiddlewareSpec) GetSeedSize() int32 {
	if x != nil {
		return x.SeedSize
	}
	return 0
}

func (x *CSRFMiddlewareSpec) GetHashAlg() kernel.HashAlg {
	if x != nil {
		return x.HashAlg
	}
	return kernel.HashAlg(0)
}

func (x *CSRFMiddlewareSpec) GetCSRFPatterns() isCSRFMiddlewareSpec_CSRFPatterns {
	if x != nil {
		return x.CSRFPatterns
	}
	return nil
}

func (x *CSRFMiddlewareSpec) GetCustomRequestHeader() *CustomRequestHeaderSpec {
	if x != nil {
		if x, ok := x.CSRFPatterns.(*CSRFMiddlewareSpec_CustomRequestHeader); ok {
			return x.CustomRequestHeader
		}
	}
	return nil
}

func (x *CSRFMiddlewareSpec) GetDoubleSubmitCookies() *DoubleSubmitCookiesSpec {
	if x != nil {
		if x, ok := x.CSRFPatterns.(*CSRFMiddlewareSpec_DoubleSubmitCookies); ok {
			return x.DoubleSubmitCookies
		}
	}
	return nil
}

func (x *CSRFMiddlewareSpec) GetSynchronizerToken() *SynchronizerTokenSpec {
	if x != nil {
		if x, ok := x.CSRFPatterns.(*CSRFMiddlewareSpec_SynchronizerToken); ok {
			return x.SynchronizerToken
		}
	}
	return nil
}

type isCSRFMiddlewareSpec_CSRFPatterns interface {
	isCSRFMiddlewareSpec_CSRFPatterns()
}

type CSRFMiddlewareSpec_CustomRequestHeader struct {
	// CustomRequestHeader is the settings for CSRF using custom request header pattern.
	// Read about that pattern at
	// https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.htm
	CustomRequestHeader *CustomRequestHeaderSpec `protobuf:"bytes,10,opt,name=CustomRequestHeader,json=customRequestHeader,proto3,oneof"`
}

type CSRFMiddlewareSpec_DoubleSubmitCookies struct {
	// CustomRequestHeaders is the settings for CSRF using double submit cookies pattern.
	// Read about that pattern at
	// https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.htm
	DoubleSubmitCookies *DoubleSubmitCookiesSpec `protobuf:"bytes,11,opt,name=DoubleSubmitCookies,json=doubleSubmitCookies,proto3,oneof"`
}

type CSRFMiddlewareSpec_SynchronizerToken struct {
	// SynchronizerToken is the settings for CSRF using synchronizer token pattern.
	// Read about that pattern at
	// https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.htm
	SynchronizerToken *SynchronizerTokenSpec `protobuf:"bytes,12,opt,name=SynchronizerToken,json=synchronizerToken,proto3,oneof"`
}

func (*CSRFMiddlewareSpec_CustomRequestHeader) isCSRFMiddlewareSpec_CSRFPatterns() {}

func (*CSRFMiddlewareSpec_DoubleSubmitCookies) isCSRFMiddlewareSpec_CSRFPatterns() {}

func (*CSRFMiddlewareSpec_SynchronizerToken) isCSRFMiddlewareSpec_CSRFPatterns() {}

// CustomRequestHeadersSpec is the specification of CSRF protection using custom header pattern.
type CustomRequestHeaderSpec struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// [OPTIONAL]
	// HeaderName is the name of header to check as custom header.
	// Header name must not be listed in the CORS-safelisted request-header and must not
	// be one which browsers automatically set.
	// "X-Requested-With" is one of the commonly used custom header.
	// See https://fetch.spec.whatwg.org/#cors-safelisted-request-header.
	HeaderName string `protobuf:"bytes,1,opt,name=HeaderName,json=headerName,proto3" json:"HeaderName,omitempty"`
	// [OPTIONAL]
	// AllowedPattern is the regular expression of the header value to allow.
	// See the https://pkg.go.dev/regexp/syntax for allowed syntax.
	// Setting this field disables HMAC validation and check by the
	// specified pattern.
	// Default is not set.
	AllowedPattern string `protobuf:"bytes,2,opt,name=AllowedPattern,json=allowedPattern,proto3" json:"AllowedPattern,omitempty"`
	unknownFields  protoimpl.UnknownFields
	sizeCache      protoimpl.SizeCache
}

func (x *CustomRequestHeaderSpec) Reset() {
	*x = CustomRequestHeaderSpec{}
	mi := &file_app_v1_middleware_csrf_proto_msgTypes[2]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*CustomRequestHeaderSpec) ProtoMessage() {}

func (x *CustomRequestHeaderSpec) ProtoReflect() protoreflect.Message {
	mi := &file_app_v1_middleware_csrf_proto_msgTypes[2]
	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 CustomRequestHeaderSpec.ProtoReflect.Descriptor instead.
func (*CustomRequestHeaderSpec) Descriptor() ([]byte, []int) {
	return file_app_v1_middleware_csrf_proto_rawDescGZIP(), []int{2}
}

func (x *CustomRequestHeaderSpec) GetHeaderName() string {
	if x != nil {
		return x.HeaderName
	}
	return ""
}

func (x *CustomRequestHeaderSpec) GetAllowedPattern() string {
	if x != nil {
		return x.AllowedPattern
	}
	return ""
}

// DoubleSubmitCookiesSpec is the specification of CSRF protection using double submit cookie pattern.
type DoubleSubmitCookiesSpec struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// [OPTIONAL]
	// CookieName is the cookie name to save csrf tokens.
	// Default is ["__csrfToken"]
	CookieName string `protobuf:"bytes,1,opt,name=CookieName,json=cookieName,proto3" json:"CookieName,omitempty"`
	// [OPTIONAL]
	// SourceKey is the key name of a csrf token to extract from the token source.
	// Default is ["__csrfToken"]
	Cookie *v1.CookieSpec `protobuf:"bytes,2,opt,name=Cookie,json=cookie,proto3" json:"Cookie,omitempty"`
	// [OPTIONAL]
	// TokenSource is the source type of csrf tokens.
	// Default is [Header].
	TokenSource TokenSource `protobuf:"varint,3,opt,name=TokenSource,json=tokenSource,proto3,enum=app.v1.TokenSource" json:"TokenSource,omitempty"`
	// [OPTIONAL]
	// SourceKey is the key name of a csrf token to extract from the token source.
	// Header name for Header source, form key name for Form source and JSON key name for json source.
	// For JSON source, dot joined path expression like "foo.bar.token" can be used.
	// Default is ["__csrfToken"]
	SourceKey     string `protobuf:"bytes,4,opt,name=SourceKey,json=sourceKey,proto3" json:"SourceKey,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *DoubleSubmitCookiesSpec) Reset() {
	*x = DoubleSubmitCookiesSpec{}
	mi := &file_app_v1_middleware_csrf_proto_msgTypes[3]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*DoubleSubmitCookiesSpec) ProtoMessage() {}

func (x *DoubleSubmitCookiesSpec) ProtoReflect() protoreflect.Message {
	mi := &file_app_v1_middleware_csrf_proto_msgTypes[3]
	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 DoubleSubmitCookiesSpec.ProtoReflect.Descriptor instead.
func (*DoubleSubmitCookiesSpec) Descriptor() ([]byte, []int) {
	return file_app_v1_middleware_csrf_proto_rawDescGZIP(), []int{3}
}

func (x *DoubleSubmitCookiesSpec) GetCookieName() string {
	if x != nil {
		return x.CookieName
	}
	return ""
}

func (x *DoubleSubmitCookiesSpec) GetCookie() *v1.CookieSpec {
	if x != nil {
		return x.Cookie
	}
	return nil
}

func (x *DoubleSubmitCookiesSpec) GetTokenSource() TokenSource {
	if x != nil {
		return x.TokenSource
	}
	return TokenSource_Header
}

func (x *DoubleSubmitCookiesSpec) GetSourceKey() string {
	if x != nil {
		return x.SourceKey
	}
	return ""
}

// DoubleSubmitCookiesSpec is the specification of CSRF protection using synchronizer token pattern.
type SynchronizerTokenSpec struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// [OPTIONAL]
	// TokenSource is the source type of csrf tokens.
	// Default is [Header].
	TokenSource TokenSource `protobuf:"varint,1,opt,name=TokenSource,json=tokenSource,proto3,enum=app.v1.TokenSource" json:"TokenSource,omitempty"`
	// [OPTIONAL]
	// SourceKey is the key name of a csrf token to extract from the token source.
	// Header name for Header source, form key name for Form source and JSON key name for json source.
	// For JSON source, dot joined path expression like "foo.bar.token" can be used.
	// Default is ["__csrfToken"]
	SourceKey     string `protobuf:"bytes,2,opt,name=SourceKey,json=sourceKey,proto3" json:"SourceKey,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *SynchronizerTokenSpec) Reset() {
	*x = SynchronizerTokenSpec{}
	mi := &file_app_v1_middleware_csrf_proto_msgTypes[4]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*SynchronizerTokenSpec) ProtoMessage() {}

func (x *SynchronizerTokenSpec) ProtoReflect() protoreflect.Message {
	mi := &file_app_v1_middleware_csrf_proto_msgTypes[4]
	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 SynchronizerTokenSpec.ProtoReflect.Descriptor instead.
func (*SynchronizerTokenSpec) Descriptor() ([]byte, []int) {
	return file_app_v1_middleware_csrf_proto_rawDescGZIP(), []int{4}
}

func (x *SynchronizerTokenSpec) GetTokenSource() TokenSource {
	if x != nil {
		return x.TokenSource
	}
	return TokenSource_Header
}

func (x *SynchronizerTokenSpec) GetSourceKey() string {
	if x != nil {
		return x.SourceKey
	}
	return ""
}

var File_app_v1_middleware_csrf_proto protoreflect.FileDescriptor

var file_app_v1_middleware_csrf_proto_rawDesc = string([]byte{
	0x0a, 0x1c, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77,
	0x61, 0x72, 0x65, 0x2f, 0x63, 0x73, 0x72, 0x66, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06,
	0x61, 0x70, 0x70, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69,
	0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72,
	0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x68, 0x74, 0x74,
	0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x2f,
	0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11,
	0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74,
	0x6f, 0x22, 0xa2, 0x01, 0x0a, 0x0e, 0x43, 0x53, 0x52, 0x46, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65,
	0x77, 0x61, 0x72, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x41, 0x50, 0x49, 0x56, 0x65, 0x72, 0x73, 0x69,
	0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72,
	0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01,
	0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x2c, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61,
	0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6b, 0x65, 0x72,
	0x6e, 0x65, 0x6c, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65,
	0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2e, 0x0a, 0x04, 0x53, 0x70, 0x65, 0x63, 0x18, 0x04,
	0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x53,
	0x52, 0x46, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x53, 0x70, 0x65, 0x63,
	0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0xec, 0x04, 0x0a, 0x12, 0x43, 0x53, 0x52, 0x46, 0x4d,
	0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x1a, 0x0a,
	0x08, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52,
	0x08, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x12, 0x2d, 0x0a, 0x07, 0x4d, 0x65, 0x74,
	0x68, 0x6f, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x72,
	0x65, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52,
	0x07, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x12, 0x35, 0x0a, 0x0b, 0x53, 0x6b, 0x69, 0x70,
	0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x13, 0x2e,
	0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x4d, 0x65, 0x74, 0x68,
	0x6f, 0x64, 0x52, 0x0b, 0x73, 0x6b, 0x69, 0x70, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x12,
	0x28, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4e, 0x61,
	0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x48,
	0x65, 0x61, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x49, 0x73, 0x73,
	0x75, 0x65, 0x4e, 0x65, 0x77, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x73,
	0x75, 0x65, 0x4e, 0x65, 0x77, 0x12, 0x2e, 0x0a, 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18,
	0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x16, 0xba, 0x48, 0x13, 0x72, 0x11, 0x32, 0x0f, 0x5b, 0x30,
	0x2d, 0x39, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x2b, 0x2f, 0x3d, 0x5d, 0x2b, 0x52, 0x06, 0x73,
	0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x23, 0x0a, 0x08, 0x53, 0x65, 0x65, 0x64, 0x53, 0x69, 0x7a,
	0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x42, 0x07, 0xba, 0x48, 0x04, 0x1a, 0x02, 0x28, 0x05,
	0x52, 0x08, 0x73, 0x65, 0x65, 0x64, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x29, 0x0a, 0x07, 0x48, 0x61,
	0x73, 0x68, 0x41, 0x6c, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x6b, 0x65,
	0x72, 0x6e, 0x65, 0x6c, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x41, 0x6c, 0x67, 0x52, 0x07, 0x68, 0x61,
	0x73, 0x68, 0x41, 0x6c, 0x67, 0x12, 0x53, 0x0a, 0x13, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52,
	0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01,
	0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x75, 0x73, 0x74,
	0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53,
	0x70, 0x65, 0x63, 0x48, 0x00, 0x52, 0x13, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x71,
	0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x53, 0x0a, 0x13, 0x44, 0x6f,
	0x75, 0x62, 0x6c, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65,
	0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x76, 0x31,
	0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x6f,
	0x6b, 0x69, 0x65, 0x73, 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, 0x52, 0x13, 0x64, 0x6f, 0x75, 0x62,
	0x6c, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x73, 0x12,
	0x4d, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x54,
	0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x61, 0x70, 0x70,
	0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x65, 0x72,
	0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, 0x52, 0x11, 0x73, 0x79, 0x6e,
	0x63, 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x15,
	0x0a, 0x0c, 0x43, 0x53, 0x52, 0x46, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x12, 0x05,
	0xba, 0x48, 0x02, 0x08, 0x01, 0x22, 0x7a, 0x0a, 0x17, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52,
	0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63,
	0x12, 0x37, 0x0a, 0x0a, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01,
	0x20, 0x01, 0x28, 0x09, 0x42, 0x17, 0xba, 0x48, 0x14, 0x72, 0x12, 0x32, 0x10, 0x5e, 0x5b, 0x30,
	0x2d, 0x39, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x2d, 0x5f, 0x5d, 0x2b, 0x24, 0x52, 0x0a, 0x68,
	0x65, 0x61, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x41, 0x6c, 0x6c,
	0x6f, 0x77, 0x65, 0x64, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28,
	0x09, 0x52, 0x0e, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72,
	0x6e, 0x22, 0xed, 0x01, 0x0a, 0x17, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x53, 0x75, 0x62, 0x6d,
	0x69, 0x74, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x73, 0x53, 0x70, 0x65, 0x63, 0x12, 0x37, 0x0a,
	0x0a, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
	0x09, 0x42, 0x17, 0xba, 0x48, 0x14, 0x72, 0x12, 0x32, 0x10, 0x5e, 0x5b, 0x30, 0x2d, 0x39, 0x61,
	0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x2d, 0x5f, 0x5d, 0x2b, 0x24, 0x52, 0x0a, 0x63, 0x6f, 0x6f, 0x6b,
	0x69, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x06, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65,
	0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31,
	0x2e, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x53, 0x70, 0x65, 0x63, 0x52, 0x06, 0x63, 0x6f, 0x6f,
	0x6b, 0x69, 0x65, 0x12, 0x35, 0x0a, 0x0b, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x6f, 0x75, 0x72,
	0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x76,
	0x31, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0b, 0x74,
	0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x09, 0x53, 0x6f,
	0x75, 0x72, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x17, 0xba,
	0x48, 0x14, 0x72, 0x12, 0x32, 0x10, 0x5e, 0x5b, 0x30, 0x2d, 0x39, 0x61, 0x2d, 0x7a, 0x41, 0x2d,
	0x5a, 0x2d, 0x5f, 0x5d, 0x2b, 0x24, 0x52, 0x09, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4b, 0x65,
	0x79, 0x22, 0x85, 0x01, 0x0a, 0x15, 0x53, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a,
	0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x12, 0x35, 0x0a, 0x0b, 0x54,
	0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e,
	0x32, 0x13, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53,
	0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0b, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x6f, 0x75, 0x72,
	0x63, 0x65, 0x12, 0x35, 0x0a, 0x09, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x18,
	0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x17, 0xba, 0x48, 0x14, 0x72, 0x12, 0x32, 0x10, 0x5e, 0x5b,
	0x30, 0x2d, 0x39, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x2d, 0x5f, 0x5d, 0x2b, 0x24, 0x52, 0x09,
	0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x2a, 0x2d, 0x0a, 0x0b, 0x54, 0x6f, 0x6b,
	0x65, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64,
	0x65, 0x72, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x6f, 0x72, 0x6d, 0x10, 0x01, 0x12, 0x08,
	0x0a, 0x04, 0x4a, 0x53, 0x4f, 0x4e, 0x10, 0x02, 0x42, 0x38, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68,
	0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x6f, 0x6e, 0x2d, 0x67,
	0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x6f, 0x6e, 0x2d, 0x67,
	0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f,
	0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
})

var (
	file_app_v1_middleware_csrf_proto_rawDescOnce sync.Once
	file_app_v1_middleware_csrf_proto_rawDescData []byte
)

func file_app_v1_middleware_csrf_proto_rawDescGZIP() []byte {
	file_app_v1_middleware_csrf_proto_rawDescOnce.Do(func() {
		file_app_v1_middleware_csrf_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_app_v1_middleware_csrf_proto_rawDesc), len(file_app_v1_middleware_csrf_proto_rawDesc)))
	})
	return file_app_v1_middleware_csrf_proto_rawDescData
}

var file_app_v1_middleware_csrf_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_app_v1_middleware_csrf_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_app_v1_middleware_csrf_proto_goTypes = []any{
	(TokenSource)(0),                // 0: app.v1.TokenSource
	(*CSRFMiddleware)(nil),          // 1: app.v1.CSRFMiddleware
	(*CSRFMiddlewareSpec)(nil),      // 2: app.v1.CSRFMiddlewareSpec
	(*CustomRequestHeaderSpec)(nil), // 3: app.v1.CustomRequestHeaderSpec
	(*DoubleSubmitCookiesSpec)(nil), // 4: app.v1.DoubleSubmitCookiesSpec
	(*SynchronizerTokenSpec)(nil),   // 5: app.v1.SynchronizerTokenSpec
	(*kernel.Metadata)(nil),         // 6: kernel.Metadata
	(v1.HTTPMethod)(0),              // 7: core.v1.HTTPMethod
	(kernel.HashAlg)(0),             // 8: kernel.HashAlg
	(*v1.CookieSpec)(nil),           // 9: core.v1.CookieSpec
}
var file_app_v1_middleware_csrf_proto_depIdxs = []int32{
	6,  // 0: app.v1.CSRFMiddleware.Metadata:type_name -> kernel.Metadata
	2,  // 1: app.v1.CSRFMiddleware.Spec:type_name -> app.v1.CSRFMiddlewareSpec
	7,  // 2: app.v1.CSRFMiddlewareSpec.Methods:type_name -> core.v1.HTTPMethod
	7,  // 3: app.v1.CSRFMiddlewareSpec.SkipMethods:type_name -> core.v1.HTTPMethod
	8,  // 4: app.v1.CSRFMiddlewareSpec.HashAlg:type_name -> kernel.HashAlg
	3,  // 5: app.v1.CSRFMiddlewareSpec.CustomRequestHeader:type_name -> app.v1.CustomRequestHeaderSpec
	4,  // 6: app.v1.CSRFMiddlewareSpec.DoubleSubmitCookies:type_name -> app.v1.DoubleSubmitCookiesSpec
	5,  // 7: app.v1.CSRFMiddlewareSpec.SynchronizerToken:type_name -> app.v1.SynchronizerTokenSpec
	9,  // 8: app.v1.DoubleSubmitCookiesSpec.Cookie:type_name -> core.v1.CookieSpec
	0,  // 9: app.v1.DoubleSubmitCookiesSpec.TokenSource:type_name -> app.v1.TokenSource
	0,  // 10: app.v1.SynchronizerTokenSpec.TokenSource:type_name -> app.v1.TokenSource
	11, // [11:11] is the sub-list for method output_type
	11, // [11:11] is the sub-list for method input_type
	11, // [11:11] is the sub-list for extension type_name
	11, // [11:11] is the sub-list for extension extendee
	0,  // [0:11] is the sub-list for field type_name
}

func init() { file_app_v1_middleware_csrf_proto_init() }
func file_app_v1_middleware_csrf_proto_init() {
	if File_app_v1_middleware_csrf_proto != nil {
		return
	}
	file_app_v1_middleware_csrf_proto_msgTypes[1].OneofWrappers = []any{
		(*CSRFMiddlewareSpec_CustomRequestHeader)(nil),
		(*CSRFMiddlewareSpec_DoubleSubmitCookies)(nil),
		(*CSRFMiddlewareSpec_SynchronizerToken)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_app_v1_middleware_csrf_proto_rawDesc), len(file_app_v1_middleware_csrf_proto_rawDesc)),
			NumEnums:      1,
			NumMessages:   5,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_app_v1_middleware_csrf_proto_goTypes,
		DependencyIndexes: file_app_v1_middleware_csrf_proto_depIdxs,
		EnumInfos:         file_app_v1_middleware_csrf_proto_enumTypes,
		MessageInfos:      file_app_v1_middleware_csrf_proto_msgTypes,
	}.Build()
	File_app_v1_middleware_csrf_proto = out.File
	file_app_v1_middleware_csrf_proto_goTypes = nil
	file_app_v1_middleware_csrf_proto_depIdxs = nil
}
