1
2
3
4
5
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
29 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
30
31 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
32 )
33
34
35
36 const _ = proto.ProtoPackageIsVersion4
37
38 type CheckRequest struct {
39 state protoimpl.MessageState
40 sizeCache protoimpl.SizeCache
41 unknownFields protoimpl.UnknownFields
42
43
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
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
87 type DeniedHttpResponse struct {
88 state protoimpl.MessageState
89 sizeCache protoimpl.SizeCache
90 unknownFields protoimpl.UnknownFields
91
92
93
94 Status *v3.HttpStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
95
96
97
98 Headers []*v31.HeaderValueOption `protobuf:"bytes,2,rep,name=headers,proto3" json:"headers,omitempty"`
99
100
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
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
158
159 type OkHttpResponse struct {
160 state protoimpl.MessageState
161 sizeCache protoimpl.SizeCache
162 unknownFields protoimpl.UnknownFields
163
164
165
166
167
168
169
170
171 Headers []*v31.HeaderValueOption `protobuf:"bytes,2,rep,name=headers,proto3" json:"headers,omitempty"`
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187 HeadersToRemove []string `protobuf:"bytes,5,rep,name=headers_to_remove,json=headersToRemove,proto3" json:"headers_to_remove,omitempty"`
188
189
190
191
192
193
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
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
244 func (x *OkHttpResponse) GetDynamicMetadata() *_struct.Struct {
245 if x != nil {
246 return x.DynamicMetadata
247 }
248 return nil
249 }
250
251
252 type CheckResponse struct {
253 state protoimpl.MessageState
254 sizeCache protoimpl.SizeCache
255 unknownFields protoimpl.UnknownFields
256
257
258 Status *status.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
259
260
261
262
263
264
265
266 HttpResponse isCheckResponse_HttpResponse `protobuf_oneof:"http_response"`
267
268
269
270
271
272
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
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
349 DeniedResponse *DeniedHttpResponse `protobuf:"bytes,2,opt,name=denied_response,json=deniedResponse,proto3,oneof"`
350 }
351
352 type CheckResponse_OkResponse struct {
353
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),
473 (*DeniedHttpResponse)(nil),
474 (*OkHttpResponse)(nil),
475 (*CheckResponse)(nil),
476 (*AttributeContext)(nil),
477 (*v3.HttpStatus)(nil),
478 (*v31.HeaderValueOption)(nil),
479 (*_struct.Struct)(nil),
480 (*status.Status)(nil),
481 }
482 var file_envoy_service_auth_v3_external_auth_proto_depIdxs = []int32{
483 4,
484 5,
485 6,
486 6,
487 7,
488 8,
489 1,
490 2,
491 7,
492 0,
493 3,
494 10,
495 9,
496 9,
497 9,
498 0,
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
582 var _ context.Context
583 var _ grpc.ClientConnInterface
584
585
586
587 const _ = grpc.SupportPackageIsVersion6
588
589
590
591
592 type AuthorizationClient interface {
593
594
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
616 type AuthorizationServer interface {
617
618
619 Check(context.Context, *CheckRequest) (*CheckResponse, error)
620 }
621
622
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