-
Notifications
You must be signed in to change notification settings - Fork 0
/
santander-cryptographic-properties-0.3.schema.json
470 lines (470 loc) · 18.9 KB
/
santander-cryptographic-properties-0.3.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
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Santander's Cryptographic Object Validator for CMDB - CycloneDX 1.6 version compatible",
"description": "Extra validations for a certificate object based in CycloneDX 1.6 CBOM definition",
"type": "object",
"required": ["metadata", "components"],
"properties": {
"metadata": {
"type": "object",
"title": "BOM Metadata Object",
"required": ["timestamp","component","properties"],
"additionalProperties": false,
"properties":{
"timestamp": {
"type": "string",
"format": "date-time",
"title": "The timestamp of the asset creation"
},
"component": {
"type": "object",
"required": [
"type",
"name",
"cryptoProperties",
"hashes"
],
"hashes": {
"type": "array",
"title": "The fingerprint(s) of the certificate",
"minItems": 1
},
"properties": {
"cryptoProperties": {
"properties": {
"certificateProperties": {
"properties": {
"certificateFormat": {
"type": "string",
"enum": [
"X.509v3",
"X.509v2",
"X.509",
"CVC"
]
}
}
}
}
},
"properties": {
"type": "array",
"minItems": 1,
"items": {
"oneOf": [
{ "$ref": "#/definitions/serialNumber40" },
{ "$ref": "#/definitions/state" },
{ "$ref": "#/definitions/x509v3ext_basicConstraints_CA" },
{ "$ref": "#/definitions/x509v3ext_keyUsage" },
{ "$ref": "#/definitions/x509v3ext_extendedKeyUsage" },
{ "$ref": "#/definitions/x509v3ext_subjectAlternativeName" },
{ "$ref": "#/definitions/x509v3ext_authorityKeyIdentifier" },
{ "$ref": "#/definitions/x509v3ext_subjectKeyIdentifier" },
{ "$ref": "#/definitions/x509v3ext_authorityInformationAccess" },
{ "$ref": "#/definitions/x509v3ext_certificatePolicies" },
{ "$ref": "#/definitions/x509v3ext_crlDistributionPoints" },
{ "$ref": "#/definitions/signatureAlgorithms" },
{ "$ref": "#/definitions/certificateEncoding" },
{ "$ref": "#/definitions/tacticalKeys" }
]
},
"required": ["serialNumber"]
}
}
},
"properties": {
"type": "array",
"minItems": 1,
"items": {
"oneOf": [
{ "$ref": "#/definitions/keyProperties" },
{ "$ref": "#/definitions/certificateManagementProperties" }
]
}
}
}
},
"components": {
"type": "array",
"minItems": 1,
"items": {
"oneOf": [
{"$ref": "#/definitions/applicationRef"},
{"$ref": "#/definitions/keyRef"}
]
}
}
},
"definitions": {
"20BytesHex":{
"type": "string",
"definition": "A 20 bytes number, represented as an hexadecimal string, with or without bytes separators (:)",
"examples": [
"18:C9:09:8E:06:01:9C:25:AF:B5:A3:DB:C0:C9:91:C8:F5:62:1C:C1",
"18C9098E06019C25AFB5A3DBC0C991C8F5621CC1"
],
"pattern": "^(([0-9a-fA-F]{2}:){19}[0-9a-fA-F]{2})|([0-9a-fA-F]{40})$"
},
"keyProperties": {
"type": "object",
"properties": {
"purpose": {
"type": "string",
"title": "The usage of the key",
"enum": [
"Master Key File (MFK)",
"Platform Master Key (PMK)",
"Futurex Token Key (FTK)",
"Key Exchange Key (KEK)",
"Backup Encryption Key (BEK)",
"Local Master Key (LMK)",
"Zone Master Key (ZMK) and KEK",
"Terminal Master Key (TMK)",
"Terminal Pin Key (TPK)",
"Card Verification Key (CVK)",
"Card Verification Value 1 (CVV1)",
"Card Verification Value 2 (CVV2)",
"Integrated Circuit Card Verification Value (ICVV)",
"Cardholder Authentication Verification Value (CAVV)",
"Zone Pin Key (ZPK)",
"Master Derivation Key (MDK) - (Auth/Mac/Enc)",
"Unique DEA Key (UDK) - (Auth/Mac/Enc)",
"Pin Verification Key (PVK)",
"Database Master Key",
"Session Key"
]
}
},
"required": ["purpose"]
},
"certificateManagementProperties": {
"type": "object",
"oneOf": [
{ "$ref": "#/definitions/managementDate" },
{ "$ref": "#/definitions/revocationReason" }
],
"additionalItems": false
},
"applicationRef": {
"type": "object",
"title": "Reference of the application in CMDB. Possibly with an empty reference",
"properties": {
"type": {
"type": "string",
"pattern": "^application$"
},
"name": {
"type": "string"
},
"bom-ref": {
"type": "string"
}
},
"required": ["type"]
},
"keyRef": {
"type": "object",
"title": "Reference to a key. Mainly used to validate the algorithm part. Possibly with an empty reference",
"properties":{
"properties": {
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"pattern": "^crypto-asset$"
},
"algorithm": {
"type": "string",
"title": "The algorithm used to generate this key",
"enum": [
"ML-DSA",
"SLH-DSA",
"ECDSA",
"EdDSA",
"RSA",
"DSA"
]
}
}
}
}
},
"required": ["type", "properties"]
},
"serialNumber40": {
"type": "object",
"title": "The serial number of the certificate",
"definition": "A 40 character hexadecimal string. May be in groups of bytes separated by colons, or not",
"properties": {
"name": {
"type": "string",
"pattern": "^serialNumber$"
},
"value": {
"$ref":"#/definitions/20BytesHex"
}
}
},
"state": {
"type": "object",
"title": "The state of the certificate",
"properties":{
"name": {
"type": "string",
"title": "The name of the state",
"pattern": "^state$"
},
"value": {
"type": "string",
"title": "The state of the certificate",
"description": "Possible states for a certificate. Differs from NIST's key states because of the revoked state. A revocation may be or not because of being compromised (there can also be administrative reasons)",
"enum": [
"pre-operational",
"operational",
"retired",
"suspended",
"revoked",
"destroyed"
]
}
}
},
"managementDate": {
"type": "object",
"title": "Some of the management dates for the certificate",
"properties":{
"name": {
"type": "string",
"title": "The name of the date",
"enum": [
"receivedDate",
"updatedDate",
"installedDate",
"availableDate",
"removalDate",
"revocationDate"
]
},
"value": {
"type": "string",
"title": "The date of the event",
"format": "date-time"
}
}
},
"revocationReason":{
"type": "object",
"title": "The reason for which the certificate was revoked",
"properties": {
"name": {
"type": "string",
"title": "The name of the reason",
"pattern": "^revocationReason$"
},
"value": {
"type": "string",
"title": "The reason for which the certificate was revoked",
"enum": [
"keyCompromise",
"administrativeReason"
]
}
}
},
"x509v3ext_basicConstraints_CA": {
"type": "object",
"title": "Basic Constraints - CA",
"description": "Specifies wether a certificate can be used as a CA certificate or not",
"properties":{
"name": {
"type": "string",
"pattern": "^x509v3ext_basicConstraints_CA$"
},
"value": {
"type": "string",
"title": "The boolean indicating wether the certificate can be used as a CA or not",
"definition": "Created as a string due to CBOM restrictions for the extende properties",
"enum": [
"true",
"false"
]
}
}
},
"x509v3ext_keyUsage": {
"type": "object",
"title": "Extended Property: Key Usage",
"description": "Specifies the allowed uses of the public key in the certificate",
"properties":{
"name": {
"type": "string",
"pattern": "^x509v3ext_keyUsage$"
},
"value": {
"type": "string",
"title": "List of possible key ussages",
"examples": ["Digital signature, Key encipherment"]
}
}
},
"x509v3ext_extendedKeyUsage": {
"type": "object",
"title": "Extended Property: Extended key Usage",
"description": "Specifies the additional purposes for which the public key can be used",
"properties":{
"name": {
"type": "string",
"pattern": "^x509v3ext_extendedKeyUsage$"
},
"value": {
"type": "string",
"title": "List of possible extended key ussages",
"examples": ["TLS web server authentication"]
}
}
},
"x509v3ext_subjectAlternativeName": {
"type": "object",
"title": "Extended Property: Subject Alternative Name",
"description": "Allows inclusion of additional names to identify the entity associated with the certificate",
"properties":{
"name": {
"type": "string",
"pattern": "^x509v3ext_subjectAlternativeName$"
},
"value": {
"type": "string",
"title": "List of possible names to identify the entity associated with the certificate",
"examples": ["DNS:test.participate.preprod.fdefi.co.uk"]
}
}
},
"x509v3ext_authorityKeyIdentifier": {
"type": "object",
"title": "Extended Property: Authority Key Identifier",
"description": "Identifies the public key of the CA that issued the certificate",
"properties":{
"name": {
"type": "string",
"pattern": "^x509v3ext_authorityKeyIdentifier$"
},
"value": {
"$ref":"#/definitions/20BytesHex"
}
}
},
"x509v3ext_subjectKeyIdentifier": {
"type": "object",
"title": "Extended Property: Subject key Identifier",
"description": "Identifies the public key associated with the entity the certificate was issued to",
"properties":{
"name": {
"type": "string",
"pattern": "^x509v3ext_subjectKeyIdentifier$"
},
"value": {
"$ref":"#/definitions/20BytesHex"
}
}
},
"x509v3ext_authorityInformationAccess": {
"type": "object",
"title": "Extended Property: Authority Information Access (AIA)",
"description": "Contains CA issuers and OCSP information",
"properties":{
"name": {
"type": "string",
"pattern": "^x509v3ext_authorityInformationAccess$"
},
"value": {
"type": "string",
"example": "CA Issuers - URI:http://crl.non-prod-pki.fdefi.co.uk/tlsR1/cert.cer"
}
}
},
"x509v3ext_certificatePolicies": {
"type": "object",
"title": "Extended Property: Certificate Policies",
"description": "Defines the policies under which the certificate was issued and can be used",
"properties":{
"name": {
"type": "string",
"pattern": "^x509v3ext_certificatePolicies$"
},
"value": {
"type": "string",
"example": "CPS: http://crlCA.gsnetclout.com/pki/InternalCPS.txt"
}
}
},
"x509v3ext_crlDistributionPoints": {
"type": "object",
"title": "Extended Property: CRL Distribution Points",
"description": "Contains one or more URLs where a Certificate Revocation List (CRL) can be obtained",
"properties":{
"name": {
"type": "string",
"pattern": "^x509v3ext_crlDistributionPoints$"
},
"value": {
"type": "string",
"example": "URI:http://crlCA.cloud.corp/pki/Santander%20CA%20Root(2).crt, URI:http://crlCA.gsnetcloud.com/pki/Santander%20CA%20Root(2).crt"
}
}
},
"signatureAlgorithms": {
"type": "object",
"title": "List of signature algorithms, split by commas",
"description": "Contains one or more (for hybrid certs) signature algorithms",
"properties":{
"name": {
"type": "string",
"pattern": "^signatureAlgorithms$"
},
"value": {
"type": "string",
"example": "ecdsa-with-SHA256, sha256WithRSAEncryption"
}
}
},
"certificateEncoding": {
"type": "object",
"title": "Certificate Encoding",
"description": "Encoding used to deliver the certificate",
"properties":{
"name": {
"type": "string",
"pattern": "^certificateEncoding$"
},
"value": {
"type": "string",
"enum": [
"PEM",
"PKCS#7/P7B",
"DER",
"PKCS#12/PFX"
]
}
}
},
"tacticalKeys": {
"type": "object",
"title": "Tactical Keys definition",
"description": "List of possible keys, split by commas. Tactical solution until we get keys inventoried. Values are not validated at this level because it is a temporary solution. The goal is to use the components array to link to all the necessary keys there",
"properties":{
"name": {
"type": "string",
"pattern": "^keys$"
},
"value": {
"type": "string",
"example": "224-255 bits - EdDSA, 4096 - DSA"
}
}
}
}
}