cerbos 0.6.1 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +31 -2
- data/README.md +1 -1
- data/cerbos.gemspec +1 -1
- data/lib/cerbos/output/check_resources.rb +38 -3
- data/lib/cerbos/protobuf/cerbos/effect/v1/effect_pb.rb +24 -7
- data/lib/cerbos/protobuf/cerbos/engine/v1/engine_pb.rb +26 -44
- data/lib/cerbos/protobuf/cerbos/request/v1/request_pb.rb +26 -56
- data/lib/cerbos/protobuf/cerbos/response/v1/response_pb.rb +26 -72
- data/lib/cerbos/protobuf/cerbos/schema/v1/schema_pb.rb +24 -11
- data/lib/cerbos/protobuf/cerbos/svc/v1/svc_pb.rb +25 -2
- data/lib/cerbos/protobuf/cerbos/svc/v1/svc_services_pb.rb +4 -0
- data/lib/cerbos/protobuf/google/api/annotations_pb.rb +26 -2
- data/lib/cerbos/protobuf/google/api/field_behavior_pb.rb +24 -11
- data/lib/cerbos/protobuf/google/api/http_pb.rb +24 -19
- data/lib/cerbos/protobuf/protoc-gen-openapiv2/options/annotations_pb.rb +26 -2
- data/lib/cerbos/protobuf/protoc-gen-openapiv2/options/openapiv2_pb.rb +28 -165
- data/lib/cerbos/protobuf/validate/validate_pb.rb +26 -254
- data/lib/cerbos/version.rb +1 -1
- metadata +5 -5
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: validate/validate.proto
|
3
4
|
|
@@ -7,262 +8,33 @@ require 'google/protobuf/descriptor_pb'
|
|
7
8
|
require 'google/protobuf/duration_pb'
|
8
9
|
require 'google/protobuf/timestamp_pb'
|
9
10
|
|
10
|
-
|
11
|
-
add_file("validate/validate.proto", :syntax => :proto2) do
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
optional :any, :message, 20, "validate.AnyRules", json_name: "any"
|
34
|
-
optional :duration, :message, 21, "validate.DurationRules", json_name: "duration"
|
35
|
-
optional :timestamp, :message, 22, "validate.TimestampRules", json_name: "timestamp"
|
36
|
-
end
|
37
|
-
end
|
38
|
-
add_message "validate.FloatRules" do
|
39
|
-
optional :const, :float, 1, json_name: "const"
|
40
|
-
optional :lt, :float, 2, json_name: "lt"
|
41
|
-
optional :lte, :float, 3, json_name: "lte"
|
42
|
-
optional :gt, :float, 4, json_name: "gt"
|
43
|
-
optional :gte, :float, 5, json_name: "gte"
|
44
|
-
repeated :in, :float, 6, json_name: "in"
|
45
|
-
repeated :not_in, :float, 7, json_name: "notIn"
|
46
|
-
optional :ignore_empty, :bool, 8, json_name: "ignoreEmpty"
|
47
|
-
end
|
48
|
-
add_message "validate.DoubleRules" do
|
49
|
-
optional :const, :double, 1, json_name: "const"
|
50
|
-
optional :lt, :double, 2, json_name: "lt"
|
51
|
-
optional :lte, :double, 3, json_name: "lte"
|
52
|
-
optional :gt, :double, 4, json_name: "gt"
|
53
|
-
optional :gte, :double, 5, json_name: "gte"
|
54
|
-
repeated :in, :double, 6, json_name: "in"
|
55
|
-
repeated :not_in, :double, 7, json_name: "notIn"
|
56
|
-
optional :ignore_empty, :bool, 8, json_name: "ignoreEmpty"
|
57
|
-
end
|
58
|
-
add_message "validate.Int32Rules" do
|
59
|
-
optional :const, :int32, 1, json_name: "const"
|
60
|
-
optional :lt, :int32, 2, json_name: "lt"
|
61
|
-
optional :lte, :int32, 3, json_name: "lte"
|
62
|
-
optional :gt, :int32, 4, json_name: "gt"
|
63
|
-
optional :gte, :int32, 5, json_name: "gte"
|
64
|
-
repeated :in, :int32, 6, json_name: "in"
|
65
|
-
repeated :not_in, :int32, 7, json_name: "notIn"
|
66
|
-
optional :ignore_empty, :bool, 8, json_name: "ignoreEmpty"
|
67
|
-
end
|
68
|
-
add_message "validate.Int64Rules" do
|
69
|
-
optional :const, :int64, 1, json_name: "const"
|
70
|
-
optional :lt, :int64, 2, json_name: "lt"
|
71
|
-
optional :lte, :int64, 3, json_name: "lte"
|
72
|
-
optional :gt, :int64, 4, json_name: "gt"
|
73
|
-
optional :gte, :int64, 5, json_name: "gte"
|
74
|
-
repeated :in, :int64, 6, json_name: "in"
|
75
|
-
repeated :not_in, :int64, 7, json_name: "notIn"
|
76
|
-
optional :ignore_empty, :bool, 8, json_name: "ignoreEmpty"
|
77
|
-
end
|
78
|
-
add_message "validate.UInt32Rules" do
|
79
|
-
optional :const, :uint32, 1, json_name: "const"
|
80
|
-
optional :lt, :uint32, 2, json_name: "lt"
|
81
|
-
optional :lte, :uint32, 3, json_name: "lte"
|
82
|
-
optional :gt, :uint32, 4, json_name: "gt"
|
83
|
-
optional :gte, :uint32, 5, json_name: "gte"
|
84
|
-
repeated :in, :uint32, 6, json_name: "in"
|
85
|
-
repeated :not_in, :uint32, 7, json_name: "notIn"
|
86
|
-
optional :ignore_empty, :bool, 8, json_name: "ignoreEmpty"
|
87
|
-
end
|
88
|
-
add_message "validate.UInt64Rules" do
|
89
|
-
optional :const, :uint64, 1, json_name: "const"
|
90
|
-
optional :lt, :uint64, 2, json_name: "lt"
|
91
|
-
optional :lte, :uint64, 3, json_name: "lte"
|
92
|
-
optional :gt, :uint64, 4, json_name: "gt"
|
93
|
-
optional :gte, :uint64, 5, json_name: "gte"
|
94
|
-
repeated :in, :uint64, 6, json_name: "in"
|
95
|
-
repeated :not_in, :uint64, 7, json_name: "notIn"
|
96
|
-
optional :ignore_empty, :bool, 8, json_name: "ignoreEmpty"
|
97
|
-
end
|
98
|
-
add_message "validate.SInt32Rules" do
|
99
|
-
optional :const, :sint32, 1, json_name: "const"
|
100
|
-
optional :lt, :sint32, 2, json_name: "lt"
|
101
|
-
optional :lte, :sint32, 3, json_name: "lte"
|
102
|
-
optional :gt, :sint32, 4, json_name: "gt"
|
103
|
-
optional :gte, :sint32, 5, json_name: "gte"
|
104
|
-
repeated :in, :sint32, 6, json_name: "in"
|
105
|
-
repeated :not_in, :sint32, 7, json_name: "notIn"
|
106
|
-
optional :ignore_empty, :bool, 8, json_name: "ignoreEmpty"
|
107
|
-
end
|
108
|
-
add_message "validate.SInt64Rules" do
|
109
|
-
optional :const, :sint64, 1, json_name: "const"
|
110
|
-
optional :lt, :sint64, 2, json_name: "lt"
|
111
|
-
optional :lte, :sint64, 3, json_name: "lte"
|
112
|
-
optional :gt, :sint64, 4, json_name: "gt"
|
113
|
-
optional :gte, :sint64, 5, json_name: "gte"
|
114
|
-
repeated :in, :sint64, 6, json_name: "in"
|
115
|
-
repeated :not_in, :sint64, 7, json_name: "notIn"
|
116
|
-
optional :ignore_empty, :bool, 8, json_name: "ignoreEmpty"
|
117
|
-
end
|
118
|
-
add_message "validate.Fixed32Rules" do
|
119
|
-
optional :const, :fixed32, 1, json_name: "const"
|
120
|
-
optional :lt, :fixed32, 2, json_name: "lt"
|
121
|
-
optional :lte, :fixed32, 3, json_name: "lte"
|
122
|
-
optional :gt, :fixed32, 4, json_name: "gt"
|
123
|
-
optional :gte, :fixed32, 5, json_name: "gte"
|
124
|
-
repeated :in, :fixed32, 6, json_name: "in"
|
125
|
-
repeated :not_in, :fixed32, 7, json_name: "notIn"
|
126
|
-
optional :ignore_empty, :bool, 8, json_name: "ignoreEmpty"
|
127
|
-
end
|
128
|
-
add_message "validate.Fixed64Rules" do
|
129
|
-
optional :const, :fixed64, 1, json_name: "const"
|
130
|
-
optional :lt, :fixed64, 2, json_name: "lt"
|
131
|
-
optional :lte, :fixed64, 3, json_name: "lte"
|
132
|
-
optional :gt, :fixed64, 4, json_name: "gt"
|
133
|
-
optional :gte, :fixed64, 5, json_name: "gte"
|
134
|
-
repeated :in, :fixed64, 6, json_name: "in"
|
135
|
-
repeated :not_in, :fixed64, 7, json_name: "notIn"
|
136
|
-
optional :ignore_empty, :bool, 8, json_name: "ignoreEmpty"
|
137
|
-
end
|
138
|
-
add_message "validate.SFixed32Rules" do
|
139
|
-
optional :const, :sfixed32, 1, json_name: "const"
|
140
|
-
optional :lt, :sfixed32, 2, json_name: "lt"
|
141
|
-
optional :lte, :sfixed32, 3, json_name: "lte"
|
142
|
-
optional :gt, :sfixed32, 4, json_name: "gt"
|
143
|
-
optional :gte, :sfixed32, 5, json_name: "gte"
|
144
|
-
repeated :in, :sfixed32, 6, json_name: "in"
|
145
|
-
repeated :not_in, :sfixed32, 7, json_name: "notIn"
|
146
|
-
optional :ignore_empty, :bool, 8, json_name: "ignoreEmpty"
|
147
|
-
end
|
148
|
-
add_message "validate.SFixed64Rules" do
|
149
|
-
optional :const, :sfixed64, 1, json_name: "const"
|
150
|
-
optional :lt, :sfixed64, 2, json_name: "lt"
|
151
|
-
optional :lte, :sfixed64, 3, json_name: "lte"
|
152
|
-
optional :gt, :sfixed64, 4, json_name: "gt"
|
153
|
-
optional :gte, :sfixed64, 5, json_name: "gte"
|
154
|
-
repeated :in, :sfixed64, 6, json_name: "in"
|
155
|
-
repeated :not_in, :sfixed64, 7, json_name: "notIn"
|
156
|
-
optional :ignore_empty, :bool, 8, json_name: "ignoreEmpty"
|
157
|
-
end
|
158
|
-
add_message "validate.BoolRules" do
|
159
|
-
optional :const, :bool, 1, json_name: "const"
|
160
|
-
end
|
161
|
-
add_message "validate.StringRules" do
|
162
|
-
optional :const, :string, 1, json_name: "const"
|
163
|
-
optional :len, :uint64, 19, json_name: "len"
|
164
|
-
optional :min_len, :uint64, 2, json_name: "minLen"
|
165
|
-
optional :max_len, :uint64, 3, json_name: "maxLen"
|
166
|
-
optional :len_bytes, :uint64, 20, json_name: "lenBytes"
|
167
|
-
optional :min_bytes, :uint64, 4, json_name: "minBytes"
|
168
|
-
optional :max_bytes, :uint64, 5, json_name: "maxBytes"
|
169
|
-
optional :pattern, :string, 6, json_name: "pattern"
|
170
|
-
optional :prefix, :string, 7, json_name: "prefix"
|
171
|
-
optional :suffix, :string, 8, json_name: "suffix"
|
172
|
-
optional :contains, :string, 9, json_name: "contains"
|
173
|
-
optional :not_contains, :string, 23, json_name: "notContains"
|
174
|
-
repeated :in, :string, 10, json_name: "in"
|
175
|
-
repeated :not_in, :string, 11, json_name: "notIn"
|
176
|
-
optional :strict, :bool, 25, default: true, json_name: "strict"
|
177
|
-
optional :ignore_empty, :bool, 26, json_name: "ignoreEmpty"
|
178
|
-
oneof :well_known do
|
179
|
-
optional :email, :bool, 12, json_name: "email"
|
180
|
-
optional :hostname, :bool, 13, json_name: "hostname"
|
181
|
-
optional :ip, :bool, 14, json_name: "ip"
|
182
|
-
optional :ipv4, :bool, 15, json_name: "ipv4"
|
183
|
-
optional :ipv6, :bool, 16, json_name: "ipv6"
|
184
|
-
optional :uri, :bool, 17, json_name: "uri"
|
185
|
-
optional :uri_ref, :bool, 18, json_name: "uriRef"
|
186
|
-
optional :address, :bool, 21, json_name: "address"
|
187
|
-
optional :uuid, :bool, 22, json_name: "uuid"
|
188
|
-
optional :well_known_regex, :enum, 24, "validate.KnownRegex", json_name: "wellKnownRegex"
|
189
|
-
end
|
190
|
-
end
|
191
|
-
add_message "validate.BytesRules" do
|
192
|
-
optional :const, :bytes, 1, json_name: "const"
|
193
|
-
optional :len, :uint64, 13, json_name: "len"
|
194
|
-
optional :min_len, :uint64, 2, json_name: "minLen"
|
195
|
-
optional :max_len, :uint64, 3, json_name: "maxLen"
|
196
|
-
optional :pattern, :string, 4, json_name: "pattern"
|
197
|
-
optional :prefix, :bytes, 5, json_name: "prefix"
|
198
|
-
optional :suffix, :bytes, 6, json_name: "suffix"
|
199
|
-
optional :contains, :bytes, 7, json_name: "contains"
|
200
|
-
repeated :in, :bytes, 8, json_name: "in"
|
201
|
-
repeated :not_in, :bytes, 9, json_name: "notIn"
|
202
|
-
optional :ignore_empty, :bool, 14, json_name: "ignoreEmpty"
|
203
|
-
oneof :well_known do
|
204
|
-
optional :ip, :bool, 10, json_name: "ip"
|
205
|
-
optional :ipv4, :bool, 11, json_name: "ipv4"
|
206
|
-
optional :ipv6, :bool, 12, json_name: "ipv6"
|
207
|
-
end
|
208
|
-
end
|
209
|
-
add_message "validate.EnumRules" do
|
210
|
-
optional :const, :int32, 1, json_name: "const"
|
211
|
-
optional :defined_only, :bool, 2, json_name: "definedOnly"
|
212
|
-
repeated :in, :int32, 3, json_name: "in"
|
213
|
-
repeated :not_in, :int32, 4, json_name: "notIn"
|
214
|
-
end
|
215
|
-
add_message "validate.MessageRules" do
|
216
|
-
optional :skip, :bool, 1, json_name: "skip"
|
217
|
-
optional :required, :bool, 2, json_name: "required"
|
218
|
-
end
|
219
|
-
add_message "validate.RepeatedRules" do
|
220
|
-
optional :min_items, :uint64, 1, json_name: "minItems"
|
221
|
-
optional :max_items, :uint64, 2, json_name: "maxItems"
|
222
|
-
optional :unique, :bool, 3, json_name: "unique"
|
223
|
-
optional :items, :message, 4, "validate.FieldRules", json_name: "items"
|
224
|
-
optional :ignore_empty, :bool, 5, json_name: "ignoreEmpty"
|
225
|
-
end
|
226
|
-
add_message "validate.MapRules" do
|
227
|
-
optional :min_pairs, :uint64, 1, json_name: "minPairs"
|
228
|
-
optional :max_pairs, :uint64, 2, json_name: "maxPairs"
|
229
|
-
optional :no_sparse, :bool, 3, json_name: "noSparse"
|
230
|
-
optional :keys, :message, 4, "validate.FieldRules", json_name: "keys"
|
231
|
-
optional :values, :message, 5, "validate.FieldRules", json_name: "values"
|
232
|
-
optional :ignore_empty, :bool, 6, json_name: "ignoreEmpty"
|
233
|
-
end
|
234
|
-
add_message "validate.AnyRules" do
|
235
|
-
optional :required, :bool, 1, json_name: "required"
|
236
|
-
repeated :in, :string, 2, json_name: "in"
|
237
|
-
repeated :not_in, :string, 3, json_name: "notIn"
|
238
|
-
end
|
239
|
-
add_message "validate.DurationRules" do
|
240
|
-
optional :required, :bool, 1, json_name: "required"
|
241
|
-
optional :const, :message, 2, "google.protobuf.Duration", json_name: "const"
|
242
|
-
optional :lt, :message, 3, "google.protobuf.Duration", json_name: "lt"
|
243
|
-
optional :lte, :message, 4, "google.protobuf.Duration", json_name: "lte"
|
244
|
-
optional :gt, :message, 5, "google.protobuf.Duration", json_name: "gt"
|
245
|
-
optional :gte, :message, 6, "google.protobuf.Duration", json_name: "gte"
|
246
|
-
repeated :in, :message, 7, "google.protobuf.Duration", json_name: "in"
|
247
|
-
repeated :not_in, :message, 8, "google.protobuf.Duration", json_name: "notIn"
|
248
|
-
end
|
249
|
-
add_message "validate.TimestampRules" do
|
250
|
-
optional :required, :bool, 1, json_name: "required"
|
251
|
-
optional :const, :message, 2, "google.protobuf.Timestamp", json_name: "const"
|
252
|
-
optional :lt, :message, 3, "google.protobuf.Timestamp", json_name: "lt"
|
253
|
-
optional :lte, :message, 4, "google.protobuf.Timestamp", json_name: "lte"
|
254
|
-
optional :gt, :message, 5, "google.protobuf.Timestamp", json_name: "gt"
|
255
|
-
optional :gte, :message, 6, "google.protobuf.Timestamp", json_name: "gte"
|
256
|
-
optional :lt_now, :bool, 7, json_name: "ltNow"
|
257
|
-
optional :gt_now, :bool, 8, json_name: "gtNow"
|
258
|
-
optional :within, :message, 9, "google.protobuf.Duration", json_name: "within"
|
259
|
-
end
|
260
|
-
add_enum "validate.KnownRegex" do
|
261
|
-
value :UNKNOWN, 0
|
262
|
-
value :HTTP_HEADER_NAME, 1
|
263
|
-
value :HTTP_HEADER_VALUE, 2
|
11
|
+
|
12
|
+
descriptor_data = "\n\x17validate/validate.proto\x12\x08validate\x1a google/protobuf/descriptor.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc8\x08\n\nFieldRules\x12\x30\n\x07message\x18\x11 \x01(\x0b\x32\x16.validate.MessageRulesR\x07message\x12,\n\x05\x66loat\x18\x01 \x01(\x0b\x32\x14.validate.FloatRulesH\x00R\x05\x66loat\x12/\n\x06\x64ouble\x18\x02 \x01(\x0b\x32\x15.validate.DoubleRulesH\x00R\x06\x64ouble\x12,\n\x05int32\x18\x03 \x01(\x0b\x32\x14.validate.Int32RulesH\x00R\x05int32\x12,\n\x05int64\x18\x04 \x01(\x0b\x32\x14.validate.Int64RulesH\x00R\x05int64\x12/\n\x06uint32\x18\x05 \x01(\x0b\x32\x15.validate.UInt32RulesH\x00R\x06uint32\x12/\n\x06uint64\x18\x06 \x01(\x0b\x32\x15.validate.UInt64RulesH\x00R\x06uint64\x12/\n\x06sint32\x18\x07 \x01(\x0b\x32\x15.validate.SInt32RulesH\x00R\x06sint32\x12/\n\x06sint64\x18\x08 \x01(\x0b\x32\x15.validate.SInt64RulesH\x00R\x06sint64\x12\x32\n\x07\x66ixed32\x18\t \x01(\x0b\x32\x16.validate.Fixed32RulesH\x00R\x07\x66ixed32\x12\x32\n\x07\x66ixed64\x18\n \x01(\x0b\x32\x16.validate.Fixed64RulesH\x00R\x07\x66ixed64\x12\x35\n\x08sfixed32\x18\x0b \x01(\x0b\x32\x17.validate.SFixed32RulesH\x00R\x08sfixed32\x12\x35\n\x08sfixed64\x18\x0c \x01(\x0b\x32\x17.validate.SFixed64RulesH\x00R\x08sfixed64\x12)\n\x04\x62ool\x18\r \x01(\x0b\x32\x13.validate.BoolRulesH\x00R\x04\x62ool\x12/\n\x06string\x18\x0e \x01(\x0b\x32\x15.validate.StringRulesH\x00R\x06string\x12,\n\x05\x62ytes\x18\x0f \x01(\x0b\x32\x14.validate.BytesRulesH\x00R\x05\x62ytes\x12)\n\x04\x65num\x18\x10 \x01(\x0b\x32\x13.validate.EnumRulesH\x00R\x04\x65num\x12\x35\n\x08repeated\x18\x12 \x01(\x0b\x32\x17.validate.RepeatedRulesH\x00R\x08repeated\x12&\n\x03map\x18\x13 \x01(\x0b\x32\x12.validate.MapRulesH\x00R\x03map\x12&\n\x03\x61ny\x18\x14 \x01(\x0b\x32\x12.validate.AnyRulesH\x00R\x03\x61ny\x12\x35\n\x08\x64uration\x18\x15 \x01(\x0b\x32\x17.validate.DurationRulesH\x00R\x08\x64uration\x12\x38\n\ttimestamp\x18\x16 \x01(\x0b\x32\x18.validate.TimestampRulesH\x00R\ttimestampB\x06\n\x04type\"\xb0\x01\n\nFloatRules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x02R\x05\x63onst\x12\x0e\n\x02lt\x18\x02 \x01(\x02R\x02lt\x12\x10\n\x03lte\x18\x03 \x01(\x02R\x03lte\x12\x0e\n\x02gt\x18\x04 \x01(\x02R\x02gt\x12\x10\n\x03gte\x18\x05 \x01(\x02R\x03gte\x12\x0e\n\x02in\x18\x06 \x03(\x02R\x02in\x12\x15\n\x06not_in\x18\x07 \x03(\x02R\x05notIn\x12!\n\x0cignore_empty\x18\x08 \x01(\x08R\x0bignoreEmpty\"\xb1\x01\n\x0b\x44oubleRules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x01R\x05\x63onst\x12\x0e\n\x02lt\x18\x02 \x01(\x01R\x02lt\x12\x10\n\x03lte\x18\x03 \x01(\x01R\x03lte\x12\x0e\n\x02gt\x18\x04 \x01(\x01R\x02gt\x12\x10\n\x03gte\x18\x05 \x01(\x01R\x03gte\x12\x0e\n\x02in\x18\x06 \x03(\x01R\x02in\x12\x15\n\x06not_in\x18\x07 \x03(\x01R\x05notIn\x12!\n\x0cignore_empty\x18\x08 \x01(\x08R\x0bignoreEmpty\"\xb0\x01\n\nInt32Rules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x05R\x05\x63onst\x12\x0e\n\x02lt\x18\x02 \x01(\x05R\x02lt\x12\x10\n\x03lte\x18\x03 \x01(\x05R\x03lte\x12\x0e\n\x02gt\x18\x04 \x01(\x05R\x02gt\x12\x10\n\x03gte\x18\x05 \x01(\x05R\x03gte\x12\x0e\n\x02in\x18\x06 \x03(\x05R\x02in\x12\x15\n\x06not_in\x18\x07 \x03(\x05R\x05notIn\x12!\n\x0cignore_empty\x18\x08 \x01(\x08R\x0bignoreEmpty\"\xb0\x01\n\nInt64Rules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x03R\x05\x63onst\x12\x0e\n\x02lt\x18\x02 \x01(\x03R\x02lt\x12\x10\n\x03lte\x18\x03 \x01(\x03R\x03lte\x12\x0e\n\x02gt\x18\x04 \x01(\x03R\x02gt\x12\x10\n\x03gte\x18\x05 \x01(\x03R\x03gte\x12\x0e\n\x02in\x18\x06 \x03(\x03R\x02in\x12\x15\n\x06not_in\x18\x07 \x03(\x03R\x05notIn\x12!\n\x0cignore_empty\x18\x08 \x01(\x08R\x0bignoreEmpty\"\xb1\x01\n\x0bUInt32Rules\x12\x14\n\x05\x63onst\x18\x01 \x01(\rR\x05\x63onst\x12\x0e\n\x02lt\x18\x02 \x01(\rR\x02lt\x12\x10\n\x03lte\x18\x03 \x01(\rR\x03lte\x12\x0e\n\x02gt\x18\x04 \x01(\rR\x02gt\x12\x10\n\x03gte\x18\x05 \x01(\rR\x03gte\x12\x0e\n\x02in\x18\x06 \x03(\rR\x02in\x12\x15\n\x06not_in\x18\x07 \x03(\rR\x05notIn\x12!\n\x0cignore_empty\x18\x08 \x01(\x08R\x0bignoreEmpty\"\xb1\x01\n\x0bUInt64Rules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x04R\x05\x63onst\x12\x0e\n\x02lt\x18\x02 \x01(\x04R\x02lt\x12\x10\n\x03lte\x18\x03 \x01(\x04R\x03lte\x12\x0e\n\x02gt\x18\x04 \x01(\x04R\x02gt\x12\x10\n\x03gte\x18\x05 \x01(\x04R\x03gte\x12\x0e\n\x02in\x18\x06 \x03(\x04R\x02in\x12\x15\n\x06not_in\x18\x07 \x03(\x04R\x05notIn\x12!\n\x0cignore_empty\x18\x08 \x01(\x08R\x0bignoreEmpty\"\xb1\x01\n\x0bSInt32Rules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x11R\x05\x63onst\x12\x0e\n\x02lt\x18\x02 \x01(\x11R\x02lt\x12\x10\n\x03lte\x18\x03 \x01(\x11R\x03lte\x12\x0e\n\x02gt\x18\x04 \x01(\x11R\x02gt\x12\x10\n\x03gte\x18\x05 \x01(\x11R\x03gte\x12\x0e\n\x02in\x18\x06 \x03(\x11R\x02in\x12\x15\n\x06not_in\x18\x07 \x03(\x11R\x05notIn\x12!\n\x0cignore_empty\x18\x08 \x01(\x08R\x0bignoreEmpty\"\xb1\x01\n\x0bSInt64Rules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x12R\x05\x63onst\x12\x0e\n\x02lt\x18\x02 \x01(\x12R\x02lt\x12\x10\n\x03lte\x18\x03 \x01(\x12R\x03lte\x12\x0e\n\x02gt\x18\x04 \x01(\x12R\x02gt\x12\x10\n\x03gte\x18\x05 \x01(\x12R\x03gte\x12\x0e\n\x02in\x18\x06 \x03(\x12R\x02in\x12\x15\n\x06not_in\x18\x07 \x03(\x12R\x05notIn\x12!\n\x0cignore_empty\x18\x08 \x01(\x08R\x0bignoreEmpty\"\xb2\x01\n\x0c\x46ixed32Rules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x07R\x05\x63onst\x12\x0e\n\x02lt\x18\x02 \x01(\x07R\x02lt\x12\x10\n\x03lte\x18\x03 \x01(\x07R\x03lte\x12\x0e\n\x02gt\x18\x04 \x01(\x07R\x02gt\x12\x10\n\x03gte\x18\x05 \x01(\x07R\x03gte\x12\x0e\n\x02in\x18\x06 \x03(\x07R\x02in\x12\x15\n\x06not_in\x18\x07 \x03(\x07R\x05notIn\x12!\n\x0cignore_empty\x18\x08 \x01(\x08R\x0bignoreEmpty\"\xb2\x01\n\x0c\x46ixed64Rules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x06R\x05\x63onst\x12\x0e\n\x02lt\x18\x02 \x01(\x06R\x02lt\x12\x10\n\x03lte\x18\x03 \x01(\x06R\x03lte\x12\x0e\n\x02gt\x18\x04 \x01(\x06R\x02gt\x12\x10\n\x03gte\x18\x05 \x01(\x06R\x03gte\x12\x0e\n\x02in\x18\x06 \x03(\x06R\x02in\x12\x15\n\x06not_in\x18\x07 \x03(\x06R\x05notIn\x12!\n\x0cignore_empty\x18\x08 \x01(\x08R\x0bignoreEmpty\"\xb3\x01\n\rSFixed32Rules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x0fR\x05\x63onst\x12\x0e\n\x02lt\x18\x02 \x01(\x0fR\x02lt\x12\x10\n\x03lte\x18\x03 \x01(\x0fR\x03lte\x12\x0e\n\x02gt\x18\x04 \x01(\x0fR\x02gt\x12\x10\n\x03gte\x18\x05 \x01(\x0fR\x03gte\x12\x0e\n\x02in\x18\x06 \x03(\x0fR\x02in\x12\x15\n\x06not_in\x18\x07 \x03(\x0fR\x05notIn\x12!\n\x0cignore_empty\x18\x08 \x01(\x08R\x0bignoreEmpty\"\xb3\x01\n\rSFixed64Rules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x10R\x05\x63onst\x12\x0e\n\x02lt\x18\x02 \x01(\x10R\x02lt\x12\x10\n\x03lte\x18\x03 \x01(\x10R\x03lte\x12\x0e\n\x02gt\x18\x04 \x01(\x10R\x02gt\x12\x10\n\x03gte\x18\x05 \x01(\x10R\x03gte\x12\x0e\n\x02in\x18\x06 \x03(\x10R\x02in\x12\x15\n\x06not_in\x18\x07 \x03(\x10R\x05notIn\x12!\n\x0cignore_empty\x18\x08 \x01(\x08R\x0bignoreEmpty\"!\n\tBoolRules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x08R\x05\x63onst\"\xd4\x05\n\x0bStringRules\x12\x14\n\x05\x63onst\x18\x01 \x01(\tR\x05\x63onst\x12\x10\n\x03len\x18\x13 \x01(\x04R\x03len\x12\x17\n\x07min_len\x18\x02 \x01(\x04R\x06minLen\x12\x17\n\x07max_len\x18\x03 \x01(\x04R\x06maxLen\x12\x1b\n\tlen_bytes\x18\x14 \x01(\x04R\x08lenBytes\x12\x1b\n\tmin_bytes\x18\x04 \x01(\x04R\x08minBytes\x12\x1b\n\tmax_bytes\x18\x05 \x01(\x04R\x08maxBytes\x12\x18\n\x07pattern\x18\x06 \x01(\tR\x07pattern\x12\x16\n\x06prefix\x18\x07 \x01(\tR\x06prefix\x12\x16\n\x06suffix\x18\x08 \x01(\tR\x06suffix\x12\x1a\n\x08\x63ontains\x18\t \x01(\tR\x08\x63ontains\x12!\n\x0cnot_contains\x18\x17 \x01(\tR\x0bnotContains\x12\x0e\n\x02in\x18\n \x03(\tR\x02in\x12\x15\n\x06not_in\x18\x0b \x03(\tR\x05notIn\x12\x16\n\x05\x65mail\x18\x0c \x01(\x08H\x00R\x05\x65mail\x12\x1c\n\x08hostname\x18\r \x01(\x08H\x00R\x08hostname\x12\x10\n\x02ip\x18\x0e \x01(\x08H\x00R\x02ip\x12\x14\n\x04ipv4\x18\x0f \x01(\x08H\x00R\x04ipv4\x12\x14\n\x04ipv6\x18\x10 \x01(\x08H\x00R\x04ipv6\x12\x12\n\x03uri\x18\x11 \x01(\x08H\x00R\x03uri\x12\x19\n\x07uri_ref\x18\x12 \x01(\x08H\x00R\x06uriRef\x12\x1a\n\x07\x61\x64\x64ress\x18\x15 \x01(\x08H\x00R\x07\x61\x64\x64ress\x12\x14\n\x04uuid\x18\x16 \x01(\x08H\x00R\x04uuid\x12@\n\x10well_known_regex\x18\x18 \x01(\x0e\x32\x14.validate.KnownRegexH\x00R\x0ewellKnownRegex\x12\x1c\n\x06strict\x18\x19 \x01(\x08:\x04trueR\x06strict\x12!\n\x0cignore_empty\x18\x1a \x01(\x08R\x0bignoreEmptyB\x0c\n\nwell_known\"\xe2\x02\n\nBytesRules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x0cR\x05\x63onst\x12\x10\n\x03len\x18\r \x01(\x04R\x03len\x12\x17\n\x07min_len\x18\x02 \x01(\x04R\x06minLen\x12\x17\n\x07max_len\x18\x03 \x01(\x04R\x06maxLen\x12\x18\n\x07pattern\x18\x04 \x01(\tR\x07pattern\x12\x16\n\x06prefix\x18\x05 \x01(\x0cR\x06prefix\x12\x16\n\x06suffix\x18\x06 \x01(\x0cR\x06suffix\x12\x1a\n\x08\x63ontains\x18\x07 \x01(\x0cR\x08\x63ontains\x12\x0e\n\x02in\x18\x08 \x03(\x0cR\x02in\x12\x15\n\x06not_in\x18\t \x03(\x0cR\x05notIn\x12\x10\n\x02ip\x18\n \x01(\x08H\x00R\x02ip\x12\x14\n\x04ipv4\x18\x0b \x01(\x08H\x00R\x04ipv4\x12\x14\n\x04ipv6\x18\x0c \x01(\x08H\x00R\x04ipv6\x12!\n\x0cignore_empty\x18\x0e \x01(\x08R\x0bignoreEmptyB\x0c\n\nwell_known\"k\n\tEnumRules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x05R\x05\x63onst\x12!\n\x0c\x64\x65\x66ined_only\x18\x02 \x01(\x08R\x0b\x64\x65\x66inedOnly\x12\x0e\n\x02in\x18\x03 \x03(\x05R\x02in\x12\x15\n\x06not_in\x18\x04 \x03(\x05R\x05notIn\">\n\x0cMessageRules\x12\x12\n\x04skip\x18\x01 \x01(\x08R\x04skip\x12\x1a\n\x08required\x18\x02 \x01(\x08R\x08required\"\xb0\x01\n\rRepeatedRules\x12\x1b\n\tmin_items\x18\x01 \x01(\x04R\x08minItems\x12\x1b\n\tmax_items\x18\x02 \x01(\x04R\x08maxItems\x12\x16\n\x06unique\x18\x03 \x01(\x08R\x06unique\x12*\n\x05items\x18\x04 \x01(\x0b\x32\x14.validate.FieldRulesR\x05items\x12!\n\x0cignore_empty\x18\x05 \x01(\x08R\x0bignoreEmpty\"\xdc\x01\n\x08MapRules\x12\x1b\n\tmin_pairs\x18\x01 \x01(\x04R\x08minPairs\x12\x1b\n\tmax_pairs\x18\x02 \x01(\x04R\x08maxPairs\x12\x1b\n\tno_sparse\x18\x03 \x01(\x08R\x08noSparse\x12(\n\x04keys\x18\x04 \x01(\x0b\x32\x14.validate.FieldRulesR\x04keys\x12,\n\x06values\x18\x05 \x01(\x0b\x32\x14.validate.FieldRulesR\x06values\x12!\n\x0cignore_empty\x18\x06 \x01(\x08R\x0bignoreEmpty\"M\n\x08\x41nyRules\x12\x1a\n\x08required\x18\x01 \x01(\x08R\x08required\x12\x0e\n\x02in\x18\x02 \x03(\tR\x02in\x12\x15\n\x06not_in\x18\x03 \x03(\tR\x05notIn\"\xe9\x02\n\rDurationRules\x12\x1a\n\x08required\x18\x01 \x01(\x08R\x08required\x12/\n\x05\x63onst\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationR\x05\x63onst\x12)\n\x02lt\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationR\x02lt\x12+\n\x03lte\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationR\x03lte\x12)\n\x02gt\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationR\x02gt\x12+\n\x03gte\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationR\x03gte\x12)\n\x02in\x18\x07 \x03(\x0b\x32\x19.google.protobuf.DurationR\x02in\x12\x30\n\x06not_in\x18\x08 \x03(\x0b\x32\x19.google.protobuf.DurationR\x05notIn\"\xf3\x02\n\x0eTimestampRules\x12\x1a\n\x08required\x18\x01 \x01(\x08R\x08required\x12\x30\n\x05\x63onst\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x05\x63onst\x12*\n\x02lt\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x02lt\x12,\n\x03lte\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x03lte\x12*\n\x02gt\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x02gt\x12,\n\x03gte\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x03gte\x12\x15\n\x06lt_now\x18\x07 \x01(\x08R\x05ltNow\x12\x15\n\x06gt_now\x18\x08 \x01(\x08R\x05gtNow\x12\x31\n\x06within\x18\t \x01(\x0b\x32\x19.google.protobuf.DurationR\x06within*F\n\nKnownRegex\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x14\n\x10HTTP_HEADER_NAME\x10\x01\x12\x15\n\x11HTTP_HEADER_VALUE\x10\x02:J\n\x05rules\x12\x1d.google.protobuf.FieldOptions\x18\xaf\x08 \x01(\x0b\x32\x14.validate.FieldRulesR\x05rulesBP\n\x1aio.envoyproxy.pgv.validateZ2github.com/envoyproxy/protoc-gen-validate/validate"
|
13
|
+
|
14
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
15
|
+
|
16
|
+
begin
|
17
|
+
pool.add_serialized_file(descriptor_data)
|
18
|
+
rescue TypeError => e
|
19
|
+
# Compatibility code: will be removed in the next major version.
|
20
|
+
require 'google/protobuf/descriptor_pb'
|
21
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
22
|
+
parsed.clear_dependency
|
23
|
+
serialized = parsed.class.encode(parsed)
|
24
|
+
file = pool.add_serialized_file(serialized)
|
25
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
26
|
+
imports = [
|
27
|
+
["google.protobuf.Duration", "google/protobuf/duration.proto"],
|
28
|
+
["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
|
29
|
+
]
|
30
|
+
imports.each do |type_name, expected_filename|
|
31
|
+
import_file = pool.lookup(type_name).file_descriptor
|
32
|
+
if import_file.name != expected_filename
|
33
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
264
34
|
end
|
265
35
|
end
|
36
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
37
|
+
warn "This will become an error in the next major version."
|
266
38
|
end
|
267
39
|
|
268
40
|
module Cerbos::Protobuf::Validate
|
data/lib/cerbos/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cerbos
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cerbos
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: grpc
|
@@ -77,7 +77,7 @@ licenses:
|
|
77
77
|
metadata:
|
78
78
|
bug_tracker_uri: https://github.com/cerbos/cerbos-sdk-ruby/issues
|
79
79
|
changelog_uri: https://github.com/cerbos/cerbos-sdk-ruby/blob/main/CHANGELOG.md
|
80
|
-
documentation_uri: https://www.rubydoc.info/gems/cerbos/0.
|
80
|
+
documentation_uri: https://www.rubydoc.info/gems/cerbos/0.7.0
|
81
81
|
homepage_uri: https://github.com/cerbos/cerbos-sdk-ruby
|
82
82
|
source_code_uri: https://github.com/cerbos/cerbos-sdk-ruby
|
83
83
|
rubygems_mfa_required: 'true'
|
@@ -89,14 +89,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
89
89
|
requirements:
|
90
90
|
- - ">="
|
91
91
|
- !ruby/object:Gem::Version
|
92
|
-
version:
|
92
|
+
version: 3.0.0
|
93
93
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
95
|
- - ">="
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: '0'
|
98
98
|
requirements: []
|
99
|
-
rubygems_version: 3.4.
|
99
|
+
rubygems_version: 3.4.13
|
100
100
|
signing_key:
|
101
101
|
specification_version: 4
|
102
102
|
summary: Client library for authorization via Cerbos
|