@sphereon/ssi-sdk.kms-rest-client 0.34.1-feature.IDK.11.294
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/LICENSE +201 -0
- package/README.md +369 -0
- package/dist/index.cjs +3924 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +3927 -0
- package/dist/index.d.ts +3927 -0
- package/dist/index.js +3903 -0
- package/dist/index.js.map +1 -0
- package/package.json +60 -0
- package/plugin.schema.json +1004 -0
- package/src/agent/KmsRestClient.ts +468 -0
- package/src/index.ts +8 -0
- package/src/models/AwsAssumeRoleCredentials.ts +90 -0
- package/src/models/AwsClientConfiguration.ts +69 -0
- package/src/models/AwsKmsSetting.ts +112 -0
- package/src/models/AwsStaticCredentials.ts +90 -0
- package/src/models/AwsWebIdentityTokenCredentials.ts +91 -0
- package/src/models/AzureClientSecretCredentialOpts.ts +85 -0
- package/src/models/AzureCredentialOpts.ts +65 -0
- package/src/models/AzureKeyVaultSetting.ts +101 -0
- package/src/models/CoseKey.ts +137 -0
- package/src/models/CoseKeyPair.ts +73 -0
- package/src/models/CoseKeyType.ts +52 -0
- package/src/models/CreateKeyProvider.ts +101 -0
- package/src/models/CreateRawSignature.ts +74 -0
- package/src/models/CreateRawSignatureResponse.ts +62 -0
- package/src/models/CreateSimpleSignature.ts +86 -0
- package/src/models/CryptoAlg.ts +52 -0
- package/src/models/Curve.ts +56 -0
- package/src/models/DigestAlg.ts +55 -0
- package/src/models/ErrorResponse.ts +79 -0
- package/src/models/GenerateKey.ts +92 -0
- package/src/models/GenerateKeyGlobal.ts +100 -0
- package/src/models/GenerateKeyResponse.ts +65 -0
- package/src/models/GetKeyResponse.ts +65 -0
- package/src/models/IdentifierMethod.ts +53 -0
- package/src/models/JoseKeyPair.ts +73 -0
- package/src/models/Jwk.ts +231 -0
- package/src/models/JwkKeyType.ts +52 -0
- package/src/models/JwkUse.ts +50 -0
- package/src/models/KeyEncoding.ts +50 -0
- package/src/models/KeyInfo.ts +144 -0
- package/src/models/KeyOperations.ts +56 -0
- package/src/models/KeyProvider.ts +74 -0
- package/src/models/KeyProviderResponse.ts +74 -0
- package/src/models/KeyProviderType.ts +51 -0
- package/src/models/KeyResolver.ts +85 -0
- package/src/models/KeyType.ts +51 -0
- package/src/models/KeyVisibility.ts +50 -0
- package/src/models/ListKeyProvidersResponse.ts +65 -0
- package/src/models/ListKeysResponse.ts +65 -0
- package/src/models/ListResolversResponse.ts +65 -0
- package/src/models/LookupMode.ts +51 -0
- package/src/models/ManagedKeyInfo.ts +147 -0
- package/src/models/ManagedKeyPair.ts +102 -0
- package/src/models/MaskGenFunction.ts +49 -0
- package/src/models/ProviderCapabilities.ts +106 -0
- package/src/models/ResolvePublicKey.ts +91 -0
- package/src/models/ResolvedKeyInfo.ts +145 -0
- package/src/models/Resolver.ts +85 -0
- package/src/models/SignInput.ts +87 -0
- package/src/models/SignOutput.ts +73 -0
- package/src/models/Signature.ts +92 -0
- package/src/models/SignatureAlgorithm.ts +60 -0
- package/src/models/StoreKey.ts +73 -0
- package/src/models/StoreKeyResponse.ts +65 -0
- package/src/models/UpdateKeyProvider.ts +90 -0
- package/src/models/VerifyRawSignature.ts +83 -0
- package/src/models/VerifyRawSignatureResponse.ts +62 -0
- package/src/models/VerifySimpleSignature.ts +76 -0
- package/src/models/index.ts +60 -0
- package/src/types/IKmsRestClient.ts +134 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* KMS REST Server API
|
|
5
|
+
* A REST API for managing cryptographic keys and performing signing and verification operations.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.0.1
|
|
8
|
+
* Contact: support@sphereon.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Indicates the visibility status of a cryptographic key.
|
|
17
|
+
* @export
|
|
18
|
+
*/
|
|
19
|
+
export const KeyVisibility = {
|
|
20
|
+
Public: 'PUBLIC',
|
|
21
|
+
Private: 'PRIVATE',
|
|
22
|
+
} as const
|
|
23
|
+
export type KeyVisibility = (typeof KeyVisibility)[keyof typeof KeyVisibility]
|
|
24
|
+
|
|
25
|
+
export function instanceOfKeyVisibility(value: any): boolean {
|
|
26
|
+
for (const key in KeyVisibility) {
|
|
27
|
+
if (Object.prototype.hasOwnProperty.call(KeyVisibility, key)) {
|
|
28
|
+
if (KeyVisibility[key as keyof typeof KeyVisibility] === value) {
|
|
29
|
+
return true
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return false
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function KeyVisibilityFromJSON(json: any): KeyVisibility {
|
|
37
|
+
return KeyVisibilityFromJSONTyped(json, false)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function KeyVisibilityFromJSONTyped(json: any, ignoreDiscriminator: boolean): KeyVisibility {
|
|
41
|
+
return json as KeyVisibility
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function KeyVisibilityToJSON(value?: KeyVisibility | null): any {
|
|
45
|
+
return value as any
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function KeyVisibilityToJSONTyped(value: any, ignoreDiscriminator: boolean): KeyVisibility {
|
|
49
|
+
return value as KeyVisibility
|
|
50
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* KMS REST Server API
|
|
5
|
+
* A REST API for managing cryptographic keys and performing signing and verification operations.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.0.1
|
|
8
|
+
* Contact: support@sphereon.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import type { KeyProvider } from './KeyProvider'
|
|
16
|
+
import { KeyProviderFromJSON, KeyProviderToJSON } from './KeyProvider'
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Response body containing the details of a Key Provider instance.
|
|
20
|
+
* @export
|
|
21
|
+
* @interface ListKeyProvidersResponse
|
|
22
|
+
*/
|
|
23
|
+
export interface ListKeyProvidersResponse {
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {Array<KeyProvider>}
|
|
27
|
+
* @memberof ListKeyProvidersResponse
|
|
28
|
+
*/
|
|
29
|
+
providers: Array<KeyProvider>
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Check if a given object implements the ListKeyProvidersResponse interface.
|
|
34
|
+
*/
|
|
35
|
+
export function instanceOfListKeyProvidersResponse(value: object): value is ListKeyProvidersResponse {
|
|
36
|
+
if (!('providers' in value) || value['providers'] === undefined) return false
|
|
37
|
+
return true
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function ListKeyProvidersResponseFromJSON(json: any): ListKeyProvidersResponse {
|
|
41
|
+
return ListKeyProvidersResponseFromJSONTyped(json, false)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function ListKeyProvidersResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListKeyProvidersResponse {
|
|
45
|
+
if (json == null) {
|
|
46
|
+
return json
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
providers: (json['providers'] as Array<any>).map(KeyProviderFromJSON),
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function ListKeyProvidersResponseToJSON(json: any): ListKeyProvidersResponse {
|
|
54
|
+
return ListKeyProvidersResponseToJSONTyped(json, false)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function ListKeyProvidersResponseToJSONTyped(value?: ListKeyProvidersResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
58
|
+
if (value == null) {
|
|
59
|
+
return value
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return {
|
|
63
|
+
providers: (value['providers'] as Array<any>).map(KeyProviderToJSON),
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* KMS REST Server API
|
|
5
|
+
* A REST API for managing cryptographic keys and performing signing and verification operations.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.0.1
|
|
8
|
+
* Contact: support@sphereon.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import type { ManagedKeyInfo } from './ManagedKeyInfo'
|
|
16
|
+
import { ManagedKeyInfoFromJSON, ManagedKeyInfoToJSON } from './ManagedKeyInfo'
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Response body containing all the managed keys.
|
|
20
|
+
* @export
|
|
21
|
+
* @interface ListKeysResponse
|
|
22
|
+
*/
|
|
23
|
+
export interface ListKeysResponse {
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {Array<ManagedKeyInfo>}
|
|
27
|
+
* @memberof ListKeysResponse
|
|
28
|
+
*/
|
|
29
|
+
keyInfos: Array<ManagedKeyInfo>
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Check if a given object implements the ListKeysResponse interface.
|
|
34
|
+
*/
|
|
35
|
+
export function instanceOfListKeysResponse(value: object): value is ListKeysResponse {
|
|
36
|
+
if (!('keyInfos' in value) || value['keyInfos'] === undefined) return false
|
|
37
|
+
return true
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function ListKeysResponseFromJSON(json: any): ListKeysResponse {
|
|
41
|
+
return ListKeysResponseFromJSONTyped(json, false)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function ListKeysResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListKeysResponse {
|
|
45
|
+
if (json == null) {
|
|
46
|
+
return json
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
keyInfos: (json['keyInfos'] as Array<any>).map(ManagedKeyInfoFromJSON),
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function ListKeysResponseToJSON(json: any): ListKeysResponse {
|
|
54
|
+
return ListKeysResponseToJSONTyped(json, false)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function ListKeysResponseToJSONTyped(value?: ListKeysResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
58
|
+
if (value == null) {
|
|
59
|
+
return value
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return {
|
|
63
|
+
keyInfos: (value['keyInfos'] as Array<any>).map(ManagedKeyInfoToJSON),
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* KMS REST Server API
|
|
5
|
+
* A REST API for managing cryptographic keys and performing signing and verification operations.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.0.1
|
|
8
|
+
* Contact: support@sphereon.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import type { Resolver } from './Resolver'
|
|
16
|
+
import { ResolverFromJSON, ResolverToJSON } from './Resolver'
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Response body containing all the resolvers.
|
|
20
|
+
* @export
|
|
21
|
+
* @interface ListResolversResponse
|
|
22
|
+
*/
|
|
23
|
+
export interface ListResolversResponse {
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {Array<Resolver>}
|
|
27
|
+
* @memberof ListResolversResponse
|
|
28
|
+
*/
|
|
29
|
+
resolvers: Array<Resolver>
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Check if a given object implements the ListResolversResponse interface.
|
|
34
|
+
*/
|
|
35
|
+
export function instanceOfListResolversResponse(value: object): value is ListResolversResponse {
|
|
36
|
+
if (!('resolvers' in value) || value['resolvers'] === undefined) return false
|
|
37
|
+
return true
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function ListResolversResponseFromJSON(json: any): ListResolversResponse {
|
|
41
|
+
return ListResolversResponseFromJSONTyped(json, false)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function ListResolversResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListResolversResponse {
|
|
45
|
+
if (json == null) {
|
|
46
|
+
return json
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
resolvers: (json['resolvers'] as Array<any>).map(ResolverFromJSON),
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function ListResolversResponseToJSON(json: any): ListResolversResponse {
|
|
54
|
+
return ListResolversResponseToJSONTyped(json, false)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function ListResolversResponseToJSONTyped(value?: ListResolversResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
58
|
+
if (value == null) {
|
|
59
|
+
return value
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return {
|
|
63
|
+
resolvers: (value['resolvers'] as Array<any>).map(ResolverToJSON),
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* KMS REST Server API
|
|
5
|
+
* A REST API for managing cryptographic keys and performing signing and verification operations.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.0.1
|
|
8
|
+
* Contact: support@sphereon.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Determines how configuration values are looked up. - VALUE: The actual configuration values are provided directly. - CONFIG_SERVICE: Configuration values are looked up from a configuration service using keys. - SECRET_SERVICE: Configuration values are looked up from a secret service using keys.
|
|
17
|
+
* @export
|
|
18
|
+
*/
|
|
19
|
+
export const LookupMode = {
|
|
20
|
+
Value: 'VALUE',
|
|
21
|
+
ConfigService: 'CONFIG_SERVICE',
|
|
22
|
+
SecretService: 'SECRET_SERVICE',
|
|
23
|
+
} as const
|
|
24
|
+
export type LookupMode = (typeof LookupMode)[keyof typeof LookupMode]
|
|
25
|
+
|
|
26
|
+
export function instanceOfLookupMode(value: any): boolean {
|
|
27
|
+
for (const key in LookupMode) {
|
|
28
|
+
if (Object.prototype.hasOwnProperty.call(LookupMode, key)) {
|
|
29
|
+
if (LookupMode[key as keyof typeof LookupMode] === value) {
|
|
30
|
+
return true
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return false
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function LookupModeFromJSON(json: any): LookupMode {
|
|
38
|
+
return LookupModeFromJSONTyped(json, false)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function LookupModeFromJSONTyped(json: any, ignoreDiscriminator: boolean): LookupMode {
|
|
42
|
+
return json as LookupMode
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function LookupModeToJSON(value?: LookupMode | null): any {
|
|
46
|
+
return value as any
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function LookupModeToJSONTyped(value: any, ignoreDiscriminator: boolean): LookupMode {
|
|
50
|
+
return value as LookupMode
|
|
51
|
+
}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* KMS REST Server API
|
|
5
|
+
* A REST API for managing cryptographic keys and performing signing and verification operations.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.0.1
|
|
8
|
+
* Contact: support@sphereon.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import type { KeyType } from './KeyType'
|
|
16
|
+
import { KeyTypeFromJSON, KeyTypeToJSON } from './KeyType'
|
|
17
|
+
import type { KeyVisibility } from './KeyVisibility'
|
|
18
|
+
import { KeyVisibilityFromJSON, KeyVisibilityToJSON } from './KeyVisibility'
|
|
19
|
+
import type { SignatureAlgorithm } from './SignatureAlgorithm'
|
|
20
|
+
import { SignatureAlgorithmFromJSON, SignatureAlgorithmToJSON } from './SignatureAlgorithm'
|
|
21
|
+
import type { KeyEncoding } from './KeyEncoding'
|
|
22
|
+
import { KeyEncodingFromJSON, KeyEncodingToJSON } from './KeyEncoding'
|
|
23
|
+
import type { Jwk } from './Jwk'
|
|
24
|
+
import { JwkFromJSON, JwkToJSON } from './Jwk'
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Represents a managed cryptographic key information that is guaranteed to be present and resolved, part of a KMS providing concrete access to the key.
|
|
28
|
+
* @export
|
|
29
|
+
* @interface ManagedKeyInfo
|
|
30
|
+
*/
|
|
31
|
+
export interface ManagedKeyInfo {
|
|
32
|
+
/**
|
|
33
|
+
* Unique identifier for the cryptographic key. Can be null if the key identifier is not provided.
|
|
34
|
+
* @type {string}
|
|
35
|
+
* @memberof ManagedKeyInfo
|
|
36
|
+
*/
|
|
37
|
+
kid?: string
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @type {Jwk}
|
|
41
|
+
* @memberof ManagedKeyInfo
|
|
42
|
+
*/
|
|
43
|
+
key: Jwk
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @type {SignatureAlgorithm}
|
|
47
|
+
* @memberof ManagedKeyInfo
|
|
48
|
+
*/
|
|
49
|
+
signatureAlgorithm?: SignatureAlgorithm
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
* @type {KeyVisibility}
|
|
53
|
+
* @memberof ManagedKeyInfo
|
|
54
|
+
*/
|
|
55
|
+
keyVisibility?: KeyVisibility
|
|
56
|
+
/**
|
|
57
|
+
* X.509 certificate chain associated with the key.
|
|
58
|
+
* @type {Array<string>}
|
|
59
|
+
* @memberof ManagedKeyInfo
|
|
60
|
+
*/
|
|
61
|
+
x5c?: Array<string>
|
|
62
|
+
/**
|
|
63
|
+
* A reference or alias to the key in the Key Management Service (KMS).
|
|
64
|
+
* @type {string}
|
|
65
|
+
* @memberof ManagedKeyInfo
|
|
66
|
+
*/
|
|
67
|
+
alias: string
|
|
68
|
+
/**
|
|
69
|
+
* The Key Management System (KMS) identifier associated with the key.
|
|
70
|
+
* @type {string}
|
|
71
|
+
* @memberof ManagedKeyInfo
|
|
72
|
+
*/
|
|
73
|
+
providerId: string
|
|
74
|
+
/**
|
|
75
|
+
*
|
|
76
|
+
* @type {KeyType}
|
|
77
|
+
* @memberof ManagedKeyInfo
|
|
78
|
+
*/
|
|
79
|
+
keyType?: KeyType
|
|
80
|
+
/**
|
|
81
|
+
*
|
|
82
|
+
* @type {KeyEncoding}
|
|
83
|
+
* @memberof ManagedKeyInfo
|
|
84
|
+
*/
|
|
85
|
+
keyEncoding?: KeyEncoding
|
|
86
|
+
/**
|
|
87
|
+
* Additional configuration options as key-value pairs.
|
|
88
|
+
* @type {{ [key: string]: string; }}
|
|
89
|
+
* @memberof ManagedKeyInfo
|
|
90
|
+
*/
|
|
91
|
+
opts?: { [key: string]: string }
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Check if a given object implements the ManagedKeyInfo interface.
|
|
96
|
+
*/
|
|
97
|
+
export function instanceOfManagedKeyInfo(value: object): value is ManagedKeyInfo {
|
|
98
|
+
if (!('key' in value) || value['key'] === undefined) return false
|
|
99
|
+
if (!('alias' in value) || value['alias'] === undefined) return false
|
|
100
|
+
if (!('providerId' in value) || value['providerId'] === undefined) return false
|
|
101
|
+
return true
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function ManagedKeyInfoFromJSON(json: any): ManagedKeyInfo {
|
|
105
|
+
return ManagedKeyInfoFromJSONTyped(json, false)
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export function ManagedKeyInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ManagedKeyInfo {
|
|
109
|
+
if (json == null) {
|
|
110
|
+
return json
|
|
111
|
+
}
|
|
112
|
+
return {
|
|
113
|
+
kid: json['kid'] == null ? undefined : json['kid'],
|
|
114
|
+
key: JwkFromJSON(json['key']),
|
|
115
|
+
signatureAlgorithm: json['signatureAlgorithm'] == null ? undefined : SignatureAlgorithmFromJSON(json['signatureAlgorithm']),
|
|
116
|
+
keyVisibility: json['keyVisibility'] == null ? undefined : KeyVisibilityFromJSON(json['keyVisibility']),
|
|
117
|
+
x5c: json['x5c'] == null ? undefined : json['x5c'],
|
|
118
|
+
alias: json['alias'],
|
|
119
|
+
providerId: json['providerId'],
|
|
120
|
+
keyType: json['keyType'] == null ? undefined : KeyTypeFromJSON(json['keyType']),
|
|
121
|
+
keyEncoding: json['keyEncoding'] == null ? undefined : KeyEncodingFromJSON(json['keyEncoding']),
|
|
122
|
+
opts: json['opts'] == null ? undefined : json['opts'],
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export function ManagedKeyInfoToJSON(json: any): ManagedKeyInfo {
|
|
127
|
+
return ManagedKeyInfoToJSONTyped(json, false)
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export function ManagedKeyInfoToJSONTyped(value?: ManagedKeyInfo | null, ignoreDiscriminator: boolean = false): any {
|
|
131
|
+
if (value == null) {
|
|
132
|
+
return value
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
return {
|
|
136
|
+
kid: value['kid'],
|
|
137
|
+
key: JwkToJSON(value['key']),
|
|
138
|
+
signatureAlgorithm: SignatureAlgorithmToJSON(value['signatureAlgorithm']),
|
|
139
|
+
keyVisibility: KeyVisibilityToJSON(value['keyVisibility']),
|
|
140
|
+
x5c: value['x5c'],
|
|
141
|
+
alias: value['alias'],
|
|
142
|
+
providerId: value['providerId'],
|
|
143
|
+
keyType: KeyTypeToJSON(value['keyType']),
|
|
144
|
+
keyEncoding: KeyEncodingToJSON(value['keyEncoding']),
|
|
145
|
+
opts: value['opts'],
|
|
146
|
+
}
|
|
147
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* KMS REST Server API
|
|
5
|
+
* A REST API for managing cryptographic keys and performing signing and verification operations.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.0.1
|
|
8
|
+
* Contact: support@sphereon.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import type { JoseKeyPair } from './JoseKeyPair'
|
|
16
|
+
import { JoseKeyPairFromJSON, JoseKeyPairToJSON } from './JoseKeyPair'
|
|
17
|
+
import type { CoseKeyPair } from './CoseKeyPair'
|
|
18
|
+
import { CoseKeyPairFromJSON, CoseKeyPairToJSON } from './CoseKeyPair'
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Represents a key pair used by a crypto provider, encapsulating both JOSE and COSE key pairs.
|
|
22
|
+
* @export
|
|
23
|
+
* @interface ManagedKeyPair
|
|
24
|
+
*/
|
|
25
|
+
export interface ManagedKeyPair {
|
|
26
|
+
/**
|
|
27
|
+
* Key identifier, may be null.
|
|
28
|
+
* @type {string}
|
|
29
|
+
* @memberof ManagedKeyPair
|
|
30
|
+
*/
|
|
31
|
+
kid?: string
|
|
32
|
+
/**
|
|
33
|
+
* Key Management System identifier.
|
|
34
|
+
* @type {string}
|
|
35
|
+
* @memberof ManagedKeyPair
|
|
36
|
+
*/
|
|
37
|
+
providerId: string
|
|
38
|
+
/**
|
|
39
|
+
* Reference to the key in the KMS.
|
|
40
|
+
* @type {string}
|
|
41
|
+
* @memberof ManagedKeyPair
|
|
42
|
+
*/
|
|
43
|
+
alias: string
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @type {CoseKeyPair}
|
|
47
|
+
* @memberof ManagedKeyPair
|
|
48
|
+
*/
|
|
49
|
+
cose: CoseKeyPair
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
* @type {JoseKeyPair}
|
|
53
|
+
* @memberof ManagedKeyPair
|
|
54
|
+
*/
|
|
55
|
+
jose: JoseKeyPair
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Check if a given object implements the ManagedKeyPair interface.
|
|
60
|
+
*/
|
|
61
|
+
export function instanceOfManagedKeyPair(value: object): value is ManagedKeyPair {
|
|
62
|
+
if (!('providerId' in value) || value['providerId'] === undefined) return false
|
|
63
|
+
if (!('alias' in value) || value['alias'] === undefined) return false
|
|
64
|
+
if (!('cose' in value) || value['cose'] === undefined) return false
|
|
65
|
+
if (!('jose' in value) || value['jose'] === undefined) return false
|
|
66
|
+
return true
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function ManagedKeyPairFromJSON(json: any): ManagedKeyPair {
|
|
70
|
+
return ManagedKeyPairFromJSONTyped(json, false)
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function ManagedKeyPairFromJSONTyped(json: any, ignoreDiscriminator: boolean): ManagedKeyPair {
|
|
74
|
+
if (json == null) {
|
|
75
|
+
return json
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
kid: json['kid'] == null ? undefined : json['kid'],
|
|
79
|
+
providerId: json['providerId'],
|
|
80
|
+
alias: json['alias'],
|
|
81
|
+
cose: CoseKeyPairFromJSON(json['cose']),
|
|
82
|
+
jose: JoseKeyPairFromJSON(json['jose']),
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function ManagedKeyPairToJSON(json: any): ManagedKeyPair {
|
|
87
|
+
return ManagedKeyPairToJSONTyped(json, false)
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function ManagedKeyPairToJSONTyped(value?: ManagedKeyPair | null, ignoreDiscriminator: boolean = false): any {
|
|
91
|
+
if (value == null) {
|
|
92
|
+
return value
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return {
|
|
96
|
+
kid: value['kid'],
|
|
97
|
+
providerId: value['providerId'],
|
|
98
|
+
alias: value['alias'],
|
|
99
|
+
cose: CoseKeyPairToJSON(value['cose']),
|
|
100
|
+
jose: JoseKeyPairToJSON(value['jose']),
|
|
101
|
+
}
|
|
102
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* KMS REST Server API
|
|
5
|
+
* A REST API for managing cryptographic keys and performing signing and verification operations.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.0.1
|
|
8
|
+
* Contact: support@sphereon.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Mask generation function algorithm.
|
|
17
|
+
* @export
|
|
18
|
+
*/
|
|
19
|
+
export const MaskGenFunction = {
|
|
20
|
+
Mgf1: 'MGF1',
|
|
21
|
+
} as const
|
|
22
|
+
export type MaskGenFunction = (typeof MaskGenFunction)[keyof typeof MaskGenFunction]
|
|
23
|
+
|
|
24
|
+
export function instanceOfMaskGenFunction(value: any): boolean {
|
|
25
|
+
for (const key in MaskGenFunction) {
|
|
26
|
+
if (Object.prototype.hasOwnProperty.call(MaskGenFunction, key)) {
|
|
27
|
+
if (MaskGenFunction[key as keyof typeof MaskGenFunction] === value) {
|
|
28
|
+
return true
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return false
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function MaskGenFunctionFromJSON(json: any): MaskGenFunction {
|
|
36
|
+
return MaskGenFunctionFromJSONTyped(json, false)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function MaskGenFunctionFromJSONTyped(json: any, ignoreDiscriminator: boolean): MaskGenFunction {
|
|
40
|
+
return json as MaskGenFunction
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function MaskGenFunctionToJSON(value?: MaskGenFunction | null): any {
|
|
44
|
+
return value as any
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function MaskGenFunctionToJSONTyped(value: any, ignoreDiscriminator: boolean): MaskGenFunction {
|
|
48
|
+
return value as MaskGenFunction
|
|
49
|
+
}
|