@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.
Files changed (72) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +369 -0
  3. package/dist/index.cjs +3924 -0
  4. package/dist/index.cjs.map +1 -0
  5. package/dist/index.d.cts +3927 -0
  6. package/dist/index.d.ts +3927 -0
  7. package/dist/index.js +3903 -0
  8. package/dist/index.js.map +1 -0
  9. package/package.json +60 -0
  10. package/plugin.schema.json +1004 -0
  11. package/src/agent/KmsRestClient.ts +468 -0
  12. package/src/index.ts +8 -0
  13. package/src/models/AwsAssumeRoleCredentials.ts +90 -0
  14. package/src/models/AwsClientConfiguration.ts +69 -0
  15. package/src/models/AwsKmsSetting.ts +112 -0
  16. package/src/models/AwsStaticCredentials.ts +90 -0
  17. package/src/models/AwsWebIdentityTokenCredentials.ts +91 -0
  18. package/src/models/AzureClientSecretCredentialOpts.ts +85 -0
  19. package/src/models/AzureCredentialOpts.ts +65 -0
  20. package/src/models/AzureKeyVaultSetting.ts +101 -0
  21. package/src/models/CoseKey.ts +137 -0
  22. package/src/models/CoseKeyPair.ts +73 -0
  23. package/src/models/CoseKeyType.ts +52 -0
  24. package/src/models/CreateKeyProvider.ts +101 -0
  25. package/src/models/CreateRawSignature.ts +74 -0
  26. package/src/models/CreateRawSignatureResponse.ts +62 -0
  27. package/src/models/CreateSimpleSignature.ts +86 -0
  28. package/src/models/CryptoAlg.ts +52 -0
  29. package/src/models/Curve.ts +56 -0
  30. package/src/models/DigestAlg.ts +55 -0
  31. package/src/models/ErrorResponse.ts +79 -0
  32. package/src/models/GenerateKey.ts +92 -0
  33. package/src/models/GenerateKeyGlobal.ts +100 -0
  34. package/src/models/GenerateKeyResponse.ts +65 -0
  35. package/src/models/GetKeyResponse.ts +65 -0
  36. package/src/models/IdentifierMethod.ts +53 -0
  37. package/src/models/JoseKeyPair.ts +73 -0
  38. package/src/models/Jwk.ts +231 -0
  39. package/src/models/JwkKeyType.ts +52 -0
  40. package/src/models/JwkUse.ts +50 -0
  41. package/src/models/KeyEncoding.ts +50 -0
  42. package/src/models/KeyInfo.ts +144 -0
  43. package/src/models/KeyOperations.ts +56 -0
  44. package/src/models/KeyProvider.ts +74 -0
  45. package/src/models/KeyProviderResponse.ts +74 -0
  46. package/src/models/KeyProviderType.ts +51 -0
  47. package/src/models/KeyResolver.ts +85 -0
  48. package/src/models/KeyType.ts +51 -0
  49. package/src/models/KeyVisibility.ts +50 -0
  50. package/src/models/ListKeyProvidersResponse.ts +65 -0
  51. package/src/models/ListKeysResponse.ts +65 -0
  52. package/src/models/ListResolversResponse.ts +65 -0
  53. package/src/models/LookupMode.ts +51 -0
  54. package/src/models/ManagedKeyInfo.ts +147 -0
  55. package/src/models/ManagedKeyPair.ts +102 -0
  56. package/src/models/MaskGenFunction.ts +49 -0
  57. package/src/models/ProviderCapabilities.ts +106 -0
  58. package/src/models/ResolvePublicKey.ts +91 -0
  59. package/src/models/ResolvedKeyInfo.ts +145 -0
  60. package/src/models/Resolver.ts +85 -0
  61. package/src/models/SignInput.ts +87 -0
  62. package/src/models/SignOutput.ts +73 -0
  63. package/src/models/Signature.ts +92 -0
  64. package/src/models/SignatureAlgorithm.ts +60 -0
  65. package/src/models/StoreKey.ts +73 -0
  66. package/src/models/StoreKeyResponse.ts +65 -0
  67. package/src/models/UpdateKeyProvider.ts +90 -0
  68. package/src/models/VerifyRawSignature.ts +83 -0
  69. package/src/models/VerifyRawSignatureResponse.ts +62 -0
  70. package/src/models/VerifySimpleSignature.ts +76 -0
  71. package/src/models/index.ts +60 -0
  72. package/src/types/IKmsRestClient.ts +134 -0
@@ -0,0 +1,112 @@
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 { AwsAssumeRoleCredentials } from './AwsAssumeRoleCredentials'
16
+ import { AwsAssumeRoleCredentialsFromJSON, AwsAssumeRoleCredentialsToJSON } from './AwsAssumeRoleCredentials'
17
+ import type { AwsStaticCredentials } from './AwsStaticCredentials'
18
+ import { AwsStaticCredentialsFromJSON, AwsStaticCredentialsToJSON } from './AwsStaticCredentials'
19
+ import type { AwsWebIdentityTokenCredentials } from './AwsWebIdentityTokenCredentials'
20
+ import { AwsWebIdentityTokenCredentialsFromJSON, AwsWebIdentityTokenCredentialsToJSON } from './AwsWebIdentityTokenCredentials'
21
+ import type { AwsClientConfiguration } from './AwsClientConfiguration'
22
+ import { AwsClientConfigurationFromJSON, AwsClientConfigurationToJSON } from './AwsClientConfiguration'
23
+
24
+ /**
25
+ * Configuration settings specific to the AWS_KMS provider type. Defines how to connect and authenticate to AWS KMS. If no specific credential provider is specified, the implementation should rely on the default AWS SDK credential provider chain.
26
+ * @export
27
+ * @interface AwsKmsSetting
28
+ */
29
+ export interface AwsKmsSetting {
30
+ /**
31
+ * The AWS region where the KMS keys reside (e.g., 'us-east-1', 'eu-west-1').
32
+ * @type {string}
33
+ * @memberof AwsKmsSetting
34
+ */
35
+ region: string
36
+ /**
37
+ *
38
+ * @type {AwsStaticCredentials}
39
+ * @memberof AwsKmsSetting
40
+ */
41
+ staticCredentials?: AwsStaticCredentials
42
+ /**
43
+ *
44
+ * @type {AwsAssumeRoleCredentials}
45
+ * @memberof AwsKmsSetting
46
+ */
47
+ assumeRoleCredentials?: AwsAssumeRoleCredentials
48
+ /**
49
+ *
50
+ * @type {AwsWebIdentityTokenCredentials}
51
+ * @memberof AwsKmsSetting
52
+ */
53
+ webIdentityTokenCredentials?: AwsWebIdentityTokenCredentials
54
+ /**
55
+ * Optional custom endpoint URL for AWS KMS (e.g., for VPC endpoints or local testing).
56
+ * @type {string}
57
+ * @memberof AwsKmsSetting
58
+ */
59
+ endpointUrl?: string
60
+ /**
61
+ *
62
+ * @type {AwsClientConfiguration}
63
+ * @memberof AwsKmsSetting
64
+ */
65
+ clientConfiguration?: AwsClientConfiguration
66
+ }
67
+
68
+ /**
69
+ * Check if a given object implements the AwsKmsSetting interface.
70
+ */
71
+ export function instanceOfAwsKmsSetting(value: object): value is AwsKmsSetting {
72
+ if (!('region' in value) || value['region'] === undefined) return false
73
+ return true
74
+ }
75
+
76
+ export function AwsKmsSettingFromJSON(json: any): AwsKmsSetting {
77
+ return AwsKmsSettingFromJSONTyped(json, false)
78
+ }
79
+
80
+ export function AwsKmsSettingFromJSONTyped(json: any, ignoreDiscriminator: boolean): AwsKmsSetting {
81
+ if (json == null) {
82
+ return json
83
+ }
84
+ return {
85
+ region: json['region'],
86
+ staticCredentials: json['staticCredentials'] == null ? undefined : AwsStaticCredentialsFromJSON(json['staticCredentials']),
87
+ assumeRoleCredentials: json['assumeRoleCredentials'] == null ? undefined : AwsAssumeRoleCredentialsFromJSON(json['assumeRoleCredentials']),
88
+ webIdentityTokenCredentials:
89
+ json['webIdentityTokenCredentials'] == null ? undefined : AwsWebIdentityTokenCredentialsFromJSON(json['webIdentityTokenCredentials']),
90
+ endpointUrl: json['endpointUrl'] == null ? undefined : json['endpointUrl'],
91
+ clientConfiguration: json['clientConfiguration'] == null ? undefined : AwsClientConfigurationFromJSON(json['clientConfiguration']),
92
+ }
93
+ }
94
+
95
+ export function AwsKmsSettingToJSON(json: any): AwsKmsSetting {
96
+ return AwsKmsSettingToJSONTyped(json, false)
97
+ }
98
+
99
+ export function AwsKmsSettingToJSONTyped(value?: AwsKmsSetting | null, ignoreDiscriminator: boolean = false): any {
100
+ if (value == null) {
101
+ return value
102
+ }
103
+
104
+ return {
105
+ region: value['region'],
106
+ staticCredentials: AwsStaticCredentialsToJSON(value['staticCredentials']),
107
+ assumeRoleCredentials: AwsAssumeRoleCredentialsToJSON(value['assumeRoleCredentials']),
108
+ webIdentityTokenCredentials: AwsWebIdentityTokenCredentialsToJSON(value['webIdentityTokenCredentials']),
109
+ endpointUrl: value['endpointUrl'],
110
+ clientConfiguration: AwsClientConfigurationToJSON(value['clientConfiguration']),
111
+ }
112
+ }
@@ -0,0 +1,90 @@
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 { LookupMode } from './LookupMode'
16
+ import { LookupModeFromJSON, LookupModeToJSON } from './LookupMode'
17
+
18
+ /**
19
+ * Explicit AWS access key ID and secret access key. Use with caution; prefer IAM roles or other mechanisms where possible.
20
+ * @export
21
+ * @interface AwsStaticCredentials
22
+ */
23
+ export interface AwsStaticCredentials {
24
+ /**
25
+ * AWS Access Key ID.
26
+ * @type {string}
27
+ * @memberof AwsStaticCredentials
28
+ */
29
+ accesskid: string
30
+ /**
31
+ * AWS Secret Access Key.
32
+ * @type {string}
33
+ * @memberof AwsStaticCredentials
34
+ */
35
+ secretAccessKey: string
36
+ /**
37
+ * Optional AWS session token, typically used with temporary credentials.
38
+ * @type {string}
39
+ * @memberof AwsStaticCredentials
40
+ */
41
+ sessionToken?: string
42
+ /**
43
+ *
44
+ * @type {LookupMode}
45
+ * @memberof AwsStaticCredentials
46
+ */
47
+ lookupMode?: LookupMode
48
+ }
49
+
50
+ /**
51
+ * Check if a given object implements the AwsStaticCredentials interface.
52
+ */
53
+ export function instanceOfAwsStaticCredentials(value: object): value is AwsStaticCredentials {
54
+ if (!('accesskid' in value) || value['accesskid'] === undefined) return false
55
+ if (!('secretAccessKey' in value) || value['secretAccessKey'] === undefined) return false
56
+ return true
57
+ }
58
+
59
+ export function AwsStaticCredentialsFromJSON(json: any): AwsStaticCredentials {
60
+ return AwsStaticCredentialsFromJSONTyped(json, false)
61
+ }
62
+
63
+ export function AwsStaticCredentialsFromJSONTyped(json: any, ignoreDiscriminator: boolean): AwsStaticCredentials {
64
+ if (json == null) {
65
+ return json
66
+ }
67
+ return {
68
+ accesskid: json['accesskid'],
69
+ secretAccessKey: json['secretAccessKey'],
70
+ sessionToken: json['sessionToken'] == null ? undefined : json['sessionToken'],
71
+ lookupMode: json['lookupMode'] == null ? undefined : LookupModeFromJSON(json['lookupMode']),
72
+ }
73
+ }
74
+
75
+ export function AwsStaticCredentialsToJSON(json: any): AwsStaticCredentials {
76
+ return AwsStaticCredentialsToJSONTyped(json, false)
77
+ }
78
+
79
+ export function AwsStaticCredentialsToJSONTyped(value?: AwsStaticCredentials | null, ignoreDiscriminator: boolean = false): any {
80
+ if (value == null) {
81
+ return value
82
+ }
83
+
84
+ return {
85
+ accesskid: value['accesskid'],
86
+ secretAccessKey: value['secretAccessKey'],
87
+ sessionToken: value['sessionToken'],
88
+ lookupMode: LookupModeToJSON(value['lookupMode']),
89
+ }
90
+ }
@@ -0,0 +1,91 @@
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 { LookupMode } from './LookupMode'
16
+ import { LookupModeFromJSON, LookupModeToJSON } from './LookupMode'
17
+
18
+ /**
19
+ * Credentials obtained using a web identity token (e.g., from Cognito, OIDC provider).
20
+ * @export
21
+ * @interface AwsWebIdentityTokenCredentials
22
+ */
23
+ export interface AwsWebIdentityTokenCredentials {
24
+ /**
25
+ * The Amazon Resource Name (ARN) of the role to assume.
26
+ * @type {string}
27
+ * @memberof AwsWebIdentityTokenCredentials
28
+ */
29
+ roleArn: string
30
+ /**
31
+ * An identifier for the assumed role session.
32
+ * @type {string}
33
+ * @memberof AwsWebIdentityTokenCredentials
34
+ */
35
+ roleSessionName: string
36
+ /**
37
+ * The web identity token (e.g., OIDC token, Cognito token) itself.
38
+ * @type {string}
39
+ * @memberof AwsWebIdentityTokenCredentials
40
+ */
41
+ webIdentityToken: string
42
+ /**
43
+ *
44
+ * @type {LookupMode}
45
+ * @memberof AwsWebIdentityTokenCredentials
46
+ */
47
+ lookupMode?: LookupMode
48
+ }
49
+
50
+ /**
51
+ * Check if a given object implements the AwsWebIdentityTokenCredentials interface.
52
+ */
53
+ export function instanceOfAwsWebIdentityTokenCredentials(value: object): value is AwsWebIdentityTokenCredentials {
54
+ if (!('roleArn' in value) || value['roleArn'] === undefined) return false
55
+ if (!('roleSessionName' in value) || value['roleSessionName'] === undefined) return false
56
+ if (!('webIdentityToken' in value) || value['webIdentityToken'] === undefined) return false
57
+ return true
58
+ }
59
+
60
+ export function AwsWebIdentityTokenCredentialsFromJSON(json: any): AwsWebIdentityTokenCredentials {
61
+ return AwsWebIdentityTokenCredentialsFromJSONTyped(json, false)
62
+ }
63
+
64
+ export function AwsWebIdentityTokenCredentialsFromJSONTyped(json: any, ignoreDiscriminator: boolean): AwsWebIdentityTokenCredentials {
65
+ if (json == null) {
66
+ return json
67
+ }
68
+ return {
69
+ roleArn: json['roleArn'],
70
+ roleSessionName: json['roleSessionName'],
71
+ webIdentityToken: json['webIdentityToken'],
72
+ lookupMode: json['lookupMode'] == null ? undefined : LookupModeFromJSON(json['lookupMode']),
73
+ }
74
+ }
75
+
76
+ export function AwsWebIdentityTokenCredentialsToJSON(json: any): AwsWebIdentityTokenCredentials {
77
+ return AwsWebIdentityTokenCredentialsToJSONTyped(json, false)
78
+ }
79
+
80
+ export function AwsWebIdentityTokenCredentialsToJSONTyped(value?: AwsWebIdentityTokenCredentials | null, ignoreDiscriminator: boolean = false): any {
81
+ if (value == null) {
82
+ return value
83
+ }
84
+
85
+ return {
86
+ roleArn: value['roleArn'],
87
+ roleSessionName: value['roleSessionName'],
88
+ webIdentityToken: value['webIdentityToken'],
89
+ lookupMode: LookupModeToJSON(value['lookupMode']),
90
+ }
91
+ }
@@ -0,0 +1,85 @@
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 { LookupMode } from './LookupMode'
16
+ import { LookupModeFromJSON, LookupModeToJSON } from './LookupMode'
17
+
18
+ /**
19
+ * Azure Service Principal credentials using a client secret.
20
+ * @export
21
+ * @interface AzureClientSecretCredentialOpts
22
+ */
23
+ export interface AzureClientSecretCredentialOpts {
24
+ /**
25
+ * The Application (client) ID of the Azure service principal.
26
+ * @type {string}
27
+ * @memberof AzureClientSecretCredentialOpts
28
+ */
29
+ clientId: string
30
+ /**
31
+ * The client secret for the service principal.
32
+ * @type {string}
33
+ * @memberof AzureClientSecretCredentialOpts
34
+ */
35
+ clientSecret: string
36
+ /**
37
+ *
38
+ * @type {LookupMode}
39
+ * @memberof AzureClientSecretCredentialOpts
40
+ */
41
+ lookupMode?: LookupMode
42
+ }
43
+
44
+ /**
45
+ * Check if a given object implements the AzureClientSecretCredentialOpts interface.
46
+ */
47
+ export function instanceOfAzureClientSecretCredentialOpts(value: object): value is AzureClientSecretCredentialOpts {
48
+ if (!('clientId' in value) || value['clientId'] === undefined) return false
49
+ if (!('clientSecret' in value) || value['clientSecret'] === undefined) return false
50
+ return true
51
+ }
52
+
53
+ export function AzureClientSecretCredentialOptsFromJSON(json: any): AzureClientSecretCredentialOpts {
54
+ return AzureClientSecretCredentialOptsFromJSONTyped(json, false)
55
+ }
56
+
57
+ export function AzureClientSecretCredentialOptsFromJSONTyped(json: any, ignoreDiscriminator: boolean): AzureClientSecretCredentialOpts {
58
+ if (json == null) {
59
+ return json
60
+ }
61
+ return {
62
+ clientId: json['clientId'],
63
+ clientSecret: json['clientSecret'],
64
+ lookupMode: json['lookupMode'] == null ? undefined : LookupModeFromJSON(json['lookupMode']),
65
+ }
66
+ }
67
+
68
+ export function AzureClientSecretCredentialOptsToJSON(json: any): AzureClientSecretCredentialOpts {
69
+ return AzureClientSecretCredentialOptsToJSONTyped(json, false)
70
+ }
71
+
72
+ export function AzureClientSecretCredentialOptsToJSONTyped(
73
+ value?: AzureClientSecretCredentialOpts | null,
74
+ ignoreDiscriminator: boolean = false,
75
+ ): any {
76
+ if (value == null) {
77
+ return value
78
+ }
79
+
80
+ return {
81
+ clientId: value['clientId'],
82
+ clientSecret: value['clientSecret'],
83
+ lookupMode: LookupModeToJSON(value['lookupMode']),
84
+ }
85
+ }
@@ -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 { AzureClientSecretCredentialOpts } from './AzureClientSecretCredentialOpts'
16
+ import { AzureClientSecretCredentialOptsFromJSON, AzureClientSecretCredentialOptsToJSON } from './AzureClientSecretCredentialOpts'
17
+
18
+ /**
19
+ * Azure credential options for authenticating to Key Vault. Currently assumes Service Principal with Client Secret.
20
+ * @export
21
+ * @interface AzureCredentialOpts
22
+ */
23
+ export interface AzureCredentialOpts {
24
+ /**
25
+ *
26
+ * @type {AzureClientSecretCredentialOpts}
27
+ * @memberof AzureCredentialOpts
28
+ */
29
+ clientSecretCredentialOpts?: AzureClientSecretCredentialOpts
30
+ }
31
+
32
+ /**
33
+ * Check if a given object implements the AzureCredentialOpts interface.
34
+ */
35
+ export function instanceOfAzureCredentialOpts(value: object): value is AzureCredentialOpts {
36
+ return true
37
+ }
38
+
39
+ export function AzureCredentialOptsFromJSON(json: any): AzureCredentialOpts {
40
+ return AzureCredentialOptsFromJSONTyped(json, false)
41
+ }
42
+
43
+ export function AzureCredentialOptsFromJSONTyped(json: any, ignoreDiscriminator: boolean): AzureCredentialOpts {
44
+ if (json == null) {
45
+ return json
46
+ }
47
+ return {
48
+ clientSecretCredentialOpts:
49
+ json['clientSecretCredentialOpts'] == null ? undefined : AzureClientSecretCredentialOptsFromJSON(json['clientSecretCredentialOpts']),
50
+ }
51
+ }
52
+
53
+ export function AzureCredentialOptsToJSON(json: any): AzureCredentialOpts {
54
+ return AzureCredentialOptsToJSONTyped(json, false)
55
+ }
56
+
57
+ export function AzureCredentialOptsToJSONTyped(value?: AzureCredentialOpts | null, ignoreDiscriminator: boolean = false): any {
58
+ if (value == null) {
59
+ return value
60
+ }
61
+
62
+ return {
63
+ clientSecretCredentialOpts: AzureClientSecretCredentialOptsToJSON(value['clientSecretCredentialOpts']),
64
+ }
65
+ }
@@ -0,0 +1,101 @@
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 { AzureCredentialOpts } from './AzureCredentialOpts'
16
+ import { AzureCredentialOptsFromJSON, AzureCredentialOptsToJSON } from './AzureCredentialOpts'
17
+ import type { LookupMode } from './LookupMode'
18
+ import { LookupModeFromJSON, LookupModeToJSON } from './LookupMode'
19
+
20
+ /**
21
+ * Configuration settings specific to the Azure KeyVault provider type.
22
+ * @export
23
+ * @interface AzureKeyVaultSetting
24
+ */
25
+ export interface AzureKeyVaultSetting {
26
+ /**
27
+ * The URL of the Azure Key Vault or Managed HSM instance.
28
+ * @type {string}
29
+ * @memberof AzureKeyVaultSetting
30
+ */
31
+ keyvaultUrl: string
32
+ /**
33
+ * The Azure Active Directory tenant (directory) ID.
34
+ * @type {string}
35
+ * @memberof AzureKeyVaultSetting
36
+ */
37
+ tenantId: string
38
+ /**
39
+ *
40
+ * @type {AzureCredentialOpts}
41
+ * @memberof AzureKeyVaultSetting
42
+ */
43
+ credentialOpts: AzureCredentialOpts
44
+ /**
45
+ * An optional identifier for your application using the Key Vault.
46
+ * @type {string}
47
+ * @memberof AzureKeyVaultSetting
48
+ */
49
+ applicationId?: string
50
+ /**
51
+ *
52
+ * @type {LookupMode}
53
+ * @memberof AzureKeyVaultSetting
54
+ */
55
+ lookupMode?: LookupMode
56
+ }
57
+
58
+ /**
59
+ * Check if a given object implements the AzureKeyVaultSetting interface.
60
+ */
61
+ export function instanceOfAzureKeyVaultSetting(value: object): value is AzureKeyVaultSetting {
62
+ if (!('keyvaultUrl' in value) || value['keyvaultUrl'] === undefined) return false
63
+ if (!('tenantId' in value) || value['tenantId'] === undefined) return false
64
+ if (!('credentialOpts' in value) || value['credentialOpts'] === undefined) return false
65
+ return true
66
+ }
67
+
68
+ export function AzureKeyVaultSettingFromJSON(json: any): AzureKeyVaultSetting {
69
+ return AzureKeyVaultSettingFromJSONTyped(json, false)
70
+ }
71
+
72
+ export function AzureKeyVaultSettingFromJSONTyped(json: any, ignoreDiscriminator: boolean): AzureKeyVaultSetting {
73
+ if (json == null) {
74
+ return json
75
+ }
76
+ return {
77
+ keyvaultUrl: json['keyvaultUrl'],
78
+ tenantId: json['tenantId'],
79
+ credentialOpts: AzureCredentialOptsFromJSON(json['credentialOpts']),
80
+ applicationId: json['applicationId'] == null ? undefined : json['applicationId'],
81
+ lookupMode: json['lookupMode'] == null ? undefined : LookupModeFromJSON(json['lookupMode']),
82
+ }
83
+ }
84
+
85
+ export function AzureKeyVaultSettingToJSON(json: any): AzureKeyVaultSetting {
86
+ return AzureKeyVaultSettingToJSONTyped(json, false)
87
+ }
88
+
89
+ export function AzureKeyVaultSettingToJSONTyped(value?: AzureKeyVaultSetting | null, ignoreDiscriminator: boolean = false): any {
90
+ if (value == null) {
91
+ return value
92
+ }
93
+
94
+ return {
95
+ keyvaultUrl: value['keyvaultUrl'],
96
+ tenantId: value['tenantId'],
97
+ credentialOpts: AzureCredentialOptsToJSON(value['credentialOpts']),
98
+ applicationId: value['applicationId'],
99
+ lookupMode: LookupModeToJSON(value['lookupMode']),
100
+ }
101
+ }
@@ -0,0 +1,137 @@
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 { CoseKeyType } from './CoseKeyType'
16
+ import { CoseKeyTypeFromJSON, CoseKeyTypeToJSON } from './CoseKeyType'
17
+
18
+ /**
19
+ * Represents a COSE (CBOR Object Signing and Encryption) key in JSON format.
20
+ * @export
21
+ * @interface CoseKey
22
+ */
23
+ export interface CoseKey {
24
+ /**
25
+ *
26
+ * @type {CoseKeyType}
27
+ * @memberof CoseKey
28
+ */
29
+ kty: CoseKeyType
30
+ /**
31
+ * Key identifier (base64url-encoded byte string).
32
+ * @type {string}
33
+ * @memberof CoseKey
34
+ */
35
+ kid?: string
36
+ /**
37
+ * The COSE algorithm identifier (e.g., -7=ES256, -35=ES384, -36=ES512, -8=EdDSA).
38
+ * @type {number}
39
+ * @memberof CoseKey
40
+ */
41
+ alg?: number
42
+ /**
43
+ * The allowed COSE key operations (1=sign, 2=verify, 3=encrypt, 4=decrypt, etc.).
44
+ * @type {Array<number>}
45
+ * @memberof CoseKey
46
+ */
47
+ keyOps?: Array<number>
48
+ /**
49
+ * Base initialization vector (base64url-encoded).
50
+ * @type {string}
51
+ * @memberof CoseKey
52
+ */
53
+ baseIV?: string
54
+ /**
55
+ * The COSE curve identifier (1=P-256, 2=P-384, 3=P-521, 8=secp256k1, 6=Ed25519, etc.).
56
+ * @type {number}
57
+ * @memberof CoseKey
58
+ */
59
+ crv?: number
60
+ /**
61
+ * The x coordinate (base64url-encoded byte string).
62
+ * @type {string}
63
+ * @memberof CoseKey
64
+ */
65
+ x?: string
66
+ /**
67
+ * The y coordinate (base64url-encoded byte string).
68
+ * @type {string}
69
+ * @memberof CoseKey
70
+ */
71
+ y?: string
72
+ /**
73
+ * The private key parameter (base64url-encoded byte string).
74
+ * @type {string}
75
+ * @memberof CoseKey
76
+ */
77
+ d?: string
78
+ /**
79
+ * X.509 certificate chain as base64-encoded certificates.
80
+ * @type {Array<string>}
81
+ * @memberof CoseKey
82
+ */
83
+ x5chain?: Array<string>
84
+ }
85
+
86
+ /**
87
+ * Check if a given object implements the CoseKey interface.
88
+ */
89
+ export function instanceOfCoseKey(value: object): value is CoseKey {
90
+ if (!('kty' in value) || value['kty'] === undefined) return false
91
+ return true
92
+ }
93
+
94
+ export function CoseKeyFromJSON(json: any): CoseKey {
95
+ return CoseKeyFromJSONTyped(json, false)
96
+ }
97
+
98
+ export function CoseKeyFromJSONTyped(json: any, ignoreDiscriminator: boolean): CoseKey {
99
+ if (json == null) {
100
+ return json
101
+ }
102
+ return {
103
+ kty: CoseKeyTypeFromJSON(json['kty']),
104
+ kid: json['kid'] == null ? undefined : json['kid'],
105
+ alg: json['alg'] == null ? undefined : json['alg'],
106
+ keyOps: json['key_ops'] == null ? undefined : json['key_ops'],
107
+ baseIV: json['baseIV'] == null ? undefined : json['baseIV'],
108
+ crv: json['crv'] == null ? undefined : json['crv'],
109
+ x: json['x'] == null ? undefined : json['x'],
110
+ y: json['y'] == null ? undefined : json['y'],
111
+ d: json['d'] == null ? undefined : json['d'],
112
+ x5chain: json['x5chain'] == null ? undefined : json['x5chain'],
113
+ }
114
+ }
115
+
116
+ export function CoseKeyToJSON(json: any): CoseKey {
117
+ return CoseKeyToJSONTyped(json, false)
118
+ }
119
+
120
+ export function CoseKeyToJSONTyped(value?: CoseKey | null, ignoreDiscriminator: boolean = false): any {
121
+ if (value == null) {
122
+ return value
123
+ }
124
+
125
+ return {
126
+ kty: CoseKeyTypeToJSON(value['kty']),
127
+ kid: value['kid'],
128
+ alg: value['alg'],
129
+ key_ops: value['keyOps'],
130
+ baseIV: value['baseIV'],
131
+ crv: value['crv'],
132
+ x: value['x'],
133
+ y: value['y'],
134
+ d: value['d'],
135
+ x5chain: value['x5chain'],
136
+ }
137
+ }