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