@sphereon/ssi-sdk.kms-rest-client 0.34.1-feature.SSISDK.70.integrate.digidentity.307 → 0.34.1-feature.SSISDK.70.integrate.digidentity.311
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +341 -114
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +130 -109
- package/dist/index.d.ts +130 -109
- package/dist/index.js +341 -114
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/plugin.schema.json +259 -95
- package/src/agent/KmsRestClient.ts +59 -47
- package/src/types/IKmsRestClient.ts +44 -61
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ var plugin_schema_default = {
|
|
|
6
6
|
IKmsRestClient: {
|
|
7
7
|
components: {
|
|
8
8
|
schemas: {
|
|
9
|
-
|
|
9
|
+
KmsClientCreateRawSignatureArgs: {
|
|
10
10
|
type: "object",
|
|
11
11
|
additionalProperties: false,
|
|
12
12
|
properties: {
|
|
@@ -20,7 +20,10 @@ var plugin_schema_default = {
|
|
|
20
20
|
type: "string"
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
|
-
required: [
|
|
23
|
+
required: [
|
|
24
|
+
"input",
|
|
25
|
+
"keyInfo"
|
|
26
|
+
]
|
|
24
27
|
},
|
|
25
28
|
KeyInfo: {
|
|
26
29
|
type: "object",
|
|
@@ -161,28 +164,56 @@ var plugin_schema_default = {
|
|
|
161
164
|
description: "X.509 certificate SHA-256 thumbprint (base64url-encoded)."
|
|
162
165
|
}
|
|
163
166
|
},
|
|
164
|
-
required: [
|
|
167
|
+
required: [
|
|
168
|
+
"kty"
|
|
169
|
+
],
|
|
165
170
|
additionalProperties: false,
|
|
166
171
|
description: "Represents a JSON Web Key (JWK) as defined by the JSON Web Key specification."
|
|
167
172
|
},
|
|
168
173
|
JwkKeyType: {
|
|
169
174
|
type: "string",
|
|
170
|
-
enum: [
|
|
175
|
+
enum: [
|
|
176
|
+
"EC",
|
|
177
|
+
"RSA",
|
|
178
|
+
"OKP",
|
|
179
|
+
"oct"
|
|
180
|
+
],
|
|
171
181
|
description: "JSON Web Key (JWK) key type parameter identifying the cryptographic algorithm family."
|
|
172
182
|
},
|
|
173
183
|
JwkUse: {
|
|
174
184
|
type: "string",
|
|
175
|
-
enum: [
|
|
185
|
+
enum: [
|
|
186
|
+
"sig",
|
|
187
|
+
"enc"
|
|
188
|
+
],
|
|
176
189
|
description: "Intended use of the key (signing or encryption)."
|
|
177
190
|
},
|
|
178
191
|
KeyOperations: {
|
|
179
192
|
type: "string",
|
|
180
|
-
enum: [
|
|
193
|
+
enum: [
|
|
194
|
+
"sign",
|
|
195
|
+
"verify",
|
|
196
|
+
"encrypt",
|
|
197
|
+
"decrypt",
|
|
198
|
+
"wrapKey",
|
|
199
|
+
"unwrapKey",
|
|
200
|
+
"deriveKey",
|
|
201
|
+
"deriveBits"
|
|
202
|
+
],
|
|
181
203
|
description: "Specific operations the key is intended for."
|
|
182
204
|
},
|
|
183
205
|
Curve: {
|
|
184
206
|
type: "string",
|
|
185
|
-
enum: [
|
|
207
|
+
enum: [
|
|
208
|
+
"P-256",
|
|
209
|
+
"P-384",
|
|
210
|
+
"P-521",
|
|
211
|
+
"secp256k1",
|
|
212
|
+
"Ed25519",
|
|
213
|
+
"Ed448",
|
|
214
|
+
"X25519",
|
|
215
|
+
"X448"
|
|
216
|
+
],
|
|
186
217
|
description: "Elliptic curve identifier."
|
|
187
218
|
},
|
|
188
219
|
SignatureAlgorithm: {
|
|
@@ -205,17 +236,27 @@ var plugin_schema_default = {
|
|
|
205
236
|
},
|
|
206
237
|
KeyVisibility: {
|
|
207
238
|
type: "string",
|
|
208
|
-
enum: [
|
|
239
|
+
enum: [
|
|
240
|
+
"PUBLIC",
|
|
241
|
+
"PRIVATE"
|
|
242
|
+
],
|
|
209
243
|
description: "Indicates the visibility status of a cryptographic key."
|
|
210
244
|
},
|
|
211
245
|
KeyType: {
|
|
212
246
|
type: "string",
|
|
213
|
-
enum: [
|
|
247
|
+
enum: [
|
|
248
|
+
"OKP",
|
|
249
|
+
"EC",
|
|
250
|
+
"RSA"
|
|
251
|
+
],
|
|
214
252
|
description: "Cryptographic key type identifier."
|
|
215
253
|
},
|
|
216
254
|
KeyEncoding: {
|
|
217
255
|
type: "string",
|
|
218
|
-
enum: [
|
|
256
|
+
enum: [
|
|
257
|
+
"COSE",
|
|
258
|
+
"JOSE"
|
|
259
|
+
],
|
|
219
260
|
description: "The encoding format of the cryptographic key."
|
|
220
261
|
},
|
|
221
262
|
CreateRawSignatureResponse: {
|
|
@@ -226,11 +267,13 @@ var plugin_schema_default = {
|
|
|
226
267
|
description: "The created signature encoded as a base64 string."
|
|
227
268
|
}
|
|
228
269
|
},
|
|
229
|
-
required: [
|
|
270
|
+
required: [
|
|
271
|
+
"signature"
|
|
272
|
+
],
|
|
230
273
|
additionalProperties: false,
|
|
231
274
|
description: "Response body containing the created signature."
|
|
232
275
|
},
|
|
233
|
-
|
|
276
|
+
KmsClientDeleteKeyArgs: {
|
|
234
277
|
type: "object",
|
|
235
278
|
properties: {
|
|
236
279
|
baseUrl: {
|
|
@@ -240,9 +283,12 @@ var plugin_schema_default = {
|
|
|
240
283
|
type: "string"
|
|
241
284
|
}
|
|
242
285
|
},
|
|
286
|
+
required: [
|
|
287
|
+
"aliasOrKid"
|
|
288
|
+
],
|
|
243
289
|
additionalProperties: false
|
|
244
290
|
},
|
|
245
|
-
|
|
291
|
+
KmsClientGenerateKeyArgs: {
|
|
246
292
|
type: "object",
|
|
247
293
|
additionalProperties: false,
|
|
248
294
|
properties: {
|
|
@@ -271,6 +317,19 @@ var plugin_schema_default = {
|
|
|
271
317
|
}
|
|
272
318
|
}
|
|
273
319
|
},
|
|
320
|
+
GenerateKeyResponse: {
|
|
321
|
+
type: "object",
|
|
322
|
+
properties: {
|
|
323
|
+
keyPair: {
|
|
324
|
+
$ref: "#/components/schemas/ManagedKeyPair"
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
required: [
|
|
328
|
+
"keyPair"
|
|
329
|
+
],
|
|
330
|
+
additionalProperties: false,
|
|
331
|
+
description: "Response body containing a generated key pair."
|
|
332
|
+
},
|
|
274
333
|
ManagedKeyPair: {
|
|
275
334
|
type: "object",
|
|
276
335
|
properties: {
|
|
@@ -293,7 +352,12 @@ var plugin_schema_default = {
|
|
|
293
352
|
$ref: "#/components/schemas/JoseKeyPair"
|
|
294
353
|
}
|
|
295
354
|
},
|
|
296
|
-
required: [
|
|
355
|
+
required: [
|
|
356
|
+
"providerId",
|
|
357
|
+
"alias",
|
|
358
|
+
"cose",
|
|
359
|
+
"jose"
|
|
360
|
+
],
|
|
297
361
|
additionalProperties: false,
|
|
298
362
|
description: "Represents a key pair used by a crypto provider, encapsulating both JOSE and COSE key pairs."
|
|
299
363
|
},
|
|
@@ -307,7 +371,9 @@ var plugin_schema_default = {
|
|
|
307
371
|
$ref: "#/components/schemas/CoseKey"
|
|
308
372
|
}
|
|
309
373
|
},
|
|
310
|
-
required: [
|
|
374
|
+
required: [
|
|
375
|
+
"publicCoseKey"
|
|
376
|
+
],
|
|
311
377
|
additionalProperties: false,
|
|
312
378
|
description: "Represents a cryptographic key pair for COSE (CBOR Object Signing and Encryption) operations."
|
|
313
379
|
},
|
|
@@ -360,13 +426,20 @@ var plugin_schema_default = {
|
|
|
360
426
|
description: "X.509 certificate chain as base64-encoded certificates."
|
|
361
427
|
}
|
|
362
428
|
},
|
|
363
|
-
required: [
|
|
429
|
+
required: [
|
|
430
|
+
"kty"
|
|
431
|
+
],
|
|
364
432
|
additionalProperties: false,
|
|
365
433
|
description: "Represents a COSE (CBOR Object Signing and Encryption) key in JSON format."
|
|
366
434
|
},
|
|
367
435
|
CoseKeyType: {
|
|
368
436
|
type: "number",
|
|
369
|
-
enum: [
|
|
437
|
+
enum: [
|
|
438
|
+
1,
|
|
439
|
+
2,
|
|
440
|
+
3,
|
|
441
|
+
4
|
|
442
|
+
],
|
|
370
443
|
description: "COSE key type parameter. 1=OKP (Octet Key Pair), 2=EC2 (Elliptic Curve), 3=RSA, 4=Symmetric."
|
|
371
444
|
},
|
|
372
445
|
JoseKeyPair: {
|
|
@@ -379,11 +452,13 @@ var plugin_schema_default = {
|
|
|
379
452
|
$ref: "#/components/schemas/Jwk"
|
|
380
453
|
}
|
|
381
454
|
},
|
|
382
|
-
required: [
|
|
455
|
+
required: [
|
|
456
|
+
"publicJwk"
|
|
457
|
+
],
|
|
383
458
|
additionalProperties: false,
|
|
384
459
|
description: "Data class representing a cryptographic key pair used with JOSE (JSON Object Signing and Encryption)."
|
|
385
460
|
},
|
|
386
|
-
|
|
461
|
+
KmsClientGetKeyArgs: {
|
|
387
462
|
type: "object",
|
|
388
463
|
properties: {
|
|
389
464
|
baseUrl: {
|
|
@@ -393,9 +468,24 @@ var plugin_schema_default = {
|
|
|
393
468
|
type: "string"
|
|
394
469
|
}
|
|
395
470
|
},
|
|
396
|
-
required: [
|
|
471
|
+
required: [
|
|
472
|
+
"aliasOrKid"
|
|
473
|
+
],
|
|
397
474
|
additionalProperties: false
|
|
398
475
|
},
|
|
476
|
+
GetKeyResponse: {
|
|
477
|
+
type: "object",
|
|
478
|
+
properties: {
|
|
479
|
+
keyInfo: {
|
|
480
|
+
$ref: "#/components/schemas/ManagedKeyInfo"
|
|
481
|
+
}
|
|
482
|
+
},
|
|
483
|
+
required: [
|
|
484
|
+
"keyInfo"
|
|
485
|
+
],
|
|
486
|
+
additionalProperties: false,
|
|
487
|
+
description: "Response body containing a managed key."
|
|
488
|
+
},
|
|
399
489
|
ManagedKeyInfo: {
|
|
400
490
|
type: "object",
|
|
401
491
|
properties: {
|
|
@@ -441,11 +531,15 @@ var plugin_schema_default = {
|
|
|
441
531
|
description: "Additional configuration options as key-value pairs."
|
|
442
532
|
}
|
|
443
533
|
},
|
|
444
|
-
required: [
|
|
534
|
+
required: [
|
|
535
|
+
"key",
|
|
536
|
+
"alias",
|
|
537
|
+
"providerId"
|
|
538
|
+
],
|
|
445
539
|
additionalProperties: false,
|
|
446
540
|
description: "Represents a managed cryptographic key information that is guaranteed to be present and resolved, part of a KMS providing concrete access to the key."
|
|
447
541
|
},
|
|
448
|
-
|
|
542
|
+
KmsClientGetKeyProviderArgs: {
|
|
449
543
|
type: "object",
|
|
450
544
|
properties: {
|
|
451
545
|
baseUrl: {
|
|
@@ -455,6 +549,9 @@ var plugin_schema_default = {
|
|
|
455
549
|
type: "string"
|
|
456
550
|
}
|
|
457
551
|
},
|
|
552
|
+
required: [
|
|
553
|
+
"providerId"
|
|
554
|
+
],
|
|
458
555
|
additionalProperties: false
|
|
459
556
|
},
|
|
460
557
|
KeyProviderResponse: {
|
|
@@ -468,16 +565,23 @@ var plugin_schema_default = {
|
|
|
468
565
|
$ref: "#/components/schemas/KeyProviderType"
|
|
469
566
|
}
|
|
470
567
|
},
|
|
471
|
-
required: [
|
|
568
|
+
required: [
|
|
569
|
+
"providerId",
|
|
570
|
+
"type"
|
|
571
|
+
],
|
|
472
572
|
additionalProperties: false,
|
|
473
573
|
description: "Response body containing the details of a Key Provider instance."
|
|
474
574
|
},
|
|
475
575
|
KeyProviderType: {
|
|
476
576
|
type: "string",
|
|
477
|
-
enum: [
|
|
577
|
+
enum: [
|
|
578
|
+
"SOFTWARE",
|
|
579
|
+
"AZURE_KEYVAULT",
|
|
580
|
+
"AWS_KMS"
|
|
581
|
+
],
|
|
478
582
|
description: "The type of Key Provider. Determines the required configuration settings. - AZURE_KEYVAULT: Microsoft Azure Key Vault or Managed HSM. - AWS_KMS: Amazon Web Services Key Management Service."
|
|
479
583
|
},
|
|
480
|
-
|
|
584
|
+
kmsClientGetResolverArgs: {
|
|
481
585
|
type: "object",
|
|
482
586
|
properties: {
|
|
483
587
|
baseUrl: {
|
|
@@ -487,7 +591,9 @@ var plugin_schema_default = {
|
|
|
487
591
|
type: "string"
|
|
488
592
|
}
|
|
489
593
|
},
|
|
490
|
-
required: [
|
|
594
|
+
required: [
|
|
595
|
+
"resolverId"
|
|
596
|
+
],
|
|
491
597
|
additionalProperties: false
|
|
492
598
|
},
|
|
493
599
|
Resolver: {
|
|
@@ -512,16 +618,24 @@ var plugin_schema_default = {
|
|
|
512
618
|
description: "List of key types supported by this resolver."
|
|
513
619
|
}
|
|
514
620
|
},
|
|
515
|
-
required: [
|
|
621
|
+
required: [
|
|
622
|
+
"resolverId"
|
|
623
|
+
],
|
|
516
624
|
additionalProperties: false,
|
|
517
625
|
description: "Represents a key resolver configuration."
|
|
518
626
|
},
|
|
519
627
|
IdentifierMethod: {
|
|
520
628
|
type: "string",
|
|
521
|
-
enum: [
|
|
629
|
+
enum: [
|
|
630
|
+
"JWK",
|
|
631
|
+
"KID",
|
|
632
|
+
"COSE_KEY",
|
|
633
|
+
"X5C",
|
|
634
|
+
"DID"
|
|
635
|
+
],
|
|
522
636
|
description: "Method used to identify cryptographic keys."
|
|
523
637
|
},
|
|
524
|
-
|
|
638
|
+
KmsClientIsValidRawSignatureArgs: {
|
|
525
639
|
type: "object",
|
|
526
640
|
additionalProperties: false,
|
|
527
641
|
properties: {
|
|
@@ -538,7 +652,11 @@ var plugin_schema_default = {
|
|
|
538
652
|
type: "string"
|
|
539
653
|
}
|
|
540
654
|
},
|
|
541
|
-
required: [
|
|
655
|
+
required: [
|
|
656
|
+
"input",
|
|
657
|
+
"keyInfo",
|
|
658
|
+
"signature"
|
|
659
|
+
]
|
|
542
660
|
},
|
|
543
661
|
VerifyRawSignatureResponse: {
|
|
544
662
|
type: "object",
|
|
@@ -548,11 +666,13 @@ var plugin_schema_default = {
|
|
|
548
666
|
description: "Indicates whether the signature is valid or not."
|
|
549
667
|
}
|
|
550
668
|
},
|
|
551
|
-
required: [
|
|
669
|
+
required: [
|
|
670
|
+
"isValid"
|
|
671
|
+
],
|
|
552
672
|
additionalProperties: false,
|
|
553
673
|
description: "Response body containing the details of the signature verification."
|
|
554
674
|
},
|
|
555
|
-
|
|
675
|
+
KmsClientListKeyProvidersArgs: {
|
|
556
676
|
type: "object",
|
|
557
677
|
properties: {
|
|
558
678
|
baseUrl: {
|
|
@@ -571,7 +691,9 @@ var plugin_schema_default = {
|
|
|
571
691
|
}
|
|
572
692
|
}
|
|
573
693
|
},
|
|
574
|
-
required: [
|
|
694
|
+
required: [
|
|
695
|
+
"providers"
|
|
696
|
+
],
|
|
575
697
|
additionalProperties: false,
|
|
576
698
|
description: "Response body containing the details of a Key Provider instance."
|
|
577
699
|
},
|
|
@@ -586,11 +708,14 @@ var plugin_schema_default = {
|
|
|
586
708
|
$ref: "#/components/schemas/KeyProviderType"
|
|
587
709
|
}
|
|
588
710
|
},
|
|
589
|
-
required: [
|
|
711
|
+
required: [
|
|
712
|
+
"providerId",
|
|
713
|
+
"type"
|
|
714
|
+
],
|
|
590
715
|
additionalProperties: false,
|
|
591
716
|
description: "Response body containing the details of a Key Provider instance."
|
|
592
717
|
},
|
|
593
|
-
|
|
718
|
+
KmsClientListKeysArgs: {
|
|
594
719
|
type: "object",
|
|
595
720
|
properties: {
|
|
596
721
|
baseUrl: {
|
|
@@ -612,11 +737,13 @@ var plugin_schema_default = {
|
|
|
612
737
|
}
|
|
613
738
|
}
|
|
614
739
|
},
|
|
615
|
-
required: [
|
|
740
|
+
required: [
|
|
741
|
+
"keyInfos"
|
|
742
|
+
],
|
|
616
743
|
additionalProperties: false,
|
|
617
744
|
description: "Response body containing all the managed keys."
|
|
618
745
|
},
|
|
619
|
-
|
|
746
|
+
KmsClientListResolversArgs: {
|
|
620
747
|
type: "object",
|
|
621
748
|
properties: {
|
|
622
749
|
baseUrl: {
|
|
@@ -635,11 +762,13 @@ var plugin_schema_default = {
|
|
|
635
762
|
}
|
|
636
763
|
}
|
|
637
764
|
},
|
|
638
|
-
required: [
|
|
765
|
+
required: [
|
|
766
|
+
"resolvers"
|
|
767
|
+
],
|
|
639
768
|
additionalProperties: false,
|
|
640
769
|
description: "Response body containing all the resolvers."
|
|
641
770
|
},
|
|
642
|
-
|
|
771
|
+
KmsClientProviderDeleteKeyArgs: {
|
|
643
772
|
type: "object",
|
|
644
773
|
properties: {
|
|
645
774
|
baseUrl: {
|
|
@@ -652,10 +781,13 @@ var plugin_schema_default = {
|
|
|
652
781
|
type: "string"
|
|
653
782
|
}
|
|
654
783
|
},
|
|
655
|
-
required: [
|
|
784
|
+
required: [
|
|
785
|
+
"providerId",
|
|
786
|
+
"aliasOrKid"
|
|
787
|
+
],
|
|
656
788
|
additionalProperties: false
|
|
657
789
|
},
|
|
658
|
-
|
|
790
|
+
KmsClientProviderGenerateKeyArgs: {
|
|
659
791
|
type: "object",
|
|
660
792
|
additionalProperties: false,
|
|
661
793
|
properties: {
|
|
@@ -682,9 +814,11 @@ var plugin_schema_default = {
|
|
|
682
814
|
type: "string"
|
|
683
815
|
}
|
|
684
816
|
},
|
|
685
|
-
required: [
|
|
817
|
+
required: [
|
|
818
|
+
"providerId"
|
|
819
|
+
]
|
|
686
820
|
},
|
|
687
|
-
|
|
821
|
+
KmsClientProviderGetKeyArgs: {
|
|
688
822
|
type: "object",
|
|
689
823
|
properties: {
|
|
690
824
|
baseUrl: {
|
|
@@ -697,10 +831,13 @@ var plugin_schema_default = {
|
|
|
697
831
|
type: "string"
|
|
698
832
|
}
|
|
699
833
|
},
|
|
700
|
-
required: [
|
|
834
|
+
required: [
|
|
835
|
+
"providerId",
|
|
836
|
+
"aliasOrKid"
|
|
837
|
+
],
|
|
701
838
|
additionalProperties: false
|
|
702
839
|
},
|
|
703
|
-
|
|
840
|
+
KmsClientProviderListKeysArgs: {
|
|
704
841
|
type: "object",
|
|
705
842
|
properties: {
|
|
706
843
|
baseUrl: {
|
|
@@ -710,10 +847,12 @@ var plugin_schema_default = {
|
|
|
710
847
|
type: "string"
|
|
711
848
|
}
|
|
712
849
|
},
|
|
713
|
-
required: [
|
|
850
|
+
required: [
|
|
851
|
+
"providerId"
|
|
852
|
+
],
|
|
714
853
|
additionalProperties: false
|
|
715
854
|
},
|
|
716
|
-
|
|
855
|
+
KmsClientProviderStoreKeyArgs: {
|
|
717
856
|
type: "object",
|
|
718
857
|
additionalProperties: false,
|
|
719
858
|
properties: {
|
|
@@ -734,7 +873,10 @@ var plugin_schema_default = {
|
|
|
734
873
|
type: "string"
|
|
735
874
|
}
|
|
736
875
|
},
|
|
737
|
-
required: [
|
|
876
|
+
required: [
|
|
877
|
+
"keyInfo",
|
|
878
|
+
"providerId"
|
|
879
|
+
]
|
|
738
880
|
},
|
|
739
881
|
ResolvedKeyInfo: {
|
|
740
882
|
type: "object",
|
|
@@ -781,11 +923,26 @@ var plugin_schema_default = {
|
|
|
781
923
|
description: "Additional configuration options as key-value pairs."
|
|
782
924
|
}
|
|
783
925
|
},
|
|
784
|
-
required: [
|
|
926
|
+
required: [
|
|
927
|
+
"key"
|
|
928
|
+
],
|
|
785
929
|
additionalProperties: false,
|
|
786
930
|
description: "Represents a resolved cryptographic key information where the key is guaranteed to be present and resolved, providing concrete access to the key."
|
|
787
931
|
},
|
|
788
|
-
|
|
932
|
+
StoreKeyResponse: {
|
|
933
|
+
type: "object",
|
|
934
|
+
properties: {
|
|
935
|
+
keyInfo: {
|
|
936
|
+
$ref: "#/components/schemas/ManagedKeyInfo"
|
|
937
|
+
}
|
|
938
|
+
},
|
|
939
|
+
required: [
|
|
940
|
+
"keyInfo"
|
|
941
|
+
],
|
|
942
|
+
additionalProperties: false,
|
|
943
|
+
description: "Response body containing a stored key."
|
|
944
|
+
},
|
|
945
|
+
KmsClientResolveKeyArgs: {
|
|
789
946
|
type: "object",
|
|
790
947
|
additionalProperties: false,
|
|
791
948
|
properties: {
|
|
@@ -813,7 +970,10 @@ var plugin_schema_default = {
|
|
|
813
970
|
$ref: "#/components/schemas/String"
|
|
814
971
|
}
|
|
815
972
|
},
|
|
816
|
-
required: [
|
|
973
|
+
required: [
|
|
974
|
+
"keyInfo",
|
|
975
|
+
"resolverId"
|
|
976
|
+
]
|
|
817
977
|
},
|
|
818
978
|
String: {
|
|
819
979
|
type: "object",
|
|
@@ -822,12 +982,14 @@ var plugin_schema_default = {
|
|
|
822
982
|
type: "number"
|
|
823
983
|
}
|
|
824
984
|
},
|
|
825
|
-
required: [
|
|
985
|
+
required: [
|
|
986
|
+
"length"
|
|
987
|
+
],
|
|
826
988
|
additionalProperties: {
|
|
827
989
|
type: "string"
|
|
828
990
|
}
|
|
829
991
|
},
|
|
830
|
-
|
|
992
|
+
KmsClientStoreKeyArgs: {
|
|
831
993
|
type: "object",
|
|
832
994
|
additionalProperties: false,
|
|
833
995
|
properties: {
|
|
@@ -845,161 +1007,163 @@ var plugin_schema_default = {
|
|
|
845
1007
|
type: "string"
|
|
846
1008
|
}
|
|
847
1009
|
},
|
|
848
|
-
required: [
|
|
1010
|
+
required: [
|
|
1011
|
+
"keyInfo"
|
|
1012
|
+
]
|
|
849
1013
|
}
|
|
850
1014
|
},
|
|
851
1015
|
methods: {
|
|
852
|
-
|
|
1016
|
+
kmsClientCreateRawSignature: {
|
|
853
1017
|
description: "",
|
|
854
1018
|
arguments: {
|
|
855
|
-
$ref: "#/components/schemas/
|
|
1019
|
+
$ref: "#/components/schemas/KmsClientCreateRawSignatureArgs"
|
|
856
1020
|
},
|
|
857
1021
|
returnType: {
|
|
858
1022
|
$ref: "#/components/schemas/CreateRawSignatureResponse"
|
|
859
1023
|
}
|
|
860
1024
|
},
|
|
861
|
-
|
|
1025
|
+
kmsClientDeleteKey: {
|
|
862
1026
|
description: "",
|
|
863
1027
|
arguments: {
|
|
864
|
-
$ref: "#/components/schemas/
|
|
1028
|
+
$ref: "#/components/schemas/KmsClientDeleteKeyArgs"
|
|
865
1029
|
},
|
|
866
1030
|
returnType: {
|
|
867
1031
|
type: "boolean"
|
|
868
1032
|
}
|
|
869
1033
|
},
|
|
870
|
-
|
|
1034
|
+
kmsClientGenerateKey: {
|
|
871
1035
|
description: "",
|
|
872
1036
|
arguments: {
|
|
873
|
-
$ref: "#/components/schemas/
|
|
1037
|
+
$ref: "#/components/schemas/KmsClientGenerateKeyArgs"
|
|
874
1038
|
},
|
|
875
1039
|
returnType: {
|
|
876
|
-
$ref: "#/components/schemas/
|
|
1040
|
+
$ref: "#/components/schemas/GenerateKeyResponse"
|
|
877
1041
|
}
|
|
878
1042
|
},
|
|
879
|
-
|
|
1043
|
+
kmsClientGetKey: {
|
|
880
1044
|
description: "",
|
|
881
1045
|
arguments: {
|
|
882
|
-
$ref: "#/components/schemas/
|
|
1046
|
+
$ref: "#/components/schemas/KmsClientGetKeyArgs"
|
|
883
1047
|
},
|
|
884
1048
|
returnType: {
|
|
885
|
-
$ref: "#/components/schemas/
|
|
1049
|
+
$ref: "#/components/schemas/GetKeyResponse"
|
|
886
1050
|
}
|
|
887
1051
|
},
|
|
888
|
-
|
|
1052
|
+
kmsClientGetKeyProvider: {
|
|
889
1053
|
description: "",
|
|
890
1054
|
arguments: {
|
|
891
|
-
$ref: "#/components/schemas/
|
|
1055
|
+
$ref: "#/components/schemas/KmsClientGetKeyProviderArgs"
|
|
892
1056
|
},
|
|
893
1057
|
returnType: {
|
|
894
1058
|
$ref: "#/components/schemas/KeyProviderResponse"
|
|
895
1059
|
}
|
|
896
1060
|
},
|
|
897
|
-
|
|
1061
|
+
kmsClientGetResolver: {
|
|
898
1062
|
description: "",
|
|
899
1063
|
arguments: {
|
|
900
|
-
$ref: "#/components/schemas/
|
|
1064
|
+
$ref: "#/components/schemas/kmsClientGetResolverArgs"
|
|
901
1065
|
},
|
|
902
1066
|
returnType: {
|
|
903
1067
|
$ref: "#/components/schemas/Resolver"
|
|
904
1068
|
}
|
|
905
1069
|
},
|
|
906
|
-
|
|
1070
|
+
kmsClientIsValidRawSignature: {
|
|
907
1071
|
description: "",
|
|
908
1072
|
arguments: {
|
|
909
|
-
$ref: "#/components/schemas/
|
|
1073
|
+
$ref: "#/components/schemas/KmsClientIsValidRawSignatureArgs"
|
|
910
1074
|
},
|
|
911
1075
|
returnType: {
|
|
912
1076
|
$ref: "#/components/schemas/VerifyRawSignatureResponse"
|
|
913
1077
|
}
|
|
914
1078
|
},
|
|
915
|
-
|
|
1079
|
+
kmsClientListKeyProviders: {
|
|
916
1080
|
description: "",
|
|
917
1081
|
arguments: {
|
|
918
|
-
$ref: "#/components/schemas/
|
|
1082
|
+
$ref: "#/components/schemas/KmsClientListKeyProvidersArgs"
|
|
919
1083
|
},
|
|
920
1084
|
returnType: {
|
|
921
1085
|
$ref: "#/components/schemas/ListKeyProvidersResponse"
|
|
922
1086
|
}
|
|
923
1087
|
},
|
|
924
|
-
|
|
1088
|
+
kmsClientListKeys: {
|
|
925
1089
|
description: "",
|
|
926
1090
|
arguments: {
|
|
927
|
-
$ref: "#/components/schemas/
|
|
1091
|
+
$ref: "#/components/schemas/KmsClientListKeysArgs"
|
|
928
1092
|
},
|
|
929
1093
|
returnType: {
|
|
930
1094
|
$ref: "#/components/schemas/ListKeysResponse"
|
|
931
1095
|
}
|
|
932
1096
|
},
|
|
933
|
-
|
|
1097
|
+
kmsClientListResolvers: {
|
|
934
1098
|
description: "",
|
|
935
1099
|
arguments: {
|
|
936
|
-
$ref: "#/components/schemas/
|
|
1100
|
+
$ref: "#/components/schemas/KmsClientListResolversArgs"
|
|
937
1101
|
},
|
|
938
1102
|
returnType: {
|
|
939
1103
|
$ref: "#/components/schemas/ListResolversResponse"
|
|
940
1104
|
}
|
|
941
1105
|
},
|
|
942
|
-
|
|
1106
|
+
kmsClientProviderDeleteKey: {
|
|
943
1107
|
description: "",
|
|
944
1108
|
arguments: {
|
|
945
|
-
$ref: "#/components/schemas/
|
|
1109
|
+
$ref: "#/components/schemas/KmsClientProviderDeleteKeyArgs"
|
|
946
1110
|
},
|
|
947
1111
|
returnType: {
|
|
948
1112
|
type: "boolean"
|
|
949
1113
|
}
|
|
950
1114
|
},
|
|
951
|
-
|
|
1115
|
+
kmsClientProviderGenerateKey: {
|
|
952
1116
|
description: "",
|
|
953
1117
|
arguments: {
|
|
954
|
-
$ref: "#/components/schemas/
|
|
1118
|
+
$ref: "#/components/schemas/KmsClientProviderGenerateKeyArgs"
|
|
955
1119
|
},
|
|
956
1120
|
returnType: {
|
|
957
|
-
$ref: "#/components/schemas/
|
|
1121
|
+
$ref: "#/components/schemas/GenerateKeyResponse"
|
|
958
1122
|
}
|
|
959
1123
|
},
|
|
960
|
-
|
|
1124
|
+
kmsClientProviderGetKey: {
|
|
961
1125
|
description: "",
|
|
962
1126
|
arguments: {
|
|
963
|
-
$ref: "#/components/schemas/
|
|
1127
|
+
$ref: "#/components/schemas/KmsClientProviderGetKeyArgs"
|
|
964
1128
|
},
|
|
965
1129
|
returnType: {
|
|
966
|
-
$ref: "#/components/schemas/
|
|
1130
|
+
$ref: "#/components/schemas/GetKeyResponse"
|
|
967
1131
|
}
|
|
968
1132
|
},
|
|
969
|
-
|
|
1133
|
+
kmsClientProviderListKeys: {
|
|
970
1134
|
description: "",
|
|
971
1135
|
arguments: {
|
|
972
|
-
$ref: "#/components/schemas/
|
|
1136
|
+
$ref: "#/components/schemas/KmsClientProviderListKeysArgs"
|
|
973
1137
|
},
|
|
974
1138
|
returnType: {
|
|
975
1139
|
$ref: "#/components/schemas/ListKeysResponse"
|
|
976
1140
|
}
|
|
977
1141
|
},
|
|
978
|
-
|
|
1142
|
+
kmsClientProviderStoreKey: {
|
|
979
1143
|
description: "",
|
|
980
1144
|
arguments: {
|
|
981
|
-
$ref: "#/components/schemas/
|
|
1145
|
+
$ref: "#/components/schemas/KmsClientProviderStoreKeyArgs"
|
|
982
1146
|
},
|
|
983
1147
|
returnType: {
|
|
984
|
-
$ref: "#/components/schemas/
|
|
1148
|
+
$ref: "#/components/schemas/StoreKeyResponse"
|
|
985
1149
|
}
|
|
986
1150
|
},
|
|
987
|
-
|
|
1151
|
+
kmsClientResolveKey: {
|
|
988
1152
|
description: "",
|
|
989
1153
|
arguments: {
|
|
990
|
-
$ref: "#/components/schemas/
|
|
1154
|
+
$ref: "#/components/schemas/KmsClientResolveKeyArgs"
|
|
991
1155
|
},
|
|
992
1156
|
returnType: {
|
|
993
1157
|
$ref: "#/components/schemas/ResolvedKeyInfo"
|
|
994
1158
|
}
|
|
995
1159
|
},
|
|
996
|
-
|
|
1160
|
+
kmsClientStoreKey: {
|
|
997
1161
|
description: "",
|
|
998
1162
|
arguments: {
|
|
999
|
-
$ref: "#/components/schemas/
|
|
1163
|
+
$ref: "#/components/schemas/KmsClientStoreKeyArgs"
|
|
1000
1164
|
},
|
|
1001
1165
|
returnType: {
|
|
1002
|
-
$ref: "#/components/schemas/
|
|
1166
|
+
$ref: "#/components/schemas/StoreKeyResponse"
|
|
1003
1167
|
}
|
|
1004
1168
|
}
|
|
1005
1169
|
}
|
|
@@ -3272,7 +3436,11 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3272
3436
|
const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
|
|
3273
3437
|
const url = _KmsRestClient.urlWithBase(`/resolvers/${args.resolverId}`, baseUrl);
|
|
3274
3438
|
const response = await fetch(url, {
|
|
3275
|
-
method: "GET"
|
|
3439
|
+
method: "GET",
|
|
3440
|
+
headers: await this.createHeaders({
|
|
3441
|
+
tenantId: args.tenantId,
|
|
3442
|
+
userId: args.userId
|
|
3443
|
+
})
|
|
3276
3444
|
});
|
|
3277
3445
|
logger.debug(`get resolver response: ${response}`);
|
|
3278
3446
|
if (!response.ok) {
|
|
@@ -3285,7 +3453,11 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3285
3453
|
const baseUrl = this.assertedAgentBaseUrl(args?.baseUrl);
|
|
3286
3454
|
const url = _KmsRestClient.urlWithBase("/resolvers", baseUrl);
|
|
3287
3455
|
const response = await fetch(url, {
|
|
3288
|
-
method: "GET"
|
|
3456
|
+
method: "GET",
|
|
3457
|
+
headers: await this.createHeaders({
|
|
3458
|
+
tenantId: args?.tenantId,
|
|
3459
|
+
userId: args?.userId
|
|
3460
|
+
})
|
|
3289
3461
|
});
|
|
3290
3462
|
logger.debug(`list resolvers response: ${response}`);
|
|
3291
3463
|
if (!response.ok) {
|
|
@@ -3306,7 +3478,9 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3306
3478
|
const response = await fetch(url, {
|
|
3307
3479
|
method: "POST",
|
|
3308
3480
|
headers: await this.createHeaders({
|
|
3309
|
-
|
|
3481
|
+
contentType: "application/json",
|
|
3482
|
+
tenantId: args.tenantId,
|
|
3483
|
+
userId: args.userId
|
|
3310
3484
|
}),
|
|
3311
3485
|
body: JSON.stringify(ResolvePublicKeyToJSONTyped(body))
|
|
3312
3486
|
});
|
|
@@ -3327,7 +3501,9 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3327
3501
|
const response = await fetch(url, {
|
|
3328
3502
|
method: "POST",
|
|
3329
3503
|
headers: await this.createHeaders({
|
|
3330
|
-
|
|
3504
|
+
contentType: "application/json",
|
|
3505
|
+
tenantId: args.tenantId,
|
|
3506
|
+
userId: args.userId
|
|
3331
3507
|
}),
|
|
3332
3508
|
body: JSON.stringify(CreateRawSignatureToJSONTyped(body))
|
|
3333
3509
|
});
|
|
@@ -3349,7 +3525,9 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3349
3525
|
const response = await fetch(url, {
|
|
3350
3526
|
method: "POST",
|
|
3351
3527
|
headers: await this.createHeaders({
|
|
3352
|
-
|
|
3528
|
+
contentType: "application/json",
|
|
3529
|
+
tenantId: args.tenantId,
|
|
3530
|
+
userId: args.userId
|
|
3353
3531
|
}),
|
|
3354
3532
|
body: JSON.stringify(VerifyRawSignatureToJSONTyped(body))
|
|
3355
3533
|
});
|
|
@@ -3364,7 +3542,11 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3364
3542
|
const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
|
|
3365
3543
|
const url = _KmsRestClient.urlWithBase(`/keys/${args.aliasOrKid}`, baseUrl);
|
|
3366
3544
|
const response = await fetch(url, {
|
|
3367
|
-
method: "GET"
|
|
3545
|
+
method: "GET",
|
|
3546
|
+
headers: await this.createHeaders({
|
|
3547
|
+
tenantId: args.tenantId,
|
|
3548
|
+
userId: args.userId
|
|
3549
|
+
})
|
|
3368
3550
|
});
|
|
3369
3551
|
logger.debug(`get key response: ${response}`);
|
|
3370
3552
|
if (!response.ok) {
|
|
@@ -3381,7 +3563,11 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3381
3563
|
}
|
|
3382
3564
|
});
|
|
3383
3565
|
const response = await fetch(url, {
|
|
3384
|
-
method: "GET"
|
|
3566
|
+
method: "GET",
|
|
3567
|
+
headers: await this.createHeaders({
|
|
3568
|
+
tenantId: args?.tenantId,
|
|
3569
|
+
userId: args?.userId
|
|
3570
|
+
})
|
|
3385
3571
|
});
|
|
3386
3572
|
logger.debug(`list keys response: ${response}`);
|
|
3387
3573
|
if (!response.ok) {
|
|
@@ -3400,7 +3586,9 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3400
3586
|
const response = await fetch(url, {
|
|
3401
3587
|
method: "POST",
|
|
3402
3588
|
headers: await this.createHeaders({
|
|
3403
|
-
|
|
3589
|
+
contentType: "application/json",
|
|
3590
|
+
tenantId: args.tenantId,
|
|
3591
|
+
userId: args.userId
|
|
3404
3592
|
}),
|
|
3405
3593
|
body: JSON.stringify(StoreKeyToJSONTyped(body))
|
|
3406
3594
|
});
|
|
@@ -3423,7 +3611,9 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3423
3611
|
const response = await fetch(url, {
|
|
3424
3612
|
method: "POST",
|
|
3425
3613
|
headers: await this.createHeaders({
|
|
3426
|
-
|
|
3614
|
+
contentType: "application/json",
|
|
3615
|
+
tenantId: args.tenantId,
|
|
3616
|
+
userId: args.userId
|
|
3427
3617
|
}),
|
|
3428
3618
|
body: JSON.stringify(GenerateKeyGlobalToJSONTyped(body))
|
|
3429
3619
|
});
|
|
@@ -3438,7 +3628,11 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3438
3628
|
const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
|
|
3439
3629
|
const url = _KmsRestClient.urlWithBase(`/keys/${args.aliasOrKid}`, baseUrl);
|
|
3440
3630
|
const response = await fetch(url, {
|
|
3441
|
-
method: "DELETE"
|
|
3631
|
+
method: "DELETE",
|
|
3632
|
+
headers: await this.createHeaders({
|
|
3633
|
+
tenantId: args.tenantId,
|
|
3634
|
+
userId: args.userId
|
|
3635
|
+
})
|
|
3442
3636
|
});
|
|
3443
3637
|
logger.debug(`delete key response: ${response}`);
|
|
3444
3638
|
if (!response.ok) {
|
|
@@ -3451,7 +3645,11 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3451
3645
|
const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
|
|
3452
3646
|
const url = _KmsRestClient.urlWithBase(`/providers/${args.providerId}`, baseUrl);
|
|
3453
3647
|
const response = await fetch(url, {
|
|
3454
|
-
method: "GET"
|
|
3648
|
+
method: "GET",
|
|
3649
|
+
headers: await this.createHeaders({
|
|
3650
|
+
tenantId: args.tenantId,
|
|
3651
|
+
userId: args.userId
|
|
3652
|
+
})
|
|
3455
3653
|
});
|
|
3456
3654
|
logger.debug(`get provider response: ${response}`);
|
|
3457
3655
|
if (!response.ok) {
|
|
@@ -3464,7 +3662,11 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3464
3662
|
const baseUrl = this.assertedAgentBaseUrl(args?.baseUrl);
|
|
3465
3663
|
const url = _KmsRestClient.urlWithBase("/providers", baseUrl);
|
|
3466
3664
|
const response = await fetch(url, {
|
|
3467
|
-
method: "GET"
|
|
3665
|
+
method: "GET",
|
|
3666
|
+
headers: await this.createHeaders({
|
|
3667
|
+
tenantId: args?.tenantId,
|
|
3668
|
+
userId: args?.userId
|
|
3669
|
+
})
|
|
3468
3670
|
});
|
|
3469
3671
|
logger.debug(`list providers response: ${response}`);
|
|
3470
3672
|
if (!response.ok) {
|
|
@@ -3477,7 +3679,11 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3477
3679
|
const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
|
|
3478
3680
|
const url = _KmsRestClient.urlWithBase(`/providers/${args.providerId}/keys`, baseUrl);
|
|
3479
3681
|
const response = await fetch(url, {
|
|
3480
|
-
method: "GET"
|
|
3682
|
+
method: "GET",
|
|
3683
|
+
headers: await this.createHeaders({
|
|
3684
|
+
tenantId: args.tenantId,
|
|
3685
|
+
userId: args.userId
|
|
3686
|
+
})
|
|
3481
3687
|
});
|
|
3482
3688
|
logger.debug(`list provider keys response: ${response}`);
|
|
3483
3689
|
if (!response.ok) {
|
|
@@ -3496,7 +3702,9 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3496
3702
|
const response = await fetch(url, {
|
|
3497
3703
|
method: "POST",
|
|
3498
3704
|
headers: await this.createHeaders({
|
|
3499
|
-
|
|
3705
|
+
contentType: "application/json",
|
|
3706
|
+
tenantId: args.tenantId,
|
|
3707
|
+
userId: args.userId
|
|
3500
3708
|
}),
|
|
3501
3709
|
body: JSON.stringify(StoreKeyToJSONTyped(body))
|
|
3502
3710
|
});
|
|
@@ -3513,12 +3721,15 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3513
3721
|
const body = {
|
|
3514
3722
|
alg: args.alg,
|
|
3515
3723
|
keyOperations: args.keyOperations,
|
|
3516
|
-
use: args.use
|
|
3724
|
+
use: args.use,
|
|
3725
|
+
alias: args.alias
|
|
3517
3726
|
};
|
|
3518
3727
|
const response = await fetch(url, {
|
|
3519
3728
|
method: "POST",
|
|
3520
3729
|
headers: await this.createHeaders({
|
|
3521
|
-
|
|
3730
|
+
contentType: "application/json",
|
|
3731
|
+
tenantId: args.tenantId,
|
|
3732
|
+
userId: args.userId
|
|
3522
3733
|
}),
|
|
3523
3734
|
body: JSON.stringify(GenerateKeyToJSONTyped(body))
|
|
3524
3735
|
});
|
|
@@ -3533,7 +3744,11 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3533
3744
|
const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
|
|
3534
3745
|
const url = _KmsRestClient.urlWithBase(`/providers/${args.providerId}/keys/${args.aliasOrKid}`, baseUrl);
|
|
3535
3746
|
const response = await fetch(url, {
|
|
3536
|
-
method: "GET"
|
|
3747
|
+
method: "GET",
|
|
3748
|
+
headers: await this.createHeaders({
|
|
3749
|
+
tenantId: args.tenantId,
|
|
3750
|
+
userId: args.userId
|
|
3751
|
+
})
|
|
3537
3752
|
});
|
|
3538
3753
|
logger.debug(`get provider key response: ${response}`);
|
|
3539
3754
|
if (!response.ok) {
|
|
@@ -3546,7 +3761,11 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3546
3761
|
const baseUrl = this.assertedAgentBaseUrl(args.baseUrl);
|
|
3547
3762
|
const url = _KmsRestClient.urlWithBase(`providers/${args.providerId}/keys/${args.aliasOrKid}`, baseUrl);
|
|
3548
3763
|
const response = await fetch(url, {
|
|
3549
|
-
method: "DELETE"
|
|
3764
|
+
method: "DELETE",
|
|
3765
|
+
headers: await this.createHeaders({
|
|
3766
|
+
tenantId: args.tenantId,
|
|
3767
|
+
userId: args.userId
|
|
3768
|
+
})
|
|
3550
3769
|
});
|
|
3551
3770
|
logger.debug(`delete key response: ${response}`);
|
|
3552
3771
|
if (!response.ok) {
|
|
@@ -3562,9 +3781,17 @@ var KmsRestClient = class _KmsRestClient {
|
|
|
3562
3781
|
}
|
|
3563
3782
|
throw new Error("No base url has been provided");
|
|
3564
3783
|
}
|
|
3565
|
-
async createHeaders(
|
|
3784
|
+
async createHeaders(args) {
|
|
3566
3785
|
const headers = {
|
|
3567
|
-
...
|
|
3786
|
+
...args?.contentType ? {
|
|
3787
|
+
"Content-Type": args.contentType
|
|
3788
|
+
} : {},
|
|
3789
|
+
...args?.tenantId ? {
|
|
3790
|
+
"X-Tenant-ID": args.tenantId
|
|
3791
|
+
} : {},
|
|
3792
|
+
...args?.userId ? {
|
|
3793
|
+
"X-User-ID": args.userId
|
|
3794
|
+
} : {},
|
|
3568
3795
|
Accept: "application/json"
|
|
3569
3796
|
};
|
|
3570
3797
|
if (this.authOpts?.enabled === true) {
|