1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Biscuit {
#[prost(uint32, optional, tag = "1")]
pub root_key_id: ::core::option::Option<u32>,
#[prost(message, required, tag = "2")]
pub authority: SignedBlock,
#[prost(message, repeated, tag = "3")]
pub blocks: ::prost::alloc::vec::Vec<SignedBlock>,
#[prost(message, required, tag = "4")]
pub proof: Proof,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SignedBlock {
#[prost(bytes = "vec", required, tag = "1")]
pub block: ::prost::alloc::vec::Vec<u8>,
#[prost(message, required, tag = "2")]
pub next_key: PublicKey,
#[prost(bytes = "vec", required, tag = "3")]
pub signature: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PublicKey {
#[prost(enumeration = "public_key::Algorithm", required, tag = "1")]
pub algorithm: i32,
#[prost(bytes = "vec", required, tag = "2")]
pub key: ::prost::alloc::vec::Vec<u8>,
}
pub mod public_key {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Algorithm {
Ed25519 = 0,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Proof {
#[prost(oneof = "proof::Content", tags = "1, 2")]
pub content: ::core::option::Option<proof::Content>,
}
pub mod proof {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Content {
#[prost(bytes, tag = "1")]
NextSecret(::prost::alloc::vec::Vec<u8>),
#[prost(bytes, tag = "2")]
FinalSignature(::prost::alloc::vec::Vec<u8>),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Block {
#[prost(string, repeated, tag = "1")]
pub symbols: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, optional, tag = "2")]
pub context: ::core::option::Option<::prost::alloc::string::String>,
#[prost(uint32, optional, tag = "3")]
pub version: ::core::option::Option<u32>,
#[prost(message, repeated, tag = "4")]
pub facts_v2: ::prost::alloc::vec::Vec<FactV2>,
#[prost(message, repeated, tag = "5")]
pub rules_v2: ::prost::alloc::vec::Vec<RuleV2>,
#[prost(message, repeated, tag = "6")]
pub checks_v2: ::prost::alloc::vec::Vec<CheckV2>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FactV2 {
#[prost(message, required, tag = "1")]
pub predicate: PredicateV2,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RuleV2 {
#[prost(message, required, tag = "1")]
pub head: PredicateV2,
#[prost(message, repeated, tag = "2")]
pub body: ::prost::alloc::vec::Vec<PredicateV2>,
#[prost(message, repeated, tag = "3")]
pub expressions: ::prost::alloc::vec::Vec<ExpressionV2>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckV2 {
#[prost(message, repeated, tag = "1")]
pub queries: ::prost::alloc::vec::Vec<RuleV2>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PredicateV2 {
#[prost(uint64, required, tag = "1")]
pub name: u64,
#[prost(message, repeated, tag = "2")]
pub terms: ::prost::alloc::vec::Vec<TermV2>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TermV2 {
#[prost(oneof = "term_v2::Content", tags = "1, 2, 3, 4, 5, 6, 7")]
pub content: ::core::option::Option<term_v2::Content>,
}
pub mod term_v2 {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Content {
#[prost(uint32, tag = "1")]
Variable(u32),
#[prost(int64, tag = "2")]
Integer(i64),
#[prost(uint64, tag = "3")]
String(u64),
#[prost(uint64, tag = "4")]
Date(u64),
#[prost(bytes, tag = "5")]
Bytes(::prost::alloc::vec::Vec<u8>),
#[prost(bool, tag = "6")]
Bool(bool),
#[prost(message, tag = "7")]
Set(super::TermSet),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TermSet {
#[prost(message, repeated, tag = "1")]
pub set: ::prost::alloc::vec::Vec<TermV2>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConstraintV2 {
#[prost(uint32, required, tag = "1")]
pub term: u32,
#[prost(oneof = "constraint_v2::Constraint", tags = "2, 3, 4, 5")]
pub constraint: ::core::option::Option<constraint_v2::Constraint>,
}
pub mod constraint_v2 {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Constraint {
#[prost(message, tag = "2")]
Int(super::IntConstraintV2),
#[prost(message, tag = "3")]
String(super::StringConstraintV2),
#[prost(message, tag = "4")]
Date(super::DateConstraintV2),
#[prost(message, tag = "5")]
Bytes(super::BytesConstraintV2),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IntConstraintV2 {
#[prost(oneof = "int_constraint_v2::Constraint", tags = "1, 2, 3, 4, 5, 6, 7")]
pub constraint: ::core::option::Option<int_constraint_v2::Constraint>,
}
pub mod int_constraint_v2 {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Constraint {
#[prost(int64, tag = "1")]
LessThan(i64),
#[prost(int64, tag = "2")]
GreaterThan(i64),
#[prost(int64, tag = "3")]
LessOrEqual(i64),
#[prost(int64, tag = "4")]
GreaterOrEqual(i64),
#[prost(int64, tag = "5")]
Equal(i64),
#[prost(message, tag = "6")]
InSet(super::IntSet),
#[prost(message, tag = "7")]
NotInSet(super::IntSet),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IntSet {
#[prost(int64, repeated, tag = "7")]
pub set: ::prost::alloc::vec::Vec<i64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StringConstraintV2 {
#[prost(oneof = "string_constraint_v2::Constraint", tags = "1, 2, 3, 4, 5, 6")]
pub constraint: ::core::option::Option<string_constraint_v2::Constraint>,
}
pub mod string_constraint_v2 {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Constraint {
#[prost(string, tag = "1")]
Prefix(::prost::alloc::string::String),
#[prost(string, tag = "2")]
Suffix(::prost::alloc::string::String),
#[prost(string, tag = "3")]
Equal(::prost::alloc::string::String),
#[prost(message, tag = "4")]
InSet(super::StringSet),
#[prost(message, tag = "5")]
NotInSet(super::StringSet),
#[prost(string, tag = "6")]
Regex(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StringSet {
#[prost(uint64, repeated, tag = "1")]
pub set: ::prost::alloc::vec::Vec<u64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DateConstraintV2 {
#[prost(oneof = "date_constraint_v2::Constraint", tags = "1, 2")]
pub constraint: ::core::option::Option<date_constraint_v2::Constraint>,
}
pub mod date_constraint_v2 {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Constraint {
#[prost(uint64, tag = "1")]
Before(u64),
#[prost(uint64, tag = "2")]
After(u64),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BytesConstraintV2 {
#[prost(oneof = "bytes_constraint_v2::Constraint", tags = "1, 2, 3")]
pub constraint: ::core::option::Option<bytes_constraint_v2::Constraint>,
}
pub mod bytes_constraint_v2 {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Constraint {
#[prost(bytes, tag = "1")]
Equal(::prost::alloc::vec::Vec<u8>),
#[prost(message, tag = "2")]
InSet(super::BytesSet),
#[prost(message, tag = "3")]
NotInSet(super::BytesSet),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BytesSet {
#[prost(bytes = "vec", repeated, tag = "1")]
pub set: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExpressionV2 {
#[prost(message, repeated, tag = "1")]
pub ops: ::prost::alloc::vec::Vec<Op>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Op {
#[prost(oneof = "op::Content", tags = "1, 2, 3")]
pub content: ::core::option::Option<op::Content>,
}
pub mod op {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Content {
#[prost(message, tag = "1")]
Value(super::TermV2),
#[prost(message, tag = "2")]
Unary(super::OpUnary),
#[prost(message, tag = "3")]
Binary(super::OpBinary),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OpUnary {
#[prost(enumeration = "op_unary::Kind", required, tag = "1")]
pub kind: i32,
}
pub mod op_unary {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Kind {
Negate = 0,
Parens = 1,
Length = 2,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OpBinary {
#[prost(enumeration = "op_binary::Kind", required, tag = "1")]
pub kind: i32,
}
pub mod op_binary {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Kind {
LessThan = 0,
GreaterThan = 1,
LessOrEqual = 2,
GreaterOrEqual = 3,
Equal = 4,
Contains = 5,
Prefix = 6,
Suffix = 7,
Regex = 8,
Add = 9,
Sub = 10,
Mul = 11,
Div = 12,
And = 13,
Or = 14,
Intersection = 15,
Union = 16,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Policy {
#[prost(message, repeated, tag = "1")]
pub queries: ::prost::alloc::vec::Vec<RuleV2>,
#[prost(enumeration = "policy::Kind", required, tag = "2")]
pub kind: i32,
}
pub mod policy {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Kind {
Allow = 0,
Deny = 1,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthorizerPolicies {
#[prost(string, repeated, tag = "1")]
pub symbols: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(uint32, optional, tag = "2")]
pub version: ::core::option::Option<u32>,
#[prost(message, repeated, tag = "3")]
pub facts: ::prost::alloc::vec::Vec<FactV2>,
#[prost(message, repeated, tag = "4")]
pub rules: ::prost::alloc::vec::Vec<RuleV2>,
#[prost(message, repeated, tag = "5")]
pub checks: ::prost::alloc::vec::Vec<CheckV2>,
#[prost(message, repeated, tag = "6")]
pub policies: ::prost::alloc::vec::Vec<Policy>,
}