-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkms-openapi.yml
More file actions
2926 lines (2810 loc) · 111 KB
/
Copy pathkms-openapi.yml
File metadata and controls
2926 lines (2810 loc) · 111 KB
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
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.4
info:
title: KMS REST Server API
version: 0.1.0
description: |
The Key Management System (KMS) REST API lets an application manage cryptographic keys
and perform raw signing operations without handling private key material directly. A key
provider is a configured backend that holds and operates on keys: a software (in-memory
or persisted) provider, AWS KMS, or Azure Key Vault. The API lets you inspect the
configured key providers; generate keys, register existing provider keys, import
externally supplied keys, and list or look up keys by alias or kid (key id); resolve a
public key (for example from a JWK, kid, X.509 chain, or DID) through a key resolver
service; and create and verify raw detached signatures over arbitrary bytes using a
managed key.
Keys are addressed either by a chosen `alias` (for example `my-signing-key`) or by their
generated `kid` (for example `00-qTBov6GxjPSuMNxnk876cMP0JKjbwl4ZyN_sY2tE`). Every key
belongs to exactly one provider, identified by a `providerId` such as `testsoftware`.
Signing input and signature bytes are carried as base64-encoded strings on the wire.
Every request must carry a JWT bearer token in the `Authorization` header
(`Authorization: Bearer <token>`). The token is the sole authentication and
tenant-resolution mechanism. The optional `X-Tenant-ID` and `X-User-ID` headers are
impersonation hints only and are never used as an authentication fallback; they are
ignored unless the caller is already authorized to act on behalf of that tenant or user.
Keys are isolated per tenant, so a key generated for one tenant is never visible to
another.
contact:
name: Sphereon International B.V.
email: support@sphereon.com
url: 'https://sphereon.com'
servers:
- url: http://localhost:8080/api/kms/v1
description: Development server
tags:
- name: Providers
description: >
Inspect configured key providers and manage the keys held by a specific provider
(list, generate, import, get, delete under /providers/{providerId}).
- name: KMS
description: >
Provider-agnostic key operations across all of the tenant's providers
(list, generate, import, register, get, delete under /keys).
- name: Resolvers
description: >
Inspect key resolver services and resolve a public key from a reference such as a
JWK, kid, X.509 chain, or DID.
- name: Signatures
description: Create and verify raw (detached) cryptographic signatures using a managed key.
- name: Capabilities
description: Inspect provider capabilities and select providers by capability criteria.
- name: Encryption
description: Encrypt, decrypt, wrap, unwrap, and perform key agreement using managed keys.
- name: Certificates
description: Generate CSRs, issue X.509 certificates, and manage certificate stores.
security:
- bearer: [ ]
paths:
/providers:
get:
tags: [ Providers ]
summary: List configured key providers
description: >
Returns every key provider that is configured and available for the calling
tenant. Providers are configured server-side (for example a `SOFTWARE`,
`AWS_KMS`, or `AZURE_KEYVAULT` provider); this endpoint does not create them.
Use the returned `providerId` (for example `testsoftware`) to scope key
operations to a specific provider.
operationId: listKeyProviders
parameters:
- $ref: './common-components.yml#/components/parameters/UserId'
- $ref: './common-components.yml#/components/parameters/TenantId'
responses:
'200':
description: A list of Key Provider configurations.
content:
application/json:
schema:
$ref: '#/components/schemas/ListKeyProvidersResponse'
example:
providers:
- providerId: "testsoftware"
type: "SOFTWARE"
'500':
$ref: '#/components/responses/InternalServerError'
# post:
# tags: [ Providers ]
# summary: Create a new Key Provider
# operationId: createKeyProvider
# requestBody:
# $ref: '#/components/requestBodies/CreateKeyProviderRequest'
# responses:
# '201':
# description: Key Provider created successfully.
# content:
# application/json:
# schema:
# $ref: '#/components/schemas/KeyProviderResponse'
# '400':
# $ref: '#/components/responses/BadRequest'
# '500':
# $ref: '#/components/responses/InternalServerError'
/providers/{providerId}:
parameters:
- $ref: '#/components/parameters/ProviderId'
- $ref: './common-components.yml#/components/parameters/UserId'
- $ref: './common-components.yml#/components/parameters/TenantId'
get:
tags: [ Providers ]
summary: Get key provider details
description: >
Returns the configuration details of a single key provider identified by its
`providerId` path parameter (for example `testsoftware`). Returns 404 if no
provider with that id is configured for the calling tenant.
operationId: getKeyProvider
responses:
'200':
description: Key Provider details retrieved successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/KeyProviderResponse'
example:
providerId: "testsoftware"
type: "SOFTWARE"
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalServerError'
# put:
# tags: [ Providers ]
# summary: Update Key Provider configuration
# operationId: updateKeyProvider
# requestBody:
# $ref: '#/components/requestBodies/UpdateKeyProviderRequest'
# responses:
# '200':
# description: Key Provider updated successfully.
# content:
# application/json:
# schema:
# $ref: '#/components/schemas/KeyProviderResponse'
# '400':
# $ref: '#/components/responses/BadRequest'
# '404':
# $ref: '#/components/responses/NotFound'
# '500':
# $ref: '#/components/responses/InternalServerError'
# delete:
# tags: [ Providers ]
# summary: Delete Key Provider
# operationId: deleteKeyProvider
# responses:
# '204':
# description: Key Provider deleted successfully.
# '404':
# $ref: '#/components/responses/NotFound'
# '500':
# $ref: '#/components/responses/InternalServerError'
/providers/{providerId}/keys:
parameters:
- $ref: '#/components/parameters/ProviderId'
- $ref: './common-components.yml#/components/parameters/UserId'
- $ref: './common-components.yml#/components/parameters/TenantId'
get:
tags: [ Providers ]
summary: List all managed cryptographic keys for a provider
description: >
Lists the keys managed by the provider identified by `providerId`. Only key
metadata is returned (alias, kid, algorithm, type); private key material is
never included. Returns 404 if the provider id is unknown for the calling
tenant. Results are scoped to the calling tenant only.
operationId: providerListKeys
responses:
'200':
description: A list of all managed keys
content:
application/json:
schema:
$ref: '#/components/schemas/ListKeysResponse'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalServerError'
post:
tags: [ Providers ]
summary: Generate a new key in a provider
description: >
Generates a new key inside the provider identified by `providerId`. The
request body selects the signature algorithm (for example `ECDSA_SHA256`), and
optionally an `alias`, intended `use` (`sig`/`enc`), and `keyOperations`. If no
alias is given the provider assigns one. The response contains the generated key
pair including its `kid`, `alias`, and the public JWK. Returns 404 if the
provider id is unknown, or 400 if the requested algorithm is not supported.
operationId: providerGenerateKey
requestBody:
$ref: '#/components/requestBodies/GenerateKeyRequest'
responses:
'201':
description: Key generated successfully
content:
application/json:
schema:
$ref: '#/components/schemas/GenerateKeyResponse'
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalServerError'
/providers/{providerId}/keys/import:
parameters:
- $ref: '#/components/parameters/ProviderId'
- $ref: './common-components.yml#/components/parameters/UserId'
- $ref: './common-components.yml#/components/parameters/TenantId'
post:
tags: [ Providers ]
summary: Import externally supplied key material into a provider
description: >
Imports a key that you already hold (its key material is supplied in the request
body as a JWK) into the provider identified by `providerId`. The body must carry
a fully resolved `keyInfo` (the `key` JWK is required). Returns 404 if the
provider id is unknown, or 400 if the supplied keyInfo is invalid.
operationId: providerImportKey
requestBody:
$ref: '#/components/requestBodies/ImportKeyRequest'
responses:
'201':
description: Key imported successfully
content:
application/json:
schema:
$ref: '#/components/schemas/ImportKeyResponse'
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalServerError'
/providers/{providerId}/keys/{aliasOrKid}:
parameters:
- $ref: '#/components/parameters/ProviderId'
- $ref: '#/components/parameters/AliasOrKid'
- $ref: './common-components.yml#/components/parameters/UserId'
- $ref: './common-components.yml#/components/parameters/TenantId'
get:
tags: [ Providers ]
summary: Get a specific managed key by alias or kid
description: >
Looks up a single key in the provider identified by `providerId`. The
`aliasOrKid` path parameter may be either the key's alias (for example
`my-signing-key`) or its kid (for example
`00-qTBov6GxjPSuMNxnk876cMP0JKjbwl4ZyN_sY2tE`). Returns 404 if the provider id
is unknown or no key matches the alias or kid in that provider.
operationId: providerGetKey
responses:
'200':
description: The managed key for the specified provider
content:
application/json:
schema:
$ref: '#/components/schemas/GetKeyResponse'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalServerError'
# put:
# tags: [ Providers ]
# summary: Update a stored key (reserved for future use)
# operationId: updateKey
# requestBody:
# $ref: '#/components/requestBodies/UpdateKeyRequest'
# responses:
# '200':
# description: Key updated successfully
# content:
# application/json:
# schema:
# $ref: '#/components/schemas/ManagedKeyInfo'
# '400':
# $ref: '#/components/responses/BadRequest'
# '404':
# $ref: '#/components/responses/NotFound'
# '500':
# $ref: '#/components/responses/InternalServerError'
delete:
tags: [ Providers ]
summary: Delete a key from a provider
description: >
Permanently removes the key identified by `aliasOrKid` from the provider
identified by `providerId`. The `aliasOrKid` may be the key's alias or its kid.
Returns 204 with no body on success, or 404 if the provider id is unknown or no
matching key exists.
operationId: providerDeleteKey
responses:
'204':
description: Key deleted successfully
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalServerError'
# /providers/{providerId}/signatures/simple:
# parameters:
# - $ref: '#/components/parameters/ProviderId'
# post:
# tags: [ Signatures ]
# summary: Create a digital signature
# operationId: createSimpleSignature
# requestBody:
# $ref: '#/components/requestBodies/CreateSimpleSignatureRequest'
# responses:
# '201':
# description: Signature created successfully
# content:
# application/json:
# schema:
# $ref: '#/components/schemas/SignOutput'
# '400':
# $ref: '#/components/responses/BadRequest'
# '404':
# $ref: '#/components/responses/NotFound'
# '500':
# $ref: '#/components/responses/InternalServerError'
#
# /providers/{providerId}/signatures/simple/verify:
# parameters:
# - $ref: '#/components/parameters/ProviderId'
# post:
# tags: [ Signatures ]
# summary: Verify a digital signature
# operationId: isValidSimpleSignature
# requestBody:
# $ref: '#/components/requestBodies/VerifySimpleSignatureRequest'
# responses:
# '200':
# description: Signature verification performed successfully
# content:
# application/json:
# schema:
# $ref: '#/components/schemas/SignatureVerificationResponse'
# '400':
# $ref: '#/components/responses/BadRequest'
# '500':
# $ref: '#/components/responses/InternalServerError'
/capabilities:
get:
tags: [ Capabilities ]
summary: List provider capabilities
description: >
Returns the capability report for every configured provider. Disabled providers
are excluded by default.
operationId: listCapabilities
parameters:
- name: includeDisabled
in: query
required: false
schema:
type: boolean
default: false
description: Include disabled providers in the capability report.
- $ref: './common-components.yml#/components/parameters/UserId'
- $ref: './common-components.yml#/components/parameters/TenantId'
responses:
'200':
description: Capabilities for configured providers.
content:
application/json:
schema:
$ref: '#/components/schemas/ListCapabilitiesResponse'
example:
providers:
- providerId: "testsoftware"
capabilities:
providerId: "testsoftware"
providerType: "software"
storageTypes: [ "PERSISTENT", "EPHEMERAL" ]
supportsKeyImport: true
supportsKeyExport: true
exposePrivateKeys: false
operations:
- operation: "GENERATE_KEY"
supported: true
signatureAlgorithms: [ "ECDSA_SHA256", "ED25519" ]
- operation: "ENCRYPT"
supported: true
contentEncryptionAlgorithms: [ "A128GCM", "A256GCM" ]
- operation: "WRAP_KEY"
supported: true
keyWrapAlgorithms: [ "A128KW", "A256KW" ]
supportedKeyTypes: [ "EC", "OKP", "RSA", "OCT" ]
supportedCurves: [ "P-256", "P-384", "Ed25519", "X25519" ]
supportedCryptoAlgorithms: [ "ECDSA", "ED25519", "X25519", "RSA" ]
supportedDigestAlgorithms: [ "SHA256", "SHA384", "SHA512" ]
signatureAlgorithms: [ "ECDSA_SHA256", "ED25519", "RSA_SHA256" ]
contentEncryptionAlgorithms: [ "A128GCM", "A256GCM" ]
supportsX509: true
supportsAttestation: false
supportsHardwareBacking: false
supportsPublicKeyResolution: true
resolutionMethods: [ "kid", "key_alias", "jwk" ]
'500':
$ref: '#/components/responses/InternalServerError'
/providers/{providerId}/capabilities:
parameters:
- $ref: '#/components/parameters/ProviderId'
- $ref: './common-components.yml#/components/parameters/UserId'
- $ref: './common-components.yml#/components/parameters/TenantId'
get:
tags: [ Capabilities ]
summary: Get capabilities for one provider
operationId: getProviderCapabilities
responses:
'200':
description: Capabilities for the requested provider.
content:
application/json:
schema:
$ref: '#/components/schemas/ProviderCapabilitiesResponse'
example:
providerId: "testsoftware"
capabilities:
providerId: "testsoftware"
providerType: "software"
storageTypes: [ "PERSISTENT" ]
supportsKeyImport: true
supportsKeyExport: true
exposePrivateKeys: false
operations:
- operation: "SIGN"
supported: true
signatureAlgorithms: [ "ECDSA_SHA256", "ED25519" ]
- operation: "ENCRYPT"
supported: true
contentEncryptionAlgorithms: [ "A256GCM" ]
supportedKeyTypes: [ "EC", "OKP", "OCT" ]
supportedCurves: [ "P-256", "Ed25519", "X25519" ]
supportedCryptoAlgorithms: [ "ECDSA", "ED25519", "X25519" ]
supportedDigestAlgorithms: [ "SHA256", "SHA512" ]
signatureAlgorithms: [ "ECDSA_SHA256", "ED25519" ]
contentEncryptionAlgorithms: [ "A256GCM" ]
supportsX509: true
supportsAttestation: false
supportsHardwareBacking: false
supportsPublicKeyResolution: true
resolutionMethods: [ "kid", "key_alias", "jwk" ]
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalServerError'
/providers/query:
post:
tags: [ Capabilities ]
summary: Query matching providers
description: Returns all providers matching the supplied capability criteria.
operationId: queryProviders
parameters:
- $ref: './common-components.yml#/components/parameters/UserId'
- $ref: './common-components.yml#/components/parameters/TenantId'
requestBody:
$ref: '#/components/requestBodies/ProviderQueryRequest'
responses:
'200':
description: Matching providers.
content:
application/json:
schema:
$ref: '#/components/schemas/QueryProvidersResponse'
example:
matches:
- providerId: "testsoftware"
matchScore: 100
capabilities:
providerId: "testsoftware"
providerType: "software"
storageTypes: [ "PERSISTENT" ]
supportsKeyImport: true
supportsKeyExport: true
exposePrivateKeys: false
operations:
- operation: "ENCRYPT"
supported: true
contentEncryptionAlgorithms: [ "A256GCM" ]
supportedKeyTypes: [ "OCT" ]
supportedCurves: [ ]
supportedCryptoAlgorithms: [ "HMAC" ]
supportedDigestAlgorithms: [ "SHA256" ]
signatureAlgorithms: [ "HMAC_SHA256" ]
contentEncryptionAlgorithms: [ "A256GCM" ]
supportsX509: true
supportsAttestation: false
supportsHardwareBacking: false
supportsPublicKeyResolution: true
resolutionMethods: [ "kid", "key_alias" ]
totalProviders: 2
matchCount: 1
'400':
$ref: '#/components/responses/BadRequest'
'500':
$ref: '#/components/responses/InternalServerError'
/providers/query/best:
post:
tags: [ Capabilities ]
summary: Query the best matching provider
description: Returns the best provider matching the supplied capability criteria.
operationId: queryBestProvider
parameters:
- $ref: './common-components.yml#/components/parameters/UserId'
- $ref: './common-components.yml#/components/parameters/TenantId'
requestBody:
$ref: '#/components/requestBodies/ProviderQueryRequest'
responses:
'200':
description: Best matching provider, or null if no provider matches.
content:
application/json:
schema:
$ref: '#/components/schemas/QueryBestProviderResponse'
example:
match:
providerId: "testsoftware"
matchScore: 100
'400':
$ref: '#/components/responses/BadRequest'
'500':
$ref: '#/components/responses/InternalServerError'
/encryption/encrypt:
post:
tags: [ Encryption ]
summary: Encrypt data
operationId: encrypt
parameters:
- $ref: './common-components.yml#/components/parameters/UserId'
- $ref: './common-components.yml#/components/parameters/TenantId'
requestBody:
$ref: '#/components/requestBodies/EncryptRequest'
responses:
'200':
description: Encrypted data and AEAD parameters.
content:
application/json:
schema:
$ref: '#/components/schemas/EncryptResponse'
example:
ciphertext: "8rj9iBf2Vv5uQmE="
iv: "QkM0hQDUzC7Vqvut"
authTag: "t6YF2+0M0vO7vKq9Qh7uQg=="
'400':
$ref: '#/components/responses/BadRequest'
'500':
$ref: '#/components/responses/InternalServerError'
/encryption/decrypt:
post:
tags: [ Encryption ]
summary: Decrypt data
operationId: decrypt
parameters:
- $ref: './common-components.yml#/components/parameters/UserId'
- $ref: './common-components.yml#/components/parameters/TenantId'
requestBody:
$ref: '#/components/requestBodies/DecryptRequest'
responses:
'200':
description: Decrypted plaintext.
content:
application/json:
schema:
$ref: '#/components/schemas/DecryptResponse'
example:
plaintext: "aGVsbG8="
'400':
$ref: '#/components/responses/BadRequest'
'500':
$ref: '#/components/responses/InternalServerError'
/encryption/wrap:
post:
tags: [ Encryption ]
summary: Wrap a key
operationId: wrapKey
parameters:
- $ref: './common-components.yml#/components/parameters/UserId'
- $ref: './common-components.yml#/components/parameters/TenantId'
requestBody:
$ref: '#/components/requestBodies/WrapKeyRequest'
responses:
'200':
description: Wrapped key material.
content:
application/json:
schema:
$ref: '#/components/schemas/WrapKeyResponse'
example:
wrappedKey: "q83vEj6GTdS3BzN9vdS6F4x1j9p5vQ=="
'400':
$ref: '#/components/responses/BadRequest'
'500':
$ref: '#/components/responses/InternalServerError'
/encryption/unwrap:
post:
tags: [ Encryption ]
summary: Unwrap a key
operationId: unwrapKey
parameters:
- $ref: './common-components.yml#/components/parameters/UserId'
- $ref: './common-components.yml#/components/parameters/TenantId'
requestBody:
$ref: '#/components/requestBodies/UnwrapKeyRequest'
responses:
'200':
description: Unwrapped key material.
content:
application/json:
schema:
$ref: '#/components/schemas/UnwrapKeyResponse'
example:
unwrappedKey: "MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDE="
'400':
$ref: '#/components/responses/BadRequest'
'500':
$ref: '#/components/responses/InternalServerError'
/encryption/key-agreement:
post:
tags: [ Encryption ]
summary: Perform key agreement
operationId: performKeyAgreement
parameters:
- $ref: './common-components.yml#/components/parameters/UserId'
- $ref: './common-components.yml#/components/parameters/TenantId'
requestBody:
$ref: '#/components/requestBodies/KeyAgreementRequest'
responses:
'200':
description: Derived shared secret.
content:
application/json:
schema:
$ref: '#/components/schemas/KeyAgreementResponse'
example:
sharedSecret: "oN1hJdAhtf3SW+pm1da4DyxLSFhP0YE6FnW9EeYk7rk="
'400':
$ref: '#/components/responses/BadRequest'
'500':
$ref: '#/components/responses/InternalServerError'
/certificates/csr:
post:
tags: [ Certificates ]
summary: Generate a certificate signing request
operationId: generateCertificateSigningRequest
parameters:
- $ref: './common-components.yml#/components/parameters/UserId'
- $ref: './common-components.yml#/components/parameters/TenantId'
requestBody:
$ref: '#/components/requestBodies/GenerateCertificateSigningRequestRequest'
responses:
'200':
description: Certificate signing request.
content:
application/json:
schema:
$ref: '#/components/schemas/CertificateSigningRequestResponse'
example:
der: "MIIBKDCBzwIBADCBiTELMAkGA1UEBhMCTkwxETAPBgNVBAgMCE92ZXJpanNzZWwxETAPBgNVBAcMCEVuc2NoZWRlMRAwDgYDVQQKDAdTcGhlcmVvbjEVMBMGA1UECwwMSWRlbnRpdHkgS0xTMSEwHwYDVQQDDBhhZGFwdGVyLXRlc3QuZXhhbXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAASH7p4t3S8CwqTq6m3VZ1B4Kq+zqC5VJxJXx8Yo+9H6c2S6rX8J2Vz5v7s6pBzQz6T1+fQF7rF1Y8fWf+Yc7oAAwCgYIKoZIzj0EAwIDSAAwRQIhAMiJjZ9Z5w8L7V2qO5n3YgO4Q3t4V6qIh3e3c4C5l7vDAiBd9c0r2k1mWm7y6iY9fKq8pC4d2x3v5z6a7b8c9d0e1g=="
commonName: "adapter-test.example.com"
organization: "Sphereon"
organizationalUnit: "Identity KMS"
locality: "Enschede"
state: "Overijssel"
country: "NL"
email: "security@example.com"
serialNumber: 42
'400':
$ref: '#/components/responses/BadRequest'
'500':
$ref: '#/components/responses/InternalServerError'
/certificates/issue:
post:
tags: [ Certificates ]
summary: Issue a certificate
operationId: issueCertificate
parameters:
- $ref: './common-components.yml#/components/parameters/UserId'
- $ref: './common-components.yml#/components/parameters/TenantId'
requestBody:
$ref: '#/components/requestBodies/IssueCertificateRequest'
responses:
'200':
description: Issued certificate.
content:
application/json:
schema:
$ref: '#/components/schemas/CertificateResponse'
example:
certificate: "MIIBrTCCAVOgAwIBAgIBKjAKBggqhkjOPQQDAjCBiTELMAkGA1UEBhMCTkwxETAPBgNVBAgMCE92ZXJpanNzZWwxETAPBgNVBAcMCEVuc2NoZWRlMRAwDgYDVQQKDAdTcGhlcmVvbjEVMBMGA1UECwwMSWRlbnRpdHkgS0xTMSEwHwYDVQQDDBhhZGFwdGVyLXRlc3QuZXhhbXBsZS5jb20wHhcNMjYwNjEyMDAwMDAwWhcNMjcwNjEyMDAwMDAwWjCBiTELMAkGA1UEBhMCTkwxETAPBgNVBAgMCE92ZXJpanNzZWwxETAPBgNVBAcMCEVuc2NoZWRlMRAwDgYDVQQKDAdTcGhlcmVvbjEVMBMGA1UECwwMSWRlbnRpdHkgS0xTMSEwHwYDVQQDDBhhZGFwdGVyLXRlc3QuZXhhbXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAASH7p4t3S8CwqTq6m3VZ1B4Kq+zqC5VJxJXx8Yo+9H6c2S6rX8J2Vz5v7s6pBzQz6T1+fQF7rF1Y8fWf+Yc7MAoGCCqGSM49BAMCA0cAMEQCIGC4wURyX5Tq5G1mdxNhGxVh8wK72L6X8RhgG55zV1i5AiA3CN8Z+M+Hh+z4RO+f5YqZlE7CqLjO3iHcEJdU2r6eHg=="
keyInfo:
key:
kty: "EC"
kid: "00-qTBov6GxjPSuMNxnk876cMP0JKjbwl4ZyN_sY2tE"
crv: "P-256"
x: "HFL67WWh6PYWKOy1mzt9Y2ANs-CWFIyVtouR-Jx_mAM"
y: "9f_1x7fwUuEbEwxSNTYE3jQF-zForWpKkEMpiUp1MNI"
kid: "00-qTBov6GxjPSuMNxnk876cMP0JKjbwl4ZyN_sY2tE"
alias: "tls-issuer-key"
providerId: "testsoftware"
signatureAlgorithm: "ECDSA_SHA256"
keyVisibility: "PUBLIC"
keyEncoding: "JOSE"
keyType: "EC"
'400':
$ref: '#/components/responses/BadRequest'
'500':
$ref: '#/components/responses/InternalServerError'
/certificates/issue-from-csr:
post:
tags: [ Certificates ]
summary: Issue a certificate from a CSR
operationId: issueCertificateFromCsr
parameters:
- $ref: './common-components.yml#/components/parameters/UserId'
- $ref: './common-components.yml#/components/parameters/TenantId'
requestBody:
$ref: '#/components/requestBodies/IssueCertificateFromCsrRequest'
responses:
'200':
description: Issued certificate.
content:
application/json:
schema:
$ref: '#/components/schemas/CertificateResponse'
example:
certificate: "MIIBrTCCAVOgAwIBAgIBKzAKBggqhkjOPQQDAjCBiTELMAkGA1UEBhMCTkwxETAPBgNVBAgMCE92ZXJpanNzZWwxETAPBgNVBAcMCEVuc2NoZWRlMRAwDgYDVQQKDAdTcGhlcmVvbjEVMBMGA1UECwwMSWRlbnRpdHkgS0xTMSEwHwYDVQQDDBhhZGFwdGVyLXRlc3QuZXhhbXBsZS5jb20wHhcNMjYwNjEyMDAwMDAwWhcNMjcwNjEyMDAwMDAwWjCBiTELMAkGA1UEBhMCTkwxETAPBgNVBAgMCE92ZXJpanNzZWwxETAPBgNVBAcMCEVuc2NoZWRlMRAwDgYDVQQKDAdTcGhlcmVvbjEVMBMGA1UECwwMSWRlbnRpdHkgS0xTMSEwHwYDVQQDDBhhZGFwdGVyLXRlc3QuZXhhbXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAASH7p4t3S8CwqTq6m3VZ1B4Kq+zqC5VJxJXx8Yo+9H6c2S6rX8J2Vz5v7s6pBzQz6T1+fQF7rF1Y8fWf+Yc7MAoGCCqGSM49BAMCA0cAMEQCIA0qMoaE0kCw8wzpQdDty2oWpQ8Y9U7nXH9uwQdU3smlAiBvpTYZyM1aEYm8kA8xU+HmD2iMabvB8Oa3dY5yp3WBwA=="
keyInfo:
key:
kty: "EC"
kid: "00-qTBov6GxjPSuMNxnk876cMP0JKjbwl4ZyN_sY2tE"
crv: "P-256"
x: "HFL67WWh6PYWKOy1mzt9Y2ANs-CWFIyVtouR-Jx_mAM"
y: "9f_1x7fwUuEbEwxSNTYE3jQF-zForWpKkEMpiUp1MNI"
kid: "00-qTBov6GxjPSuMNxnk876cMP0JKjbwl4ZyN_sY2tE"
alias: "tls-subject-key"
providerId: "testsoftware"
signatureAlgorithm: "ECDSA_SHA256"
keyVisibility: "PUBLIC"
keyEncoding: "JOSE"
keyType: "EC"
'400':
$ref: '#/components/responses/BadRequest'
'500':
$ref: '#/components/responses/InternalServerError'
/certificates:
get:
tags: [ Certificates ]
summary: List trusted certificate aliases
operationId: listTrustedCertificateAliases
parameters:
- name: providerId
in: query
required: false
schema:
type: string
description: Optional provider whose certificate store should be used.
- $ref: './common-components.yml#/components/parameters/UserId'
- $ref: './common-components.yml#/components/parameters/TenantId'
responses:
'200':
description: Trusted certificate aliases.
content:
application/json:
schema:
$ref: '#/components/schemas/CertificateAliasesResponse'
example:
aliases: [ "root-ca", "issuer-ca" ]
'400':
$ref: '#/components/responses/BadRequest'
'500':
$ref: '#/components/responses/InternalServerError'
/certificates/{alias}:
parameters:
- name: alias
in: path
required: true
schema:
type: string
- name: providerId
in: query
required: false
schema:
type: string
description: Optional provider whose certificate store should be used.
- $ref: './common-components.yml#/components/parameters/UserId'
- $ref: './common-components.yml#/components/parameters/TenantId'
get:
tags: [ Certificates ]
summary: Get a trusted certificate
operationId: getTrustedCertificate
responses:
'200':
description: Trusted certificate.
content:
application/json:
schema:
$ref: '#/components/schemas/CertificateBytesResponse'
example:
certificate: "MIIBrTCCAVOgAwIBAgIBKjAKBggqhkjOPQQDAjCBiTELMAkGA1UEBhMCTkwxETAPBgNVBAgMCE92ZXJpanNzZWwxETAPBgNVBAcMCEVuc2NoZWRlMRAwDgYDVQQKDAdTcGhlcmVvbjEVMBMGA1UECwwMSWRlbnRpdHkgS0xTMSEwHwYDVQQDDBhhZGFwdGVyLXRlc3QuZXhhbXBsZS5jb20wHhcNMjYwNjEyMDAwMDAwWhcNMjcwNjEyMDAwMDAwWjCBiTELMAkGA1UEBhMCTkwxETAPBgNVBAgMCE92ZXJpanNzZWwxETAPBgNVBAcMCEVuc2NoZWRlMRAwDgYDVQQKDAdTcGhlcmVvbjEVMBMGA1UECwwMSWRlbnRpdHkgS0xTMSEwHwYDVQQDDBhhZGFwdGVyLXRlc3QuZXhhbXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAASH7p4t3S8CwqTq6m3VZ1B4Kq+zqC5VJxJXx8Yo+9H6c2S6rX8J2Vz5v7s6pBzQz6T1+fQF7rF1Y8fWf+Yc7MAoGCCqGSM49BAMCA0cAMEQCIGC4wURyX5Tq5G1mdxNhGxVh8wK72L6X8RhgG55zV1i5AiA3CN8Z+M+Hh+z4RO+f5YqZlE7CqLjO3iHcEJdU2r6eHg=="
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalServerError'
post:
tags: [ Certificates ]
summary: Store a trusted certificate
operationId: storeTrustedCertificate
requestBody:
$ref: '#/components/requestBodies/StoreCertificateRequest'
responses:
'201':
description: Trusted certificate stored.
content:
application/json:
schema:
$ref: '#/components/schemas/CertificateBytesResponse'
example:
certificate: "MIIBrTCCAVOgAwIBAgIBKjAKBggqhkjOPQQDAjCBiTELMAkGA1UEBhMCTkwxETAPBgNVBAgMCE92ZXJpanNzZWwxETAPBgNVBAcMCEVuc2NoZWRlMRAwDgYDVQQKDAdTcGhlcmVvbjEVMBMGA1UECwwMSWRlbnRpdHkgS0xTMSEwHwYDVQQDDBhhZGFwdGVyLXRlc3QuZXhhbXBsZS5jb20wHhcNMjYwNjEyMDAwMDAwWhcNMjcwNjEyMDAwMDAwWjCBiTELMAkGA1UEBhMCTkwxETAPBgNVBAgMCE92ZXJpanNzZWwxETAPBgNVBAcMCEVuc2NoZWRlMRAwDgYDVQQKDAdTcGhlcmVvbjEVMBMGA1UECwwMSWRlbnRpdHkgS0xTMSEwHwYDVQQDDBhhZGFwdGVyLXRlc3QuZXhhbXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAASH7p4t3S8CwqTq6m3VZ1B4Kq+zqC5VJxJXx8Yo+9H6c2S6rX8J2Vz5v7s6pBzQz6T1+fQF7rF1Y8fWf+Yc7MAoGCCqGSM49BAMCA0cAMEQCIGC4wURyX5Tq5G1mdxNhGxVh8wK72L6X8RhgG55zV1i5AiA3CN8Z+M+Hh+z4RO+f5YqZlE7CqLjO3iHcEJdU2r6eHg=="
'400':
$ref: '#/components/responses/BadRequest'
'500':
$ref: '#/components/responses/InternalServerError'
delete:
tags: [ Certificates ]
summary: Delete a trusted certificate
operationId: deleteTrustedCertificate
responses:
'204':
description: Trusted certificate deleted.
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalServerError'
/certificate-chains:
get:
tags: [ Certificates ]
summary: List certificate-chain aliases
operationId: listCertificateChainAliases
parameters:
- name: providerId
in: query
required: false
schema:
type: string
description: Optional provider whose certificate store should be used.
- $ref: './common-components.yml#/components/parameters/UserId'
- $ref: './common-components.yml#/components/parameters/TenantId'
responses:
'200':
description: Certificate-chain aliases.
content:
application/json:
schema:
$ref: '#/components/schemas/CertificateAliasesResponse'
example:
aliases: [ "issuer-chain", "wallet-trust-chain" ]
'400':
$ref: '#/components/responses/BadRequest'
'500':
$ref: '#/components/responses/InternalServerError'
/certificate-chains/{alias}:
parameters:
- name: alias
in: path
required: true
schema:
type: string
- name: providerId
in: query
required: false
schema:
type: string
description: Optional provider whose certificate store should be used.
- $ref: './common-components.yml#/components/parameters/UserId'
- $ref: './common-components.yml#/components/parameters/TenantId'
get:
tags: [ Certificates ]
summary: Get a certificate chain
operationId: getCertificateChain
responses:
'200':
description: Certificate chain.
content:
application/json:
schema:
$ref: '#/components/schemas/CertificateChainResponse'
example:
certificates:
- "MIIBrTCCAVOgAwIBAgIBKjAKBggqhkjOPQQDAjCBiTELMAkGA1UEBhMCTkwxETAPBgNVBAgMCE92ZXJpanNzZWwxETAPBgNVBAcMCEVuc2NoZWRlMRAwDgYDVQQKDAdTcGhlcmVvbjEVMBMGA1UECwwMSWRlbnRpdHkgS0xTMSEwHwYDVQQDDBhhZGFwdGVyLXRlc3QuZXhhbXBsZS5jb20wHhcNMjYwNjEyMDAwMDAwWhcNMjcwNjEyMDAwMDAwWjCBiTELMAkGA1UEBhMCTkwxETAPBgNVBAgMCE92ZXJpanNzZWwxETAPBgNVBAcMCEVuc2NoZWRlMRAwDgYDVQQKDAdTcGhlcmVvbjEVMBMGA1UECwwMSWRlbnRpdHkgS0xTMSEwHwYDVQQDDBhhZGFwdGVyLXRlc3QuZXhhbXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAASH7p4t3S8CwqTq6m3VZ1B4Kq+zqC5VJxJXx8Yo+9H6c2S6rX8J2Vz5v7s6pBzQz6T1+fQF7rF1Y8fWf+Yc7MAoGCCqGSM49BAMCA0cAMEQCIGC4wURyX5Tq5G1mdxNhGxVh8wK72L6X8RhgG55zV1i5AiA3CN8Z+M+Hh+z4RO+f5YqZlE7CqLjO3iHcEJdU2r6eHg=="
- "MIIBjTCCATOgAwIBAgIBATAKBggqhkjOPQQDAjBqMQswCQYDVQQGEwJOTDERMA8GA1UECAwIT3Zlcmlqc3NlbDERMA8GA1UEBwwIRW5zY2hlZGUxEDAOBgNVBAoMB1NwaGVyZW9uMSMwIQYDVQQDDBpTcGhlcmVvbiBUZXN0IFJvb3QgQ0EgMjAyNjAeFw0yNjA2MTIwMDAwMDBaFw0zNjA2MTAwMDAwMDBaMGoxCzAJBgNVBAYTAk5MMREwDwYDVQQIDAhPdmVyaWpzc2VsMREwDwYDVQQHDAhFbnNjaGVkZTEQMA4GA1UECgwHU3BoZXJlb24xIzAhBgNVBAMMGlNwaGVyZW9uIFRlc3QgUm9vdCBDQSAyMDI2MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEl+6eLd0vAsKk6upt1WdQeCqvs6guVScSV8fGKPvR+nNkuq1/Cdlc+b+7OqQc0M+k9fn0Be6xdWPH1n/mHOzAKBggqhkjOPQQDAgNHADBEAiA8pT9o+0YQqE6ld7Y5RKu+U3ZlAiSZ8eR5rRQ0v8Wj1gIgRk89mJZ2Zj8vJZt+wa7YKk6mrG9Pj3Wf5db5hOMxXJQ="
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalServerError'
post:
tags: [ Certificates ]
summary: Store a certificate chain
operationId: storeCertificateChain
requestBody:
$ref: '#/components/requestBodies/StoreCertificateChainRequest'
responses:
'201':
description: Certificate chain stored.
content:
application/json:
schema:
$ref: '#/components/schemas/CertificateChainResponse'
'400':
$ref: '#/components/responses/BadRequest'
'500':
$ref: '#/components/responses/InternalServerError'
delete:
tags: [ Certificates ]
summary: Delete a certificate chain
operationId: deleteCertificateChain
responses:
'204':
description: Certificate chain deleted.
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalServerError'
/signatures/raw/create:
post:
tags: [ Signatures ]
summary: Create a raw signature
description: >
Produces a raw (detached) cryptographic signature over the supplied bytes using a
managed key. The request body identifies the key with a `keyInfo` (by `providerId`
plus either `alias` or `kid`) and carries the bytes to sign in `input` as a
base64-encoded string; the signature algorithm is taken from the resolved key. The
response returns the signature bytes, base64-encoded; only the signature is returned,
not the input. Pass the same `input` and `keyInfo` to `/signatures/raw/verify`.
Returns 400 if the key cannot be found.
operationId: createRawSignature
parameters:
- $ref: './common-components.yml#/components/parameters/UserId'
- $ref: './common-components.yml#/components/parameters/TenantId'
requestBody:
$ref: '#/components/requestBodies/CreateRawSignatureRequest'
responses:
'201':
description: Signature created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/CreateRawSignatureResponse'
example:
signature: "MEUCIQDx1c0r2k1mWmExampleSignatureBytesBase64EncodedAA"
'400':
$ref: '#/components/responses/BadRequest'
'500':
$ref: '#/components/responses/InternalServerError'
/signatures/raw/verify:
post:
tags: [ Signatures ]
summary: Verify a raw signature
description: >
Verifies a raw (detached) signature against the original bytes using a managed
key. The request body carries the `keyInfo` identifying the verifying key, the
original bytes in `input` (base64), and the candidate `signature` (base64). The
response is `{ "isValid": true }` when the signature matches and
`{ "isValid": false }` when it does not (for example when the input was tampered
with). Verification failures due to a wrong signature return 200 with
`isValid: false`, not an error status. Returns 400 only for malformed input.
operationId: isValidRawSignature
parameters:
- $ref: './common-components.yml#/components/parameters/UserId'
- $ref: './common-components.yml#/components/parameters/TenantId'
requestBody:
$ref: '#/components/requestBodies/VerifyRawSignatureRequest'
responses:
'200':
description: Signature verification performed successfully