-
Notifications
You must be signed in to change notification settings - Fork 5
/
limbo-schema.json
344 lines (344 loc) · 9.75 KB
/
limbo-schema.json
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
335
336
337
338
339
340
341
342
343
344
{
"$defs": {
"ExpectedResult": {
"description": "Represents an expected testcase evaluation result.",
"enum": [
"SUCCESS",
"FAILURE"
],
"title": "ExpectedResult",
"type": "string"
},
"Feature": {
"description": "Feature tags for testcases.",
"enum": [
"has-policy-constraints",
"has-cert-policies",
"no-cert-policies",
"pedantic-public-suffix-wildcard",
"name-constraint-dn",
"pedantic-webpki-subscriber-key",
"pedantic-webpki-eku",
"pedantic-serial-number",
"max-chain-depth",
"pedantic-rfc5280",
"rfc5280-incompatible-with-webpki",
"denial-of-service"
],
"title": "Feature",
"type": "string"
},
"Importance": {
"description": "A subjective ranking of a testcase's importance.",
"enum": [
"undetermined",
"low",
"medium",
"high",
"critical"
],
"title": "Importance",
"type": "string"
},
"KeyUsage": {
"description": "X.509 key usages.\n\nSee: https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.3",
"enum": [
"digitalSignature",
"contentCommitment",
"keyEncipherment",
"dataEncipherment",
"keyAgreement",
"keyCertSign",
"cRLSign",
"encipherOnly",
"decipherOnly"
],
"title": "KeyUsage",
"type": "string"
},
"KnownEKUs": {
"description": "Well-known extended key usages, from RFC 5280.\n\nSee: https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.12",
"enum": [
"anyExtendedKeyUsage",
"serverAuth",
"clientAuth",
"codeSigning",
"emailProtection",
"timeStamping",
"OCSPSigning"
],
"title": "KnownEKUs",
"type": "string"
},
"Limbo": {
"description": "The top-level testcase container.",
"properties": {
"version": {
"const": 1,
"description": "The limbo schema version; this must currently always be 1",
"title": "Version",
"type": "integer"
},
"testcases": {
"description": "One or more testcases in this testsuite",
"items": {
"$ref": "#/$defs/Testcase"
},
"title": "Testcases",
"type": "array"
}
},
"required": [
"version",
"testcases"
],
"title": "Limbo",
"type": "object"
},
"PeerKind": {
"description": "Different types of peer subjects.",
"enum": [
"RFC822",
"DNS",
"IP"
],
"title": "PeerKind",
"type": "string"
},
"PeerName": {
"description": "Represents a peer (i.e., end entity) certificate's name (Subject or SAN).",
"properties": {
"kind": {
"$ref": "#/$defs/PeerKind",
"description": "The kind of peer name"
},
"value": {
"description": "The peer's name",
"title": "Value",
"type": "string"
}
},
"required": [
"kind",
"value"
],
"title": "PeerName",
"type": "object"
},
"SignatureAlgorithm": {
"description": "Valid X.509 signature algorithms.",
"enum": [
"RSA_WITH_MD5",
"RSA_WITH_SHA1",
"RSA_WITH_SHA224",
"RSA_WITH_SHA256",
"RSA_WITH_SHA384",
"RSA_WITH_SHA512",
"RSA_WITH_SHA3_224",
"RSA_WITH_SHA3_256",
"RSA_WITH_SHA3_384",
"RSA_WITH_SHA3_512",
"RSASSA_PSS",
"ECDSA_WITH_SHA1",
"ECDSA_WITH_SHA224",
"ECDSA_WITH_SHA256",
"ECDSA_WITH_SHA384",
"ECDSA_WITH_SHA512",
"ECDSA_WITH_SHA3_224",
"ECDSA_WITH_SHA3_256",
"ECDSA_WITH_SHA3_384",
"ECDSA_WITH_SHA3_512",
"DSA_WITH_SHA1",
"DSA_WITH_SHA224",
"DSA_WITH_SHA256",
"DSA_WITH_SHA384",
"DSA_WITH_SHA512",
"ED25519",
"ED448",
"GOSTR3411_94_WITH_3410_2001",
"GOSTR3410_2012_WITH_3411_2012_256",
"GOSTR3410_2012_WITH_3411_2012_512"
],
"title": "SignatureAlgorithm",
"type": "string"
},
"Testcase": {
"description": "Represents an individual Limbo testcase.",
"properties": {
"id": {
"description": "A short, unique identifier for this testcase",
"pattern": "^([A-Za-z][A-Za-z0-9-.]+::)*([A-Za-z][A-Za-z0-9-.]+)$",
"title": "Id",
"type": "string"
},
"conflicts_with": {
"default": [],
"description": "A list of testcase IDs that this testcase is mutually incompatible with",
"items": {
"pattern": "^([A-Za-z][A-Za-z0-9-.]+::)*([A-Za-z][A-Za-z0-9-.]+)$",
"type": "string"
},
"title": "Conflicts With",
"type": "array"
},
"features": {
"default": [],
"description": "Zero or more human-readable tags that describe OPTIONAL functionality described by this testcase. Implementers should use this to specify testcases for non-mandatory X.509 behavior (like certificate policy validation) or for 'pedantic' cases. Consumers that don't understand a given feature should skip tests that are marked with it.",
"items": {
"$ref": "#/$defs/Feature"
},
"title": "Features",
"type": "array"
},
"importance": {
"$ref": "#/$defs/Importance",
"default": "undetermined",
"description": "The testcase's importance"
},
"description": {
"description": "A short, Markdown-formatted description",
"title": "Description",
"type": "string"
},
"validation_kind": {
"$ref": "#/$defs/ValidationKind",
"description": "The kind of validation to perform"
},
"trusted_certs": {
"description": "A list of PEM-encoded CA certificates to consider trusted",
"items": {
"type": "string"
},
"title": "Trusted Certs",
"type": "array"
},
"untrusted_intermediates": {
"description": "A list of PEM-encoded untrusted intermediates to use during path building",
"items": {
"type": "string"
},
"title": "Untrusted Intermediates",
"type": "array"
},
"peer_certificate": {
"description": "The PEM-encoded peer (EE) certificate",
"title": "Peer Certificate",
"type": "string"
},
"peer_certificate_key": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The PEM-encoded private key for the peer certificate, if present",
"title": "Peer Certificate Key"
},
"validation_time": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The time at which to perform the validation",
"title": "Validation Time"
},
"signature_algorithms": {
"description": "A list of acceptable signature algorithms to constrain against",
"items": {
"$ref": "#/$defs/SignatureAlgorithm"
},
"title": "Signature Algorithms",
"type": "array"
},
"key_usage": {
"description": "A constraining list of key usages",
"items": {
"$ref": "#/$defs/KeyUsage"
},
"title": "Key Usage",
"type": "array"
},
"extended_key_usage": {
"description": "A constraining list of extended key usages, either in well-known form or as OIDs",
"items": {
"$ref": "#/$defs/KnownEKUs"
},
"title": "Extended Key Usage",
"type": "array"
},
"expected_result": {
"$ref": "#/$defs/ExpectedResult",
"description": "The expected validation result"
},
"expected_peer_name": {
"anyOf": [
{
"$ref": "#/$defs/PeerName"
},
{
"type": "null"
}
],
"default": null,
"description": "For server (i.e. client-side) validation: the expected peer name, if any"
},
"expected_peer_names": {
"description": "For client (i.e. server-side) validation: the expected peer names",
"items": {
"$ref": "#/$defs/PeerName"
},
"title": "Expected Peer Names",
"type": "array"
},
"max_chain_depth": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "The maximum chain-building depth",
"title": "Max Chain Depth"
}
},
"required": [
"id",
"description",
"validation_kind",
"trusted_certs",
"untrusted_intermediates",
"peer_certificate",
"signature_algorithms",
"key_usage",
"extended_key_usage",
"expected_result",
"expected_peer_names"
],
"title": "Testcase",
"type": "object"
},
"ValidationKind": {
"description": "The kind of validation to perform.",
"enum": [
"CLIENT",
"SERVER"
],
"title": "ValidationKind",
"type": "string"
}
},
"title": "x509-limbo schemas"
}