From 9c73d59df6aa378dda85aad2682fad6b60360db2 Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Tue, 22 Jan 2019 10:47:20 -0800 Subject: [PATCH] add response headers Signed-off-by: Kuat Yessenov --- policy/v1beta1/cfg.pb.go | 4 +- policy/v1beta1/cfg.proto | 4 +- policy/v1beta1/http_response.pb.go | 315 ++++++++++++++---- policy/v1beta1/http_response.proto | 3 + policy/v1beta1/istio.policy.v1beta1.pb.html | 12 +- proto.lock | 10 + .../policy/v1beta1/http_response_pb2.py | 68 +++- 7 files changed, 341 insertions(+), 75 deletions(-) diff --git a/policy/v1beta1/cfg.pb.go b/policy/v1beta1/cfg.pb.go index 9107e53be9..e4ff2d1b4e 100644 --- a/policy/v1beta1/cfg.pb.go +++ b/policy/v1beta1/cfg.pb.go @@ -291,10 +291,10 @@ type Rule struct { // Optional. The actions that will be executed when match evaluates to `true`. Actions []*Action `protobuf:"bytes,2,rep,name=actions" json:"actions,omitempty"` // Optional. Templatized operations on the request headers using values produced by the - // rule actions. + // rule actions. Require the check action result to be OK. RequestHeaderOperations []*Rule_HeaderOperationTemplate `protobuf:"bytes,3,rep,name=request_header_operations,json=requestHeaderOperations" json:"request_header_operations,omitempty"` // Optional. Templatized operations on the response headers using values produced by the - // rule actions. + // rule actions. Require the check action result to be OK. ResponseHeaderOperations []*Rule_HeaderOperationTemplate `protobuf:"bytes,4,rep,name=response_header_operations,json=responseHeaderOperations" json:"response_header_operations,omitempty"` // $hide_from_docs // Optional. Provides the ability to add a sampling configuration for Mixer rules. This sampling diff --git a/policy/v1beta1/cfg.proto b/policy/v1beta1/cfg.proto index 248ebad308..e346755bea 100644 --- a/policy/v1beta1/cfg.proto +++ b/policy/v1beta1/cfg.proto @@ -167,11 +167,11 @@ message Rule { } // Optional. Templatized operations on the request headers using values produced by the - // rule actions. + // rule actions. Require the check action result to be OK. repeated HeaderOperationTemplate request_header_operations = 3; // Optional. Templatized operations on the response headers using values produced by the - // rule actions. + // rule actions. Require the check action result to be OK. repeated HeaderOperationTemplate response_header_operations = 4; // $hide_from_docs diff --git a/policy/v1beta1/http_response.pb.go b/policy/v1beta1/http_response.pb.go index fccb5b5b05..ec3d55e25f 100644 --- a/policy/v1beta1/http_response.pb.go +++ b/policy/v1beta1/http_response.pb.go @@ -11,6 +11,7 @@ import strconv "strconv" import strings "strings" import reflect "reflect" +import sortkeys "github.com/gogo/protobuf/sortkeys" import io "io" @@ -213,6 +214,8 @@ type DirectHttpResponse struct { Code HttpStatusCode `protobuf:"varint,1,opt,name=code,proto3,enum=istio.policy.v1beta1.HttpStatusCode" json:"code,omitempty"` // HTTP response body. Body string `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` + // Optional HTTP response headers. + Headers map[string]string `protobuf:"bytes,3,rep,name=headers" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (m *DirectHttpResponse) Reset() { *m = DirectHttpResponse{} } @@ -233,6 +236,13 @@ func (m *DirectHttpResponse) GetBody() string { return "" } +func (m *DirectHttpResponse) GetHeaders() map[string]string { + if m != nil { + return m.Headers + } + return nil +} + func init() { proto.RegisterType((*DirectHttpResponse)(nil), "istio.policy.v1beta1.DirectHttpResponse") proto.RegisterEnum("istio.policy.v1beta1.HttpStatusCode", HttpStatusCode_name, HttpStatusCode_value) @@ -269,16 +279,37 @@ func (this *DirectHttpResponse) Equal(that interface{}) bool { if this.Body != that1.Body { return false } + if len(this.Headers) != len(that1.Headers) { + return false + } + for i := range this.Headers { + if this.Headers[i] != that1.Headers[i] { + return false + } + } return true } func (this *DirectHttpResponse) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 6) + s := make([]string, 0, 7) s = append(s, "&v1beta1.DirectHttpResponse{") s = append(s, "Code: "+fmt.Sprintf("%#v", this.Code)+",\n") s = append(s, "Body: "+fmt.Sprintf("%#v", this.Body)+",\n") + keysForHeaders := make([]string, 0, len(this.Headers)) + for k, _ := range this.Headers { + keysForHeaders = append(keysForHeaders, k) + } + sortkeys.Strings(keysForHeaders) + mapStringForHeaders := "map[string]string{" + for _, k := range keysForHeaders { + mapStringForHeaders += fmt.Sprintf("%#v: %#v,", k, this.Headers[k]) + } + mapStringForHeaders += "}" + if this.Headers != nil { + s = append(s, "Headers: "+mapStringForHeaders+",\n") + } s = append(s, "}") return strings.Join(s, "") } @@ -316,6 +347,23 @@ func (m *DirectHttpResponse) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintHttpResponse(dAtA, i, uint64(len(m.Body))) i += copy(dAtA[i:], m.Body) } + if len(m.Headers) > 0 { + for k, _ := range m.Headers { + dAtA[i] = 0x1a + i++ + v := m.Headers[k] + mapSize := 1 + len(k) + sovHttpResponse(uint64(len(k))) + 1 + len(v) + sovHttpResponse(uint64(len(v))) + i = encodeVarintHttpResponse(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintHttpResponse(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintHttpResponse(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } return i, nil } @@ -338,6 +386,14 @@ func (m *DirectHttpResponse) Size() (n int) { if l > 0 { n += 1 + l + sovHttpResponse(uint64(l)) } + if len(m.Headers) > 0 { + for k, v := range m.Headers { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovHttpResponse(uint64(len(k))) + 1 + len(v) + sovHttpResponse(uint64(len(v))) + n += mapEntrySize + 1 + sovHttpResponse(uint64(mapEntrySize)) + } + } return n } @@ -358,9 +414,20 @@ func (this *DirectHttpResponse) String() string { if this == nil { return "nil" } + keysForHeaders := make([]string, 0, len(this.Headers)) + for k, _ := range this.Headers { + keysForHeaders = append(keysForHeaders, k) + } + sortkeys.Strings(keysForHeaders) + mapStringForHeaders := "map[string]string{" + for _, k := range keysForHeaders { + mapStringForHeaders += fmt.Sprintf("%v: %v,", k, this.Headers[k]) + } + mapStringForHeaders += "}" s := strings.Join([]string{`&DirectHttpResponse{`, `Code:` + fmt.Sprintf("%v", this.Code) + `,`, `Body:` + fmt.Sprintf("%v", this.Body) + `,`, + `Headers:` + mapStringForHeaders + `,`, `}`, }, "") return s @@ -450,6 +517,124 @@ func (m *DirectHttpResponse) Unmarshal(dAtA []byte) error { } m.Body = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Headers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthHttpResponse + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Headers == nil { + m.Headers = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthHttpResponse + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthHttpResponse + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipHttpResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthHttpResponse + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Headers[mapkey] = mapvalue + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipHttpResponse(dAtA[iNdEx:]) @@ -579,66 +764,70 @@ var ( func init() { proto.RegisterFile("policy/v1beta1/http_response.proto", fileDescriptorHttpResponse) } var fileDescriptorHttpResponse = []byte{ - // 967 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x54, 0x4b, 0x6f, 0x5b, 0xc5, - 0x17, 0xcf, 0xf5, 0xa4, 0x8f, 0x4c, 0xd3, 0x74, 0x3a, 0x4d, 0xff, 0xcd, 0x9f, 0xc2, 0x55, 0x14, - 0xb1, 0xa8, 0x58, 0x24, 0x2a, 0x6c, 0xd8, 0xa6, 0x79, 0x34, 0x16, 0xb1, 0x6b, 0x39, 0x76, 0x17, - 0x6c, 0xd0, 0xf8, 0xce, 0xb1, 0x3d, 0xea, 0xf5, 0x9c, 0xdb, 0xb9, 0xc7, 0x49, 0x2e, 0x2b, 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0xf6, 0x4b, 0x80, 0x8f, 0xda, 0x0e, - 0x92, 0xfe, 0x95, 0xc9, 0xfb, 0xf9, 0x99, 0x8d, 0x46, 0xa3, 0x76, 0x19, 0x5c, 0x6e, 0xd0, 0x7a, - 0x97, 0x0f, 0x62, 0x10, 0xbf, 0x31, 0x79, 0x1f, 0x3f, 0x7d, 0x59, 0x39, 0xa3, 0x2c, 0x2d, 0xa7, - 0x39, 0x56, 0xa1, 0x83, 0x64, 0x14, 0x41, 0x2e, 0x7e, 0x1f, 0xf1, 0xcc, 0xfb, 0xed, 0xb6, 0x49, - 0x0c, 0x58, 0xda, 0x22, 0x74, 0xaa, 0x03, 0xe2, 0x8f, 0x70, 0xe7, 0x9b, 0x88, 0xd9, 0x2a, 0x50, - 0x88, 0x40, 0xfc, 0xc9, 0x46, 0x3f, 0xae, 0xb5, 0x5d, 0xf2, 0x8e, 0x6a, 0xf1, 0x17, 0x93, 0x0b, - 0xfc, 0x81, 0x2a, 0xd0, 0x0e, 0xba, 0x2b, 0xff, 0x71, 0x9b, 0x7f, 0xb3, 0x0b, 0xe5, 0xbd, 0xfd, - 0x78, 0xe2, 0xdb, 0xfd, 0x78, 0xe2, 0xce, 0x7e, 0x1c, 0x3d, 0x35, 0x88, 0xa3, 0xeb, 0x83, 0x38, - 0xba, 0x3d, 0x88, 0xa3, 0xbd, 0x41, 0x1c, 0x7d, 0x37, 0x88, 0xa3, 0x1f, 0x06, 0xf1, 0xc4, 0x9d, - 0x41, 0x1c, 0x5d, 0xfb, 0x3e, 0x9e, 0x78, 0xfc, 0xec, 0xf0, 0xa1, 0x34, 0xb8, 0xa4, 0x32, 0xb3, - 0x74, 0xef, 0xa3, 0xdc, 0x3a, 0x1c, 0xde, 0xe1, 0x47, 0xfe, 0x09, 0x00, 0x00, 0xff, 0xff, 0xf1, - 0x71, 0x26, 0xea, 0xad, 0x05, 0x00, 0x00, + // 1032 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00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0x75, 0x40, 0xfc, 0x19, 0xf6, 0x7c, 0x1d, 0x31, 0x3d, 0x0d, 0x14, 0x2c, + 0x10, 0x7f, 0xb1, 0xf1, 0xc7, 0x55, 0xbe, 0x4c, 0x5e, 0x51, 0x2d, 0xfe, 0x66, 0xf2, 0x08, 0x7f, + 0xb0, 0x06, 0x74, 0x09, 0xdd, 0x85, 0xff, 0xd9, 0xcd, 0x7f, 0xd8, 0xa9, 0xca, 0xad, 0xdb, 0xc5, + 0x99, 0x6f, 0x6f, 0x17, 0x67, 0xee, 0xdc, 0x2e, 0x46, 0x4f, 0x0d, 0x8b, 0xd1, 0xd5, 0x61, 0x31, + 0xba, 0x39, 0x2c, 0x46, 0xb7, 0x86, 0xc5, 0xe8, 0xbb, 0x61, 0x31, 0xfa, 0x61, 0x58, 0x9c, 0xb9, + 0x33, 0x2c, 0x46, 0x57, 0xbe, 0x2f, 0xce, 0x3c, 0x7e, 0x78, 0xf4, 0x93, 0x35, 0xb8, 0xac, 0x52, + 0xb3, 0x7c, 0xf7, 0x15, 0xb1, 0xb9, 0x23, 0xdc, 0x0a, 0x8f, 0xfc, 0x1b, 0x00, 0x00, 0xff, 0xff, + 0xd9, 0x97, 0x1d, 0x7f, 0x3b, 0x06, 0x00, 0x00, } diff --git a/policy/v1beta1/http_response.proto b/policy/v1beta1/http_response.proto index 845aa24e66..5da35120a8 100644 --- a/policy/v1beta1/http_response.proto +++ b/policy/v1beta1/http_response.proto @@ -26,6 +26,9 @@ message DirectHttpResponse { // HTTP response body. string body = 2; + + // Optional HTTP response headers. + map headers = 3; } // HTTP response codes. diff --git a/policy/v1beta1/istio.policy.v1beta1.pb.html b/policy/v1beta1/istio.policy.v1beta1.pb.html index 2c74519d4f..8f0e37473f 100644 --- a/policy/v1beta1/istio.policy.v1beta1.pb.html +++ b/policy/v1beta1/istio.policy.v1beta1.pb.html @@ -321,6 +321,14 @@

DirectHttpResponse

HTTP response body.

+ + + +headers +map<string, string> + +

Optional HTTP response headers.

+ @@ -1117,7 +1125,7 @@

Rule

Rule.HeaderOperationTemplate[]

Optional. Templatized operations on the request headers using values produced by the -rule actions.

+rule actions. Require the check action result to be OK.

@@ -1126,7 +1134,7 @@

Rule

Rule.HeaderOperationTemplate[]

Optional. Templatized operations on the response headers using values produced by the -rule actions.

+rule actions. Require the check action result to be OK.

diff --git a/proto.lock b/proto.lock index c337e4e00d..0f0232352c 100644 --- a/proto.lock +++ b/proto.lock @@ -4914,6 +4914,16 @@ "name": "body", "type": "string" } + ], + "maps": [ + { + "key_type": "string", + "field": { + "id": 3, + "name": "headers", + "type": "string" + } + } ] } ] diff --git a/python/istio_api/policy/v1beta1/http_response_pb2.py b/python/istio_api/policy/v1beta1/http_response_pb2.py index 99c8f309ea..7a788c4862 100644 --- a/python/istio_api/policy/v1beta1/http_response_pb2.py +++ b/python/istio_api/policy/v1beta1/http_response_pb2.py @@ -20,7 +20,7 @@ name='policy/v1beta1/http_response.proto', package='istio.policy.v1beta1', syntax='proto3', - serialized_pb=_b('\n\"policy/v1beta1/http_response.proto\x12\x14istio.policy.v1beta1\"V\n\x12\x44irectHttpResponse\x12\x32\n\x04\x63ode\x18\x01 \x01(\x0e\x32$.istio.policy.v1beta1.HttpStatusCode\x12\x0c\n\x04\x62ody\x18\x02 \x01(\t*\xb9\t\n\x0eHttpStatusCode\x12\t\n\x05\x45mpty\x10\x00\x12\x0c\n\x08\x43ontinue\x10\x64\x12\x07\n\x02OK\x10\xc8\x01\x12\x0c\n\x07\x43reated\x10\xc9\x01\x12\r\n\x08\x41\x63\x63\x65pted\x10\xca\x01\x12 \n\x1bNonAuthoritativeInformation\x10\xcb\x01\x12\x0e\n\tNoContent\x10\xcc\x01\x12\x11\n\x0cResetContent\x10\xcd\x01\x12\x13\n\x0ePartialContent\x10\xce\x01\x12\x10\n\x0bMultiStatus\x10\xcf\x01\x12\x14\n\x0f\x41lreadyReported\x10\xd0\x01\x12\x0b\n\x06IMUsed\x10\xe2\x01\x12\x14\n\x0fMultipleChoices\x10\xac\x02\x12\x15\n\x10MovedPermanently\x10\xad\x02\x12\n\n\x05\x46ound\x10\xae\x02\x12\r\n\x08SeeOther\x10\xaf\x02\x12\x10\n\x0bNotModified\x10\xb0\x02\x12\r\n\x08UseProxy\x10\xb1\x02\x12\x16\n\x11TemporaryRedirect\x10\xb3\x02\x12\x16\n\x11PermanentRedirect\x10\xb4\x02\x12\x0f\n\nBadRequest\x10\x90\x03\x12\x11\n\x0cUnauthorized\x10\x91\x03\x12\x14\n\x0fPaymentRequired\x10\x92\x03\x12\x0e\n\tForbidden\x10\x93\x03\x12\r\n\x08NotFound\x10\x94\x03\x12\x15\n\x10MethodNotAllowed\x10\x95\x03\x12\x12\n\rNotAcceptable\x10\x96\x03\x12 \n\x1bProxyAuthenticationRequired\x10\x97\x03\x12\x13\n\x0eRequestTimeout\x10\x98\x03\x12\r\n\x08\x43onflict\x10\x99\x03\x12\t\n\x04Gone\x10\x9a\x03\x12\x13\n\x0eLengthRequired\x10\x9b\x03\x12\x17\n\x12PreconditionFailed\x10\x9c\x03\x12\x14\n\x0fPayloadTooLarge\x10\x9d\x03\x12\x0f\n\nURITooLong\x10\x9e\x03\x12\x19\n\x14UnsupportedMediaType\x10\x9f\x03\x12\x18\n\x13RangeNotSatisfiable\x10\xa0\x03\x12\x16\n\x11\x45xpectationFailed\x10\xa1\x03\x12\x17\n\x12MisdirectedRequest\x10\xa5\x03\x12\x18\n\x13UnprocessableEntity\x10\xa6\x03\x12\x0b\n\x06Locked\x10\xa7\x03\x12\x15\n\x10\x46\x61iledDependency\x10\xa8\x03\x12\x14\n\x0fUpgradeRequired\x10\xaa\x03\x12\x19\n\x14PreconditionRequired\x10\xac\x03\x12\x14\n\x0fTooManyRequests\x10\xad\x03\x12 \n\x1bRequestHeaderFieldsTooLarge\x10\xaf\x03\x12\x18\n\x13InternalServerError\x10\xf4\x03\x12\x13\n\x0eNotImplemented\x10\xf5\x03\x12\x0f\n\nBadGateway\x10\xf6\x03\x12\x17\n\x12ServiceUnavailable\x10\xf7\x03\x12\x13\n\x0eGatewayTimeout\x10\xf8\x03\x12\x1c\n\x17HTTPVersionNotSupported\x10\xf9\x03\x12\x1a\n\x15VariantAlsoNegotiates\x10\xfa\x03\x12\x18\n\x13InsufficientStorage\x10\xfb\x03\x12\x11\n\x0cLoopDetected\x10\xfc\x03\x12\x10\n\x0bNotExtended\x10\xfe\x03\x12\"\n\x1dNetworkAuthenticationRequired\x10\xff\x03\x42\x1dZ\x1bistio.io/api/policy/v1beta1b\x06proto3') + serialized_pb=_b('\n\"policy/v1beta1/http_response.proto\x12\x14istio.policy.v1beta1\"\xce\x01\n\x12\x44irectHttpResponse\x12\x32\n\x04\x63ode\x18\x01 \x01(\x0e\x32$.istio.policy.v1beta1.HttpStatusCode\x12\x0c\n\x04\x62ody\x18\x02 \x01(\t\x12\x46\n\x07headers\x18\x03 \x03(\x0b\x32\x35.istio.policy.v1beta1.DirectHttpResponse.HeadersEntry\x1a.\n\x0cHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01*\xb9\t\n\x0eHttpStatusCode\x12\t\n\x05\x45mpty\x10\x00\x12\x0c\n\x08\x43ontinue\x10\x64\x12\x07\n\x02OK\x10\xc8\x01\x12\x0c\n\x07\x43reated\x10\xc9\x01\x12\r\n\x08\x41\x63\x63\x65pted\x10\xca\x01\x12 \n\x1bNonAuthoritativeInformation\x10\xcb\x01\x12\x0e\n\tNoContent\x10\xcc\x01\x12\x11\n\x0cResetContent\x10\xcd\x01\x12\x13\n\x0ePartialContent\x10\xce\x01\x12\x10\n\x0bMultiStatus\x10\xcf\x01\x12\x14\n\x0f\x41lreadyReported\x10\xd0\x01\x12\x0b\n\x06IMUsed\x10\xe2\x01\x12\x14\n\x0fMultipleChoices\x10\xac\x02\x12\x15\n\x10MovedPermanently\x10\xad\x02\x12\n\n\x05\x46ound\x10\xae\x02\x12\r\n\x08SeeOther\x10\xaf\x02\x12\x10\n\x0bNotModified\x10\xb0\x02\x12\r\n\x08UseProxy\x10\xb1\x02\x12\x16\n\x11TemporaryRedirect\x10\xb3\x02\x12\x16\n\x11PermanentRedirect\x10\xb4\x02\x12\x0f\n\nBadRequest\x10\x90\x03\x12\x11\n\x0cUnauthorized\x10\x91\x03\x12\x14\n\x0fPaymentRequired\x10\x92\x03\x12\x0e\n\tForbidden\x10\x93\x03\x12\r\n\x08NotFound\x10\x94\x03\x12\x15\n\x10MethodNotAllowed\x10\x95\x03\x12\x12\n\rNotAcceptable\x10\x96\x03\x12 \n\x1bProxyAuthenticationRequired\x10\x97\x03\x12\x13\n\x0eRequestTimeout\x10\x98\x03\x12\r\n\x08\x43onflict\x10\x99\x03\x12\t\n\x04Gone\x10\x9a\x03\x12\x13\n\x0eLengthRequired\x10\x9b\x03\x12\x17\n\x12PreconditionFailed\x10\x9c\x03\x12\x14\n\x0fPayloadTooLarge\x10\x9d\x03\x12\x0f\n\nURITooLong\x10\x9e\x03\x12\x19\n\x14UnsupportedMediaType\x10\x9f\x03\x12\x18\n\x13RangeNotSatisfiable\x10\xa0\x03\x12\x16\n\x11\x45xpectationFailed\x10\xa1\x03\x12\x17\n\x12MisdirectedRequest\x10\xa5\x03\x12\x18\n\x13UnprocessableEntity\x10\xa6\x03\x12\x0b\n\x06Locked\x10\xa7\x03\x12\x15\n\x10\x46\x61iledDependency\x10\xa8\x03\x12\x14\n\x0fUpgradeRequired\x10\xaa\x03\x12\x19\n\x14PreconditionRequired\x10\xac\x03\x12\x14\n\x0fTooManyRequests\x10\xad\x03\x12 \n\x1bRequestHeaderFieldsTooLarge\x10\xaf\x03\x12\x18\n\x13InternalServerError\x10\xf4\x03\x12\x13\n\x0eNotImplemented\x10\xf5\x03\x12\x0f\n\nBadGateway\x10\xf6\x03\x12\x17\n\x12ServiceUnavailable\x10\xf7\x03\x12\x13\n\x0eGatewayTimeout\x10\xf8\x03\x12\x1c\n\x17HTTPVersionNotSupported\x10\xf9\x03\x12\x1a\n\x15VariantAlsoNegotiates\x10\xfa\x03\x12\x18\n\x13InsufficientStorage\x10\xfb\x03\x12\x11\n\x0cLoopDetected\x10\xfc\x03\x12\x10\n\x0bNotExtended\x10\xfe\x03\x12\"\n\x1dNetworkAuthenticationRequired\x10\xff\x03\x42\x1dZ\x1bistio.io/api/policy/v1beta1b\x06proto3') ) _HTTPSTATUSCODE = _descriptor.EnumDescriptor( @@ -260,8 +260,8 @@ ], containing_type=None, options=None, - serialized_start=149, - serialized_end=1358, + serialized_start=270, + serialized_end=1479, ) _sym_db.RegisterEnumDescriptor(_HTTPSTATUSCODE) @@ -326,6 +326,43 @@ +_DIRECTHTTPRESPONSE_HEADERSENTRY = _descriptor.Descriptor( + name='HeadersEntry', + full_name='istio.policy.v1beta1.DirectHttpResponse.HeadersEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='istio.policy.v1beta1.DirectHttpResponse.HeadersEntry.key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='value', full_name='istio.policy.v1beta1.DirectHttpResponse.HeadersEntry.value', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')), + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=221, + serialized_end=267, +) + _DIRECTHTTPRESPONSE = _descriptor.Descriptor( name='DirectHttpResponse', full_name='istio.policy.v1beta1.DirectHttpResponse', @@ -347,10 +384,17 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='headers', full_name='istio.policy.v1beta1.DirectHttpResponse.headers', index=2, + number=3, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), ], extensions=[ ], - nested_types=[], + nested_types=[_DIRECTHTTPRESPONSE_HEADERSENTRY, ], enum_types=[ ], options=None, @@ -359,23 +403,35 @@ extension_ranges=[], oneofs=[ ], - serialized_start=60, - serialized_end=146, + serialized_start=61, + serialized_end=267, ) +_DIRECTHTTPRESPONSE_HEADERSENTRY.containing_type = _DIRECTHTTPRESPONSE _DIRECTHTTPRESPONSE.fields_by_name['code'].enum_type = _HTTPSTATUSCODE +_DIRECTHTTPRESPONSE.fields_by_name['headers'].message_type = _DIRECTHTTPRESPONSE_HEADERSENTRY DESCRIPTOR.message_types_by_name['DirectHttpResponse'] = _DIRECTHTTPRESPONSE DESCRIPTOR.enum_types_by_name['HttpStatusCode'] = _HTTPSTATUSCODE _sym_db.RegisterFileDescriptor(DESCRIPTOR) DirectHttpResponse = _reflection.GeneratedProtocolMessageType('DirectHttpResponse', (_message.Message,), dict( + + HeadersEntry = _reflection.GeneratedProtocolMessageType('HeadersEntry', (_message.Message,), dict( + DESCRIPTOR = _DIRECTHTTPRESPONSE_HEADERSENTRY, + __module__ = 'policy.v1beta1.http_response_pb2' + # @@protoc_insertion_point(class_scope:istio.policy.v1beta1.DirectHttpResponse.HeadersEntry) + )) + , DESCRIPTOR = _DIRECTHTTPRESPONSE, __module__ = 'policy.v1beta1.http_response_pb2' # @@protoc_insertion_point(class_scope:istio.policy.v1beta1.DirectHttpResponse) )) _sym_db.RegisterMessage(DirectHttpResponse) +_sym_db.RegisterMessage(DirectHttpResponse.HeadersEntry) DESCRIPTOR.has_options = True DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('Z\033istio.io/api/policy/v1beta1')) +_DIRECTHTTPRESPONSE_HEADERSENTRY.has_options = True +_DIRECTHTTPRESPONSE_HEADERSENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')) # @@protoc_insertion_point(module_scope)