From c823d98431908ff9e3a53fe79dad41af6566f868 Mon Sep 17 00:00:00 2001 From: Charith Ellawala Date: Thu, 8 Jun 2023 12:30:13 +0100 Subject: [PATCH] chore: Add output support to Playground API (#1632) Refactor the `PlaygroundEvaluateResponse` message to avoid repetition of `effectiveDerivedRoles` and `validationErrors`. Add `outputs` to the evaluate response. Signed-off-by: Charith Ellawala --- .../cerbos/private/v1/hashpb_helpers.pb.go | 28 ++ .../cerbos/response/v1/hashpb_helpers.pb.go | 28 ++ api/genpb/cerbos/response/v1/response.pb.go | 349 ++++++++++-------- .../response/v1/response.pb.validate.go | 68 ++++ .../cerbos/response/v1/response_vtproto.pb.go | 203 ++++++++++ api/public/cerbos/response/v1/response.proto | 7 +- internal/server/tests.go | 8 +- internal/storage/blob/cloner_test.go | 2 +- internal/svc/playground_svc.go | 15 +- .../admin/add_or_update_policy/case_01.yaml | 2 +- .../playground/evaluate/pge_case_00.yaml | 13 +- .../playground/evaluate/pge_case_02.yaml | 21 +- .../playground/evaluate/pge_case_03.yaml | 84 +++++ .../{policy_08.yaml => policy_07_acme.yaml} | 0 .../v1/PlaygroundEvaluateResponse.schema.json | 34 ++ .../EvalResultList.schema.json | 34 ++ .../openapiv2/cerbos/svc/v1/svc.swagger.json | 20 + 17 files changed, 731 insertions(+), 185 deletions(-) create mode 100644 internal/test/testdata/server/playground/evaluate/pge_case_03.yaml rename internal/test/testdata/store/resource_policies/{policy_08.yaml => policy_07_acme.yaml} (100%) diff --git a/api/genpb/cerbos/private/v1/hashpb_helpers.pb.go b/api/genpb/cerbos/private/v1/hashpb_helpers.pb.go index 00481f09b..ba8e630a8 100644 --- a/api/genpb/cerbos/private/v1/hashpb_helpers.pb.go +++ b/api/genpb/cerbos/private/v1/hashpb_helpers.pb.go @@ -2622,6 +2622,34 @@ func cerbos_response_v1_PlaygroundEvaluateResponse_EvalResultList_hashpb_sum(m * } } } + if _, ok := ignore["cerbos.response.v1.PlaygroundEvaluateResponse.EvalResultList.effective_derived_roles"]; !ok { + if len(m.EffectiveDerivedRoles) > 0 { + for _, v := range m.EffectiveDerivedRoles { + _, _ = hasher.Write(protowire.AppendString(nil, v)) + + } + } + } + if _, ok := ignore["cerbos.response.v1.PlaygroundEvaluateResponse.EvalResultList.validation_errors"]; !ok { + if len(m.ValidationErrors) > 0 { + for _, v := range m.ValidationErrors { + if v != nil { + cerbos_schema_v1_ValidationError_hashpb_sum(v, hasher, ignore) + } + + } + } + } + if _, ok := ignore["cerbos.response.v1.PlaygroundEvaluateResponse.EvalResultList.outputs"]; !ok { + if len(m.Outputs) > 0 { + for _, v := range m.Outputs { + if v != nil { + cerbos_engine_v1_OutputEntry_hashpb_sum(v, hasher, ignore) + } + + } + } + } } func cerbos_response_v1_PlaygroundEvaluateResponse_EvalResult_hashpb_sum(m *v13.PlaygroundEvaluateResponse_EvalResult, hasher hash.Hash, ignore map[string]struct{}) { diff --git a/api/genpb/cerbos/response/v1/hashpb_helpers.pb.go b/api/genpb/cerbos/response/v1/hashpb_helpers.pb.go index a176096d4..6bbb992f6 100644 --- a/api/genpb/cerbos/response/v1/hashpb_helpers.pb.go +++ b/api/genpb/cerbos/response/v1/hashpb_helpers.pb.go @@ -1764,6 +1764,34 @@ func cerbos_response_v1_PlaygroundEvaluateResponse_EvalResultList_hashpb_sum(m * } } } + if _, ok := ignore["cerbos.response.v1.PlaygroundEvaluateResponse.EvalResultList.effective_derived_roles"]; !ok { + if len(m.EffectiveDerivedRoles) > 0 { + for _, v := range m.EffectiveDerivedRoles { + _, _ = hasher.Write(protowire.AppendString(nil, v)) + + } + } + } + if _, ok := ignore["cerbos.response.v1.PlaygroundEvaluateResponse.EvalResultList.validation_errors"]; !ok { + if len(m.ValidationErrors) > 0 { + for _, v := range m.ValidationErrors { + if v != nil { + cerbos_schema_v1_ValidationError_hashpb_sum(v, hasher, ignore) + } + + } + } + } + if _, ok := ignore["cerbos.response.v1.PlaygroundEvaluateResponse.EvalResultList.outputs"]; !ok { + if len(m.Outputs) > 0 { + for _, v := range m.Outputs { + if v != nil { + cerbos_engine_v1_OutputEntry_hashpb_sum(v, hasher, ignore) + } + + } + } + } } func cerbos_response_v1_PlaygroundEvaluateResponse_EvalResult_hashpb_sum(m *PlaygroundEvaluateResponse_EvalResult, hasher hash.Hash, ignore map[string]struct{}) { diff --git a/api/genpb/cerbos/response/v1/response.pb.go b/api/genpb/cerbos/response/v1/response.pb.go index aa62eea10..c948fc2aa 100644 --- a/api/genpb/cerbos/response/v1/response.pb.go +++ b/api/genpb/cerbos/response/v1/response.pb.go @@ -2038,11 +2038,13 @@ type PlaygroundEvaluateResponse_EvalResult struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Action string `protobuf:"bytes,1,opt,name=action,proto3" json:"action,omitempty"` - Effect v14.Effect `protobuf:"varint,2,opt,name=effect,proto3,enum=cerbos.effect.v1.Effect" json:"effect,omitempty"` - Policy string `protobuf:"bytes,3,opt,name=policy,proto3" json:"policy,omitempty"` - EffectiveDerivedRoles []string `protobuf:"bytes,4,rep,name=effective_derived_roles,json=effectiveDerivedRoles,proto3" json:"effective_derived_roles,omitempty"` - ValidationErrors []*v11.ValidationError `protobuf:"bytes,5,rep,name=validation_errors,json=validationErrors,proto3" json:"validation_errors,omitempty"` + Action string `protobuf:"bytes,1,opt,name=action,proto3" json:"action,omitempty"` + Effect v14.Effect `protobuf:"varint,2,opt,name=effect,proto3,enum=cerbos.effect.v1.Effect" json:"effect,omitempty"` + Policy string `protobuf:"bytes,3,opt,name=policy,proto3" json:"policy,omitempty"` + // Deprecated: Marked as deprecated in cerbos/response/v1/response.proto. + EffectiveDerivedRoles []string `protobuf:"bytes,4,rep,name=effective_derived_roles,json=effectiveDerivedRoles,proto3" json:"effective_derived_roles,omitempty"` + // Deprecated: Marked as deprecated in cerbos/response/v1/response.proto. + ValidationErrors []*v11.ValidationError `protobuf:"bytes,5,rep,name=validation_errors,json=validationErrors,proto3" json:"validation_errors,omitempty"` } func (x *PlaygroundEvaluateResponse_EvalResult) Reset() { @@ -2098,6 +2100,7 @@ func (x *PlaygroundEvaluateResponse_EvalResult) GetPolicy() string { return "" } +// Deprecated: Marked as deprecated in cerbos/response/v1/response.proto. func (x *PlaygroundEvaluateResponse_EvalResult) GetEffectiveDerivedRoles() []string { if x != nil { return x.EffectiveDerivedRoles @@ -2105,6 +2108,7 @@ func (x *PlaygroundEvaluateResponse_EvalResult) GetEffectiveDerivedRoles() []str return nil } +// Deprecated: Marked as deprecated in cerbos/response/v1/response.proto. func (x *PlaygroundEvaluateResponse_EvalResult) GetValidationErrors() []*v11.ValidationError { if x != nil { return x.ValidationErrors @@ -2117,7 +2121,10 @@ type PlaygroundEvaluateResponse_EvalResultList struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Results []*PlaygroundEvaluateResponse_EvalResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` + Results []*PlaygroundEvaluateResponse_EvalResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` + EffectiveDerivedRoles []string `protobuf:"bytes,2,rep,name=effective_derived_roles,json=effectiveDerivedRoles,proto3" json:"effective_derived_roles,omitempty"` + ValidationErrors []*v11.ValidationError `protobuf:"bytes,3,rep,name=validation_errors,json=validationErrors,proto3" json:"validation_errors,omitempty"` + Outputs []*v1.OutputEntry `protobuf:"bytes,4,rep,name=outputs,proto3" json:"outputs,omitempty"` } func (x *PlaygroundEvaluateResponse_EvalResultList) Reset() { @@ -2159,6 +2166,27 @@ func (x *PlaygroundEvaluateResponse_EvalResultList) GetResults() []*PlaygroundEv return nil } +func (x *PlaygroundEvaluateResponse_EvalResultList) GetEffectiveDerivedRoles() []string { + if x != nil { + return x.EffectiveDerivedRoles + } + return nil +} + +func (x *PlaygroundEvaluateResponse_EvalResultList) GetValidationErrors() []*v11.ValidationError { + if x != nil { + return x.ValidationErrors + } + return nil +} + +func (x *PlaygroundEvaluateResponse_EvalResultList) GetOutputs() []*v1.OutputEntry { + if x != nil { + return x.Outputs + } + return nil +} + var File_cerbos_response_v1_response_proto protoreflect.FileDescriptor var file_cerbos_response_v1_response_proto_rawDesc = []byte{ @@ -2707,7 +2735,7 @@ var file_cerbos_response_v1_response_proto_rawDesc = []byte{ 0x73, 0x75, 0x6c, 0x74, 0x73, 0x3a, 0x1f, 0x92, 0x41, 0x1c, 0x0a, 0x1a, 0x32, 0x18, 0x50, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x74, 0x65, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x63, 0x6f, 0x6d, - 0x65, 0x22, 0xef, 0x04, 0x0a, 0x1a, 0x50, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, + 0x65, 0x22, 0xb9, 0x06, 0x0a, 0x1a, 0x50, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, @@ -2721,154 +2749,167 @@ var file_cerbos_response_v1_response_proto_rawDesc = []byte{ 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x1a, 0xf6, 0x01, 0x0a, 0x0a, 0x45, 0x76, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x75, + 0x65, 0x73, 0x73, 0x1a, 0xfe, 0x01, 0x0a, 0x0a, 0x45, 0x76, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x06, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x63, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x2e, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x66, 0x66, 0x65, 0x63, 0x74, 0x52, 0x06, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x12, 0x36, 0x0a, 0x17, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, + 0x6c, 0x69, 0x63, 0x79, 0x12, 0x3a, 0x0a, 0x17, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x15, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, - 0x44, 0x65, 0x72, 0x69, 0x76, 0x65, 0x64, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x4e, 0x0a, 0x11, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x65, 0x72, 0x62, 0x6f, 0x73, - 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x1a, 0x65, 0x0a, 0x0e, - 0x45, 0x76, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x53, - 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x39, 0x2e, 0x63, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x45, - 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, - 0x45, 0x76, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x73, 0x3a, 0x23, 0x92, 0x41, 0x20, 0x0a, 0x1e, 0x32, 0x1c, 0x50, 0x6c, 0x61, 0x79, - 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x20, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x63, - 0x6f, 0x6d, 0x65, 0x22, 0x9b, 0x04, 0x0a, 0x17, 0x50, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, - 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x23, 0x0a, 0x0d, 0x70, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, - 0x6e, 0x64, 0x49, 0x64, 0x12, 0x41, 0x0a, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x2e, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x67, - 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x48, 0x00, 0x52, 0x07, - 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x5c, 0x0a, 0x12, 0x63, 0x68, 0x65, 0x63, 0x6b, - 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x63, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x2e, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x48, 0x00, 0x52, 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x53, 0x65, 0x74, 0x12, 0x62, 0x0a, 0x14, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x63, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x2e, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x12, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x52, 0x0a, 0x0e, 0x70, 0x6c, 0x61, - 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0d, - 0x70, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x55, 0x0a, - 0x0f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x2e, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x48, 0x00, 0x52, 0x0e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x3a, 0x20, 0x92, 0x41, 0x1d, 0x0a, 0x1b, 0x32, 0x19, 0x50, 0x6c, 0x61, - 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x20, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x63, 0x6f, 0x6d, - 0x65, 0x22, 0x70, 0x0a, 0x19, 0x41, 0x64, 0x64, 0x4f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, - 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x3a, 0x21, 0x92, 0x41, 0x1e, 0x0a, 0x1c, 0x32, 0x1a, 0x41, 0x64, 0x64, 0x2f, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x20, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0xe0, 0x01, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x75, 0x64, 0x69, - 0x74, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x10, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, - 0x67, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, - 0x63, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, - 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x48, 0x00, - 0x52, 0x0e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x51, 0x0a, 0x12, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x6f, 0x67, - 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, - 0x65, 0x72, 0x62, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x44, - 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x48, - 0x00, 0x52, 0x10, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x67, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x3a, 0x18, 0x92, 0x41, 0x15, 0x0a, 0x13, 0x32, 0x11, 0x41, 0x75, 0x64, 0x69, - 0x74, 0x20, 0x6c, 0x6f, 0x67, 0x20, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x42, 0x07, 0x0a, - 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x82, 0x01, 0x0a, 0x12, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, - 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, - 0x1d, 0x0a, 0x0a, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x1b, - 0x92, 0x41, 0x18, 0x0a, 0x16, 0x32, 0x14, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x69, 0x6e, - 0x66, 0x6f, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6a, 0x0a, 0x14, 0x4c, - 0x69, 0x73, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, - 0x64, 0x73, 0x3a, 0x33, 0x92, 0x41, 0x30, 0x0a, 0x2e, 0x32, 0x2c, 0x4c, 0x69, 0x73, 0x74, 0x20, - 0x6f, 0x66, 0x20, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x20, 0x73, 0x74, 0x6f, 0x72, - 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x65, 0x72, 0x62, 0x6f, 0x73, - 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x22, 0x65, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x08, - 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, - 0x2e, 0x63, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x76, - 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, - 0x65, 0x73, 0x3a, 0x1a, 0x92, 0x41, 0x17, 0x0a, 0x15, 0x32, 0x13, 0x47, 0x65, 0x74, 0x20, 0x70, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x64, - 0x0a, 0x15, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, - 0x6c, 0x65, 0x64, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x10, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x69, 0x65, 0x73, 0x3a, 0x1e, 0x92, 0x41, 0x1b, 0x0a, 0x19, 0x32, 0x17, 0x44, 0x69, 0x73, - 0x61, 0x62, 0x6c, 0x65, 0x20, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x20, 0x72, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x60, 0x0a, 0x14, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x10, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x3a, 0x1d, 0x92, 0x41, 0x1a, 0x0a, 0x18, 0x32, 0x16, - 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x20, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3e, 0x0a, 0x19, 0x41, 0x64, 0x64, 0x4f, 0x72, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x3a, 0x21, 0x92, 0x41, 0x1e, 0x0a, 0x1c, 0x32, 0x1a, 0x41, 0x64, 0x64, 0x2f, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x20, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x55, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, - 0x0a, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x09, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x49, 0x64, 0x73, 0x3a, 0x1f, 0x92, 0x41, - 0x1c, 0x0a, 0x1a, 0x32, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x20, 0x69, 0x64, 0x73, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x66, 0x0a, - 0x11, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x32, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x2e, 0x73, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x07, 0x73, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x3a, 0x1d, 0x92, 0x41, 0x1a, 0x0a, 0x18, 0x32, 0x16, 0x47, - 0x65, 0x74, 0x20, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x28, 0x73, 0x29, 0x20, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x61, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, - 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x3a, 0x20, 0x92, 0x41, 0x1d, 0x0a, 0x1b, 0x32, 0x19, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x28, 0x73, 0x29, 0x20, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x0a, 0x13, 0x52, 0x65, 0x6c, 0x6f, - 0x61, 0x64, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x3a, - 0x1c, 0x92, 0x41, 0x19, 0x0a, 0x17, 0x32, 0x15, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x20, 0x73, - 0x74, 0x6f, 0x72, 0x65, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x77, 0x0a, - 0x1a, 0x64, 0x65, 0x76, 0x2e, 0x63, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5a, 0x40, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x2f, 0x63, - 0x65, 0x72, 0x62, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x62, 0x2f, - 0x63, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2f, - 0x76, 0x31, 0x3b, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x76, 0x31, 0xaa, 0x02, 0x16, - 0x43, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x31, 0x2e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x04, 0x20, 0x03, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x15, 0x65, 0x66, 0x66, 0x65, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x44, 0x65, 0x72, 0x69, 0x76, 0x65, 0x64, 0x52, 0x6f, 0x6c, 0x65, 0x73, + 0x12, 0x52, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x65, + 0x72, 0x62, 0x6f, 0x73, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x02, + 0x18, 0x01, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x73, 0x1a, 0xa6, 0x02, 0x0a, 0x0e, 0x45, 0x76, 0x61, 0x6c, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x53, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x63, 0x65, 0x72, 0x62, 0x6f, + 0x73, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, + 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x36, 0x0a, 0x17, + 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x65, + 0x64, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x15, 0x65, + 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x44, 0x65, 0x72, 0x69, 0x76, 0x65, 0x64, 0x52, + 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x21, 0x2e, 0x63, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, + 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, + 0x6f, 0x72, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x73, 0x12, 0x37, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x2e, 0x65, + 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x3a, 0x23, 0x92, + 0x41, 0x20, 0x0a, 0x1e, 0x32, 0x1c, 0x50, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, + 0x20, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x63, 0x6f, 0x6d, 0x65, 0x22, 0x9b, 0x04, + 0x0a, 0x17, 0x50, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x78, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x6c, 0x61, + 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0c, 0x70, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x49, 0x64, 0x12, 0x41, + 0x0a, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x25, 0x2e, 0x63, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x46, + 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x48, 0x00, 0x52, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, + 0x65, 0x12, 0x5c, 0x0a, 0x12, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, + 0x63, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x10, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x74, 0x12, + 0x62, 0x0a, 0x14, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x5f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, + 0x63, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, + 0x12, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x61, + 0x74, 0x63, 0x68, 0x12, 0x52, 0x0a, 0x0e, 0x70, 0x6c, 0x61, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x65, + 0x72, 0x62, 0x6f, 0x73, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0d, 0x70, 0x6c, 0x61, 0x6e, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x55, 0x0a, 0x0f, 0x63, 0x68, 0x65, 0x63, 0x6b, + 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2a, 0x2e, 0x63, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0e, + 0x63, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x3a, 0x20, + 0x92, 0x41, 0x1d, 0x0a, 0x1b, 0x32, 0x19, 0x50, 0x6c, 0x61, 0x79, 0x67, 0x72, 0x6f, 0x75, 0x6e, + 0x64, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x42, 0x09, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x63, 0x6f, 0x6d, 0x65, 0x22, 0x70, 0x0a, 0x19, 0x41, + 0x64, 0x64, 0x4f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x3a, 0x21, 0x92, 0x41, 0x1e, 0x0a, + 0x1c, 0x32, 0x1a, 0x41, 0x64, 0x64, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x70, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe0, 0x01, + 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x75, 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x45, 0x6e, + 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, + 0x10, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x65, 0x72, 0x62, 0x6f, 0x73, + 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x48, 0x00, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x51, 0x0a, 0x12, 0x64, 0x65, + 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x2e, + 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x48, 0x00, 0x52, 0x10, 0x64, 0x65, 0x63, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x3a, 0x18, 0x92, + 0x41, 0x15, 0x0a, 0x13, 0x32, 0x11, 0x41, 0x75, 0x64, 0x69, 0x74, 0x20, 0x6c, 0x6f, 0x67, 0x20, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x42, 0x07, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, + 0x22, 0x82, 0x01, 0x0a, 0x12, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x75, 0x69, + 0x6c, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, + 0x75, 0x69, 0x6c, 0x64, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x1b, 0x92, 0x41, 0x18, 0x0a, 0x16, 0x32, + 0x14, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x20, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6a, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, + 0x0a, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x73, 0x3a, 0x33, 0x92, 0x41, + 0x30, 0x0a, 0x2e, 0x32, 0x2c, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x70, 0x6f, 0x6c, + 0x69, 0x63, 0x69, 0x65, 0x73, 0x20, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x43, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x22, 0x65, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x65, 0x72, 0x62, 0x6f, + 0x73, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x3a, 0x1a, 0x92, 0x41, + 0x17, 0x0a, 0x15, 0x32, 0x13, 0x47, 0x65, 0x74, 0x20, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x20, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x64, 0x0a, 0x15, 0x44, 0x69, 0x73, 0x61, + 0x62, 0x6c, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x5f, 0x70, 0x6f, + 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x64, 0x69, + 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x3a, 0x1e, + 0x92, 0x41, 0x1b, 0x0a, 0x19, 0x32, 0x17, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x60, + 0x0a, 0x14, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x64, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x0f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, + 0x73, 0x3a, 0x1d, 0x92, 0x41, 0x1a, 0x0a, 0x18, 0x32, 0x16, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x20, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x3e, 0x0a, 0x19, 0x41, 0x64, 0x64, 0x4f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x3a, 0x21, 0x92, + 0x41, 0x1e, 0x0a, 0x1c, 0x32, 0x1a, 0x41, 0x64, 0x64, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x20, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x55, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x73, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x49, 0x64, 0x73, 0x3a, 0x1f, 0x92, 0x41, 0x1c, 0x0a, 0x1a, 0x32, 0x18, 0x4c, + 0x69, 0x73, 0x74, 0x20, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x20, 0x69, 0x64, 0x73, 0x20, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x66, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x07, + 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, + 0x63, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, + 0x3a, 0x1d, 0x92, 0x41, 0x1a, 0x0a, 0x18, 0x32, 0x16, 0x47, 0x65, 0x74, 0x20, 0x73, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x28, 0x73, 0x29, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x61, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x64, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, + 0x3a, 0x20, 0x92, 0x41, 0x1d, 0x0a, 0x1b, 0x32, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, + 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x28, 0x73, 0x29, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x33, 0x0a, 0x13, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x6f, 0x72, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x3a, 0x1c, 0x92, 0x41, 0x19, 0x0a, 0x17, + 0x32, 0x15, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x20, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x20, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x77, 0x0a, 0x1a, 0x64, 0x65, 0x76, 0x2e, 0x63, + 0x65, 0x72, 0x62, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x63, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x2f, 0x63, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x62, 0x2f, 0x63, 0x65, 0x72, 0x62, 0x6f, 0x73, + 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x76, 0x31, 0xaa, 0x02, 0x16, 0x43, 0x65, 0x72, 0x62, 0x6f, 0x73, + 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2986,11 +3027,13 @@ var file_cerbos_response_v1_response_proto_depIdxs = []int32{ 49, // 44: cerbos.response.v1.PlaygroundEvaluateResponse.EvalResult.effect:type_name -> cerbos.effect.v1.Effect 43, // 45: cerbos.response.v1.PlaygroundEvaluateResponse.EvalResult.validation_errors:type_name -> cerbos.schema.v1.ValidationError 40, // 46: cerbos.response.v1.PlaygroundEvaluateResponse.EvalResultList.results:type_name -> cerbos.response.v1.PlaygroundEvaluateResponse.EvalResult - 47, // [47:47] is the sub-list for method output_type - 47, // [47:47] is the sub-list for method input_type - 47, // [47:47] is the sub-list for extension type_name - 47, // [47:47] is the sub-list for extension extendee - 0, // [0:47] is the sub-list for field type_name + 43, // 47: cerbos.response.v1.PlaygroundEvaluateResponse.EvalResultList.validation_errors:type_name -> cerbos.schema.v1.ValidationError + 50, // 48: cerbos.response.v1.PlaygroundEvaluateResponse.EvalResultList.outputs:type_name -> cerbos.engine.v1.OutputEntry + 49, // [49:49] is the sub-list for method output_type + 49, // [49:49] is the sub-list for method input_type + 49, // [49:49] is the sub-list for extension type_name + 49, // [49:49] is the sub-list for extension extendee + 0, // [0:49] is the sub-list for field type_name } func init() { file_cerbos_response_v1_response_proto_init() } diff --git a/api/genpb/cerbos/response/v1/response.pb.validate.go b/api/genpb/cerbos/response/v1/response.pb.validate.go index ebcf108a4..5aee601ac 100644 --- a/api/genpb/cerbos/response/v1/response.pb.validate.go +++ b/api/genpb/cerbos/response/v1/response.pb.validate.go @@ -5003,6 +5003,74 @@ func (m *PlaygroundEvaluateResponse_EvalResultList) validate(all bool) error { } + for idx, item := range m.GetValidationErrors() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PlaygroundEvaluateResponse_EvalResultListValidationError{ + field: fmt.Sprintf("ValidationErrors[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PlaygroundEvaluateResponse_EvalResultListValidationError{ + field: fmt.Sprintf("ValidationErrors[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PlaygroundEvaluateResponse_EvalResultListValidationError{ + field: fmt.Sprintf("ValidationErrors[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetOutputs() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PlaygroundEvaluateResponse_EvalResultListValidationError{ + field: fmt.Sprintf("Outputs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PlaygroundEvaluateResponse_EvalResultListValidationError{ + field: fmt.Sprintf("Outputs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PlaygroundEvaluateResponse_EvalResultListValidationError{ + field: fmt.Sprintf("Outputs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + if len(errors) > 0 { return PlaygroundEvaluateResponse_EvalResultListMultiError(errors) } diff --git a/api/genpb/cerbos/response/v1/response_vtproto.pb.go b/api/genpb/cerbos/response/v1/response_vtproto.pb.go index 2090c05c9..1e38fa39d 100644 --- a/api/genpb/cerbos/response/v1/response_vtproto.pb.go +++ b/api/genpb/cerbos/response/v1/response_vtproto.pb.go @@ -1424,6 +1424,63 @@ func (m *PlaygroundEvaluateResponse_EvalResultList) MarshalToSizedBufferVT(dAtA i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if len(m.Outputs) > 0 { + for iNdEx := len(m.Outputs) - 1; iNdEx >= 0; iNdEx-- { + if vtmsg, ok := interface{}(m.Outputs[iNdEx]).(interface { + MarshalToSizedBufferVT([]byte) (int, error) + }); ok { + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + } else { + encoded, err := proto.Marshal(m.Outputs[iNdEx]) + if err != nil { + return 0, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = encodeVarint(dAtA, i, uint64(len(encoded))) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.ValidationErrors) > 0 { + for iNdEx := len(m.ValidationErrors) - 1; iNdEx >= 0; iNdEx-- { + if vtmsg, ok := interface{}(m.ValidationErrors[iNdEx]).(interface { + MarshalToSizedBufferVT([]byte) (int, error) + }); ok { + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + } else { + encoded, err := proto.Marshal(m.ValidationErrors[iNdEx]) + if err != nil { + return 0, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = encodeVarint(dAtA, i, uint64(len(encoded))) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.EffectiveDerivedRoles) > 0 { + for iNdEx := len(m.EffectiveDerivedRoles) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.EffectiveDerivedRoles[iNdEx]) + copy(dAtA[i:], m.EffectiveDerivedRoles[iNdEx]) + i = encodeVarint(dAtA, i, uint64(len(m.EffectiveDerivedRoles[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } if len(m.Results) > 0 { for iNdEx := len(m.Results) - 1; iNdEx >= 0; iNdEx-- { size, err := m.Results[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) @@ -2863,6 +2920,36 @@ func (m *PlaygroundEvaluateResponse_EvalResultList) SizeVT() (n int) { n += 1 + l + sov(uint64(l)) } } + if len(m.EffectiveDerivedRoles) > 0 { + for _, s := range m.EffectiveDerivedRoles { + l = len(s) + n += 1 + l + sov(uint64(l)) + } + } + if len(m.ValidationErrors) > 0 { + for _, e := range m.ValidationErrors { + if size, ok := interface{}(e).(interface { + SizeVT() int + }); ok { + l = size.SizeVT() + } else { + l = proto.Size(e) + } + n += 1 + l + sov(uint64(l)) + } + } + if len(m.Outputs) > 0 { + for _, e := range m.Outputs { + if size, ok := interface{}(e).(interface { + SizeVT() int + }); ok { + l = size.SizeVT() + } else { + l = proto.Size(e) + } + n += 1 + l + sov(uint64(l)) + } + } n += len(m.unknownFields) return n } @@ -6804,6 +6891,122 @@ func (m *PlaygroundEvaluateResponse_EvalResultList) UnmarshalVT(dAtA []byte) err return err } iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EffectiveDerivedRoles", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EffectiveDerivedRoles = append(m.EffectiveDerivedRoles, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidationErrors", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidationErrors = append(m.ValidationErrors, &v11.ValidationError{}) + if unmarshal, ok := interface{}(m.ValidationErrors[len(m.ValidationErrors)-1]).(interface { + UnmarshalVT([]byte) error + }); ok { + if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.ValidationErrors[len(m.ValidationErrors)-1]); err != nil { + return err + } + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Outputs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Outputs = append(m.Outputs, &v1.OutputEntry{}) + if unmarshal, ok := interface{}(m.Outputs[len(m.Outputs)-1]).(interface { + UnmarshalVT([]byte) error + }); ok { + if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.Outputs[len(m.Outputs)-1]); err != nil { + return err + } + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:]) diff --git a/api/public/cerbos/response/v1/response.proto b/api/public/cerbos/response/v1/response.proto index 08a2b29fc..7da19e324 100644 --- a/api/public/cerbos/response/v1/response.proto +++ b/api/public/cerbos/response/v1/response.proto @@ -286,12 +286,15 @@ message PlaygroundEvaluateResponse { string action = 1; cerbos.effect.v1.Effect effect = 2; string policy = 3; - repeated string effective_derived_roles = 4; - repeated cerbos.schema.v1.ValidationError validation_errors = 5; + repeated string effective_derived_roles = 4 [deprecated = true]; + repeated cerbos.schema.v1.ValidationError validation_errors = 5 [deprecated = true]; } message EvalResultList { repeated EvalResult results = 1; + repeated string effective_derived_roles = 2; + repeated cerbos.schema.v1.ValidationError validation_errors = 3; + repeated cerbos.engine.v1.OutputEntry outputs = 4; } string playground_id = 1; diff --git a/internal/server/tests.go b/internal/server/tests.go index 0430ed42c..d5bfd364b 100644 --- a/internal/server/tests.go +++ b/internal/server/tests.go @@ -25,6 +25,7 @@ import ( "google.golang.org/protobuf/proto" "google.golang.org/protobuf/testing/protocmp" + enginev1 "github.com/cerbos/cerbos/api/genpb/cerbos/engine/v1" policyv1 "github.com/cerbos/cerbos/api/genpb/cerbos/policy/v1" privatev1 "github.com/cerbos/cerbos/api/genpb/cerbos/private/v1" responsev1 "github.com/cerbos/cerbos/api/genpb/cerbos/response/v1" @@ -397,8 +398,9 @@ func compareProto(t *testing.T, want, have proto.Message) { protocmp.Transform(), protocmp.SortRepeatedFields(&responsev1.CheckResourceSetResponse_Meta_ActionMeta{}, "effective_derived_roles"), protocmp.SortRepeatedFields(&responsev1.CheckResourcesResponse_ResultEntry_Meta{}, "effective_derived_roles"), - protocmp.SortRepeatedFields(&responsev1.PlaygroundEvaluateResponse_EvalResult{}, "effective_derived_roles"), + protocmp.SortRepeatedFields(&responsev1.PlaygroundEvaluateResponse_EvalResultList{}, "effective_derived_roles"), protocmp.SortRepeatedFields(&policyv1.TestResults_Details{}, "engine_trace"), + protocmp.SortRepeated(cmpOutputs), protocmp.SortRepeated(cmpPlaygroundEvalResult), protocmp.SortRepeated(cmpPlaygroundError), protocmp.SortRepeated(cmpValidationError), @@ -424,6 +426,10 @@ func cmpValidationError(a, b *schemav1.ValidationError) bool { return a.Source < b.Source } +func cmpOutputs(a, b *enginev1.OutputEntry) bool { + return a.Src < b.Src +} + func grpcHealthCheckPasses(grpcConn *grpc.ClientConn, reqTimeout time.Duration) func() bool { return func() bool { client := healthpb.NewHealthClient(grpcConn) diff --git a/internal/storage/blob/cloner_test.go b/internal/storage/blob/cloner_test.go index 45c95768c..43112a938 100644 --- a/internal/storage/blob/cloner_test.go +++ b/internal/storage/blob/cloner_test.go @@ -48,6 +48,6 @@ func TestCloneResult(t *testing.T) { "resource_policies/policy_05_acme.yaml", "resource_policies/policy_06.yaml", "resource_policies/policy_07.yaml", - "resource_policies/policy_08.yaml", + "resource_policies/policy_07_acme.yaml", }, result.updateOrAdd) } diff --git a/internal/svc/playground_svc.go b/internal/svc/playground_svc.go index 7d869154a..b16788e5f 100644 --- a/internal/svc/playground_svc.go +++ b/internal/svc/playground_svc.go @@ -377,18 +377,21 @@ func processEngineOutput(_ context.Context, playgroundID string, outputs []*engi for action, effect := range outputs[0].Actions { results = append(results, &responsev1.PlaygroundEvaluateResponse_EvalResult{ - Action: action, - Effect: effect.Effect, - Policy: effect.Policy, - EffectiveDerivedRoles: outputs[0].EffectiveDerivedRoles, - ValidationErrors: outputs[0].ValidationErrors, + Action: action, + Effect: effect.Effect, + Policy: effect.Policy, }) } return &responsev1.PlaygroundEvaluateResponse{ PlaygroundId: playgroundID, Outcome: &responsev1.PlaygroundEvaluateResponse_Success{ - Success: &responsev1.PlaygroundEvaluateResponse_EvalResultList{Results: results}, + Success: &responsev1.PlaygroundEvaluateResponse_EvalResultList{ + Results: results, + EffectiveDerivedRoles: outputs[0].EffectiveDerivedRoles, + ValidationErrors: outputs[0].ValidationErrors, + Outputs: outputs[0].Outputs, + }, }, }, nil } diff --git a/internal/test/testdata/server/admin/add_or_update_policy/case_01.yaml b/internal/test/testdata/server/admin/add_or_update_policy/case_01.yaml index d039f8401..7909eabcb 100644 --- a/internal/test/testdata/server/admin/add_or_update_policy/case_01.yaml +++ b/internal/test/testdata/server/admin/add_or_update_policy/case_01.yaml @@ -7,7 +7,7 @@ adminAddOrUpdatePolicy: input: { "policies": [ {{- readPolicy "store/resource_policies/policy_07.yaml" | toPolicyJSON }}, - {{- readPolicy "store/resource_policies/policy_08.yaml" | toPolicyJSON }}, + {{- readPolicy "store/resource_policies/policy_07_acme.yaml" | toPolicyJSON }}, {{- readPolicy "store/principal_policies/policy_04.yaml" | toPolicyJSON }}, ] } diff --git a/internal/test/testdata/server/playground/evaluate/pge_case_00.yaml b/internal/test/testdata/server/playground/evaluate/pge_case_00.yaml index 88e9590aa..2046d5496 100644 --- a/internal/test/testdata/server/playground/evaluate/pge_case_00.yaml +++ b/internal/test/testdata/server/playground/evaluate/pge_case_00.yaml @@ -37,19 +37,16 @@ playgroundEvaluate: { "action": "view", "effect": "EFFECT_ALLOW", - "policy": "resource.album_object.vdefault", - "effectiveDerivedRoles": [ - "owner" - ] + "policy": "resource.album_object.vdefault" }, { "action": "delete", "effect": "EFFECT_ALLOW", - "policy": "resource.album_object.vdefault", - "effectiveDerivedRoles": [ - "owner" - ] + "policy": "resource.album_object.vdefault" } + ], + "effectiveDerivedRoles": [ + "owner" ] } } diff --git a/internal/test/testdata/server/playground/evaluate/pge_case_02.yaml b/internal/test/testdata/server/playground/evaluate/pge_case_02.yaml index 21f8137ed..bf57d5825 100644 --- a/internal/test/testdata/server/playground/evaluate/pge_case_02.yaml +++ b/internal/test/testdata/server/playground/evaluate/pge_case_02.yaml @@ -28,7 +28,7 @@ playgroundEvaluate: "contents": "{{ fileString `store/_schemas/resources/leave_request.json` | b64enc }}", } ], - "actions": ["approve", "view:public"], + "actions": ["approve", "view:public"], "principal": { "id": "john", "policyVersion": "20210210", @@ -61,23 +61,18 @@ playgroundEvaluate: { "action": "approve", "effect": "EFFECT_DENY", - "policy": "resource.leave_request.v20210210", - "effective_derived_roles": ["employee_that_owns_the_record", "any_employee"], - "validationErrors": [ - {"path": "/department", "message": "value must be one of \"marketing\", \"engineering\"", "source": "SOURCE_PRINCIPAL"}, - {"path": "/department", "message": "value must be one of \"marketing\", \"engineering\"", "source": "SOURCE_RESOURCE"} - ] + "policy": "resource.leave_request.v20210210" }, { "action": "view:public", "effect": "EFFECT_ALLOW", - "policy": "resource.leave_request.v20210210", - "effective_derived_roles": ["employee_that_owns_the_record", "any_employee"], - "validationErrors": [ - {"path": "/department", "message": "value must be one of \"marketing\", \"engineering\"", "source": "SOURCE_PRINCIPAL"}, - {"path": "/department", "message": "value must be one of \"marketing\", \"engineering\"", "source": "SOURCE_RESOURCE"} - ] + "policy": "resource.leave_request.v20210210" } + ], + "effectiveDerivedRoles": ["any_employee", "employee_that_owns_the_record"], + "validationErrors": [ + {"path": "/department", "message": "value must be one of \"marketing\", \"engineering\"", "source": "SOURCE_PRINCIPAL"}, + {"path": "/department", "message": "value must be one of \"marketing\", \"engineering\"", "source": "SOURCE_RESOURCE"} ] } } diff --git a/internal/test/testdata/server/playground/evaluate/pge_case_03.yaml b/internal/test/testdata/server/playground/evaluate/pge_case_03.yaml new file mode 100644 index 000000000..47d8cfbb3 --- /dev/null +++ b/internal/test/testdata/server/playground/evaluate/pge_case_03.yaml @@ -0,0 +1,84 @@ +--- +description: "Valid request with outputs" +wantStatus: + httpStatusCode: 200 + grpcStatusCode: 0 +playgroundEvaluate: + input: { + "playgroundId": "test", + "files": [ + { + "fileName": "roles.yaml", + "contents": "{{ fileString `store/derived_roles/derived_roles_02.yaml` | b64enc }}", + }, + { + "fileName": "resource_01.yaml", + "contents": "{{ fileString `store/resource_policies/policy_07.yaml` | b64enc }}", + }, + { + "fileName": "resource_01_acme.yaml", + "contents": "{{ fileString `store/resource_policies/policy_07_acme.yaml` | b64enc }}", + } + ], + "actions": ["view:public", "create"], + "principal": { + "id": "alicia", + "roles": ["employee"], + "attr": { + "department": "marketing", + "team": "design" + } + }, + "resource": { + "kind": "equipment_request", + "id": "XX125", + "scope": "acme", + "attr": { + "id": "XX125", + "department": "marketing", + "status": "DRAFT" + } + } + } + wantResponse: { + "playgroundId": "test", + "success": { + "results": [ + { + "action": "view:public", + "effect": "EFFECT_ALLOW", + "policy": "resource.equipment_request.vdefault/acme", + }, + { + "action": "create", + "effect": "EFFECT_ALLOW", + "policy": "resource.equipment_request.vdefault/acme", + } + ], + "effectiveDerivedRoles": [ + "any_employee" + ], + "outputs": [ + { + "src": "resource.equipment_request.vdefault/acme#rule-001", + "val": "create_allowed:alicia" + }, + { + "src": "resource.equipment_request.vdefault#public-view", + "val": { + "id": "alicia", + "keys": "XX125", + "formatted_string": "id:alicia", + "some_bool": true, + "some_list": ["foo", "bar"], + "something_nested": { + "nested_str": "foo", + "nested_bool": false, + "nested_list": ["nest_foo", 1.01], + "nested_formatted_string": "id:alicia" + }, + } + } + ] + } + } diff --git a/internal/test/testdata/store/resource_policies/policy_08.yaml b/internal/test/testdata/store/resource_policies/policy_07_acme.yaml similarity index 100% rename from internal/test/testdata/store/resource_policies/policy_08.yaml rename to internal/test/testdata/store/resource_policies/policy_07_acme.yaml diff --git a/schema/jsonschema/cerbos/response/v1/PlaygroundEvaluateResponse.schema.json b/schema/jsonschema/cerbos/response/v1/PlaygroundEvaluateResponse.schema.json index 9e0543a79..f0f70bee0 100644 --- a/schema/jsonschema/cerbos/response/v1/PlaygroundEvaluateResponse.schema.json +++ b/schema/jsonschema/cerbos/response/v1/PlaygroundEvaluateResponse.schema.json @@ -11,6 +11,18 @@ "EFFECT_NO_MATCH" ] }, + "cerbos.engine.v1.OutputEntry": { + "type": "object", + "additionalProperties": false, + "properties": { + "src": { + "type": "string" + }, + "val": { + "$ref": "#/definitions/google.protobuf.Value" + } + } + }, "cerbos.response.v1.PlaygroundEvaluateResponse.EvalResult": { "type": "object", "additionalProperties": false, @@ -42,11 +54,29 @@ "type": "object", "additionalProperties": false, "properties": { + "effectiveDerivedRoles": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputs": { + "type": "array", + "items": { + "$ref": "#/definitions/cerbos.engine.v1.OutputEntry" + } + }, "results": { "type": "array", "items": { "$ref": "#/definitions/cerbos.response.v1.PlaygroundEvaluateResponse.EvalResult" } + }, + "validationErrors": { + "type": "array", + "items": { + "$ref": "#/definitions/cerbos.schema.v1.ValidationError" + } } } }, @@ -96,6 +126,10 @@ "SOURCE_PRINCIPAL", "SOURCE_RESOURCE" ] + }, + "google.protobuf.Value": { + "title": "Value", + "description": "A dynamically-typed value." } }, "type": "object", diff --git a/schema/jsonschema/cerbos/response/v1/PlaygroundEvaluateResponse/EvalResultList.schema.json b/schema/jsonschema/cerbos/response/v1/PlaygroundEvaluateResponse/EvalResultList.schema.json index 60bdcbf2f..aca85ce3f 100644 --- a/schema/jsonschema/cerbos/response/v1/PlaygroundEvaluateResponse/EvalResultList.schema.json +++ b/schema/jsonschema/cerbos/response/v1/PlaygroundEvaluateResponse/EvalResultList.schema.json @@ -11,6 +11,18 @@ "EFFECT_NO_MATCH" ] }, + "cerbos.engine.v1.OutputEntry": { + "type": "object", + "additionalProperties": false, + "properties": { + "src": { + "type": "string" + }, + "val": { + "$ref": "#/definitions/google.protobuf.Value" + } + } + }, "cerbos.response.v1.PlaygroundEvaluateResponse.EvalResult": { "type": "object", "additionalProperties": false, @@ -60,16 +72,38 @@ "SOURCE_PRINCIPAL", "SOURCE_RESOURCE" ] + }, + "google.protobuf.Value": { + "title": "Value", + "description": "A dynamically-typed value." } }, "type": "object", "additionalProperties": false, "properties": { + "effectiveDerivedRoles": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputs": { + "type": "array", + "items": { + "$ref": "#/definitions/cerbos.engine.v1.OutputEntry" + } + }, "results": { "type": "array", "items": { "$ref": "#/definitions/cerbos.response.v1.PlaygroundEvaluateResponse.EvalResult" } + }, + "validationErrors": { + "type": "array", + "items": { + "$ref": "#/definitions/cerbos.schema.v1.ValidationError" + } } } } diff --git a/schema/openapiv2/cerbos/svc/v1/svc.swagger.json b/schema/openapiv2/cerbos/svc/v1/svc.swagger.json index 77cc8079c..dba297d75 100644 --- a/schema/openapiv2/cerbos/svc/v1/svc.swagger.json +++ b/schema/openapiv2/cerbos/svc/v1/svc.swagger.json @@ -1249,6 +1249,26 @@ "type": "object", "$ref": "#/definitions/PlaygroundEvaluateResponseEvalResult" } + }, + "effectiveDerivedRoles": { + "type": "array", + "items": { + "type": "string" + } + }, + "validationErrors": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1ValidationError" + } + }, + "outputs": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1OutputEntry" + } } } },