...

Source file src/github.com/datawire/ambassador/v2/pkg/api/envoy/service/auth/v3/external_auth.pb.go

Documentation: github.com/datawire/ambassador/v2/pkg/api/envoy/service/auth/v3

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

View as plain text