...

Source file src/github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/auth/v2/external_auth.pb.go

Documentation: github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/auth/v2

     1  // Code generated by protoc-gen-go. DO NOT EDIT.
     2  // versions:
     3  // 	protoc-gen-go v1.28.1
     4  // 	protoc        v3.21.12
     5  // source: envoy/service/auth/v2/external_auth.proto
     6  
     7  package authv2
     8  
     9  import (
    10  	context "context"
    11  	_ "github.com/cncf/xds/go/udpa/annotations"
    12  	core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core"
    13  	_type "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/type"
    14  	_ "github.com/envoyproxy/protoc-gen-validate/validate"
    15  	status "google.golang.org/genproto/googleapis/rpc/status"
    16  	grpc "google.golang.org/grpc"
    17  	codes "google.golang.org/grpc/codes"
    18  	status1 "google.golang.org/grpc/status"
    19  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    20  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    21  	reflect "reflect"
    22  	sync "sync"
    23  )
    24  
    25  const (
    26  	// Verify that this generated code is sufficiently up-to-date.
    27  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    28  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    29  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    30  )
    31  
    32  type CheckRequest struct {
    33  	state         protoimpl.MessageState
    34  	sizeCache     protoimpl.SizeCache
    35  	unknownFields protoimpl.UnknownFields
    36  
    37  	// The request attributes.
    38  	Attributes *AttributeContext `protobuf:"bytes,1,opt,name=attributes,proto3" json:"attributes,omitempty"`
    39  }
    40  
    41  func (x *CheckRequest) Reset() {
    42  	*x = CheckRequest{}
    43  	if protoimpl.UnsafeEnabled {
    44  		mi := &file_envoy_service_auth_v2_external_auth_proto_msgTypes[0]
    45  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    46  		ms.StoreMessageInfo(mi)
    47  	}
    48  }
    49  
    50  func (x *CheckRequest) String() string {
    51  	return protoimpl.X.MessageStringOf(x)
    52  }
    53  
    54  func (*CheckRequest) ProtoMessage() {}
    55  
    56  func (x *CheckRequest) ProtoReflect() protoreflect.Message {
    57  	mi := &file_envoy_service_auth_v2_external_auth_proto_msgTypes[0]
    58  	if protoimpl.UnsafeEnabled && x != nil {
    59  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    60  		if ms.LoadMessageInfo() == nil {
    61  			ms.StoreMessageInfo(mi)
    62  		}
    63  		return ms
    64  	}
    65  	return mi.MessageOf(x)
    66  }
    67  
    68  // Deprecated: Use CheckRequest.ProtoReflect.Descriptor instead.
    69  func (*CheckRequest) Descriptor() ([]byte, []int) {
    70  	return file_envoy_service_auth_v2_external_auth_proto_rawDescGZIP(), []int{0}
    71  }
    72  
    73  func (x *CheckRequest) GetAttributes() *AttributeContext {
    74  	if x != nil {
    75  		return x.Attributes
    76  	}
    77  	return nil
    78  }
    79  
    80  // HTTP attributes for a denied response.
    81  type DeniedHttpResponse struct {
    82  	state         protoimpl.MessageState
    83  	sizeCache     protoimpl.SizeCache
    84  	unknownFields protoimpl.UnknownFields
    85  
    86  	// This field allows the authorization service to send a HTTP response status
    87  	// code to the downstream client other than 403 (Forbidden).
    88  	Status *_type.HttpStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
    89  	// This field allows the authorization service to send HTTP response headers
    90  	// to the downstream client. Note that the `append` field in `HeaderValueOption` defaults to
    91  	// false when used in this message.
    92  	Headers []*core.HeaderValueOption `protobuf:"bytes,2,rep,name=headers,proto3" json:"headers,omitempty"`
    93  	// This field allows the authorization service to send a response body data
    94  	// to the downstream client.
    95  	Body string `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
    96  }
    97  
    98  func (x *DeniedHttpResponse) Reset() {
    99  	*x = DeniedHttpResponse{}
   100  	if protoimpl.UnsafeEnabled {
   101  		mi := &file_envoy_service_auth_v2_external_auth_proto_msgTypes[1]
   102  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   103  		ms.StoreMessageInfo(mi)
   104  	}
   105  }
   106  
   107  func (x *DeniedHttpResponse) String() string {
   108  	return protoimpl.X.MessageStringOf(x)
   109  }
   110  
   111  func (*DeniedHttpResponse) ProtoMessage() {}
   112  
   113  func (x *DeniedHttpResponse) ProtoReflect() protoreflect.Message {
   114  	mi := &file_envoy_service_auth_v2_external_auth_proto_msgTypes[1]
   115  	if protoimpl.UnsafeEnabled && x != nil {
   116  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   117  		if ms.LoadMessageInfo() == nil {
   118  			ms.StoreMessageInfo(mi)
   119  		}
   120  		return ms
   121  	}
   122  	return mi.MessageOf(x)
   123  }
   124  
   125  // Deprecated: Use DeniedHttpResponse.ProtoReflect.Descriptor instead.
   126  func (*DeniedHttpResponse) Descriptor() ([]byte, []int) {
   127  	return file_envoy_service_auth_v2_external_auth_proto_rawDescGZIP(), []int{1}
   128  }
   129  
   130  func (x *DeniedHttpResponse) GetStatus() *_type.HttpStatus {
   131  	if x != nil {
   132  		return x.Status
   133  	}
   134  	return nil
   135  }
   136  
   137  func (x *DeniedHttpResponse) GetHeaders() []*core.HeaderValueOption {
   138  	if x != nil {
   139  		return x.Headers
   140  	}
   141  	return nil
   142  }
   143  
   144  func (x *DeniedHttpResponse) GetBody() string {
   145  	if x != nil {
   146  		return x.Body
   147  	}
   148  	return ""
   149  }
   150  
   151  // HTTP attributes for an ok response.
   152  type OkHttpResponse struct {
   153  	state         protoimpl.MessageState
   154  	sizeCache     protoimpl.SizeCache
   155  	unknownFields protoimpl.UnknownFields
   156  
   157  	// HTTP entity headers in addition to the original request headers. This allows the authorization
   158  	// service to append, to add or to override headers from the original request before
   159  	// dispatching it to the upstream. Note that the `append` field in `HeaderValueOption` defaults to
   160  	// false when used in this message. By setting the `append` field to `true`,
   161  	// the filter will append the correspondent header value to the matched request header.
   162  	// By leaving `append` as false, the filter will either add a new header, or override an existing
   163  	// one if there is a match.
   164  	Headers []*core.HeaderValueOption `protobuf:"bytes,2,rep,name=headers,proto3" json:"headers,omitempty"`
   165  }
   166  
   167  func (x *OkHttpResponse) Reset() {
   168  	*x = OkHttpResponse{}
   169  	if protoimpl.UnsafeEnabled {
   170  		mi := &file_envoy_service_auth_v2_external_auth_proto_msgTypes[2]
   171  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   172  		ms.StoreMessageInfo(mi)
   173  	}
   174  }
   175  
   176  func (x *OkHttpResponse) String() string {
   177  	return protoimpl.X.MessageStringOf(x)
   178  }
   179  
   180  func (*OkHttpResponse) ProtoMessage() {}
   181  
   182  func (x *OkHttpResponse) ProtoReflect() protoreflect.Message {
   183  	mi := &file_envoy_service_auth_v2_external_auth_proto_msgTypes[2]
   184  	if protoimpl.UnsafeEnabled && x != nil {
   185  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   186  		if ms.LoadMessageInfo() == nil {
   187  			ms.StoreMessageInfo(mi)
   188  		}
   189  		return ms
   190  	}
   191  	return mi.MessageOf(x)
   192  }
   193  
   194  // Deprecated: Use OkHttpResponse.ProtoReflect.Descriptor instead.
   195  func (*OkHttpResponse) Descriptor() ([]byte, []int) {
   196  	return file_envoy_service_auth_v2_external_auth_proto_rawDescGZIP(), []int{2}
   197  }
   198  
   199  func (x *OkHttpResponse) GetHeaders() []*core.HeaderValueOption {
   200  	if x != nil {
   201  		return x.Headers
   202  	}
   203  	return nil
   204  }
   205  
   206  // Intended for gRPC and Network Authorization servers `only`.
   207  type CheckResponse struct {
   208  	state         protoimpl.MessageState
   209  	sizeCache     protoimpl.SizeCache
   210  	unknownFields protoimpl.UnknownFields
   211  
   212  	// Status `OK` allows the request. Any other status indicates the request should be denied.
   213  	Status *status.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
   214  	// An message that contains HTTP response attributes. This message is
   215  	// used when the authorization service needs to send custom responses to the
   216  	// downstream client or, to modify/add request headers being dispatched to the upstream.
   217  	//
   218  	// Types that are assignable to HttpResponse:
   219  	//	*CheckResponse_DeniedResponse
   220  	//	*CheckResponse_OkResponse
   221  	HttpResponse isCheckResponse_HttpResponse `protobuf_oneof:"http_response"`
   222  }
   223  
   224  func (x *CheckResponse) Reset() {
   225  	*x = CheckResponse{}
   226  	if protoimpl.UnsafeEnabled {
   227  		mi := &file_envoy_service_auth_v2_external_auth_proto_msgTypes[3]
   228  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   229  		ms.StoreMessageInfo(mi)
   230  	}
   231  }
   232  
   233  func (x *CheckResponse) String() string {
   234  	return protoimpl.X.MessageStringOf(x)
   235  }
   236  
   237  func (*CheckResponse) ProtoMessage() {}
   238  
   239  func (x *CheckResponse) ProtoReflect() protoreflect.Message {
   240  	mi := &file_envoy_service_auth_v2_external_auth_proto_msgTypes[3]
   241  	if protoimpl.UnsafeEnabled && x != nil {
   242  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   243  		if ms.LoadMessageInfo() == nil {
   244  			ms.StoreMessageInfo(mi)
   245  		}
   246  		return ms
   247  	}
   248  	return mi.MessageOf(x)
   249  }
   250  
   251  // Deprecated: Use CheckResponse.ProtoReflect.Descriptor instead.
   252  func (*CheckResponse) Descriptor() ([]byte, []int) {
   253  	return file_envoy_service_auth_v2_external_auth_proto_rawDescGZIP(), []int{3}
   254  }
   255  
   256  func (x *CheckResponse) GetStatus() *status.Status {
   257  	if x != nil {
   258  		return x.Status
   259  	}
   260  	return nil
   261  }
   262  
   263  func (m *CheckResponse) GetHttpResponse() isCheckResponse_HttpResponse {
   264  	if m != nil {
   265  		return m.HttpResponse
   266  	}
   267  	return nil
   268  }
   269  
   270  func (x *CheckResponse) GetDeniedResponse() *DeniedHttpResponse {
   271  	if x, ok := x.GetHttpResponse().(*CheckResponse_DeniedResponse); ok {
   272  		return x.DeniedResponse
   273  	}
   274  	return nil
   275  }
   276  
   277  func (x *CheckResponse) GetOkResponse() *OkHttpResponse {
   278  	if x, ok := x.GetHttpResponse().(*CheckResponse_OkResponse); ok {
   279  		return x.OkResponse
   280  	}
   281  	return nil
   282  }
   283  
   284  type isCheckResponse_HttpResponse interface {
   285  	isCheckResponse_HttpResponse()
   286  }
   287  
   288  type CheckResponse_DeniedResponse struct {
   289  	// Supplies http attributes for a denied response.
   290  	DeniedResponse *DeniedHttpResponse `protobuf:"bytes,2,opt,name=denied_response,json=deniedResponse,proto3,oneof"`
   291  }
   292  
   293  type CheckResponse_OkResponse struct {
   294  	// Supplies http attributes for an ok response.
   295  	OkResponse *OkHttpResponse `protobuf:"bytes,3,opt,name=ok_response,json=okResponse,proto3,oneof"`
   296  }
   297  
   298  func (*CheckResponse_DeniedResponse) isCheckResponse_HttpResponse() {}
   299  
   300  func (*CheckResponse_OkResponse) isCheckResponse_HttpResponse() {}
   301  
   302  var File_envoy_service_auth_v2_external_auth_proto protoreflect.FileDescriptor
   303  
   304  var file_envoy_service_auth_v2_external_auth_proto_rawDesc = []byte{
   305  	0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f,
   306  	0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c,
   307  	0x5f, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76,
   308  	0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e,
   309  	0x76, 0x32, 0x1a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32,
   310  	0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
   311  	0x1a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f,
   312  	0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
   313  	0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
   314  	0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x68, 0x74, 0x74, 0x70,
   315  	0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67,
   316  	0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
   317  	0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e,
   318  	0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e,
   319  	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f,
   320  	0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x57,
   321  	0x0a, 0x0c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x47,
   322  	0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01,
   323  	0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69,
   324  	0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69,
   325  	0x62, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x0a, 0x61, 0x74, 0x74,
   326  	0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x22, 0xa2, 0x01, 0x0a, 0x12, 0x44, 0x65, 0x6e, 0x69,
   327  	0x65, 0x64, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38,
   328  	0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16,
   329  	0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70,
   330  	0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01,
   331  	0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3e, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64,
   332  	0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f,
   333  	0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x65,
   334  	0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52,
   335  	0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79,
   336  	0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x50, 0x0a, 0x0e,
   337  	0x4f, 0x6b, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e,
   338  	0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32,
   339  	0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63,
   340  	0x6f, 0x72, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f,
   341  	0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x22, 0xec,
   342  	0x01, 0x0a, 0x0d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
   343  	0x12, 0x2a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
   344  	0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74,
   345  	0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x54, 0x0a, 0x0f,
   346  	0x64, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18,
   347  	0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65,
   348  	0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65,
   349  	0x6e, 0x69, 0x65, 0x64, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
   350  	0x48, 0x00, 0x52, 0x0e, 0x64, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
   351  	0x73, 0x65, 0x12, 0x48, 0x0a, 0x0b, 0x6f, 0x6b, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
   352  	0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e,
   353  	0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e,
   354  	0x4f, 0x6b, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00,
   355  	0x52, 0x0a, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0f, 0x0a, 0x0d,
   356  	0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x65, 0x0a,
   357  	0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x54,
   358  	0x0a, 0x05, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e,
   359  	0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e,
   360  	0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x65,
   361  	0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74,
   362  	0x68, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
   363  	0x73, 0x65, 0x22, 0x00, 0x42, 0x8a, 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f,
   364  	0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72,
   365  	0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x42, 0x11, 0x45, 0x78,
   366  	0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50,
   367  	0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e,
   368  	0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74,
   369  	0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f,
   370  	0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x32, 0x3b,
   371  	0x61, 0x75, 0x74, 0x68, 0x76, 0x32, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10,
   372  	0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
   373  }
   374  
   375  var (
   376  	file_envoy_service_auth_v2_external_auth_proto_rawDescOnce sync.Once
   377  	file_envoy_service_auth_v2_external_auth_proto_rawDescData = file_envoy_service_auth_v2_external_auth_proto_rawDesc
   378  )
   379  
   380  func file_envoy_service_auth_v2_external_auth_proto_rawDescGZIP() []byte {
   381  	file_envoy_service_auth_v2_external_auth_proto_rawDescOnce.Do(func() {
   382  		file_envoy_service_auth_v2_external_auth_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_auth_v2_external_auth_proto_rawDescData)
   383  	})
   384  	return file_envoy_service_auth_v2_external_auth_proto_rawDescData
   385  }
   386  
   387  var file_envoy_service_auth_v2_external_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
   388  var file_envoy_service_auth_v2_external_auth_proto_goTypes = []interface{}{
   389  	(*CheckRequest)(nil),           // 0: envoy.service.auth.v2.CheckRequest
   390  	(*DeniedHttpResponse)(nil),     // 1: envoy.service.auth.v2.DeniedHttpResponse
   391  	(*OkHttpResponse)(nil),         // 2: envoy.service.auth.v2.OkHttpResponse
   392  	(*CheckResponse)(nil),          // 3: envoy.service.auth.v2.CheckResponse
   393  	(*AttributeContext)(nil),       // 4: envoy.service.auth.v2.AttributeContext
   394  	(*_type.HttpStatus)(nil),       // 5: envoy.type.HttpStatus
   395  	(*core.HeaderValueOption)(nil), // 6: envoy.api.v2.core.HeaderValueOption
   396  	(*status.Status)(nil),          // 7: google.rpc.Status
   397  }
   398  var file_envoy_service_auth_v2_external_auth_proto_depIdxs = []int32{
   399  	4, // 0: envoy.service.auth.v2.CheckRequest.attributes:type_name -> envoy.service.auth.v2.AttributeContext
   400  	5, // 1: envoy.service.auth.v2.DeniedHttpResponse.status:type_name -> envoy.type.HttpStatus
   401  	6, // 2: envoy.service.auth.v2.DeniedHttpResponse.headers:type_name -> envoy.api.v2.core.HeaderValueOption
   402  	6, // 3: envoy.service.auth.v2.OkHttpResponse.headers:type_name -> envoy.api.v2.core.HeaderValueOption
   403  	7, // 4: envoy.service.auth.v2.CheckResponse.status:type_name -> google.rpc.Status
   404  	1, // 5: envoy.service.auth.v2.CheckResponse.denied_response:type_name -> envoy.service.auth.v2.DeniedHttpResponse
   405  	2, // 6: envoy.service.auth.v2.CheckResponse.ok_response:type_name -> envoy.service.auth.v2.OkHttpResponse
   406  	0, // 7: envoy.service.auth.v2.Authorization.Check:input_type -> envoy.service.auth.v2.CheckRequest
   407  	3, // 8: envoy.service.auth.v2.Authorization.Check:output_type -> envoy.service.auth.v2.CheckResponse
   408  	8, // [8:9] is the sub-list for method output_type
   409  	7, // [7:8] is the sub-list for method input_type
   410  	7, // [7:7] is the sub-list for extension type_name
   411  	7, // [7:7] is the sub-list for extension extendee
   412  	0, // [0:7] is the sub-list for field type_name
   413  }
   414  
   415  func init() { file_envoy_service_auth_v2_external_auth_proto_init() }
   416  func file_envoy_service_auth_v2_external_auth_proto_init() {
   417  	if File_envoy_service_auth_v2_external_auth_proto != nil {
   418  		return
   419  	}
   420  	file_envoy_service_auth_v2_attribute_context_proto_init()
   421  	if !protoimpl.UnsafeEnabled {
   422  		file_envoy_service_auth_v2_external_auth_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   423  			switch v := v.(*CheckRequest); i {
   424  			case 0:
   425  				return &v.state
   426  			case 1:
   427  				return &v.sizeCache
   428  			case 2:
   429  				return &v.unknownFields
   430  			default:
   431  				return nil
   432  			}
   433  		}
   434  		file_envoy_service_auth_v2_external_auth_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
   435  			switch v := v.(*DeniedHttpResponse); i {
   436  			case 0:
   437  				return &v.state
   438  			case 1:
   439  				return &v.sizeCache
   440  			case 2:
   441  				return &v.unknownFields
   442  			default:
   443  				return nil
   444  			}
   445  		}
   446  		file_envoy_service_auth_v2_external_auth_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
   447  			switch v := v.(*OkHttpResponse); i {
   448  			case 0:
   449  				return &v.state
   450  			case 1:
   451  				return &v.sizeCache
   452  			case 2:
   453  				return &v.unknownFields
   454  			default:
   455  				return nil
   456  			}
   457  		}
   458  		file_envoy_service_auth_v2_external_auth_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
   459  			switch v := v.(*CheckResponse); i {
   460  			case 0:
   461  				return &v.state
   462  			case 1:
   463  				return &v.sizeCache
   464  			case 2:
   465  				return &v.unknownFields
   466  			default:
   467  				return nil
   468  			}
   469  		}
   470  	}
   471  	file_envoy_service_auth_v2_external_auth_proto_msgTypes[3].OneofWrappers = []interface{}{
   472  		(*CheckResponse_DeniedResponse)(nil),
   473  		(*CheckResponse_OkResponse)(nil),
   474  	}
   475  	type x struct{}
   476  	out := protoimpl.TypeBuilder{
   477  		File: protoimpl.DescBuilder{
   478  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   479  			RawDescriptor: file_envoy_service_auth_v2_external_auth_proto_rawDesc,
   480  			NumEnums:      0,
   481  			NumMessages:   4,
   482  			NumExtensions: 0,
   483  			NumServices:   1,
   484  		},
   485  		GoTypes:           file_envoy_service_auth_v2_external_auth_proto_goTypes,
   486  		DependencyIndexes: file_envoy_service_auth_v2_external_auth_proto_depIdxs,
   487  		MessageInfos:      file_envoy_service_auth_v2_external_auth_proto_msgTypes,
   488  	}.Build()
   489  	File_envoy_service_auth_v2_external_auth_proto = out.File
   490  	file_envoy_service_auth_v2_external_auth_proto_rawDesc = nil
   491  	file_envoy_service_auth_v2_external_auth_proto_goTypes = nil
   492  	file_envoy_service_auth_v2_external_auth_proto_depIdxs = nil
   493  }
   494  
   495  // Reference imports to suppress errors if they are not otherwise used.
   496  var _ context.Context
   497  var _ grpc.ClientConnInterface
   498  
   499  // This is a compile-time assertion to ensure that this generated file
   500  // is compatible with the grpc package it is being compiled against.
   501  const _ = grpc.SupportPackageIsVersion6
   502  
   503  // AuthorizationClient is the client API for Authorization service.
   504  //
   505  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   506  type AuthorizationClient interface {
   507  	// Performs authorization check based on the attributes associated with the
   508  	// incoming request, and returns status `OK` or not `OK`.
   509  	Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error)
   510  }
   511  
   512  type authorizationClient struct {
   513  	cc grpc.ClientConnInterface
   514  }
   515  
   516  func NewAuthorizationClient(cc grpc.ClientConnInterface) AuthorizationClient {
   517  	return &authorizationClient{cc}
   518  }
   519  
   520  func (c *authorizationClient) Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error) {
   521  	out := new(CheckResponse)
   522  	err := c.cc.Invoke(ctx, "/envoy.service.auth.v2.Authorization/Check", in, out, opts...)
   523  	if err != nil {
   524  		return nil, err
   525  	}
   526  	return out, nil
   527  }
   528  
   529  // AuthorizationServer is the server API for Authorization service.
   530  type AuthorizationServer interface {
   531  	// Performs authorization check based on the attributes associated with the
   532  	// incoming request, and returns status `OK` or not `OK`.
   533  	Check(context.Context, *CheckRequest) (*CheckResponse, error)
   534  }
   535  
   536  // UnimplementedAuthorizationServer can be embedded to have forward compatible implementations.
   537  type UnimplementedAuthorizationServer struct {
   538  }
   539  
   540  func (*UnimplementedAuthorizationServer) Check(context.Context, *CheckRequest) (*CheckResponse, error) {
   541  	return nil, status1.Errorf(codes.Unimplemented, "method Check not implemented")
   542  }
   543  
   544  func RegisterAuthorizationServer(s *grpc.Server, srv AuthorizationServer) {
   545  	s.RegisterService(&_Authorization_serviceDesc, srv)
   546  }
   547  
   548  func _Authorization_Check_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   549  	in := new(CheckRequest)
   550  	if err := dec(in); err != nil {
   551  		return nil, err
   552  	}
   553  	if interceptor == nil {
   554  		return srv.(AuthorizationServer).Check(ctx, in)
   555  	}
   556  	info := &grpc.UnaryServerInfo{
   557  		Server:     srv,
   558  		FullMethod: "/envoy.service.auth.v2.Authorization/Check",
   559  	}
   560  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   561  		return srv.(AuthorizationServer).Check(ctx, req.(*CheckRequest))
   562  	}
   563  	return interceptor(ctx, in, info, handler)
   564  }
   565  
   566  var _Authorization_serviceDesc = grpc.ServiceDesc{
   567  	ServiceName: "envoy.service.auth.v2.Authorization",
   568  	HandlerType: (*AuthorizationServer)(nil),
   569  	Methods: []grpc.MethodDesc{
   570  		{
   571  			MethodName: "Check",
   572  			Handler:    _Authorization_Check_Handler,
   573  		},
   574  	},
   575  	Streams:  []grpc.StreamDesc{},
   576  	Metadata: "envoy/service/auth/v2/external_auth.proto",
   577  }
   578  

View as plain text