From 3ea3becbe7c3e6ccd8a85ec9c38c16c9cb0dc1b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Delafargue?= Date: Thu, 16 Jun 2022 01:06:48 +0200 Subject: [PATCH 1/2] 3rd party: Update protobuf schema --- pb/biscuit.pb.go | 913 +++++++++++++++++++++++++++++++++++------------ pb/biscuit.proto | 31 ++ 2 files changed, 707 insertions(+), 237 deletions(-) diff --git a/pb/biscuit.pb.go b/pb/biscuit.pb.go index ccc6fa4..59ac1ca 100644 --- a/pb/biscuit.pb.go +++ b/pb/biscuit.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 -// protoc v3.19.4 +// protoc-gen-go v1.28.0 +// protoc v3.12.3 // source: biscuit.proto package pb @@ -70,7 +70,63 @@ func (x *PublicKey_Algorithm) UnmarshalJSON(b []byte) error { // Deprecated: Use PublicKey_Algorithm.Descriptor instead. func (PublicKey_Algorithm) EnumDescriptor() ([]byte, []int) { - return file_biscuit_proto_rawDescGZIP(), []int{2, 0} + return file_biscuit_proto_rawDescGZIP(), []int{3, 0} +} + +type Scope_ScopeType int32 + +const ( + Scope_Authority Scope_ScopeType = 0 + Scope_Previous Scope_ScopeType = 1 +) + +// Enum value maps for Scope_ScopeType. +var ( + Scope_ScopeType_name = map[int32]string{ + 0: "Authority", + 1: "Previous", + } + Scope_ScopeType_value = map[string]int32{ + "Authority": 0, + "Previous": 1, + } +) + +func (x Scope_ScopeType) Enum() *Scope_ScopeType { + p := new(Scope_ScopeType) + *p = x + return p +} + +func (x Scope_ScopeType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Scope_ScopeType) Descriptor() protoreflect.EnumDescriptor { + return file_biscuit_proto_enumTypes[1].Descriptor() +} + +func (Scope_ScopeType) Type() protoreflect.EnumType { + return &file_biscuit_proto_enumTypes[1] +} + +func (x Scope_ScopeType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *Scope_ScopeType) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = Scope_ScopeType(num) + return nil +} + +// Deprecated: Use Scope_ScopeType.Descriptor instead. +func (Scope_ScopeType) EnumDescriptor() ([]byte, []int) { + return file_biscuit_proto_rawDescGZIP(), []int{6, 0} } type OpUnary_Kind int32 @@ -106,11 +162,11 @@ func (x OpUnary_Kind) String() string { } func (OpUnary_Kind) Descriptor() protoreflect.EnumDescriptor { - return file_biscuit_proto_enumTypes[1].Descriptor() + return file_biscuit_proto_enumTypes[2].Descriptor() } func (OpUnary_Kind) Type() protoreflect.EnumType { - return &file_biscuit_proto_enumTypes[1] + return &file_biscuit_proto_enumTypes[2] } func (x OpUnary_Kind) Number() protoreflect.EnumNumber { @@ -129,7 +185,7 @@ func (x *OpUnary_Kind) UnmarshalJSON(b []byte) error { // Deprecated: Use OpUnary_Kind.Descriptor instead. func (OpUnary_Kind) EnumDescriptor() ([]byte, []int) { - return file_biscuit_proto_rawDescGZIP(), []int{13, 0} + return file_biscuit_proto_rawDescGZIP(), []int{15, 0} } type OpBinary_Kind int32 @@ -207,11 +263,11 @@ func (x OpBinary_Kind) String() string { } func (OpBinary_Kind) Descriptor() protoreflect.EnumDescriptor { - return file_biscuit_proto_enumTypes[2].Descriptor() + return file_biscuit_proto_enumTypes[3].Descriptor() } func (OpBinary_Kind) Type() protoreflect.EnumType { - return &file_biscuit_proto_enumTypes[2] + return &file_biscuit_proto_enumTypes[3] } func (x OpBinary_Kind) Number() protoreflect.EnumNumber { @@ -230,7 +286,7 @@ func (x *OpBinary_Kind) UnmarshalJSON(b []byte) error { // Deprecated: Use OpBinary_Kind.Descriptor instead. func (OpBinary_Kind) EnumDescriptor() ([]byte, []int) { - return file_biscuit_proto_rawDescGZIP(), []int{14, 0} + return file_biscuit_proto_rawDescGZIP(), []int{16, 0} } type Policy_Kind int32 @@ -263,11 +319,11 @@ func (x Policy_Kind) String() string { } func (Policy_Kind) Descriptor() protoreflect.EnumDescriptor { - return file_biscuit_proto_enumTypes[3].Descriptor() + return file_biscuit_proto_enumTypes[4].Descriptor() } func (Policy_Kind) Type() protoreflect.EnumType { - return &file_biscuit_proto_enumTypes[3] + return &file_biscuit_proto_enumTypes[4] } func (x Policy_Kind) Number() protoreflect.EnumNumber { @@ -286,7 +342,7 @@ func (x *Policy_Kind) UnmarshalJSON(b []byte) error { // Deprecated: Use Policy_Kind.Descriptor instead. func (Policy_Kind) EnumDescriptor() ([]byte, []int) { - return file_biscuit_proto_rawDescGZIP(), []int{15, 0} + return file_biscuit_proto_rawDescGZIP(), []int{17, 0} } type Biscuit struct { @@ -365,9 +421,10 @@ type SignedBlock struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Block []byte `protobuf:"bytes,1,req,name=block" json:"block,omitempty"` - NextKey *PublicKey `protobuf:"bytes,2,req,name=nextKey" json:"nextKey,omitempty"` - Signature []byte `protobuf:"bytes,3,req,name=signature" json:"signature,omitempty"` + Block []byte `protobuf:"bytes,1,req,name=block" json:"block,omitempty"` + NextKey *PublicKey `protobuf:"bytes,2,req,name=nextKey" json:"nextKey,omitempty"` + Signature []byte `protobuf:"bytes,3,req,name=signature" json:"signature,omitempty"` + ExternalSignature *ExternalSignature `protobuf:"bytes,4,opt,name=externalSignature" json:"externalSignature,omitempty"` } func (x *SignedBlock) Reset() { @@ -423,6 +480,68 @@ func (x *SignedBlock) GetSignature() []byte { return nil } +func (x *SignedBlock) GetExternalSignature() *ExternalSignature { + if x != nil { + return x.ExternalSignature + } + return nil +} + +type ExternalSignature struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Signature []byte `protobuf:"bytes,1,req,name=signature" json:"signature,omitempty"` + PublicKey *PublicKey `protobuf:"bytes,2,req,name=publicKey" json:"publicKey,omitempty"` +} + +func (x *ExternalSignature) Reset() { + *x = ExternalSignature{} + if protoimpl.UnsafeEnabled { + mi := &file_biscuit_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExternalSignature) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExternalSignature) ProtoMessage() {} + +func (x *ExternalSignature) ProtoReflect() protoreflect.Message { + mi := &file_biscuit_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExternalSignature.ProtoReflect.Descriptor instead. +func (*ExternalSignature) Descriptor() ([]byte, []int) { + return file_biscuit_proto_rawDescGZIP(), []int{2} +} + +func (x *ExternalSignature) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +func (x *ExternalSignature) GetPublicKey() *PublicKey { + if x != nil { + return x.PublicKey + } + return nil +} + type PublicKey struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -435,7 +554,7 @@ type PublicKey struct { func (x *PublicKey) Reset() { *x = PublicKey{} if protoimpl.UnsafeEnabled { - mi := &file_biscuit_proto_msgTypes[2] + mi := &file_biscuit_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -448,7 +567,7 @@ func (x *PublicKey) String() string { func (*PublicKey) ProtoMessage() {} func (x *PublicKey) ProtoReflect() protoreflect.Message { - mi := &file_biscuit_proto_msgTypes[2] + mi := &file_biscuit_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -461,7 +580,7 @@ func (x *PublicKey) ProtoReflect() protoreflect.Message { // Deprecated: Use PublicKey.ProtoReflect.Descriptor instead. func (*PublicKey) Descriptor() ([]byte, []int) { - return file_biscuit_proto_rawDescGZIP(), []int{2} + return file_biscuit_proto_rawDescGZIP(), []int{3} } func (x *PublicKey) GetAlgorithm() PublicKey_Algorithm { @@ -492,7 +611,7 @@ type Proof struct { func (x *Proof) Reset() { *x = Proof{} if protoimpl.UnsafeEnabled { - mi := &file_biscuit_proto_msgTypes[3] + mi := &file_biscuit_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -505,7 +624,7 @@ func (x *Proof) String() string { func (*Proof) ProtoMessage() {} func (x *Proof) ProtoReflect() protoreflect.Message { - mi := &file_biscuit_proto_msgTypes[3] + mi := &file_biscuit_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -518,7 +637,7 @@ func (x *Proof) ProtoReflect() protoreflect.Message { // Deprecated: Use Proof.ProtoReflect.Descriptor instead. func (*Proof) Descriptor() ([]byte, []int) { - return file_biscuit_proto_rawDescGZIP(), []int{3} + return file_biscuit_proto_rawDescGZIP(), []int{4} } func (m *Proof) GetContent() isProof_Content { @@ -563,18 +682,20 @@ type Block struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Symbols []string `protobuf:"bytes,1,rep,name=symbols" json:"symbols,omitempty"` - Context *string `protobuf:"bytes,2,opt,name=context" json:"context,omitempty"` - Version *uint32 `protobuf:"varint,3,opt,name=version" json:"version,omitempty"` - FactsV2 []*FactV2 `protobuf:"bytes,4,rep,name=facts_v2,json=factsV2" json:"facts_v2,omitempty"` - RulesV2 []*RuleV2 `protobuf:"bytes,5,rep,name=rules_v2,json=rulesV2" json:"rules_v2,omitempty"` - ChecksV2 []*CheckV2 `protobuf:"bytes,6,rep,name=checks_v2,json=checksV2" json:"checks_v2,omitempty"` + Symbols []string `protobuf:"bytes,1,rep,name=symbols" json:"symbols,omitempty"` + Context *string `protobuf:"bytes,2,opt,name=context" json:"context,omitempty"` + Version *uint32 `protobuf:"varint,3,opt,name=version" json:"version,omitempty"` + FactsV2 []*FactV2 `protobuf:"bytes,4,rep,name=facts_v2,json=factsV2" json:"facts_v2,omitempty"` + RulesV2 []*RuleV2 `protobuf:"bytes,5,rep,name=rules_v2,json=rulesV2" json:"rules_v2,omitempty"` + ChecksV2 []*CheckV2 `protobuf:"bytes,6,rep,name=checks_v2,json=checksV2" json:"checks_v2,omitempty"` + Scope []*Scope `protobuf:"bytes,7,rep,name=scope" json:"scope,omitempty"` + PublicKeys []*PublicKey `protobuf:"bytes,8,rep,name=publicKeys" json:"publicKeys,omitempty"` } func (x *Block) Reset() { *x = Block{} if protoimpl.UnsafeEnabled { - mi := &file_biscuit_proto_msgTypes[4] + mi := &file_biscuit_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -587,7 +708,7 @@ func (x *Block) String() string { func (*Block) ProtoMessage() {} func (x *Block) ProtoReflect() protoreflect.Message { - mi := &file_biscuit_proto_msgTypes[4] + mi := &file_biscuit_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -600,7 +721,7 @@ func (x *Block) ProtoReflect() protoreflect.Message { // Deprecated: Use Block.ProtoReflect.Descriptor instead. func (*Block) Descriptor() ([]byte, []int) { - return file_biscuit_proto_rawDescGZIP(), []int{4} + return file_biscuit_proto_rawDescGZIP(), []int{5} } func (x *Block) GetSymbols() []string { @@ -645,6 +766,100 @@ func (x *Block) GetChecksV2() []*CheckV2 { return nil } +func (x *Block) GetScope() []*Scope { + if x != nil { + return x.Scope + } + return nil +} + +func (x *Block) GetPublicKeys() []*PublicKey { + if x != nil { + return x.PublicKeys + } + return nil +} + +type Scope struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Content: + // *Scope_ScopeType_ + // *Scope_Block + Content isScope_Content `protobuf_oneof:"Content"` +} + +func (x *Scope) Reset() { + *x = Scope{} + if protoimpl.UnsafeEnabled { + mi := &file_biscuit_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Scope) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Scope) ProtoMessage() {} + +func (x *Scope) ProtoReflect() protoreflect.Message { + mi := &file_biscuit_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Scope.ProtoReflect.Descriptor instead. +func (*Scope) Descriptor() ([]byte, []int) { + return file_biscuit_proto_rawDescGZIP(), []int{6} +} + +func (m *Scope) GetContent() isScope_Content { + if m != nil { + return m.Content + } + return nil +} + +func (x *Scope) GetScopeType() Scope_ScopeType { + if x, ok := x.GetContent().(*Scope_ScopeType_); ok { + return x.ScopeType + } + return Scope_Authority +} + +func (x *Scope) GetBlock() int64 { + if x, ok := x.GetContent().(*Scope_Block); ok { + return x.Block + } + return 0 +} + +type isScope_Content interface { + isScope_Content() +} + +type Scope_ScopeType_ struct { + ScopeType Scope_ScopeType `protobuf:"varint,1,opt,name=scopeType,enum=Scope_ScopeType,oneof"` +} + +type Scope_Block struct { + Block int64 `protobuf:"varint,2,opt,name=block,oneof"` +} + +func (*Scope_ScopeType_) isScope_Content() {} + +func (*Scope_Block) isScope_Content() {} + type FactV2 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -656,7 +871,7 @@ type FactV2 struct { func (x *FactV2) Reset() { *x = FactV2{} if protoimpl.UnsafeEnabled { - mi := &file_biscuit_proto_msgTypes[5] + mi := &file_biscuit_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -669,7 +884,7 @@ func (x *FactV2) String() string { func (*FactV2) ProtoMessage() {} func (x *FactV2) ProtoReflect() protoreflect.Message { - mi := &file_biscuit_proto_msgTypes[5] + mi := &file_biscuit_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -682,7 +897,7 @@ func (x *FactV2) ProtoReflect() protoreflect.Message { // Deprecated: Use FactV2.ProtoReflect.Descriptor instead. func (*FactV2) Descriptor() ([]byte, []int) { - return file_biscuit_proto_rawDescGZIP(), []int{5} + return file_biscuit_proto_rawDescGZIP(), []int{7} } func (x *FactV2) GetPredicate() *PredicateV2 { @@ -700,12 +915,13 @@ type RuleV2 struct { Head *PredicateV2 `protobuf:"bytes,1,req,name=head" json:"head,omitempty"` Body []*PredicateV2 `protobuf:"bytes,2,rep,name=body" json:"body,omitempty"` Expressions []*ExpressionV2 `protobuf:"bytes,3,rep,name=expressions" json:"expressions,omitempty"` + Scope []*Scope `protobuf:"bytes,4,rep,name=scope" json:"scope,omitempty"` } func (x *RuleV2) Reset() { *x = RuleV2{} if protoimpl.UnsafeEnabled { - mi := &file_biscuit_proto_msgTypes[6] + mi := &file_biscuit_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -718,7 +934,7 @@ func (x *RuleV2) String() string { func (*RuleV2) ProtoMessage() {} func (x *RuleV2) ProtoReflect() protoreflect.Message { - mi := &file_biscuit_proto_msgTypes[6] + mi := &file_biscuit_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -731,7 +947,7 @@ func (x *RuleV2) ProtoReflect() protoreflect.Message { // Deprecated: Use RuleV2.ProtoReflect.Descriptor instead. func (*RuleV2) Descriptor() ([]byte, []int) { - return file_biscuit_proto_rawDescGZIP(), []int{6} + return file_biscuit_proto_rawDescGZIP(), []int{8} } func (x *RuleV2) GetHead() *PredicateV2 { @@ -755,6 +971,13 @@ func (x *RuleV2) GetExpressions() []*ExpressionV2 { return nil } +func (x *RuleV2) GetScope() []*Scope { + if x != nil { + return x.Scope + } + return nil +} + type CheckV2 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -766,7 +989,7 @@ type CheckV2 struct { func (x *CheckV2) Reset() { *x = CheckV2{} if protoimpl.UnsafeEnabled { - mi := &file_biscuit_proto_msgTypes[7] + mi := &file_biscuit_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -779,7 +1002,7 @@ func (x *CheckV2) String() string { func (*CheckV2) ProtoMessage() {} func (x *CheckV2) ProtoReflect() protoreflect.Message { - mi := &file_biscuit_proto_msgTypes[7] + mi := &file_biscuit_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -792,7 +1015,7 @@ func (x *CheckV2) ProtoReflect() protoreflect.Message { // Deprecated: Use CheckV2.ProtoReflect.Descriptor instead. func (*CheckV2) Descriptor() ([]byte, []int) { - return file_biscuit_proto_rawDescGZIP(), []int{7} + return file_biscuit_proto_rawDescGZIP(), []int{9} } func (x *CheckV2) GetQueries() []*RuleV2 { @@ -814,7 +1037,7 @@ type PredicateV2 struct { func (x *PredicateV2) Reset() { *x = PredicateV2{} if protoimpl.UnsafeEnabled { - mi := &file_biscuit_proto_msgTypes[8] + mi := &file_biscuit_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -827,7 +1050,7 @@ func (x *PredicateV2) String() string { func (*PredicateV2) ProtoMessage() {} func (x *PredicateV2) ProtoReflect() protoreflect.Message { - mi := &file_biscuit_proto_msgTypes[8] + mi := &file_biscuit_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -840,7 +1063,7 @@ func (x *PredicateV2) ProtoReflect() protoreflect.Message { // Deprecated: Use PredicateV2.ProtoReflect.Descriptor instead. func (*PredicateV2) Descriptor() ([]byte, []int) { - return file_biscuit_proto_rawDescGZIP(), []int{8} + return file_biscuit_proto_rawDescGZIP(), []int{10} } func (x *PredicateV2) GetName() uint64 { @@ -876,7 +1099,7 @@ type TermV2 struct { func (x *TermV2) Reset() { *x = TermV2{} if protoimpl.UnsafeEnabled { - mi := &file_biscuit_proto_msgTypes[9] + mi := &file_biscuit_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -889,7 +1112,7 @@ func (x *TermV2) String() string { func (*TermV2) ProtoMessage() {} func (x *TermV2) ProtoReflect() protoreflect.Message { - mi := &file_biscuit_proto_msgTypes[9] + mi := &file_biscuit_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -902,7 +1125,7 @@ func (x *TermV2) ProtoReflect() protoreflect.Message { // Deprecated: Use TermV2.ProtoReflect.Descriptor instead. func (*TermV2) Descriptor() ([]byte, []int) { - return file_biscuit_proto_rawDescGZIP(), []int{9} + return file_biscuit_proto_rawDescGZIP(), []int{11} } func (m *TermV2) GetContent() isTermV2_Content { @@ -1018,7 +1241,7 @@ type TermSet struct { func (x *TermSet) Reset() { *x = TermSet{} if protoimpl.UnsafeEnabled { - mi := &file_biscuit_proto_msgTypes[10] + mi := &file_biscuit_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1031,7 +1254,7 @@ func (x *TermSet) String() string { func (*TermSet) ProtoMessage() {} func (x *TermSet) ProtoReflect() protoreflect.Message { - mi := &file_biscuit_proto_msgTypes[10] + mi := &file_biscuit_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1044,7 +1267,7 @@ func (x *TermSet) ProtoReflect() protoreflect.Message { // Deprecated: Use TermSet.ProtoReflect.Descriptor instead. func (*TermSet) Descriptor() ([]byte, []int) { - return file_biscuit_proto_rawDescGZIP(), []int{10} + return file_biscuit_proto_rawDescGZIP(), []int{12} } func (x *TermSet) GetSet() []*TermV2 { @@ -1065,7 +1288,7 @@ type ExpressionV2 struct { func (x *ExpressionV2) Reset() { *x = ExpressionV2{} if protoimpl.UnsafeEnabled { - mi := &file_biscuit_proto_msgTypes[11] + mi := &file_biscuit_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1078,7 +1301,7 @@ func (x *ExpressionV2) String() string { func (*ExpressionV2) ProtoMessage() {} func (x *ExpressionV2) ProtoReflect() protoreflect.Message { - mi := &file_biscuit_proto_msgTypes[11] + mi := &file_biscuit_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1091,7 +1314,7 @@ func (x *ExpressionV2) ProtoReflect() protoreflect.Message { // Deprecated: Use ExpressionV2.ProtoReflect.Descriptor instead. func (*ExpressionV2) Descriptor() ([]byte, []int) { - return file_biscuit_proto_rawDescGZIP(), []int{11} + return file_biscuit_proto_rawDescGZIP(), []int{13} } func (x *ExpressionV2) GetOps() []*Op { @@ -1116,7 +1339,7 @@ type Op struct { func (x *Op) Reset() { *x = Op{} if protoimpl.UnsafeEnabled { - mi := &file_biscuit_proto_msgTypes[12] + mi := &file_biscuit_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1129,7 +1352,7 @@ func (x *Op) String() string { func (*Op) ProtoMessage() {} func (x *Op) ProtoReflect() protoreflect.Message { - mi := &file_biscuit_proto_msgTypes[12] + mi := &file_biscuit_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1142,7 +1365,7 @@ func (x *Op) ProtoReflect() protoreflect.Message { // Deprecated: Use Op.ProtoReflect.Descriptor instead. func (*Op) Descriptor() ([]byte, []int) { - return file_biscuit_proto_rawDescGZIP(), []int{12} + return file_biscuit_proto_rawDescGZIP(), []int{14} } func (m *Op) GetContent() isOp_Content { @@ -1206,7 +1429,7 @@ type OpUnary struct { func (x *OpUnary) Reset() { *x = OpUnary{} if protoimpl.UnsafeEnabled { - mi := &file_biscuit_proto_msgTypes[13] + mi := &file_biscuit_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1219,7 +1442,7 @@ func (x *OpUnary) String() string { func (*OpUnary) ProtoMessage() {} func (x *OpUnary) ProtoReflect() protoreflect.Message { - mi := &file_biscuit_proto_msgTypes[13] + mi := &file_biscuit_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1232,7 +1455,7 @@ func (x *OpUnary) ProtoReflect() protoreflect.Message { // Deprecated: Use OpUnary.ProtoReflect.Descriptor instead. func (*OpUnary) Descriptor() ([]byte, []int) { - return file_biscuit_proto_rawDescGZIP(), []int{13} + return file_biscuit_proto_rawDescGZIP(), []int{15} } func (x *OpUnary) GetKind() OpUnary_Kind { @@ -1253,7 +1476,7 @@ type OpBinary struct { func (x *OpBinary) Reset() { *x = OpBinary{} if protoimpl.UnsafeEnabled { - mi := &file_biscuit_proto_msgTypes[14] + mi := &file_biscuit_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1266,7 +1489,7 @@ func (x *OpBinary) String() string { func (*OpBinary) ProtoMessage() {} func (x *OpBinary) ProtoReflect() protoreflect.Message { - mi := &file_biscuit_proto_msgTypes[14] + mi := &file_biscuit_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1279,7 +1502,7 @@ func (x *OpBinary) ProtoReflect() protoreflect.Message { // Deprecated: Use OpBinary.ProtoReflect.Descriptor instead. func (*OpBinary) Descriptor() ([]byte, []int) { - return file_biscuit_proto_rawDescGZIP(), []int{14} + return file_biscuit_proto_rawDescGZIP(), []int{16} } func (x *OpBinary) GetKind() OpBinary_Kind { @@ -1301,7 +1524,7 @@ type Policy struct { func (x *Policy) Reset() { *x = Policy{} if protoimpl.UnsafeEnabled { - mi := &file_biscuit_proto_msgTypes[15] + mi := &file_biscuit_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1314,7 +1537,7 @@ func (x *Policy) String() string { func (*Policy) ProtoMessage() {} func (x *Policy) ProtoReflect() protoreflect.Message { - mi := &file_biscuit_proto_msgTypes[15] + mi := &file_biscuit_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1327,7 +1550,7 @@ func (x *Policy) ProtoReflect() protoreflect.Message { // Deprecated: Use Policy.ProtoReflect.Descriptor instead. func (*Policy) Descriptor() ([]byte, []int) { - return file_biscuit_proto_rawDescGZIP(), []int{15} + return file_biscuit_proto_rawDescGZIP(), []int{17} } func (x *Policy) GetQueries() []*RuleV2 { @@ -1360,7 +1583,7 @@ type AuthorizerPolicies struct { func (x *AuthorizerPolicies) Reset() { *x = AuthorizerPolicies{} if protoimpl.UnsafeEnabled { - mi := &file_biscuit_proto_msgTypes[16] + mi := &file_biscuit_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1373,7 +1596,7 @@ func (x *AuthorizerPolicies) String() string { func (*AuthorizerPolicies) ProtoMessage() {} func (x *AuthorizerPolicies) ProtoReflect() protoreflect.Message { - mi := &file_biscuit_proto_msgTypes[16] + mi := &file_biscuit_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1386,7 +1609,7 @@ func (x *AuthorizerPolicies) ProtoReflect() protoreflect.Message { // Deprecated: Use AuthorizerPolicies.ProtoReflect.Descriptor instead. func (*AuthorizerPolicies) Descriptor() ([]byte, []int) { - return file_biscuit_proto_rawDescGZIP(), []int{16} + return file_biscuit_proto_rawDescGZIP(), []int{18} } func (x *AuthorizerPolicies) GetSymbols() []string { @@ -1431,6 +1654,116 @@ func (x *AuthorizerPolicies) GetPolicies() []*Policy { return nil } +type ThirdPartyBlockRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PreviousKey *PublicKey `protobuf:"bytes,1,req,name=previousKey" json:"previousKey,omitempty"` + PublicKeys []*PublicKey `protobuf:"bytes,2,rep,name=publicKeys" json:"publicKeys,omitempty"` +} + +func (x *ThirdPartyBlockRequest) Reset() { + *x = ThirdPartyBlockRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_biscuit_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ThirdPartyBlockRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ThirdPartyBlockRequest) ProtoMessage() {} + +func (x *ThirdPartyBlockRequest) ProtoReflect() protoreflect.Message { + mi := &file_biscuit_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ThirdPartyBlockRequest.ProtoReflect.Descriptor instead. +func (*ThirdPartyBlockRequest) Descriptor() ([]byte, []int) { + return file_biscuit_proto_rawDescGZIP(), []int{19} +} + +func (x *ThirdPartyBlockRequest) GetPreviousKey() *PublicKey { + if x != nil { + return x.PreviousKey + } + return nil +} + +func (x *ThirdPartyBlockRequest) GetPublicKeys() []*PublicKey { + if x != nil { + return x.PublicKeys + } + return nil +} + +type ThirdPartyBlockContents struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Payload []byte `protobuf:"bytes,1,req,name=payload" json:"payload,omitempty"` + ExternalSignature *ExternalSignature `protobuf:"bytes,2,req,name=externalSignature" json:"externalSignature,omitempty"` +} + +func (x *ThirdPartyBlockContents) Reset() { + *x = ThirdPartyBlockContents{} + if protoimpl.UnsafeEnabled { + mi := &file_biscuit_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ThirdPartyBlockContents) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ThirdPartyBlockContents) ProtoMessage() {} + +func (x *ThirdPartyBlockContents) ProtoReflect() protoreflect.Message { + mi := &file_biscuit_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ThirdPartyBlockContents.ProtoReflect.Descriptor instead. +func (*ThirdPartyBlockContents) Descriptor() ([]byte, []int) { + return file_biscuit_proto_rawDescGZIP(), []int{20} +} + +func (x *ThirdPartyBlockContents) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +func (x *ThirdPartyBlockContents) GetExternalSignature() *ExternalSignature { + if x != nil { + return x.ExternalSignature + } + return nil +} + var File_biscuit_proto protoreflect.FileDescriptor var file_biscuit_proto_rawDesc = []byte{ @@ -1444,14 +1777,24 @@ var file_biscuit_proto_rawDesc = []byte{ 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x06, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x1c, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x50, 0x72, 0x6f, - 0x6f, 0x66, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x22, 0x67, 0x0a, 0x0b, 0x53, 0x69, 0x67, - 0x6e, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x24, - 0x0a, 0x07, 0x6e, 0x65, 0x78, 0x74, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0b, 0x32, - 0x0a, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x07, 0x6e, 0x65, 0x78, - 0x74, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x22, 0x6b, 0x0a, 0x09, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, + 0x6f, 0x66, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x22, 0xa9, 0x01, 0x0a, 0x0b, 0x53, 0x69, + 0x67, 0x6e, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, + 0x24, 0x0a, 0x07, 0x6e, 0x65, 0x78, 0x74, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0b, + 0x32, 0x0a, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x07, 0x6e, 0x65, + 0x78, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x12, 0x40, 0x0a, 0x11, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, + 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x52, 0x11, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x5b, 0x0a, 0x11, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0c, 0x52, 0x09, 0x73, + 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x28, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x50, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, + 0x65, 0x79, 0x22, 0x6b, 0x0a, 0x09, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x32, 0x0a, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x2e, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x52, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, @@ -1464,7 +1807,7 @@ var file_biscuit_proto_rawDesc = []byte{ 0x6e, 0x61, 0x6c, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0e, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, - 0xc4, 0x01, 0x0a, 0x05, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x79, 0x6d, + 0x8e, 0x02, 0x0a, 0x05, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x18, 0x0a, @@ -1476,93 +1819,123 @@ var file_biscuit_proto_rawDesc = []byte{ 0x52, 0x75, 0x6c, 0x65, 0x56, 0x32, 0x52, 0x07, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x56, 0x32, 0x12, 0x25, 0x0a, 0x09, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x5f, 0x76, 0x32, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x56, 0x32, 0x52, 0x08, 0x63, 0x68, - 0x65, 0x63, 0x6b, 0x73, 0x56, 0x32, 0x22, 0x34, 0x0a, 0x06, 0x46, 0x61, 0x63, 0x74, 0x56, 0x32, - 0x12, 0x2a, 0x0a, 0x09, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, - 0x02, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x56, - 0x32, 0x52, 0x09, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x22, 0x7d, 0x0a, 0x06, - 0x52, 0x75, 0x6c, 0x65, 0x56, 0x32, 0x12, 0x20, 0x0a, 0x04, 0x68, 0x65, 0x61, 0x64, 0x18, 0x01, - 0x20, 0x02, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x56, 0x32, 0x52, 0x04, 0x68, 0x65, 0x61, 0x64, 0x12, 0x20, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, - 0x74, 0x65, 0x56, 0x32, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x2f, 0x0a, 0x0b, 0x65, 0x78, - 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x0d, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x56, 0x32, 0x52, 0x0b, - 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x2c, 0x0a, 0x07, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x56, 0x32, 0x12, 0x21, 0x0a, 0x07, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x56, 0x32, - 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x22, 0x40, 0x0a, 0x0b, 0x50, 0x72, 0x65, - 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x56, 0x32, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x05, - 0x74, 0x65, 0x72, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x54, 0x65, - 0x72, 0x6d, 0x56, 0x32, 0x52, 0x05, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x22, 0xc9, 0x01, 0x0a, 0x06, - 0x54, 0x65, 0x72, 0x6d, 0x56, 0x32, 0x12, 0x1c, 0x0a, 0x08, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, - 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x08, 0x76, 0x61, 0x72, 0x69, - 0x61, 0x62, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x07, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x07, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, - 0x12, 0x18, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, - 0x48, 0x00, 0x52, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x04, 0x64, 0x61, - 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x04, 0x64, 0x61, 0x74, 0x65, - 0x12, 0x16, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x48, - 0x00, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x04, 0x62, 0x6f, 0x6f, 0x6c, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x04, 0x62, 0x6f, 0x6f, 0x6c, 0x12, 0x1c, - 0x0a, 0x03, 0x73, 0x65, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x54, 0x65, - 0x72, 0x6d, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x03, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x24, 0x0a, 0x07, 0x54, 0x65, 0x72, 0x6d, 0x53, - 0x65, 0x74, 0x12, 0x19, 0x0a, 0x03, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x07, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x56, 0x32, 0x52, 0x03, 0x73, 0x65, 0x74, 0x22, 0x25, 0x0a, - 0x0c, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x56, 0x32, 0x12, 0x15, 0x0a, - 0x03, 0x6f, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x03, 0x2e, 0x4f, 0x70, 0x52, - 0x03, 0x6f, 0x70, 0x73, 0x22, 0x77, 0x0a, 0x02, 0x4f, 0x70, 0x12, 0x1f, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x54, 0x65, 0x72, 0x6d, - 0x56, 0x32, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x20, 0x0a, 0x05, 0x75, - 0x6e, 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x4f, 0x70, 0x55, - 0x6e, 0x61, 0x72, 0x79, 0x48, 0x00, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x72, 0x79, 0x12, 0x23, 0x0a, - 0x06, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, - 0x4f, 0x70, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x48, 0x00, 0x52, 0x06, 0x42, 0x69, 0x6e, 0x61, - 0x72, 0x79, 0x42, 0x09, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x58, 0x0a, - 0x07, 0x4f, 0x70, 0x55, 0x6e, 0x61, 0x72, 0x79, 0x12, 0x21, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, - 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x4f, 0x70, 0x55, 0x6e, 0x61, 0x72, 0x79, - 0x2e, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0x2a, 0x0a, 0x04, 0x4b, - 0x69, 0x6e, 0x64, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x65, 0x67, 0x61, 0x74, 0x65, 0x10, 0x00, 0x12, - 0x0a, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x73, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4c, - 0x65, 0x6e, 0x67, 0x74, 0x68, 0x10, 0x02, 0x22, 0x89, 0x02, 0x0a, 0x08, 0x4f, 0x70, 0x42, 0x69, - 0x6e, 0x61, 0x72, 0x79, 0x12, 0x22, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x02, - 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x4f, 0x70, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x2e, 0x4b, 0x69, - 0x6e, 0x64, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0xd8, 0x01, 0x0a, 0x04, 0x4b, 0x69, 0x6e, - 0x64, 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x65, 0x73, 0x73, 0x54, 0x68, 0x61, 0x6e, 0x10, 0x00, 0x12, - 0x0f, 0x0a, 0x0b, 0x47, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x54, 0x68, 0x61, 0x6e, 0x10, 0x01, - 0x12, 0x0f, 0x0a, 0x0b, 0x4c, 0x65, 0x73, 0x73, 0x4f, 0x72, 0x45, 0x71, 0x75, 0x61, 0x6c, 0x10, - 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x47, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x4f, 0x72, 0x45, 0x71, - 0x75, 0x61, 0x6c, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x71, 0x75, 0x61, 0x6c, 0x10, 0x04, - 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x10, 0x05, 0x12, 0x0a, - 0x0a, 0x06, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x10, 0x06, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x75, - 0x66, 0x66, 0x69, 0x78, 0x10, 0x07, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x65, 0x67, 0x65, 0x78, 0x10, - 0x08, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x64, 0x64, 0x10, 0x09, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x75, - 0x62, 0x10, 0x0a, 0x12, 0x07, 0x0a, 0x03, 0x4d, 0x75, 0x6c, 0x10, 0x0b, 0x12, 0x07, 0x0a, 0x03, - 0x44, 0x69, 0x76, 0x10, 0x0c, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x6e, 0x64, 0x10, 0x0d, 0x12, 0x06, - 0x0a, 0x02, 0x4f, 0x72, 0x10, 0x0e, 0x12, 0x10, 0x0a, 0x0c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x73, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x0f, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x6e, 0x69, 0x6f, - 0x6e, 0x10, 0x10, 0x22, 0x6a, 0x0a, 0x06, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x21, 0x0a, - 0x07, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, - 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x56, 0x32, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, - 0x12, 0x20, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x0c, - 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, 0x6b, 0x69, - 0x6e, 0x64, 0x22, 0x1b, 0x0a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x6c, - 0x6c, 0x6f, 0x77, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x65, 0x6e, 0x79, 0x10, 0x01, 0x22, - 0xcd, 0x01, 0x0a, 0x12, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x73, - 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x05, 0x66, 0x61, - 0x63, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x46, 0x61, 0x63, 0x74, - 0x56, 0x32, 0x52, 0x05, 0x66, 0x61, 0x63, 0x74, 0x73, 0x12, 0x1d, 0x0a, 0x05, 0x72, 0x75, 0x6c, - 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x56, - 0x32, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x06, 0x63, 0x68, 0x65, 0x63, - 0x6b, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x56, 0x32, 0x52, 0x06, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x12, 0x23, 0x0a, 0x08, 0x70, 0x6f, - 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x42, - 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, + 0x65, 0x63, 0x6b, 0x73, 0x56, 0x32, 0x12, 0x1c, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, + 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x05, 0x73, + 0x63, 0x6f, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, + 0x79, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x4b, 0x65, 0x79, 0x52, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x73, + 0x22, 0x86, 0x01, 0x0a, 0x05, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x63, + 0x6f, 0x70, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, + 0x53, 0x63, 0x6f, 0x70, 0x65, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x54, 0x79, 0x70, 0x65, 0x48, + 0x00, 0x52, 0x09, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x05, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x05, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x28, 0x0a, 0x09, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x10, 0x00, + 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x10, 0x01, 0x42, 0x09, + 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x34, 0x0a, 0x06, 0x46, 0x61, 0x63, + 0x74, 0x56, 0x32, 0x12, 0x2a, 0x0a, 0x09, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, + 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x56, 0x32, 0x52, 0x09, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x22, + 0x9b, 0x01, 0x0a, 0x06, 0x52, 0x75, 0x6c, 0x65, 0x56, 0x32, 0x12, 0x20, 0x0a, 0x04, 0x68, 0x65, + 0x61, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x56, 0x32, 0x52, 0x04, 0x68, 0x65, 0x61, 0x64, 0x12, 0x20, 0x0a, 0x04, + 0x62, 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x50, 0x72, 0x65, + 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x56, 0x32, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x2f, + 0x0a, 0x0b, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x56, 0x32, 0x52, 0x0b, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x1c, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x06, + 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x22, 0x2c, 0x0a, + 0x07, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x56, 0x32, 0x12, 0x21, 0x0a, 0x07, 0x71, 0x75, 0x65, 0x72, + 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x52, 0x75, 0x6c, 0x65, + 0x56, 0x32, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x22, 0x40, 0x0a, 0x0b, 0x50, + 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x56, 0x32, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x04, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, + 0x0a, 0x05, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, + 0x54, 0x65, 0x72, 0x6d, 0x56, 0x32, 0x52, 0x05, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x22, 0xc9, 0x01, + 0x0a, 0x06, 0x54, 0x65, 0x72, 0x6d, 0x56, 0x32, 0x12, 0x1c, 0x0a, 0x08, 0x76, 0x61, 0x72, 0x69, + 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x08, 0x76, 0x61, + 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x07, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x07, 0x69, 0x6e, 0x74, 0x65, 0x67, + 0x65, 0x72, 0x12, 0x18, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x04, 0x48, 0x00, 0x52, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x04, + 0x64, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x04, 0x64, 0x61, + 0x74, 0x65, 0x12, 0x16, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0c, 0x48, 0x00, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x04, 0x62, 0x6f, + 0x6f, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x04, 0x62, 0x6f, 0x6f, 0x6c, + 0x12, 0x1c, 0x0a, 0x03, 0x73, 0x65, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, + 0x54, 0x65, 0x72, 0x6d, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x03, 0x73, 0x65, 0x74, 0x42, 0x09, + 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x24, 0x0a, 0x07, 0x54, 0x65, 0x72, + 0x6d, 0x53, 0x65, 0x74, 0x12, 0x19, 0x0a, 0x03, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x07, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x56, 0x32, 0x52, 0x03, 0x73, 0x65, 0x74, 0x22, + 0x25, 0x0a, 0x0c, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x56, 0x32, 0x12, + 0x15, 0x0a, 0x03, 0x6f, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x03, 0x2e, 0x4f, + 0x70, 0x52, 0x03, 0x6f, 0x70, 0x73, 0x22, 0x77, 0x0a, 0x02, 0x4f, 0x70, 0x12, 0x1f, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x54, 0x65, + 0x72, 0x6d, 0x56, 0x32, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x20, 0x0a, + 0x05, 0x75, 0x6e, 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x4f, + 0x70, 0x55, 0x6e, 0x61, 0x72, 0x79, 0x48, 0x00, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x72, 0x79, 0x12, + 0x23, 0x0a, 0x06, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x09, 0x2e, 0x4f, 0x70, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x48, 0x00, 0x52, 0x06, 0x42, 0x69, + 0x6e, 0x61, 0x72, 0x79, 0x42, 0x09, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, + 0x58, 0x0a, 0x07, 0x4f, 0x70, 0x55, 0x6e, 0x61, 0x72, 0x79, 0x12, 0x21, 0x0a, 0x04, 0x6b, 0x69, + 0x6e, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x4f, 0x70, 0x55, 0x6e, 0x61, + 0x72, 0x79, 0x2e, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0x2a, 0x0a, + 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x65, 0x67, 0x61, 0x74, 0x65, 0x10, + 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x73, 0x10, 0x01, 0x12, 0x0a, 0x0a, + 0x06, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x10, 0x02, 0x22, 0x89, 0x02, 0x0a, 0x08, 0x4f, 0x70, + 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x12, 0x22, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, + 0x20, 0x02, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x4f, 0x70, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x2e, + 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0xd8, 0x01, 0x0a, 0x04, 0x4b, + 0x69, 0x6e, 0x64, 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x65, 0x73, 0x73, 0x54, 0x68, 0x61, 0x6e, 0x10, + 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x47, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x54, 0x68, 0x61, 0x6e, + 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x4c, 0x65, 0x73, 0x73, 0x4f, 0x72, 0x45, 0x71, 0x75, 0x61, + 0x6c, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x47, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x4f, 0x72, + 0x45, 0x71, 0x75, 0x61, 0x6c, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x71, 0x75, 0x61, 0x6c, + 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x10, 0x05, + 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x10, 0x06, 0x12, 0x0a, 0x0a, 0x06, + 0x53, 0x75, 0x66, 0x66, 0x69, 0x78, 0x10, 0x07, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x65, 0x67, 0x65, + 0x78, 0x10, 0x08, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x64, 0x64, 0x10, 0x09, 0x12, 0x07, 0x0a, 0x03, + 0x53, 0x75, 0x62, 0x10, 0x0a, 0x12, 0x07, 0x0a, 0x03, 0x4d, 0x75, 0x6c, 0x10, 0x0b, 0x12, 0x07, + 0x0a, 0x03, 0x44, 0x69, 0x76, 0x10, 0x0c, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x6e, 0x64, 0x10, 0x0d, + 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x72, 0x10, 0x0e, 0x12, 0x10, 0x0a, 0x0c, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x0f, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x6e, + 0x69, 0x6f, 0x6e, 0x10, 0x10, 0x22, 0x6a, 0x0a, 0x06, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, + 0x21, 0x0a, 0x07, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x07, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x56, 0x32, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, 0x69, + 0x65, 0x73, 0x12, 0x20, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x0e, + 0x32, 0x0c, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, + 0x6b, 0x69, 0x6e, 0x64, 0x22, 0x1b, 0x0a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x09, 0x0a, 0x05, + 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x65, 0x6e, 0x79, 0x10, + 0x01, 0x22, 0xcd, 0x01, 0x0a, 0x12, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x72, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x79, 0x6d, 0x62, + 0x6f, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x73, 0x79, 0x6d, 0x62, 0x6f, + 0x6c, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x05, + 0x66, 0x61, 0x63, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x46, 0x61, + 0x63, 0x74, 0x56, 0x32, 0x52, 0x05, 0x66, 0x61, 0x63, 0x74, 0x73, 0x12, 0x1d, 0x0a, 0x05, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x52, 0x75, 0x6c, + 0x65, 0x56, 0x32, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x06, 0x63, 0x68, + 0x65, 0x63, 0x6b, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x56, 0x32, 0x52, 0x06, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x12, 0x23, 0x0a, 0x08, + 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, + 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, + 0x73, 0x22, 0x72, 0x0a, 0x16, 0x54, 0x68, 0x69, 0x72, 0x64, 0x50, 0x61, 0x72, 0x74, 0x79, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x0b, 0x70, + 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0b, + 0x32, 0x0a, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x0b, 0x70, 0x72, + 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x0a, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, + 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x4b, 0x65, 0x79, 0x73, 0x22, 0x75, 0x0a, 0x17, 0x54, 0x68, 0x69, 0x72, 0x64, 0x50, 0x61, + 0x72, 0x74, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, + 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, + 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x40, 0x0a, 0x11, 0x65, 0x78, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, + 0x02, 0x20, 0x02, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x11, 0x65, 0x78, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x42, 0x06, 0x5a, 0x04, + 0x2e, 0x3b, 0x70, 0x62, } var ( @@ -1577,65 +1950,79 @@ func file_biscuit_proto_rawDescGZIP() []byte { return file_biscuit_proto_rawDescData } -var file_biscuit_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_biscuit_proto_msgTypes = make([]protoimpl.MessageInfo, 17) +var file_biscuit_proto_enumTypes = make([]protoimpl.EnumInfo, 5) +var file_biscuit_proto_msgTypes = make([]protoimpl.MessageInfo, 21) var file_biscuit_proto_goTypes = []interface{}{ - (PublicKey_Algorithm)(0), // 0: PublicKey.Algorithm - (OpUnary_Kind)(0), // 1: OpUnary.Kind - (OpBinary_Kind)(0), // 2: OpBinary.Kind - (Policy_Kind)(0), // 3: Policy.Kind - (*Biscuit)(nil), // 4: Biscuit - (*SignedBlock)(nil), // 5: SignedBlock - (*PublicKey)(nil), // 6: PublicKey - (*Proof)(nil), // 7: Proof - (*Block)(nil), // 8: Block - (*FactV2)(nil), // 9: FactV2 - (*RuleV2)(nil), // 10: RuleV2 - (*CheckV2)(nil), // 11: CheckV2 - (*PredicateV2)(nil), // 12: PredicateV2 - (*TermV2)(nil), // 13: TermV2 - (*TermSet)(nil), // 14: TermSet - (*ExpressionV2)(nil), // 15: ExpressionV2 - (*Op)(nil), // 16: Op - (*OpUnary)(nil), // 17: OpUnary - (*OpBinary)(nil), // 18: OpBinary - (*Policy)(nil), // 19: Policy - (*AuthorizerPolicies)(nil), // 20: AuthorizerPolicies + (PublicKey_Algorithm)(0), // 0: PublicKey.Algorithm + (Scope_ScopeType)(0), // 1: Scope.ScopeType + (OpUnary_Kind)(0), // 2: OpUnary.Kind + (OpBinary_Kind)(0), // 3: OpBinary.Kind + (Policy_Kind)(0), // 4: Policy.Kind + (*Biscuit)(nil), // 5: Biscuit + (*SignedBlock)(nil), // 6: SignedBlock + (*ExternalSignature)(nil), // 7: ExternalSignature + (*PublicKey)(nil), // 8: PublicKey + (*Proof)(nil), // 9: Proof + (*Block)(nil), // 10: Block + (*Scope)(nil), // 11: Scope + (*FactV2)(nil), // 12: FactV2 + (*RuleV2)(nil), // 13: RuleV2 + (*CheckV2)(nil), // 14: CheckV2 + (*PredicateV2)(nil), // 15: PredicateV2 + (*TermV2)(nil), // 16: TermV2 + (*TermSet)(nil), // 17: TermSet + (*ExpressionV2)(nil), // 18: ExpressionV2 + (*Op)(nil), // 19: Op + (*OpUnary)(nil), // 20: OpUnary + (*OpBinary)(nil), // 21: OpBinary + (*Policy)(nil), // 22: Policy + (*AuthorizerPolicies)(nil), // 23: AuthorizerPolicies + (*ThirdPartyBlockRequest)(nil), // 24: ThirdPartyBlockRequest + (*ThirdPartyBlockContents)(nil), // 25: ThirdPartyBlockContents } var file_biscuit_proto_depIdxs = []int32{ - 5, // 0: Biscuit.authority:type_name -> SignedBlock - 5, // 1: Biscuit.blocks:type_name -> SignedBlock - 7, // 2: Biscuit.proof:type_name -> Proof - 6, // 3: SignedBlock.nextKey:type_name -> PublicKey - 0, // 4: PublicKey.algorithm:type_name -> PublicKey.Algorithm - 9, // 5: Block.facts_v2:type_name -> FactV2 - 10, // 6: Block.rules_v2:type_name -> RuleV2 - 11, // 7: Block.checks_v2:type_name -> CheckV2 - 12, // 8: FactV2.predicate:type_name -> PredicateV2 - 12, // 9: RuleV2.head:type_name -> PredicateV2 - 12, // 10: RuleV2.body:type_name -> PredicateV2 - 15, // 11: RuleV2.expressions:type_name -> ExpressionV2 - 10, // 12: CheckV2.queries:type_name -> RuleV2 - 13, // 13: PredicateV2.terms:type_name -> TermV2 - 14, // 14: TermV2.set:type_name -> TermSet - 13, // 15: TermSet.set:type_name -> TermV2 - 16, // 16: ExpressionV2.ops:type_name -> Op - 13, // 17: Op.value:type_name -> TermV2 - 17, // 18: Op.unary:type_name -> OpUnary - 18, // 19: Op.Binary:type_name -> OpBinary - 1, // 20: OpUnary.kind:type_name -> OpUnary.Kind - 2, // 21: OpBinary.kind:type_name -> OpBinary.Kind - 10, // 22: Policy.queries:type_name -> RuleV2 - 3, // 23: Policy.kind:type_name -> Policy.Kind - 9, // 24: AuthorizerPolicies.facts:type_name -> FactV2 - 10, // 25: AuthorizerPolicies.rules:type_name -> RuleV2 - 11, // 26: AuthorizerPolicies.checks:type_name -> CheckV2 - 19, // 27: AuthorizerPolicies.policies:type_name -> Policy - 28, // [28:28] is the sub-list for method output_type - 28, // [28:28] is the sub-list for method input_type - 28, // [28:28] is the sub-list for extension type_name - 28, // [28:28] is the sub-list for extension extendee - 0, // [0:28] is the sub-list for field type_name + 6, // 0: Biscuit.authority:type_name -> SignedBlock + 6, // 1: Biscuit.blocks:type_name -> SignedBlock + 9, // 2: Biscuit.proof:type_name -> Proof + 8, // 3: SignedBlock.nextKey:type_name -> PublicKey + 7, // 4: SignedBlock.externalSignature:type_name -> ExternalSignature + 8, // 5: ExternalSignature.publicKey:type_name -> PublicKey + 0, // 6: PublicKey.algorithm:type_name -> PublicKey.Algorithm + 12, // 7: Block.facts_v2:type_name -> FactV2 + 13, // 8: Block.rules_v2:type_name -> RuleV2 + 14, // 9: Block.checks_v2:type_name -> CheckV2 + 11, // 10: Block.scope:type_name -> Scope + 8, // 11: Block.publicKeys:type_name -> PublicKey + 1, // 12: Scope.scopeType:type_name -> Scope.ScopeType + 15, // 13: FactV2.predicate:type_name -> PredicateV2 + 15, // 14: RuleV2.head:type_name -> PredicateV2 + 15, // 15: RuleV2.body:type_name -> PredicateV2 + 18, // 16: RuleV2.expressions:type_name -> ExpressionV2 + 11, // 17: RuleV2.scope:type_name -> Scope + 13, // 18: CheckV2.queries:type_name -> RuleV2 + 16, // 19: PredicateV2.terms:type_name -> TermV2 + 17, // 20: TermV2.set:type_name -> TermSet + 16, // 21: TermSet.set:type_name -> TermV2 + 19, // 22: ExpressionV2.ops:type_name -> Op + 16, // 23: Op.value:type_name -> TermV2 + 20, // 24: Op.unary:type_name -> OpUnary + 21, // 25: Op.Binary:type_name -> OpBinary + 2, // 26: OpUnary.kind:type_name -> OpUnary.Kind + 3, // 27: OpBinary.kind:type_name -> OpBinary.Kind + 13, // 28: Policy.queries:type_name -> RuleV2 + 4, // 29: Policy.kind:type_name -> Policy.Kind + 12, // 30: AuthorizerPolicies.facts:type_name -> FactV2 + 13, // 31: AuthorizerPolicies.rules:type_name -> RuleV2 + 14, // 32: AuthorizerPolicies.checks:type_name -> CheckV2 + 22, // 33: AuthorizerPolicies.policies:type_name -> Policy + 8, // 34: ThirdPartyBlockRequest.previousKey:type_name -> PublicKey + 8, // 35: ThirdPartyBlockRequest.publicKeys:type_name -> PublicKey + 7, // 36: ThirdPartyBlockContents.externalSignature:type_name -> ExternalSignature + 37, // [37:37] is the sub-list for method output_type + 37, // [37:37] is the sub-list for method input_type + 37, // [37:37] is the sub-list for extension type_name + 37, // [37:37] is the sub-list for extension extendee + 0, // [0:37] is the sub-list for field type_name } func init() { file_biscuit_proto_init() } @@ -1669,7 +2056,7 @@ func file_biscuit_proto_init() { } } file_biscuit_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PublicKey); i { + switch v := v.(*ExternalSignature); i { case 0: return &v.state case 1: @@ -1681,7 +2068,7 @@ func file_biscuit_proto_init() { } } file_biscuit_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Proof); i { + switch v := v.(*PublicKey); i { case 0: return &v.state case 1: @@ -1693,7 +2080,7 @@ func file_biscuit_proto_init() { } } file_biscuit_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Block); i { + switch v := v.(*Proof); i { case 0: return &v.state case 1: @@ -1705,7 +2092,7 @@ func file_biscuit_proto_init() { } } file_biscuit_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FactV2); i { + switch v := v.(*Block); i { case 0: return &v.state case 1: @@ -1717,7 +2104,7 @@ func file_biscuit_proto_init() { } } file_biscuit_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RuleV2); i { + switch v := v.(*Scope); i { case 0: return &v.state case 1: @@ -1729,7 +2116,7 @@ func file_biscuit_proto_init() { } } file_biscuit_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CheckV2); i { + switch v := v.(*FactV2); i { case 0: return &v.state case 1: @@ -1741,7 +2128,7 @@ func file_biscuit_proto_init() { } } file_biscuit_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PredicateV2); i { + switch v := v.(*RuleV2); i { case 0: return &v.state case 1: @@ -1753,7 +2140,7 @@ func file_biscuit_proto_init() { } } file_biscuit_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TermV2); i { + switch v := v.(*CheckV2); i { case 0: return &v.state case 1: @@ -1765,7 +2152,7 @@ func file_biscuit_proto_init() { } } file_biscuit_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TermSet); i { + switch v := v.(*PredicateV2); i { case 0: return &v.state case 1: @@ -1777,7 +2164,7 @@ func file_biscuit_proto_init() { } } file_biscuit_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExpressionV2); i { + switch v := v.(*TermV2); i { case 0: return &v.state case 1: @@ -1789,7 +2176,7 @@ func file_biscuit_proto_init() { } } file_biscuit_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Op); i { + switch v := v.(*TermSet); i { case 0: return &v.state case 1: @@ -1801,7 +2188,7 @@ func file_biscuit_proto_init() { } } file_biscuit_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OpUnary); i { + switch v := v.(*ExpressionV2); i { case 0: return &v.state case 1: @@ -1813,7 +2200,7 @@ func file_biscuit_proto_init() { } } file_biscuit_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OpBinary); i { + switch v := v.(*Op); i { case 0: return &v.state case 1: @@ -1825,7 +2212,7 @@ func file_biscuit_proto_init() { } } file_biscuit_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Policy); i { + switch v := v.(*OpUnary); i { case 0: return &v.state case 1: @@ -1837,6 +2224,30 @@ func file_biscuit_proto_init() { } } file_biscuit_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OpBinary); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_biscuit_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Policy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_biscuit_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AuthorizerPolicies); i { case 0: return &v.state @@ -1848,12 +2259,40 @@ func file_biscuit_proto_init() { return nil } } + file_biscuit_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ThirdPartyBlockRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_biscuit_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ThirdPartyBlockContents); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } - file_biscuit_proto_msgTypes[3].OneofWrappers = []interface{}{ + file_biscuit_proto_msgTypes[4].OneofWrappers = []interface{}{ (*Proof_NextSecret)(nil), (*Proof_FinalSignature)(nil), } - file_biscuit_proto_msgTypes[9].OneofWrappers = []interface{}{ + file_biscuit_proto_msgTypes[6].OneofWrappers = []interface{}{ + (*Scope_ScopeType_)(nil), + (*Scope_Block)(nil), + } + file_biscuit_proto_msgTypes[11].OneofWrappers = []interface{}{ (*TermV2_Variable)(nil), (*TermV2_Integer)(nil), (*TermV2_String_)(nil), @@ -1862,7 +2301,7 @@ func file_biscuit_proto_init() { (*TermV2_Bool)(nil), (*TermV2_Set)(nil), } - file_biscuit_proto_msgTypes[12].OneofWrappers = []interface{}{ + file_biscuit_proto_msgTypes[14].OneofWrappers = []interface{}{ (*Op_Value)(nil), (*Op_Unary)(nil), (*Op_Binary)(nil), @@ -1872,8 +2311,8 @@ func file_biscuit_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_biscuit_proto_rawDesc, - NumEnums: 4, - NumMessages: 17, + NumEnums: 5, + NumMessages: 21, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/biscuit.proto b/pb/biscuit.proto index b443c32..f27f718 100644 --- a/pb/biscuit.proto +++ b/pb/biscuit.proto @@ -13,6 +13,12 @@ message SignedBlock { required bytes block = 1; required PublicKey nextKey = 2; required bytes signature = 3; + optional ExternalSignature externalSignature = 4; +} + +message ExternalSignature { + required bytes signature = 1; + required PublicKey publicKey = 2; } message PublicKey { @@ -40,6 +46,20 @@ message Block { repeated FactV2 facts_v2 = 4; repeated RuleV2 rules_v2 = 5; repeated CheckV2 checks_v2 = 6; + repeated Scope scope = 7; + repeated PublicKey publicKeys = 8; +} + +message Scope { + enum ScopeType { + Authority = 0; + Previous = 1; + } + + oneof Content { + ScopeType scopeType = 1; + int64 block = 2; + } } message FactV2 { @@ -50,6 +70,7 @@ message RuleV2 { required PredicateV2 head = 1; repeated PredicateV2 body = 2; repeated ExpressionV2 expressions = 3; + repeated Scope scope = 4; } message CheckV2 { @@ -141,3 +162,13 @@ message AuthorizerPolicies { repeated CheckV2 checks = 5; repeated Policy policies = 6; } + +message ThirdPartyBlockRequest { + required PublicKey previousKey = 1; + repeated PublicKey publicKeys = 2; +} + +message ThirdPartyBlockContents { + required bytes payload = 1; + required ExternalSignature externalSignature = 2; +} From 15aac87016a8f552de55c6145832a7e6a7998f8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Delafargue?= Date: Thu, 16 Jun 2022 01:08:03 +0200 Subject: [PATCH 2/2] 3rd party: verify third party signatures --- biscuit.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/biscuit.go b/biscuit.go index 7e02259..51b7fbb 100644 --- a/biscuit.go +++ b/biscuit.go @@ -290,6 +290,7 @@ func (b *Biscuit) Authorizer(root ed25519.PublicKey) (Authorizer, error) { } currentKey = b.container.Authority.NextKey.Key + currentAlgorithm := b.container.Authority.NextKey.Algorithm if len(currentKey) != 32 { return nil, ErrInvalidKeySize } @@ -308,7 +309,26 @@ func (b *Biscuit) Authorizer(root ed25519.PublicKey) (Authorizer, error) { return nil, ErrInvalidSignature } + if block.ExternalSignature != nil { + // an external signature is present, we need to verify it + if *block.ExternalSignature.PublicKey.Algorithm != pb.PublicKey_Ed25519 { + return nil, UnsupportedAlgorithm + } + + // the public key that's part of the signed block is the public key used to sign + // the previous block + algorithm := make([]byte, 4) + binary.LittleEndian.PutUint32(algorithm[0:], uint32(currentAlgorithm.Number())) + toVerify := append(block.Block[:], algorithm...) + toVerify = append(toVerify, currentKey[:]...) + + if ok := ed25519.Verify(block.ExternalSignature.PublicKey.Key, toVerify, block.ExternalSignature.Signature); !ok { + return nil, ErrInvalidSignature + } + } + currentKey = block.NextKey.Key + currentAlgorithm = block.NextKey.Algorithm if len(currentKey) != 32 { return nil, ErrInvalidKeySize }