@sphereon/ssi-sdk.kms-rest-client 0.34.1-feature.IDK.11.48 → 0.34.1-feature.IDK.11.49
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 +169 -288
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -11
- package/dist/index.d.ts +11 -11
- package/dist/index.js +169 -288
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/plugin.schema.json +38 -157
- package/src/agent/KmsRestClient.ts +16 -17
- package/src/models/AwsAssumeRoleCredentials.ts +49 -57
- package/src/models/AwsClientConfiguration.ts +29 -32
- package/src/models/AwsKmsSetting.ts +71 -85
- package/src/models/AwsStaticCredentials.ts +49 -57
- package/src/models/AwsWebIdentityTokenCredentials.ts +50 -58
- package/src/models/AzureClientSecretCredentialOpts.ts +45 -50
- package/src/models/AzureCredentialOpts.ts +24 -29
- package/src/models/AzureKeyVaultSetting.ts +60 -71
- package/src/models/CoseKey.ts +96 -104
- package/src/models/CoseKeyPair.ts +32 -38
- package/src/models/CoseKeyType.ts +18 -21
- package/src/models/CreateKeyProvider.ts +60 -74
- package/src/models/CreateRawSignature.ts +33 -39
- package/src/models/CreateRawSignatureResponse.ts +22 -25
- package/src/models/CreateSimpleSignature.ts +45 -59
- package/src/models/CryptoAlg.ts +18 -21
- package/src/models/Curve.ts +22 -25
- package/src/models/DigestAlg.ts +21 -24
- package/src/models/ErrorResponse.ts +39 -42
- package/src/models/GenerateKey.ts +51 -65
- package/src/models/GenerateKeyGlobal.ts +59 -73
- package/src/models/GenerateKeyResponse.ts +24 -30
- package/src/models/GetKeyResponse.ts +24 -30
- package/src/models/IdentifierMethod.ts +19 -22
- package/src/models/JoseKeyPair.ts +32 -38
- package/src/models/Jwk.ts +190 -207
- package/src/models/JwkKeyType.ts +18 -21
- package/src/models/JwkUse.ts +16 -19
- package/src/models/KeyEncoding.ts +16 -19
- package/src/models/KeyInfo.ts +103 -123
- package/src/models/KeyOperations.ts +22 -25
- package/src/models/KeyProvider.ts +33 -41
- package/src/models/KeyProviderResponse.ts +33 -41
- package/src/models/KeyProviderType.ts +17 -20
- package/src/models/KeyResolver.ts +44 -51
- package/src/models/KeyType.ts +17 -20
- package/src/models/KeyVisibility.ts +16 -19
- package/src/models/ListKeyProvidersResponse.ts +24 -30
- package/src/models/ListKeysResponse.ts +24 -30
- package/src/models/ListResolversResponse.ts +24 -30
- package/src/models/LookupMode.ts +17 -20
- package/src/models/ManagedKeyInfo.ts +106 -126
- package/src/models/ManagedKeyPair.ts +61 -70
- package/src/models/MaskGenFunction.ts +15 -18
- package/src/models/ProviderCapabilities.ts +65 -81
- package/src/models/ResolvePublicKey.ts +50 -61
- package/src/models/ResolvedKeyInfo.ts +104 -124
- package/src/models/Resolver.ts +44 -51
- package/src/models/SignInput.ts +42 -47
- package/src/models/SignOutput.ts +32 -38
- package/src/models/Signature.ts +51 -62
- package/src/models/SignatureAlgorithm.ts +26 -29
- package/src/models/StoreKey.ts +32 -38
- package/src/models/StoreKeyResponse.ts +24 -30
- package/src/models/UpdateKeyProvider.ts +49 -58
- package/src/models/VerifyRawSignature.ts +42 -48
- package/src/models/VerifyRawSignatureResponse.ts +22 -25
- package/src/models/VerifySimpleSignature.ts +35 -44
- package/src/models/index.ts +58 -58
- package/src/types/IKmsRestClient.ts +2 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphereon/ssi-sdk.kms-rest-client",
|
|
3
3
|
"description": "contains the client side to call REST endpoints of a KMS server",
|
|
4
|
-
"version": "0.34.1-feature.IDK.11.
|
|
4
|
+
"version": "0.34.1-feature.IDK.11.49+19dd3372",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/index.cjs",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"generate-plugin-schema": "tsx ../../packages/dev/bin/sphereon.js dev generate-plugin-schema"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@sphereon/ssi-types": "0.34.1-feature.IDK.11.
|
|
31
|
+
"@sphereon/ssi-types": "0.34.1-feature.IDK.11.49+19dd3372",
|
|
32
32
|
"cross-fetch": "^3.1.8"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"KMS",
|
|
57
57
|
"REST"
|
|
58
58
|
],
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "19dd33727e96d37a7b9c9ff3dadcbfd2d1885d09"
|
|
60
60
|
}
|
package/plugin.schema.json
CHANGED
|
@@ -16,10 +16,7 @@
|
|
|
16
16
|
"type": "string"
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
|
-
"required": [
|
|
20
|
-
"input",
|
|
21
|
-
"keyInfo"
|
|
22
|
-
]
|
|
19
|
+
"required": ["input", "keyInfo"]
|
|
23
20
|
},
|
|
24
21
|
"KeyInfo": {
|
|
25
22
|
"type": "object",
|
|
@@ -160,56 +157,28 @@
|
|
|
160
157
|
"description": "X.509 certificate SHA-256 thumbprint (base64url-encoded)."
|
|
161
158
|
}
|
|
162
159
|
},
|
|
163
|
-
"required": [
|
|
164
|
-
"kty"
|
|
165
|
-
],
|
|
160
|
+
"required": ["kty"],
|
|
166
161
|
"additionalProperties": false,
|
|
167
162
|
"description": "Represents a JSON Web Key (JWK) as defined by the JSON Web Key specification."
|
|
168
163
|
},
|
|
169
164
|
"JwkKeyType": {
|
|
170
165
|
"type": "string",
|
|
171
|
-
"enum": [
|
|
172
|
-
"EC",
|
|
173
|
-
"RSA",
|
|
174
|
-
"OKP",
|
|
175
|
-
"oct"
|
|
176
|
-
],
|
|
166
|
+
"enum": ["EC", "RSA", "OKP", "oct"],
|
|
177
167
|
"description": "JSON Web Key (JWK) key type parameter identifying the cryptographic algorithm family."
|
|
178
168
|
},
|
|
179
169
|
"JwkUse": {
|
|
180
170
|
"type": "string",
|
|
181
|
-
"enum": [
|
|
182
|
-
"sig",
|
|
183
|
-
"enc"
|
|
184
|
-
],
|
|
171
|
+
"enum": ["sig", "enc"],
|
|
185
172
|
"description": "Intended use of the key (signing or encryption)."
|
|
186
173
|
},
|
|
187
174
|
"KeyOperations": {
|
|
188
175
|
"type": "string",
|
|
189
|
-
"enum": [
|
|
190
|
-
"sign",
|
|
191
|
-
"verify",
|
|
192
|
-
"encrypt",
|
|
193
|
-
"decrypt",
|
|
194
|
-
"wrapKey",
|
|
195
|
-
"unwrapKey",
|
|
196
|
-
"deriveKey",
|
|
197
|
-
"deriveBits"
|
|
198
|
-
],
|
|
176
|
+
"enum": ["sign", "verify", "encrypt", "decrypt", "wrapKey", "unwrapKey", "deriveKey", "deriveBits"],
|
|
199
177
|
"description": "Specific operations the key is intended for."
|
|
200
178
|
},
|
|
201
179
|
"Curve": {
|
|
202
180
|
"type": "string",
|
|
203
|
-
"enum": [
|
|
204
|
-
"P-256",
|
|
205
|
-
"P-384",
|
|
206
|
-
"P-521",
|
|
207
|
-
"secp256k1",
|
|
208
|
-
"Ed25519",
|
|
209
|
-
"Ed448",
|
|
210
|
-
"X25519",
|
|
211
|
-
"X448"
|
|
212
|
-
],
|
|
181
|
+
"enum": ["P-256", "P-384", "P-521", "secp256k1", "Ed25519", "Ed448", "X25519", "X448"],
|
|
213
182
|
"description": "Elliptic curve identifier."
|
|
214
183
|
},
|
|
215
184
|
"SignatureAlgorithm": {
|
|
@@ -232,27 +201,17 @@
|
|
|
232
201
|
},
|
|
233
202
|
"KeyVisibility": {
|
|
234
203
|
"type": "string",
|
|
235
|
-
"enum": [
|
|
236
|
-
"PUBLIC",
|
|
237
|
-
"PRIVATE"
|
|
238
|
-
],
|
|
204
|
+
"enum": ["PUBLIC", "PRIVATE"],
|
|
239
205
|
"description": "Indicates the visibility status of a cryptographic key."
|
|
240
206
|
},
|
|
241
207
|
"KeyType": {
|
|
242
208
|
"type": "string",
|
|
243
|
-
"enum": [
|
|
244
|
-
"OKP",
|
|
245
|
-
"EC",
|
|
246
|
-
"RSA"
|
|
247
|
-
],
|
|
209
|
+
"enum": ["OKP", "EC", "RSA"],
|
|
248
210
|
"description": "Cryptographic key type identifier."
|
|
249
211
|
},
|
|
250
212
|
"KeyEncoding": {
|
|
251
213
|
"type": "string",
|
|
252
|
-
"enum": [
|
|
253
|
-
"COSE",
|
|
254
|
-
"JOSE"
|
|
255
|
-
],
|
|
214
|
+
"enum": ["COSE", "JOSE"],
|
|
256
215
|
"description": "The encoding format of the cryptographic key."
|
|
257
216
|
},
|
|
258
217
|
"CreateRawSignatureResponse": {
|
|
@@ -263,9 +222,7 @@
|
|
|
263
222
|
"description": "The created signature encoded as a base64 string."
|
|
264
223
|
}
|
|
265
224
|
},
|
|
266
|
-
"required": [
|
|
267
|
-
"signature"
|
|
268
|
-
],
|
|
225
|
+
"required": ["signature"],
|
|
269
226
|
"additionalProperties": false,
|
|
270
227
|
"description": "Response body containing the created signature."
|
|
271
228
|
},
|
|
@@ -332,12 +289,7 @@
|
|
|
332
289
|
"$ref": "#/components/schemas/JoseKeyPair"
|
|
333
290
|
}
|
|
334
291
|
},
|
|
335
|
-
"required": [
|
|
336
|
-
"providerId",
|
|
337
|
-
"alias",
|
|
338
|
-
"cose",
|
|
339
|
-
"jose"
|
|
340
|
-
],
|
|
292
|
+
"required": ["providerId", "alias", "cose", "jose"],
|
|
341
293
|
"additionalProperties": false,
|
|
342
294
|
"description": "Represents a key pair used by a crypto provider, encapsulating both JOSE and COSE key pairs."
|
|
343
295
|
},
|
|
@@ -351,9 +303,7 @@
|
|
|
351
303
|
"$ref": "#/components/schemas/CoseKey"
|
|
352
304
|
}
|
|
353
305
|
},
|
|
354
|
-
"required": [
|
|
355
|
-
"publicCoseKey"
|
|
356
|
-
],
|
|
306
|
+
"required": ["publicCoseKey"],
|
|
357
307
|
"additionalProperties": false,
|
|
358
308
|
"description": "Represents a cryptographic key pair for COSE (CBOR Object Signing and Encryption) operations."
|
|
359
309
|
},
|
|
@@ -406,20 +356,13 @@
|
|
|
406
356
|
"description": "X.509 certificate chain as base64-encoded certificates."
|
|
407
357
|
}
|
|
408
358
|
},
|
|
409
|
-
"required": [
|
|
410
|
-
"kty"
|
|
411
|
-
],
|
|
359
|
+
"required": ["kty"],
|
|
412
360
|
"additionalProperties": false,
|
|
413
361
|
"description": "Represents a COSE (CBOR Object Signing and Encryption) key in JSON format."
|
|
414
362
|
},
|
|
415
363
|
"CoseKeyType": {
|
|
416
364
|
"type": "number",
|
|
417
|
-
"enum": [
|
|
418
|
-
1,
|
|
419
|
-
2,
|
|
420
|
-
3,
|
|
421
|
-
4
|
|
422
|
-
],
|
|
365
|
+
"enum": [1, 2, 3, 4],
|
|
423
366
|
"description": "COSE key type parameter. 1=OKP (Octet Key Pair), 2=EC2 (Elliptic Curve), 3=RSA, 4=Symmetric."
|
|
424
367
|
},
|
|
425
368
|
"JoseKeyPair": {
|
|
@@ -432,9 +375,7 @@
|
|
|
432
375
|
"$ref": "#/components/schemas/Jwk"
|
|
433
376
|
}
|
|
434
377
|
},
|
|
435
|
-
"required": [
|
|
436
|
-
"publicJwk"
|
|
437
|
-
],
|
|
378
|
+
"required": ["publicJwk"],
|
|
438
379
|
"additionalProperties": false,
|
|
439
380
|
"description": "Data class representing a cryptographic key pair used with JOSE (JSON Object Signing and Encryption)."
|
|
440
381
|
},
|
|
@@ -448,9 +389,7 @@
|
|
|
448
389
|
"type": "string"
|
|
449
390
|
}
|
|
450
391
|
},
|
|
451
|
-
"required": [
|
|
452
|
-
"aliasOrKid"
|
|
453
|
-
],
|
|
392
|
+
"required": ["aliasOrKid"],
|
|
454
393
|
"additionalProperties": false
|
|
455
394
|
},
|
|
456
395
|
"ManagedKeyInfo": {
|
|
@@ -498,11 +437,7 @@
|
|
|
498
437
|
"description": "Additional configuration options as key-value pairs."
|
|
499
438
|
}
|
|
500
439
|
},
|
|
501
|
-
"required": [
|
|
502
|
-
"key",
|
|
503
|
-
"alias",
|
|
504
|
-
"providerId"
|
|
505
|
-
],
|
|
440
|
+
"required": ["key", "alias", "providerId"],
|
|
506
441
|
"additionalProperties": false,
|
|
507
442
|
"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."
|
|
508
443
|
},
|
|
@@ -529,20 +464,13 @@
|
|
|
529
464
|
"$ref": "#/components/schemas/KeyProviderType"
|
|
530
465
|
}
|
|
531
466
|
},
|
|
532
|
-
"required": [
|
|
533
|
-
"providerId",
|
|
534
|
-
"type"
|
|
535
|
-
],
|
|
467
|
+
"required": ["providerId", "type"],
|
|
536
468
|
"additionalProperties": false,
|
|
537
469
|
"description": "Response body containing the details of a Key Provider instance."
|
|
538
470
|
},
|
|
539
471
|
"KeyProviderType": {
|
|
540
472
|
"type": "string",
|
|
541
|
-
"enum": [
|
|
542
|
-
"SOFTWARE",
|
|
543
|
-
"AZURE_KEYVAULT",
|
|
544
|
-
"AWS_KMS"
|
|
545
|
-
],
|
|
473
|
+
"enum": ["SOFTWARE", "AZURE_KEYVAULT", "AWS_KMS"],
|
|
546
474
|
"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."
|
|
547
475
|
},
|
|
548
476
|
"kmsGetResolverArgs": {
|
|
@@ -555,9 +483,7 @@
|
|
|
555
483
|
"type": "string"
|
|
556
484
|
}
|
|
557
485
|
},
|
|
558
|
-
"required": [
|
|
559
|
-
"resolverId"
|
|
560
|
-
],
|
|
486
|
+
"required": ["resolverId"],
|
|
561
487
|
"additionalProperties": false
|
|
562
488
|
},
|
|
563
489
|
"Resolver": {
|
|
@@ -582,21 +508,13 @@
|
|
|
582
508
|
"description": "List of key types supported by this resolver."
|
|
583
509
|
}
|
|
584
510
|
},
|
|
585
|
-
"required": [
|
|
586
|
-
"resolverId"
|
|
587
|
-
],
|
|
511
|
+
"required": ["resolverId"],
|
|
588
512
|
"additionalProperties": false,
|
|
589
513
|
"description": "Represents a key resolver configuration."
|
|
590
514
|
},
|
|
591
515
|
"IdentifierMethod": {
|
|
592
516
|
"type": "string",
|
|
593
|
-
"enum": [
|
|
594
|
-
"JWK",
|
|
595
|
-
"KID",
|
|
596
|
-
"COSE_KEY",
|
|
597
|
-
"X5C",
|
|
598
|
-
"DID"
|
|
599
|
-
],
|
|
517
|
+
"enum": ["JWK", "KID", "COSE_KEY", "X5C", "DID"],
|
|
600
518
|
"description": "Method used to identify cryptographic keys."
|
|
601
519
|
},
|
|
602
520
|
"KmsIsValidRawSignatureArgs": {
|
|
@@ -616,11 +534,7 @@
|
|
|
616
534
|
"type": "string"
|
|
617
535
|
}
|
|
618
536
|
},
|
|
619
|
-
"required": [
|
|
620
|
-
"input",
|
|
621
|
-
"keyInfo",
|
|
622
|
-
"signature"
|
|
623
|
-
]
|
|
537
|
+
"required": ["input", "keyInfo", "signature"]
|
|
624
538
|
},
|
|
625
539
|
"VerifyRawSignatureResponse": {
|
|
626
540
|
"type": "object",
|
|
@@ -630,9 +544,7 @@
|
|
|
630
544
|
"description": "Indicates whether the signature is valid or not."
|
|
631
545
|
}
|
|
632
546
|
},
|
|
633
|
-
"required": [
|
|
634
|
-
"isValid"
|
|
635
|
-
],
|
|
547
|
+
"required": ["isValid"],
|
|
636
548
|
"additionalProperties": false,
|
|
637
549
|
"description": "Response body containing the details of the signature verification."
|
|
638
550
|
},
|
|
@@ -655,9 +567,7 @@
|
|
|
655
567
|
}
|
|
656
568
|
}
|
|
657
569
|
},
|
|
658
|
-
"required": [
|
|
659
|
-
"providers"
|
|
660
|
-
],
|
|
570
|
+
"required": ["providers"],
|
|
661
571
|
"additionalProperties": false,
|
|
662
572
|
"description": "Response body containing the details of a Key Provider instance."
|
|
663
573
|
},
|
|
@@ -672,10 +582,7 @@
|
|
|
672
582
|
"$ref": "#/components/schemas/KeyProviderType"
|
|
673
583
|
}
|
|
674
584
|
},
|
|
675
|
-
"required": [
|
|
676
|
-
"providerId",
|
|
677
|
-
"type"
|
|
678
|
-
],
|
|
585
|
+
"required": ["providerId", "type"],
|
|
679
586
|
"additionalProperties": false,
|
|
680
587
|
"description": "Response body containing the details of a Key Provider instance."
|
|
681
588
|
},
|
|
@@ -701,9 +608,7 @@
|
|
|
701
608
|
}
|
|
702
609
|
}
|
|
703
610
|
},
|
|
704
|
-
"required": [
|
|
705
|
-
"keyInfos"
|
|
706
|
-
],
|
|
611
|
+
"required": ["keyInfos"],
|
|
707
612
|
"additionalProperties": false,
|
|
708
613
|
"description": "Response body containing all the managed keys."
|
|
709
614
|
},
|
|
@@ -726,9 +631,7 @@
|
|
|
726
631
|
}
|
|
727
632
|
}
|
|
728
633
|
},
|
|
729
|
-
"required": [
|
|
730
|
-
"resolvers"
|
|
731
|
-
],
|
|
634
|
+
"required": ["resolvers"],
|
|
732
635
|
"additionalProperties": false,
|
|
733
636
|
"description": "Response body containing all the resolvers."
|
|
734
637
|
},
|
|
@@ -745,10 +648,7 @@
|
|
|
745
648
|
"type": "string"
|
|
746
649
|
}
|
|
747
650
|
},
|
|
748
|
-
"required": [
|
|
749
|
-
"providerId",
|
|
750
|
-
"aliasOrKid"
|
|
751
|
-
],
|
|
651
|
+
"required": ["providerId", "aliasOrKid"],
|
|
752
652
|
"additionalProperties": false
|
|
753
653
|
},
|
|
754
654
|
"KmsProviderGenerateKey": {
|
|
@@ -778,9 +678,7 @@
|
|
|
778
678
|
"type": "string"
|
|
779
679
|
}
|
|
780
680
|
},
|
|
781
|
-
"required": [
|
|
782
|
-
"providerId"
|
|
783
|
-
]
|
|
681
|
+
"required": ["providerId"]
|
|
784
682
|
},
|
|
785
683
|
"KmsProviderGetKeyArgs": {
|
|
786
684
|
"type": "object",
|
|
@@ -795,10 +693,7 @@
|
|
|
795
693
|
"type": "string"
|
|
796
694
|
}
|
|
797
695
|
},
|
|
798
|
-
"required": [
|
|
799
|
-
"providerId",
|
|
800
|
-
"aliasOrKid"
|
|
801
|
-
],
|
|
696
|
+
"required": ["providerId", "aliasOrKid"],
|
|
802
697
|
"additionalProperties": false
|
|
803
698
|
},
|
|
804
699
|
"KmsProviderListKeysArgs": {
|
|
@@ -811,9 +706,7 @@
|
|
|
811
706
|
"type": "string"
|
|
812
707
|
}
|
|
813
708
|
},
|
|
814
|
-
"required": [
|
|
815
|
-
"providerId"
|
|
816
|
-
],
|
|
709
|
+
"required": ["providerId"],
|
|
817
710
|
"additionalProperties": false
|
|
818
711
|
},
|
|
819
712
|
"KmsProviderStoreKey": {
|
|
@@ -837,10 +730,7 @@
|
|
|
837
730
|
"type": "string"
|
|
838
731
|
}
|
|
839
732
|
},
|
|
840
|
-
"required": [
|
|
841
|
-
"keyInfo",
|
|
842
|
-
"providerId"
|
|
843
|
-
]
|
|
733
|
+
"required": ["keyInfo", "providerId"]
|
|
844
734
|
},
|
|
845
735
|
"ResolvedKeyInfo": {
|
|
846
736
|
"type": "object",
|
|
@@ -887,9 +777,7 @@
|
|
|
887
777
|
"description": "Additional configuration options as key-value pairs."
|
|
888
778
|
}
|
|
889
779
|
},
|
|
890
|
-
"required": [
|
|
891
|
-
"key"
|
|
892
|
-
],
|
|
780
|
+
"required": ["key"],
|
|
893
781
|
"additionalProperties": false,
|
|
894
782
|
"description": "Represents a resolved cryptographic key information where the key is guaranteed to be present and resolved, providing concrete access to the key."
|
|
895
783
|
},
|
|
@@ -921,10 +809,7 @@
|
|
|
921
809
|
"$ref": "#/components/schemas/String"
|
|
922
810
|
}
|
|
923
811
|
},
|
|
924
|
-
"required": [
|
|
925
|
-
"keyInfo",
|
|
926
|
-
"resolverId"
|
|
927
|
-
]
|
|
812
|
+
"required": ["keyInfo", "resolverId"]
|
|
928
813
|
},
|
|
929
814
|
"String": {
|
|
930
815
|
"type": "object",
|
|
@@ -933,9 +818,7 @@
|
|
|
933
818
|
"type": "number"
|
|
934
819
|
}
|
|
935
820
|
},
|
|
936
|
-
"required": [
|
|
937
|
-
"length"
|
|
938
|
-
],
|
|
821
|
+
"required": ["length"],
|
|
939
822
|
"additionalProperties": {
|
|
940
823
|
"type": "string"
|
|
941
824
|
}
|
|
@@ -958,9 +841,7 @@
|
|
|
958
841
|
"type": "string"
|
|
959
842
|
}
|
|
960
843
|
},
|
|
961
|
-
"required": [
|
|
962
|
-
"keyInfo"
|
|
963
|
-
]
|
|
844
|
+
"required": ["keyInfo"]
|
|
964
845
|
}
|
|
965
846
|
},
|
|
966
847
|
"methods": {
|
|
@@ -1120,4 +1001,4 @@
|
|
|
1120
1001
|
}
|
|
1121
1002
|
}
|
|
1122
1003
|
}
|
|
1123
|
-
}
|
|
1004
|
+
}
|
|
@@ -21,7 +21,7 @@ import type {
|
|
|
21
21
|
KmsProviderDeleteKeyArgs,
|
|
22
22
|
RestClientAuthenticationOpts,
|
|
23
23
|
KmsRestClientArgs,
|
|
24
|
-
KmsIsValidRawSignatureArgs
|
|
24
|
+
KmsIsValidRawSignatureArgs,
|
|
25
25
|
} from '../types/IKmsRestClient'
|
|
26
26
|
import type {
|
|
27
27
|
CreateRawSignature,
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
VerifyRawSignatureResponseFromJSONTyped,
|
|
58
58
|
StoreKeyToJSONTyped,
|
|
59
59
|
VerifyRawSignatureToJSONTyped,
|
|
60
|
-
KeyProviderResponseFromJSONTyped
|
|
60
|
+
KeyProviderResponseFromJSONTyped,
|
|
61
61
|
} from '../models'
|
|
62
62
|
|
|
63
63
|
const logger = Loggers.DEFAULT.get('sphereon:ssi-sdk:kms:rest-client')
|
|
@@ -86,7 +86,7 @@ export class KmsRestClient implements IAgentPlugin {
|
|
|
86
86
|
kmsResolveKey: this.kmsResolveKey.bind(this),
|
|
87
87
|
|
|
88
88
|
kmsCreateRawSignature: this.kmsCreateRawSignature.bind(this),
|
|
89
|
-
kmsIsValidRawSignature: this.kmsIsValidRawSignature.bind(this)
|
|
89
|
+
kmsIsValidRawSignature: this.kmsIsValidRawSignature.bind(this),
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
private readonly agentBaseUrl?: string
|
|
@@ -109,7 +109,7 @@ export class KmsRestClient implements IAgentPlugin {
|
|
|
109
109
|
const url = KmsRestClient.urlWithBase(`/resolvers/${args.resolverId}`, baseUrl)
|
|
110
110
|
|
|
111
111
|
const response = await fetch(url, {
|
|
112
|
-
method: 'GET'
|
|
112
|
+
method: 'GET',
|
|
113
113
|
})
|
|
114
114
|
logger.debug(`get resolver response: ${response}`)
|
|
115
115
|
|
|
@@ -126,7 +126,7 @@ export class KmsRestClient implements IAgentPlugin {
|
|
|
126
126
|
const url = KmsRestClient.urlWithBase('/resolvers', baseUrl)
|
|
127
127
|
|
|
128
128
|
const response = await fetch(url, {
|
|
129
|
-
method: 'GET'
|
|
129
|
+
method: 'GET',
|
|
130
130
|
})
|
|
131
131
|
logger.debug(`list resolvers response: ${response}`)
|
|
132
132
|
|
|
@@ -146,7 +146,7 @@ export class KmsRestClient implements IAgentPlugin {
|
|
|
146
146
|
keyInfo: args.keyInfo,
|
|
147
147
|
identifierMethod: args.identifierMethod,
|
|
148
148
|
trustedCerts: args.trustedCerts,
|
|
149
|
-
verifyX509CertificateChain: args.verifyX509CertificateChain
|
|
149
|
+
verifyX509CertificateChain: args.verifyX509CertificateChain,
|
|
150
150
|
} satisfies ResolvePublicKey
|
|
151
151
|
const response = await fetch(url, {
|
|
152
152
|
method: 'POST',
|
|
@@ -215,7 +215,7 @@ export class KmsRestClient implements IAgentPlugin {
|
|
|
215
215
|
const url = KmsRestClient.urlWithBase(`/keys/${args.aliasOrKid}`, baseUrl)
|
|
216
216
|
|
|
217
217
|
const response = await fetch(url, {
|
|
218
|
-
method: 'GET'
|
|
218
|
+
method: 'GET',
|
|
219
219
|
})
|
|
220
220
|
logger.debug(`get key response: ${response}`)
|
|
221
221
|
|
|
@@ -297,7 +297,7 @@ export class KmsRestClient implements IAgentPlugin {
|
|
|
297
297
|
const url = KmsRestClient.urlWithBase(`/keys/${args.aliasOrKid}`, baseUrl)
|
|
298
298
|
|
|
299
299
|
await fetch(url, {
|
|
300
|
-
method: 'DELETE'
|
|
300
|
+
method: 'DELETE',
|
|
301
301
|
})
|
|
302
302
|
|
|
303
303
|
return true
|
|
@@ -309,7 +309,7 @@ export class KmsRestClient implements IAgentPlugin {
|
|
|
309
309
|
const url = KmsRestClient.urlWithBase(`/providers/${args.providerId}`, baseUrl)
|
|
310
310
|
|
|
311
311
|
const response = await fetch(url, {
|
|
312
|
-
method: 'GET'
|
|
312
|
+
method: 'GET',
|
|
313
313
|
})
|
|
314
314
|
logger.debug(`get provider response: ${response}`)
|
|
315
315
|
|
|
@@ -326,7 +326,7 @@ export class KmsRestClient implements IAgentPlugin {
|
|
|
326
326
|
const url = KmsRestClient.urlWithBase('/providers', baseUrl)
|
|
327
327
|
|
|
328
328
|
const response = await fetch(url, {
|
|
329
|
-
method: 'GET'
|
|
329
|
+
method: 'GET',
|
|
330
330
|
})
|
|
331
331
|
logger.debug(`list providers response: ${response}`)
|
|
332
332
|
|
|
@@ -343,7 +343,7 @@ export class KmsRestClient implements IAgentPlugin {
|
|
|
343
343
|
const url = KmsRestClient.urlWithBase(`/providers/${args.providerId}/keys`, baseUrl)
|
|
344
344
|
|
|
345
345
|
const response = await fetch(url, {
|
|
346
|
-
method: 'GET'
|
|
346
|
+
method: 'GET',
|
|
347
347
|
})
|
|
348
348
|
logger.debug(`list provider keys response: ${response}`)
|
|
349
349
|
|
|
@@ -407,7 +407,7 @@ export class KmsRestClient implements IAgentPlugin {
|
|
|
407
407
|
const url = KmsRestClient.urlWithBase(`/providers/${args.providerId}/keys/${args.aliasOrKid}`, baseUrl)
|
|
408
408
|
|
|
409
409
|
const response = await fetch(url, {
|
|
410
|
-
method: 'GET'
|
|
410
|
+
method: 'GET',
|
|
411
411
|
})
|
|
412
412
|
logger.debug(`get provider key response: ${response}`)
|
|
413
413
|
|
|
@@ -424,7 +424,7 @@ export class KmsRestClient implements IAgentPlugin {
|
|
|
424
424
|
const url = KmsRestClient.urlWithBase(`providers/${args.providerId}/keys/${args.aliasOrKid}`, baseUrl)
|
|
425
425
|
|
|
426
426
|
await fetch(url, {
|
|
427
|
-
method: 'DELETE'
|
|
427
|
+
method: 'DELETE',
|
|
428
428
|
})
|
|
429
429
|
|
|
430
430
|
return true
|
|
@@ -456,13 +456,12 @@ export class KmsRestClient implements IAgentPlugin {
|
|
|
456
456
|
}
|
|
457
457
|
|
|
458
458
|
private addSearchParams(baseUrl: string, params: Record<string, string | number | boolean>): URL {
|
|
459
|
-
const url = new URL(baseUrl)
|
|
459
|
+
const url = new URL(baseUrl)
|
|
460
460
|
|
|
461
461
|
for (const [key, value] of Object.entries(params)) {
|
|
462
|
-
url.searchParams.set(key, String(value))
|
|
462
|
+
url.searchParams.set(key, String(value))
|
|
463
463
|
}
|
|
464
464
|
|
|
465
|
-
return url
|
|
465
|
+
return url
|
|
466
466
|
}
|
|
467
|
-
|
|
468
467
|
}
|