@3sixty/vault-connector-hashicorp 0.20.0-next.0 → 0.20.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/hashicorpVaultConnector.js.map +1 -1
- package/dist/es/index.js.map +1 -1
- package/dist/es/models/IBackupKeyResponse.js.map +1 -1
- package/dist/es/models/ICreateKeyRequest.js.map +1 -1
- package/dist/es/models/IDataKeyEnvelope.js.map +1 -1
- package/dist/es/models/IDecryptDataRequest.js.map +1 -1
- package/dist/es/models/IDecryptDataResponse.js.map +1 -1
- package/dist/es/models/IEncryptDataRequest.js.map +1 -1
- package/dist/es/models/IEncryptDataResponse.js.map +1 -1
- package/dist/es/models/IExportKeyResponse.js.map +1 -1
- package/dist/es/models/IHashicorpVaultConnectorConfig.js.map +1 -1
- package/dist/es/models/IHashicorpVaultConnectorConstructorOptions.js.map +1 -1
- package/dist/es/models/IHashicorpVaultRequest.js.map +1 -1
- package/dist/es/models/IHashicorpVaultResponse.js.map +1 -1
- package/dist/es/models/IImportKeyRequest.js.map +1 -1
- package/dist/es/models/IKeyDeleteConfigResponse.js.map +1 -1
- package/dist/es/models/IReadKeyResponse.js.map +1 -1
- package/dist/es/models/IRestoreKeyRequest.js.map +1 -1
- package/dist/es/models/ISecretData.js.map +1 -1
- package/dist/es/models/ISecretVersionResponse.js.map +1 -1
- package/dist/es/models/ISignDataRequest.js.map +1 -1
- package/dist/es/models/ISignDataResponse.js.map +1 -1
- package/dist/es/models/IUpdateKeyConfigRequest.js.map +1 -1
- package/dist/es/models/IVerifyDataRequest.js.map +1 -1
- package/dist/es/models/IVerifyDataResponse.js.map +1 -1
- package/docs/changelog.md +21 -0
- package/docs/reference/classes/HashicorpVaultConnector.md +2 -2
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hashicorpVaultConnector.js","sourceRoot":"","sources":["../../src/hashicorpVaultConnector.ts"],"names":[],"mappings":"AAAA,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AI,CAAC,EAAE,CAAC;IACzE,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport {\n\tHealthCategory,\n\tHealthStatus,\n\ttype IHealth,\n\ttype IHealthProviderComponent\n} from \"@3sixty/api-models\";\nimport {\n\tAlreadyExistsError,\n\tBaseError,\n\tComponentFactory,\n\tConverter,\n\tGeneralError,\n\tGuards,\n\tIs,\n\tLruCache,\n\tNotFoundError,\n\tRandomHelper,\n\tStringHelper\n} from \"@3sixty/core\";\nimport { ChaCha20Poly1305, Ed25519 } from \"@3sixty/crypto\";\nimport type { ILoggingComponent } from \"@3sixty/logging-models\";\nimport { nameof } from \"@3sixty/nameof\";\nimport { type IVaultConnector, VaultEncryptionType, VaultKeyType } from \"@3sixty/vault-models\";\nimport { FetchHelper, HttpMethod, type IHttpHeaders } from \"@3sixty/web\";\nimport type { IBackupKeyResponse } from \"./models/IBackupKeyResponse.js\";\nimport type { ICreateKeyRequest } from \"./models/ICreateKeyRequest.js\";\nimport type { IDataKeyEnvelope } from \"./models/IDataKeyEnvelope.js\";\nimport type { IDecryptDataRequest } from \"./models/IDecryptDataRequest.js\";\nimport type { IDecryptDataResponse } from \"./models/IDecryptDataResponse.js\";\nimport type { IEncryptDataRequest } from \"./models/IEncryptDataRequest.js\";\nimport type { IEncryptDataResponse } from \"./models/IEncryptDataResponse.js\";\nimport type { IExportKeyResponse } from \"./models/IExportKeyResponse.js\";\nimport type { IHashicorpVaultConnectorConfig } from \"./models/IHashicorpVaultConnectorConfig.js\";\nimport type { IHashicorpVaultConnectorConstructorOptions } from \"./models/IHashicorpVaultConnectorConstructorOptions.js\";\nimport type { IHashicorpVaultRequest } from \"./models/IHashicorpVaultRequest.js\";\nimport type { IHashicorpVaultResponse } from \"./models/IHashicorpVaultResponse.js\";\nimport type { IImportKeyRequest } from \"./models/IImportKeyRequest.js\";\nimport type { IKeyDeleteConfigResponse } from \"./models/IKeyDeleteConfigResponse.js\";\nimport type { IReadKeyResponse } from \"./models/IReadKeyResponse.js\";\nimport type { IRestoreKeyRequest } from \"./models/IRestoreKeyRequest.js\";\nimport type { ISecretData } from \"./models/ISecretData.js\";\nimport type { ISecretVersionResponse } from \"./models/ISecretVersionResponse.js\";\nimport type { ISignDataRequest } from \"./models/ISignDataRequest.js\";\nimport type { ISignDataResponse } from \"./models/ISignDataResponse.js\";\nimport type { IUpdateKeyConfigRequest } from \"./models/IUpdateKeyConfigRequest.js\";\nimport type { IVerifyDataRequest } from \"./models/IVerifyDataRequest.js\";\nimport type { IVerifyDataResponse } from \"./models/IVerifyDataResponse.js\";\n\n/**\n * Class for performing vault operations using HashiCorp Vault.\n */\nexport class HashicorpVaultConnector implements IVaultConnector, IHealthProviderComponent {\n\t/**\n\t * Runtime name for the class.\n\t */\n\tpublic static readonly CLASS_NAME: string = nameof<HashicorpVaultConnector>();\n\n\t/**\n\t * The namespace supported by the vault connector.\n\t */\n\tpublic static readonly NAMESPACE: string = \"hashicorp\";\n\n\t/**\n\t * The prefix to strip from keys and encrypted data.\n\t * @internal\n\t */\n\tprivate static readonly _DATA_PREFIX: string = \"vault:v1:\";\n\n\t/**\n\t * The prefix marking data encrypted under a wrapped data key.\n\t * @internal\n\t */\n\tprivate static readonly _ENVELOPE_PREFIX: Uint8Array = Converter.utf8ToBytes(\"twin:env:v1:\");\n\n\t/**\n\t * The length in bytes of a data key.\n\t * @internal\n\t */\n\tprivate static readonly _DATA_KEY_LENGTH: number = 32;\n\n\t/**\n\t * The length in bytes of a ChaCha20Poly1305 nonce.\n\t * @internal\n\t */\n\tprivate static readonly _NONCE_LENGTH: number = 12;\n\n\t/**\n\t * The length in bytes of a ChaCha20Poly1305 authentication tag.\n\t * @internal\n\t */\n\tprivate static readonly _TAG_LENGTH: number = 16;\n\n\t/**\n\t * The default TTL in milliseconds for cached key metadata.\n\t * @internal\n\t */\n\tprivate static readonly _DEFAULT_KEY_METADATA_CACHE_TTL_MS: number = 30000;\n\n\t/**\n\t * The configuration for the vault connector.\n\t * @internal\n\t */\n\tprivate readonly _config: IHashicorpVaultConnectorConfig;\n\n\t/**\n\t * The KV mount path.\n\t * @internal\n\t */\n\tprivate readonly _kvMountPath: string;\n\n\t/**\n\t * The transit mount path.\n\t * @internal\n\t */\n\tprivate readonly _transitMountPath: string;\n\n\t/**\n\t * The base URL for the Vault API.\n\t * @internal\n\t */\n\tprivate readonly _baseUrl: string;\n\n\t/**\n\t * The request options for fetch calls.\n\t * @internal\n\t */\n\tprivate readonly _requestOptions: { headers: IHttpHeaders; timeoutMs?: number };\n\n\t/**\n\t * A prefix for the keys stored in the vault.\n\t * @internal\n\t */\n\tprivate readonly _prefix?: string;\n\n\t/**\n\t * The TTL in milliseconds for cached key metadata.\n\t * @internal\n\t */\n\tprivate readonly _keyMetadataCacheTtlMs: number;\n\n\t/**\n\t * Cache of key metadata by key name, undefined when caching is disabled.\n\t * @internal\n\t */\n\tprivate _keyMetadataCache?: LruCache<IReadKeyResponse>;\n\n\t/**\n\t * Create a new instance of HashicorpVaultConnector.\n\t * @param options The options for the vault connector.\n\t */\n\tconstructor(options: IHashicorpVaultConnectorConstructorOptions) {\n\t\tGuards.object(HashicorpVaultConnector.CLASS_NAME, nameof(options), options);\n\t\tGuards.object<IHashicorpVaultConnectorConfig>(\n\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\tnameof(options.config),\n\t\t\toptions.config\n\t\t);\n\t\tGuards.stringValue(\n\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\tnameof(options.config.endpoint),\n\t\t\toptions.config.endpoint\n\t\t);\n\t\tGuards.stringValue(\n\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\tnameof(options.config.token),\n\t\t\toptions.config.token\n\t\t);\n\n\t\tthis._config = options.config;\n\t\tthis._kvMountPath = this._config.kvMountPath ?? \"secret\";\n\t\tthis._transitMountPath = this._config.transitMountPath ?? \"transit\";\n\t\tthis._baseUrl = `${StringHelper.trimTrailingSlashes(this._config.endpoint)}/${this._config.apiVersion ?? \"v1\"}`;\n\t\tconst headers: IHttpHeaders = {\n\t\t\t\"X-Vault-Token\": this._config.token\n\t\t};\n\t\tif (Is.stringValue(this._config.namespace)) {\n\t\t\theaders[\"X-Vault-Namespace\"] = this._config.namespace;\n\t\t}\n\t\tthis._requestOptions = {\n\t\t\theaders,\n\t\t\ttimeoutMs: this._config.timeoutMs\n\t\t};\n\t\tthis._prefix = this._config.prefix;\n\t\tthis._keyMetadataCacheTtlMs =\n\t\t\tthis._config.keyMetadataCacheTtlMs ??\n\t\t\tHashicorpVaultConnector._DEFAULT_KEY_METADATA_CACHE_TTL_MS;\n\t\tthis._keyMetadataCache =\n\t\t\tthis._keyMetadataCacheTtlMs > 0\n\t\t\t\t? new LruCache<IReadKeyResponse>({ ttiMs: this._keyMetadataCacheTtlMs })\n\t\t\t\t: undefined;\n\t}\n\n\t/**\n\t * Returns the class name of the component.\n\t * @returns The class name of the component.\n\t */\n\tpublic className(): string {\n\t\treturn HashicorpVaultConnector.CLASS_NAME;\n\t}\n\n\t/**\n\t * Returns the health status of the component.\n\t * @returns The health status of the component.\n\t */\n\tpublic async health(): Promise<IHealth[]> {\n\t\tconst endpoint = `${this._baseUrl}/sys/health`;\n\t\ttry {\n\t\t\tawait FetchHelper.fetch(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\tendpoint,\n\t\t\t\tHttpMethod.GET,\n\t\t\t\tundefined,\n\t\t\t\tthis._requestOptions\n\t\t\t);\n\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tsource: HashicorpVaultConnector.CLASS_NAME,\n\t\t\t\t\tcategory: HealthCategory.Connectivity,\n\t\t\t\t\tstatus: HealthStatus.Ok,\n\t\t\t\t\tdescription: \"healthDescription\",\n\t\t\t\t\tdata: { endpoint }\n\t\t\t\t}\n\t\t\t];\n\t\t} catch {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tsource: HashicorpVaultConnector.CLASS_NAME,\n\t\t\t\t\tcategory: HealthCategory.Connectivity,\n\t\t\t\t\tstatus: HealthStatus.Error,\n\t\t\t\t\tdescription: \"healthDescription\",\n\t\t\t\t\tmessage: \"vaultHealthCheckFailed\",\n\t\t\t\t\tdata: { endpoint }\n\t\t\t\t}\n\t\t\t];\n\t\t}\n\t}\n\n\t/**\n\t * Bootstrap the vault connector and ensure connectivity.\n\t * @param nodeLoggingComponentType The node logging component type.\n\t * @returns True if the bootstrapping process was successful.\n\t */\n\tpublic async bootstrap(nodeLoggingComponentType?: string): Promise<boolean> {\n\t\tconst nodeLogging = ComponentFactory.getIfExists<ILoggingComponent>(nodeLoggingComponentType);\n\n\t\ttry {\n\t\t\tawait FetchHelper.fetch(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\t`${this._baseUrl}/sys/health`,\n\t\t\t\tHttpMethod.GET,\n\t\t\t\tundefined,\n\t\t\t\tthis._requestOptions\n\t\t\t);\n\n\t\t\tawait nodeLogging?.log({\n\t\t\t\tlevel: \"info\",\n\t\t\t\tsource: HashicorpVaultConnector.CLASS_NAME,\n\t\t\t\tts: Date.now(),\n\t\t\t\tmessage: \"hashicorpVaultConnected\",\n\t\t\t\tdata: {\n\t\t\t\t\taddress: this._config.endpoint\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn true;\n\t\t} catch (err) {\n\t\t\tawait nodeLogging?.log({\n\t\t\t\tlevel: \"error\",\n\t\t\t\tsource: HashicorpVaultConnector.CLASS_NAME,\n\t\t\t\tts: Date.now(),\n\t\t\t\tmessage: \"hashicorpVaultConnectionFailed\",\n\t\t\t\terror: BaseError.fromError(err),\n\t\t\t\tdata: {\n\t\t\t\t\taddress: this._config.endpoint\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t * Store a secret in the vault.\n\t * @param name The name of the item in the vault to set.\n\t * @param data The item to add to the vault.\n\t * @returns A promise that resolves when the secret has been stored.\n\t */\n\tpublic async setSecret<T>(name: string, data: T): Promise<void> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, nameof(name), name);\n\t\tGuards.defined(HashicorpVaultConnector.CLASS_NAME, nameof(data), data);\n\n\t\ttry {\n\t\t\tconst path = this.getSecretPath(name);\n\t\t\tconst url = `${this._baseUrl}/${path}`;\n\t\t\tconst payload = {\n\t\t\t\tdata: {\n\t\t\t\t\tsecret: data\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tawait FetchHelper.fetchJson<IHashicorpVaultRequest<T>, unknown>(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\turl,\n\t\t\t\tHttpMethod.POST,\n\t\t\t\tpayload,\n\t\t\t\tthis._requestOptions\n\t\t\t);\n\t\t} catch (err) {\n\t\t\tthrow new GeneralError(HashicorpVaultConnector.CLASS_NAME, \"setSecretFailed\", { name }, err);\n\t\t}\n\t}\n\n\t/**\n\t * Stop the component and release the key metadata cache.\n\t * @param nodeLoggingComponentType The node logging component type.\n\t * @returns A promise that resolves when the component has stopped.\n\t */\n\tpublic async stop(nodeLoggingComponentType?: string): Promise<void> {\n\t\tthis._keyMetadataCache?.destroy();\n\t\tthis._keyMetadataCache = undefined;\n\t}\n\n\t/**\n\t * Check if a secret exists in the vault.\n\t * @param name The name of the secret to check.\n\t * @returns True if the secret exists, false otherwise.\n\t */\n\tpublic async secretExists(name: string): Promise<boolean> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, nameof(name), name);\n\n\t\ttry {\n\t\t\tawait this.getSecretVersions(name);\n\t\t\treturn true;\n\t\t} catch (err) {\n\t\t\tif (BaseError.isErrorName(err, NotFoundError.CLASS_NAME)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tthrow err;\n\t\t}\n\t}\n\n\t/**\n\t * Get a secret from the vault.\n\t * @param name The name of the item in the vault to get.\n\t * @returns The item from the vault.\n\t * @throws Error if the item is not found.\n\t */\n\tpublic async getSecret<T>(name: string): Promise<T> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, nameof(name), name);\n\n\t\tawait this.getSecretVersions(name);\n\n\t\ttry {\n\t\t\tconst path = this.getSecretPath(name);\n\t\t\tconst url = `${this._baseUrl}/${path}`;\n\n\t\t\tconst response = await FetchHelper.fetchJson<never, IHashicorpVaultResponse<ISecretData<T>>>(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\turl,\n\t\t\t\tHttpMethod.GET,\n\t\t\t\tundefined,\n\t\t\t\tthis._requestOptions\n\t\t\t);\n\n\t\t\treturn response.data.data.secret;\n\t\t} catch (err) {\n\t\t\tif (\n\t\t\t\tIs.object<{ properties?: { httpStatus?: number } }>(err) &&\n\t\t\t\terr.properties?.httpStatus === 404\n\t\t\t) {\n\t\t\t\tthrow new NotFoundError(\n\t\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\t\t\"secretNotFound\",\n\t\t\t\t\tname,\n\t\t\t\t\tundefined,\n\t\t\t\t\terr\n\t\t\t\t);\n\t\t\t}\n\t\t\tthrow new GeneralError(HashicorpVaultConnector.CLASS_NAME, \"setSecretFailed\", { name }, err);\n\t\t}\n\t}\n\n\t/**\n\t * Remove a secret from the vault.\n\t * @param name The name of the item in the vault to remove.\n\t * @returns A promise that resolves when the secret has been removed.\n\t * @throws Error if the item is not found.\n\t */\n\tpublic async removeSecret(name: string): Promise<void> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, nameof(name), name);\n\n\t\tawait this.getSecretVersions(name);\n\n\t\ttry {\n\t\t\tconst path = this.getSecretMetadataPath(name);\n\t\t\tconst url = `${this._baseUrl}/${path}`;\n\n\t\t\tawait FetchHelper.fetchJson<never, IHashicorpVaultResponse<unknown>>(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\turl,\n\t\t\t\tHttpMethod.DELETE,\n\t\t\t\tundefined,\n\t\t\t\tthis._requestOptions\n\t\t\t);\n\t\t} catch (err) {\n\t\t\tthrow new GeneralError(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\t\"removeSecretFailed\",\n\t\t\t\t{ name },\n\t\t\t\terr\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Generate a new key and store it in the vault.\n\t * @param name The name of the key to generate and store in the vault.\n\t * @param type The type of key to create.\n\t * @returns The public key for the key pair.\n\t */\n\tpublic async createKey(name: string, type: VaultKeyType): Promise<Uint8Array> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, nameof(name), name);\n\t\tGuards.arrayOneOf<VaultKeyType>(\n\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\tnameof(type),\n\t\t\ttype,\n\t\t\tObject.values(VaultKeyType)\n\t\t);\n\n\t\tconst path = this.getTransitKeyPath(name);\n\t\tconst url = `${this._baseUrl}/${path}`;\n\n\t\ttry {\n\t\t\t// Check if the key exists\n\t\t\tconst existingVaultKey = await this.readKey(name);\n\t\t\tif (existingVaultKey) {\n\t\t\t\tthrow new AlreadyExistsError(HashicorpVaultConnector.CLASS_NAME, \"keyAlreadyExists\", name);\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tif (!BaseError.isErrorName(err, NotFoundError.CLASS_NAME)) {\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\tconst vaultKeyType = this.mapVaultKeyType(type);\n\n\t\t\tconst payload: ICreateKeyRequest = {\n\t\t\t\ttype: vaultKeyType,\n\t\t\t\texportable: true,\n\t\t\t\tallow_plaintext_backup: true // eslint-disable-line camelcase\n\t\t\t};\n\n\t\t\tawait FetchHelper.fetchJson<ICreateKeyRequest, IHashicorpVaultResponse<unknown>>(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\turl,\n\t\t\t\tHttpMethod.POST,\n\t\t\t\tpayload,\n\t\t\t\tthis._requestOptions\n\t\t\t);\n\t\t\tthis._keyMetadataCache?.delete(name);\n\n\t\t\t// If the key is asymmetric, return the public key\n\t\t\tif (this.isAsymmetricKeyType(type)) {\n\t\t\t\tconst publicKey = await this.exportKey(name, \"public-key\");\n\t\t\t\treturn publicKey.key;\n\t\t\t}\n\n\t\t\t// If the key is symmetric, return the encryption key\n\t\t\tconst symmetricKey = await this.exportKey(name, \"encryption-key\");\n\t\t\treturn symmetricKey.key;\n\t\t} catch (err) {\n\t\t\tif (BaseError.isErrorName(err, AlreadyExistsError.CLASS_NAME)) {\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t\tthrow new GeneralError(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\t\"createKeyFailed\",\n\t\t\t\t{ name, type },\n\t\t\t\terr\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Add an existing key to the vault.\n\t * @param name The name of the key to add to the vault.\n\t * @param type The type of key to add.\n\t * @param privateKey The private key.\n\t * @param publicKey The public key, can be undefined if the key type is symmetric.\n\t * @returns A promise that resolves when the key has been stored.\n\t */\n\tpublic async addKey(\n\t\tname: string,\n\t\ttype: VaultKeyType,\n\t\tprivateKey: Uint8Array,\n\t\tpublicKey?: Uint8Array\n\t): Promise<void> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, nameof(name), name);\n\t\tGuards.arrayOneOf<VaultKeyType>(\n\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\tnameof(type),\n\t\t\ttype,\n\t\t\tObject.values(VaultKeyType)\n\t\t);\n\t\tGuards.uint8Array(HashicorpVaultConnector.CLASS_NAME, nameof(privateKey), privateKey);\n\n\t\ttry {\n\t\t\t// Check if the key exists\n\t\t\tconst existingVaultKey = await this.readKey(name);\n\t\t\tif (existingVaultKey) {\n\t\t\t\tthrow new AlreadyExistsError(HashicorpVaultConnector.CLASS_NAME, \"keyAlreadyExists\", name);\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tif (!BaseError.isErrorName(err, NotFoundError.CLASS_NAME)) {\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\tconst internalType = this.mapVaultKeyTypeToIndex(type);\n\n\t\t\tlet publicKeyForPayload: string | null = null;\n\t\t\tlet privateKeyForPayload: string | null = null;\n\n\t\t\tif (type === VaultKeyType.Ed25519 || type === VaultKeyType.ChaCha20Poly1305) {\n\t\t\t\tconst combinedKey = new Uint8Array(privateKey.length + (publicKey?.length ?? 0));\n\t\t\t\tcombinedKey.set(privateKey);\n\t\t\t\tif (publicKey) {\n\t\t\t\t\tcombinedKey.set(publicKey, privateKey.length);\n\t\t\t\t}\n\t\t\t\tprivateKeyForPayload = Converter.bytesToBase64(combinedKey);\n\t\t\t\tif (!Is.undefined(publicKey)) {\n\t\t\t\t\tpublicKeyForPayload = Converter.bytesToBase64(publicKey);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst payload = {\n\t\t\t\tpolicy: {\n\t\t\t\t\tname,\n\t\t\t\t\tkeys: {\n\t\t\t\t\t\t\"1\": {\n\t\t\t\t\t\t\tkey: privateKeyForPayload,\n\t\t\t\t\t\t\thmac_key: Converter.bytesToBase64(RandomHelper.generate(32)), // eslint-disable-line camelcase\n\t\t\t\t\t\t\tpublic_key: publicKeyForPayload // eslint-disable-line camelcase\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\texportable: true,\n\t\t\t\t\tallow_plaintext_backup: true, // eslint-disable-line camelcase\n\t\t\t\t\tmin_decryption_version: 1, // eslint-disable-line camelcase\n\t\t\t\t\tmin_encryption_version: 0, // eslint-disable-line camelcase\n\t\t\t\t\tlatest_version: 1, // eslint-disable-line camelcase\n\t\t\t\t\ttype: internalType\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tconst json = JSON.stringify(payload);\n\n\t\t\tconst backup = Converter.bytesToBase64(Converter.utf8ToBytes(json));\n\n\t\t\tawait this.restoreKey(name, backup);\n\t\t} catch (err) {\n\t\t\tif (BaseError.isErrorName(err, AlreadyExistsError.CLASS_NAME)) {\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t\tthrow new GeneralError(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\t\"addKeyFailed\",\n\t\t\t\t{ name, type },\n\t\t\t\terr\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Get a key from the vault.\n\t * @param name The name of the key to get.\n\t * @param components Which key components to return, defaults to \"both\".\n\t * @returns The key, publicKey can be undefined if key is symmetric, privateKey can be undefined if only public was requested.\n\t * @throws GeneralError if \"private\" is requested for a symmetric key.\n\t */\n\tpublic async getKey(\n\t\tname: string,\n\t\tcomponents?: \"public\" | \"private\" | \"both\"\n\t): Promise<{\n\t\t/**\n\t\t * The type of the key e.g. Ed25519.\n\t\t */\n\t\ttype: VaultKeyType;\n\n\t\t/**\n\t\t * The private key, undefined if only public component was requested.\n\t\t */\n\t\tprivateKey?: Uint8Array;\n\n\t\t/**\n\t\t * The public key, which can be undefined if key type is symmetric or only private was requested.\n\t\t */\n\t\tpublicKey?: Uint8Array;\n\t}> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, nameof(name), name);\n\n\t\tcomponents ??= \"both\";\n\n\t\tGuards.arrayOneOf<\"public\" | \"private\" | \"both\">(\n\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\tnameof(components),\n\t\t\tcomponents,\n\t\t\t[\"public\", \"private\", \"both\"]\n\t\t);\n\n\t\tconst keyDetails = await this.readKeyCached(name);\n\n\t\tconst type = this.mapHashicorpKeyType(keyDetails.type);\n\t\tconst isAsymmetric = this.isAsymmetricKeyType(type);\n\n\t\tif (!isAsymmetric && components === \"private\") {\n\t\t\tthrow new GeneralError(HashicorpVaultConnector.CLASS_NAME, \"symmetricKeyHasNoPrivateKey\", {\n\t\t\t\tname\n\t\t\t});\n\t\t}\n\n\t\ttry {\n\t\t\tlet publicKey: Uint8Array | undefined;\n\t\t\tlet privateKey: Uint8Array | undefined;\n\n\t\t\tif (isAsymmetric) {\n\t\t\t\tif (components !== \"public\") {\n\t\t\t\t\tconst privateKeyData = await this.exportKey(name, \"signing-key\");\n\t\t\t\t\tprivateKey = privateKeyData.key;\n\t\t\t\t}\n\t\t\t\tif (components !== \"private\") {\n\t\t\t\t\tconst publicKeyData = await this.exportKey(name, \"public-key\");\n\t\t\t\t\tpublicKey = publicKeyData.key;\n\t\t\t\t}\n\t\t\t} else if (components !== \"public\") {\n\t\t\t\tconst privateKeyData = await this.exportKey(name, \"encryption-key\");\n\t\t\t\tprivateKey = privateKeyData.key;\n\t\t\t}\n\n\t\t\treturn { type, privateKey, publicKey };\n\t\t} catch (err) {\n\t\t\tif (BaseError.isErrorName(err, NotFoundError.CLASS_NAME)) {\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t\tthrow new GeneralError(HashicorpVaultConnector.CLASS_NAME, \"getKeyFailed\", { name }, err);\n\t\t}\n\t}\n\n\t/**\n\t * Check if a key exists in the vault.\n\t * @param name The name of the key to check.\n\t * @returns True if the key exists, false otherwise.\n\t */\n\tpublic async keyExists(name: string): Promise<boolean> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, nameof(name), name);\n\n\t\ttry {\n\t\t\tawait this.readKey(name);\n\t\t\treturn true;\n\t\t} catch (err) {\n\t\t\tif (BaseError.isErrorName(err, NotFoundError.CLASS_NAME)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tthrow err;\n\t\t}\n\t}\n\n\t/**\n\t * Get the type of a key from the vault without retrieving the key material.\n\t * @param name The name of the key.\n\t * @returns The key type.\n\t * @throws NotFoundError if the key does not exist.\n\t */\n\tpublic async getKeyType(name: string): Promise<VaultKeyType> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, nameof(name), name);\n\n\t\tconst keyDetails = await this.readKeyCached(name);\n\n\t\treturn this.mapHashicorpKeyType(keyDetails.type);\n\t}\n\n\t/**\n\t * Rename a key in the vault.\n\t * @param name The name of the key to rename.\n\t * @param newName The new name of the key.\n\t * @returns A promise that resolves when the key has been renamed.\n\t */\n\tpublic async renameKey(name: string, newName: string): Promise<void> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, nameof(name), name);\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, nameof(newName), newName);\n\n\t\tawait this.readKey(name);\n\n\t\tlet existingVaultKey;\n\t\ttry {\n\t\t\texistingVaultKey = await this.readKey(newName);\n\t\t} catch (err) {\n\t\t\tif (!BaseError.isErrorName(err, NotFoundError.CLASS_NAME)) {\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t}\n\t\tif (existingVaultKey) {\n\t\t\tthrow new AlreadyExistsError(HashicorpVaultConnector.CLASS_NAME, \"keyAlreadyExists\", newName);\n\t\t}\n\n\t\ttry {\n\t\t\tconst backup = await this.backupKey(name);\n\t\t\tawait this.restoreKey(newName, backup);\n\t\t\tawait this.removeKey(name);\n\t\t} catch (err) {\n\t\t\tthrow new GeneralError(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\t\"renameKeyFailed\",\n\t\t\t\t{ name, newName },\n\t\t\t\terr\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Remove a key from the vault.\n\t * @param name The name of the key to remove.\n\t * @returns A promise that resolves when the key has been removed.\n\t */\n\tpublic async removeKey(name: string): Promise<void> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, nameof(name), name);\n\n\t\tawait this.readKey(name);\n\n\t\ttry {\n\t\t\tconst path = this.getTransitKeyPath(name);\n\t\t\tconst url = `${this._baseUrl}/${path}`;\n\n\t\t\tawait this.updateKeyConfig(name, true);\n\n\t\t\tawait FetchHelper.fetch(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\turl,\n\t\t\t\tHttpMethod.DELETE,\n\t\t\t\tundefined,\n\t\t\t\tthis._requestOptions\n\t\t\t);\n\t\t\tthis._keyMetadataCache?.delete(name);\n\t\t} catch (err) {\n\t\t\tthrow new GeneralError(HashicorpVaultConnector.CLASS_NAME, \"removeKeyFailed\", { name }, err);\n\t\t}\n\t}\n\n\t/**\n\t * Sign data.\n\t * @param name The name of the key to use.\n\t * @param data The data to sign.\n\t * @returns The signature.\n\t */\n\tpublic async sign(name: string, data: Uint8Array): Promise<Uint8Array> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, nameof(name), name);\n\t\tGuards.uint8Array(HashicorpVaultConnector.CLASS_NAME, nameof(data), data);\n\n\t\tawait this.readKeyCached(name);\n\n\t\ttry {\n\t\t\tconst path = this.getTransitSignPath(name);\n\t\t\tconst url = `${this._baseUrl}/${path}`;\n\n\t\t\tconst base64Data = Converter.bytesToBase64(data);\n\n\t\t\tconst payload = {\n\t\t\t\tinput: base64Data\n\t\t\t};\n\n\t\t\tconst response = await FetchHelper.fetchJson<\n\t\t\t\tISignDataRequest,\n\t\t\t\tIHashicorpVaultResponse<ISignDataResponse>\n\t\t\t>(HashicorpVaultConnector.CLASS_NAME, url, HttpMethod.POST, payload, this._requestOptions);\n\n\t\t\tif (response?.data?.signature) {\n\t\t\t\tconst signatureString = response.data.signature;\n\n\t\t\t\tconst cleanedSignature = signatureString.startsWith(HashicorpVaultConnector._DATA_PREFIX)\n\t\t\t\t\t? signatureString.slice(HashicorpVaultConnector._DATA_PREFIX.length)\n\t\t\t\t\t: signatureString;\n\n\t\t\t\tconst signatureBytes = Converter.base64ToBytes(cleanedSignature);\n\t\t\t\treturn signatureBytes;\n\t\t\t}\n\t\t\tthrow new GeneralError(HashicorpVaultConnector.CLASS_NAME, \"invalidSignResponse\", { name });\n\t\t} catch (err) {\n\t\t\tthrow new GeneralError(HashicorpVaultConnector.CLASS_NAME, \"signDataFailed\", { name }, err);\n\t\t}\n\t}\n\n\t/**\n\t * Verify a signature.\n\t * @param name The name of the key to use.\n\t * @param data The data to verify.\n\t * @param signature The signature to verify.\n\t * @returns True if the signature is valid.\n\t */\n\tpublic async verify(name: string, data: Uint8Array, signature: Uint8Array): Promise<boolean> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, nameof(name), name);\n\t\tGuards.uint8Array(HashicorpVaultConnector.CLASS_NAME, nameof(data), data);\n\t\tGuards.uint8Array(HashicorpVaultConnector.CLASS_NAME, nameof(signature), signature);\n\n\t\tawait this.readKeyCached(name);\n\n\t\ttry {\n\t\t\tconst path = this.getTransitVerifyPath(name);\n\t\t\tconst url = `${this._baseUrl}/${path}`;\n\n\t\t\tconst base64Data = Converter.bytesToBase64(data);\n\t\t\tconst signatureBase64 = Converter.bytesToBase64(signature);\n\n\t\t\tconst prefixedSignature = `${HashicorpVaultConnector._DATA_PREFIX}${signatureBase64}`;\n\n\t\t\tconst payload = {\n\t\t\t\tinput: base64Data,\n\t\t\t\tsignature: prefixedSignature\n\t\t\t};\n\n\t\t\tconst response = await FetchHelper.fetchJson<\n\t\t\t\tIVerifyDataRequest,\n\t\t\t\tIHashicorpVaultResponse<IVerifyDataResponse>\n\t\t\t>(HashicorpVaultConnector.CLASS_NAME, url, HttpMethod.POST, payload, this._requestOptions);\n\n\t\t\tif (response?.data?.valid) {\n\t\t\t\treturn response.data.valid;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t} catch (err) {\n\t\t\tthrow new GeneralError(HashicorpVaultConnector.CLASS_NAME, \"verifyDataFailed\", { name }, err);\n\t\t}\n\t}\n\n\t/**\n\t * Encrypt data locally under a data key wrapped by the transit key.\n\t * @param name The name of the key to use.\n\t * @param encryptionType The type of encryption to use.\n\t * @param data The data to encrypt.\n\t * @returns The encrypted data.\n\t */\n\tpublic async encrypt(\n\t\tname: string,\n\t\tencryptionType: VaultEncryptionType,\n\t\tdata: Uint8Array\n\t): Promise<Uint8Array> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, nameof(name), name);\n\t\tGuards.arrayOneOf<VaultEncryptionType>(\n\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\tnameof(encryptionType),\n\t\t\tencryptionType,\n\t\t\tObject.values(VaultEncryptionType)\n\t\t);\n\t\tGuards.uint8Array(HashicorpVaultConnector.CLASS_NAME, nameof(data), data);\n\n\t\tconst keyDetails = await this.readKeyCached(name);\n\n\t\tif (\n\t\t\tencryptionType === VaultEncryptionType.ChaCha20Poly1305 &&\n\t\t\tkeyDetails.type !== this.mapVaultKeyType(VaultKeyType.ChaCha20Poly1305)\n\t\t) {\n\t\t\tthrow new GeneralError(HashicorpVaultConnector.CLASS_NAME, \"keyTypeMismatch\", {\n\t\t\t\tencryptionType,\n\t\t\t\tkeyType: keyDetails.type\n\t\t\t});\n\t\t}\n\n\t\ttry {\n\t\t\tconst dataKey = RandomHelper.generate(HashicorpVaultConnector._DATA_KEY_LENGTH);\n\t\t\tconst wrappedKey = await this.transitEncrypt(name, dataKey);\n\t\t\tconst header = this.buildEnvelopeHeader(wrappedKey);\n\t\t\tconst nonce = RandomHelper.generate(HashicorpVaultConnector._NONCE_LENGTH);\n\t\t\tconst payload = new ChaCha20Poly1305(dataKey, nonce, header).encrypt(data);\n\t\t\tdataKey.fill(0);\n\n\t\t\tconst envelope = new Uint8Array(header.length + nonce.length + payload.length);\n\t\t\tenvelope.set(header);\n\t\t\tenvelope.set(nonce, header.length);\n\t\t\tenvelope.set(payload, header.length + nonce.length);\n\t\t\treturn envelope;\n\t\t} catch (err) {\n\t\t\tthrow new GeneralError(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\t\"encryptDataFailed\",\n\t\t\t\t{ name, encryptionType },\n\t\t\t\terr\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Decrypt data, either an envelope or data encrypted directly by the transit key.\n\t * @param name The name of the key to use.\n\t * @param encryptionType The type of encryption to use.\n\t * @param encryptedData The encrypted data to decrypt.\n\t * @returns The decrypted data.\n\t */\n\tpublic async decrypt(\n\t\tname: string,\n\t\tencryptionType: VaultEncryptionType,\n\t\tencryptedData: Uint8Array\n\t): Promise<Uint8Array> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, nameof(name), name);\n\t\tGuards.arrayOneOf<VaultEncryptionType>(\n\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\tnameof(encryptionType),\n\t\t\tencryptionType,\n\t\t\tObject.values(VaultEncryptionType)\n\t\t);\n\t\tGuards.uint8Array(HashicorpVaultConnector.CLASS_NAME, nameof(encryptedData), encryptedData);\n\n\t\tawait this.readKeyCached(name);\n\n\t\ttry {\n\t\t\tif (!this.hasEnvelopePrefix(encryptedData)) {\n\t\t\t\treturn await this.transitDecrypt(\n\t\t\t\t\tname,\n\t\t\t\t\t`${HashicorpVaultConnector._DATA_PREFIX}${Converter.bytesToBase64(encryptedData)}`\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst envelope = this.parseEnvelope(encryptedData);\n\t\t\tconst dataKey = await this.transitDecrypt(name, envelope.wrappedKey);\n\t\t\tconst decrypted = new ChaCha20Poly1305(dataKey, envelope.nonce, envelope.header).decrypt(\n\t\t\t\tenvelope.payload\n\t\t\t);\n\t\t\tdataKey.fill(0);\n\t\t\treturn decrypted;\n\t\t} catch (err) {\n\t\t\tthrow new GeneralError(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\t\"decryptDataFailed\",\n\t\t\t\t{ name, encryptionType },\n\t\t\t\terr\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Get the versions of a secret.\n\t * @param name The name of the secret.\n\t * @returns The versions of the secret.\n\t * @throws Error if the secret is not found.\n\t */\n\tpublic async getSecretVersions(name: string): Promise<number[]> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, nameof(name), name);\n\n\t\ttry {\n\t\t\tconst versions = await this.fetchSecretVersions(name);\n\t\t\treturn versions;\n\t\t} catch (err) {\n\t\t\tif (BaseError.isErrorName(err, NotFoundError.CLASS_NAME)) {\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t\tthrow new GeneralError(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\t\"getSecretVersionsFailed\",\n\t\t\t\t{ name },\n\t\t\t\terr\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Update the configuration of a key.\n\t * @param name The name of the key to update.\n\t * @param deletionAllowed Whether the key can be deleted.\n\t * @param exportable Whether the key can be exported.\n\t * @returns A promise that resolves when the key configuration has been updated.\n\t */\n\tpublic async updateKeyConfig(\n\t\tname: string,\n\t\tdeletionAllowed?: boolean,\n\t\texportable?: boolean\n\t): Promise<void> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, nameof(name), name);\n\n\t\ttry {\n\t\t\tconst path = this.getTransitKeyConfigPath(name);\n\t\t\tconst url = `${this._baseUrl}/${path}`;\n\n\t\t\tconst payload = {\n\t\t\t\tdeletion_allowed: deletionAllowed, // eslint-disable-line camelcase\n\t\t\t\texportable\n\t\t\t};\n\n\t\t\tawait FetchHelper.fetchJson<IUpdateKeyConfigRequest, IHashicorpVaultResponse<unknown>>(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\turl,\n\t\t\t\tHttpMethod.POST,\n\t\t\t\tpayload,\n\t\t\t\tthis._requestOptions\n\t\t\t);\n\t\t} catch (err) {\n\t\t\tthrow new GeneralError(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\t\"updateKeyConfigFailed\",\n\t\t\t\t{ name },\n\t\t\t\terr\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Backup a key from the vault.\n\t * @param name The name of the key to backup.\n\t * @returns The Base64-encoded backup payload.\n\t * @throws Error if the key cannot be exported or found.\n\t */\n\tpublic async backupKey(name: string): Promise<string> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, nameof(name), name);\n\n\t\tconst path = this.getTransitBackupKeyPath(name);\n\t\tconst url = `${this._baseUrl}/${path}`;\n\n\t\ttry {\n\t\t\tconst response = await FetchHelper.fetchJson<\n\t\t\t\tnever,\n\t\t\t\tIHashicorpVaultResponse<IBackupKeyResponse>\n\t\t\t>(HashicorpVaultConnector.CLASS_NAME, url, HttpMethod.GET, undefined, this._requestOptions);\n\n\t\t\tif (response?.data?.backup) {\n\t\t\t\tconst backup = response.data.backup;\n\t\t\t\treturn backup;\n\t\t\t}\n\n\t\t\tthrow new NotFoundError(HashicorpVaultConnector.CLASS_NAME, \"backupKeyNotFound\", name);\n\t\t} catch (err) {\n\t\t\tif (BaseError.isErrorName(err, NotFoundError.CLASS_NAME)) {\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t\tthrow new GeneralError(HashicorpVaultConnector.CLASS_NAME, \"backupKeyFailed\", { name }, err);\n\t\t}\n\t}\n\n\t/**\n\t * Restore a key to the vault.\n\t * @param name The name of the key to restore.\n\t * @param backup The Base64-encoded backup payload.\n\t * @returns A promise that resolves when the key has been restored.\n\t * @throws Error if the key cannot be restored.\n\t */\n\tpublic async restoreKey(name: string, backup: string): Promise<void> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, nameof(name), name);\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, nameof(backup), backup);\n\n\t\tconst path = this.getTransitRestoreKeyPath(name);\n\t\tconst url = `${this._baseUrl}/${path}`;\n\n\t\ttry {\n\t\t\tconst payload = { backup };\n\n\t\t\tawait FetchHelper.fetchJson<IRestoreKeyRequest, IHashicorpVaultResponse<unknown>>(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\turl,\n\t\t\t\tHttpMethod.POST,\n\t\t\t\tpayload,\n\t\t\t\tthis._requestOptions\n\t\t\t);\n\t\t\tthis._keyMetadataCache?.delete(name);\n\t\t} catch (err) {\n\t\t\tthrow new GeneralError(HashicorpVaultConnector.CLASS_NAME, \"restoreKeyFailed\", { name }, err);\n\t\t}\n\t}\n\n\t/**\n\t * Import a key to the vault.\n\t * @param name The name of the key to import.\n\t * @param type The type of key to import, e.g. \"ed25519\".\n\t * @param privateKeyPem The PEM bundle of the key to import.\n\t * @returns A promise that resolves when the key has been imported.\n\t * @throws Error if the key cannot be imported.\n\t */\n\tpublic async importKey(name: string, type: string, privateKeyPem: string): Promise<void> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, nameof(name), name);\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, nameof(privateKeyPem), privateKeyPem);\n\n\t\tconst path = this.getTransitImportKeyPath(name);\n\t\tconst url = `${this._baseUrl}/${path}`;\n\n\t\ttry {\n\t\t\tconst payload = {\n\t\t\t\ttype,\n\t\t\t\tkey: Converter.bytesToBase58(Converter.utf8ToBytes(privateKeyPem)),\n\t\t\t\texportable: true,\n\t\t\t\t// eslint-disable-next-line camelcase\n\t\t\t\tallow_plaintext_backup: true\n\t\t\t};\n\n\t\t\tawait FetchHelper.fetchJson<IImportKeyRequest, IHashicorpVaultResponse<unknown>>(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\turl,\n\t\t\t\tHttpMethod.POST,\n\t\t\t\tpayload,\n\t\t\t\tthis._requestOptions\n\t\t\t);\n\t\t\tthis._keyMetadataCache?.delete(name);\n\t\t} catch (err) {\n\t\t\tthrow new GeneralError(HashicorpVaultConnector.CLASS_NAME, \"importKeyFailed\", { name }, err);\n\t\t}\n\t}\n\n\t/**\n\t * Export the key from the vault.\n\t * @param name The name of the key.\n\t * @param keyPath The path of the key. Defaults to \"signing-key\".\n\t * @param version The version of the key. If omitted, all versions of the key will be returned.\n\t * @returns The key details.\n\t * @throws Error if the key cannot be exported or found.\n\t */\n\tpublic async exportKey(\n\t\tname: string,\n\t\tkeyPath: \"signing-key\" | \"encryption-key\" | \"public-key\",\n\t\tversion?: string\n\t): Promise<{\n\t\t/**\n\t\t * The type of the key e.g. Ed25519.\n\t\t */\n\t\ttype: VaultKeyType;\n\n\t\t/**\n\t\t * The key.\n\t\t */\n\t\tkey: Uint8Array;\n\n\t\t/**\n\t\t * The name of the key.\n\t\t */\n\t\tname: string;\n\t}> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, nameof(name), name);\n\t\tconst versionPath = version ? `${version}` : \"latest\";\n\n\t\tconst path = this.getTransitExportKeyPath(name, keyPath);\n\t\tconst url = `${this._baseUrl}/${path}/${versionPath}`;\n\n\t\ttry {\n\t\t\tconst response = await FetchHelper.fetchJson<\n\t\t\t\tnever,\n\t\t\t\tIHashicorpVaultResponse<IExportKeyResponse>\n\t\t\t>(HashicorpVaultConnector.CLASS_NAME, url, HttpMethod.GET, undefined, this._requestOptions);\n\n\t\t\tif (response?.data) {\n\t\t\t\tconst { keys, type } = response.data;\n\t\t\t\tconst keyVersion = Object.keys(keys)[0];\n\t\t\t\tlet key;\n\n\t\t\t\tconst keyType = this.mapHashicorpKeyType(type);\n\t\t\t\tif (keyType === VaultKeyType.Ed25519) {\n\t\t\t\t\tkey = Converter.base64ToBytes(keys[keyVersion]).slice(\n\t\t\t\t\t\t0,\n\t\t\t\t\t\tkeyPath === \"public-key\" ? Ed25519.PUBLIC_KEY_SIZE : Ed25519.PRIVATE_KEY_SIZE\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\t// VaultKeyType.ChaCha20Poly1305\n\t\t\t\t\tkey = Converter.base64ToBytes(keys[keyVersion]);\n\t\t\t\t}\n\n\t\t\t\tconst keyData = {\n\t\t\t\t\ttype: keyType,\n\t\t\t\t\tkey,\n\t\t\t\t\tname: response?.data?.name\n\t\t\t\t};\n\n\t\t\t\treturn keyData;\n\t\t\t}\n\n\t\t\tthrow new NotFoundError(HashicorpVaultConnector.CLASS_NAME, \"exportKeyNotFound\", name);\n\t\t} catch (err) {\n\t\t\tif (BaseError.isErrorName(err, NotFoundError.CLASS_NAME)) {\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t\tthrow new GeneralError(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\t\"exportKeyFailed\",\n\t\t\t\t{ name, keyPath },\n\t\t\t\terr\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Get the key configuration.\n\t * @param name The name of the key to get the configuration for.\n\t * @returns True if the key can be deleted.\n\t */\n\tpublic async getKeyDeleteConfiguration(name: string): Promise<boolean> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, nameof(name), name);\n\t\tconst path = this.getTransitKeyPath(name);\n\t\tconst url = `${this._baseUrl}/${path}`;\n\n\t\ttry {\n\t\t\tconst response = await FetchHelper.fetchJson<\n\t\t\t\tnever,\n\t\t\t\tIHashicorpVaultResponse<IKeyDeleteConfigResponse>\n\t\t\t>(HashicorpVaultConnector.CLASS_NAME, url, HttpMethod.GET, undefined, this._requestOptions);\n\n\t\t\treturn response.data.deletion_allowed;\n\t\t} catch (err) {\n\t\t\tthrow new GeneralError(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\t\"getKeyDeleteConfigurationFailed\",\n\t\t\t\t{ name },\n\t\t\t\terr\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Read key information from the vault.\n\t * @param name The name of the key.\n\t * @returns An object containing key information.\n\t * @internal\n\t */\n\tprivate async readKey(name: string): Promise<IReadKeyResponse> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, nameof(name), name);\n\n\t\tconst path = this.getTransitKeyPath(name);\n\t\tconst url = `${this._baseUrl}/${path}`;\n\n\t\ttry {\n\t\t\tconst response = await FetchHelper.fetchJson<\n\t\t\t\tnever,\n\t\t\t\tIHashicorpVaultResponse<IReadKeyResponse>\n\t\t\t>(HashicorpVaultConnector.CLASS_NAME, url, HttpMethod.GET, undefined, this._requestOptions);\n\n\t\t\tif (response?.data?.name) {\n\t\t\t\tconst keyName = response.data.name;\n\t\t\t\treturn { name: keyName, type: response.data.type };\n\t\t\t}\n\t\t\tthrow new NotFoundError(HashicorpVaultConnector.CLASS_NAME, \"keyNotFound\", name);\n\t\t} catch (err) {\n\t\t\tif (this.isHttpNotFoundError(err)) {\n\t\t\t\tthrow new NotFoundError(\n\t\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\t\t\"keyNotFound\",\n\t\t\t\t\tname,\n\t\t\t\t\tundefined,\n\t\t\t\t\terr\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (BaseError.isErrorName(err, NotFoundError.CLASS_NAME)) {\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t\tthrow new GeneralError(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\t\"invalidReadKeyResponse\",\n\t\t\t\t{ name },\n\t\t\t\terr\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Read key metadata, served from the cache when it is enabled.\n\t * @param name The name of the key.\n\t * @returns An object containing key information.\n\t * @internal\n\t */\n\tprivate async readKeyCached(name: string): Promise<IReadKeyResponse> {\n\t\tconst cached = this._keyMetadataCache?.get(name);\n\t\tif (!Is.undefined(cached)) {\n\t\t\treturn cached;\n\t\t}\n\n\t\tconst keyDetails = await this.readKey(name);\n\t\tthis._keyMetadataCache?.set(name, keyDetails, Date.now() + this._keyMetadataCacheTtlMs);\n\t\treturn keyDetails;\n\t}\n\n\t/**\n\t * Encrypt bytes with the transit key.\n\t * @param name The name of the key.\n\t * @param data The bytes to encrypt.\n\t * @returns The transit ciphertext including its version prefix.\n\t * @internal\n\t */\n\tprivate async transitEncrypt(name: string, data: Uint8Array): Promise<string> {\n\t\tconst url = `${this._baseUrl}/${this.getTransitEncryptPath(name)}`;\n\t\tconst payload = { plaintext: Converter.bytesToBase64(data) };\n\n\t\tconst response = await FetchHelper.fetchJson<\n\t\t\tIEncryptDataRequest,\n\t\t\tIHashicorpVaultResponse<IEncryptDataResponse>\n\t\t>(HashicorpVaultConnector.CLASS_NAME, url, HttpMethod.POST, payload, this._requestOptions);\n\n\t\tif (Is.stringValue(response?.data?.ciphertext)) {\n\t\t\treturn response.data.ciphertext;\n\t\t}\n\t\tthrow new GeneralError(HashicorpVaultConnector.CLASS_NAME, \"invalidEncryptResponse\", { name });\n\t}\n\n\t/**\n\t * Decrypt a transit ciphertext with the transit key.\n\t * @param name The name of the key.\n\t * @param ciphertext The transit ciphertext including its version prefix.\n\t * @returns The decrypted bytes.\n\t * @internal\n\t */\n\tprivate async transitDecrypt(name: string, ciphertext: string): Promise<Uint8Array> {\n\t\tconst url = `${this._baseUrl}/${this.getTransitDecryptPath(name)}`;\n\t\tconst payload = { ciphertext };\n\n\t\tconst response = await FetchHelper.fetchJson<\n\t\t\tIDecryptDataRequest,\n\t\t\tIHashicorpVaultResponse<IDecryptDataResponse>\n\t\t>(HashicorpVaultConnector.CLASS_NAME, url, HttpMethod.POST, payload, this._requestOptions);\n\n\t\tif (Is.stringValue(response?.data?.plaintext)) {\n\t\t\treturn Converter.base64ToBytes(response.data.plaintext);\n\t\t}\n\t\tthrow new GeneralError(HashicorpVaultConnector.CLASS_NAME, \"invalidDecryptResponse\", { name });\n\t}\n\n\t/**\n\t * Check whether the data starts with the envelope prefix.\n\t * @param data The data to check.\n\t * @returns True if the data is an envelope.\n\t * @internal\n\t */\n\tprivate hasEnvelopePrefix(data: Uint8Array): boolean {\n\t\treturn HashicorpVaultConnector._ENVELOPE_PREFIX.every((byte, index) => data[index] === byte);\n\t}\n\n\t/**\n\t * Build the envelope header, the prefix followed by the length prefixed wrapped data key.\n\t * @param wrappedKey The transit ciphertext of the data key.\n\t * @returns The header bytes.\n\t * @internal\n\t */\n\tprivate buildEnvelopeHeader(wrappedKey: string): Uint8Array {\n\t\tconst prefix = HashicorpVaultConnector._ENVELOPE_PREFIX;\n\t\tconst wrappedBytes = Converter.utf8ToBytes(wrappedKey);\n\t\tconst header = new Uint8Array(prefix.length + 2 + wrappedBytes.length);\n\t\theader.set(prefix);\n\t\tnew DataView(header.buffer).setUint16(prefix.length, wrappedBytes.length);\n\t\theader.set(wrappedBytes, prefix.length + 2);\n\t\treturn header;\n\t}\n\n\t/**\n\t * Split an envelope into its header, wrapped data key, nonce and payload.\n\t * @param envelope The envelope bytes.\n\t * @returns The envelope parts.\n\t * @throws GeneralError if the envelope is shorter than its header declares.\n\t * @internal\n\t */\n\tprivate parseEnvelope(envelope: Uint8Array): IDataKeyEnvelope {\n\t\tconst lengthOffset = HashicorpVaultConnector._ENVELOPE_PREFIX.length;\n\t\tconst wrappedLength =\n\t\t\tenvelope.length >= lengthOffset + 2\n\t\t\t\t? new DataView(envelope.buffer, envelope.byteOffset).getUint16(lengthOffset)\n\t\t\t\t: 0;\n\t\tconst headerLength = lengthOffset + 2 + wrappedLength;\n\t\tconst payloadOffset = headerLength + HashicorpVaultConnector._NONCE_LENGTH;\n\n\t\tif (envelope.length < payloadOffset + HashicorpVaultConnector._TAG_LENGTH) {\n\t\t\tthrow new GeneralError(HashicorpVaultConnector.CLASS_NAME, \"invalidEnvelope\", {\n\t\t\t\tlength: envelope.length\n\t\t\t});\n\t\t}\n\n\t\treturn {\n\t\t\theader: envelope.slice(0, headerLength),\n\t\t\twrappedKey: Converter.bytesToUtf8(envelope, lengthOffset + 2, wrappedLength),\n\t\t\tnonce: envelope.slice(headerLength, payloadOffset),\n\t\t\tpayload: envelope.slice(payloadOffset)\n\t\t};\n\t}\n\n\t/**\n\t * Determine whether an error is a framework missing-key error.\n\t * @param err The error to inspect.\n\t * @returns True if the error is a NotFoundError.\n\t * @internal\n\t */\n\t/**\n\t * Determine whether a Vault request reported a missing key.\n\t * @param err The error to inspect.\n\t * @returns True if the error has an HTTP 404 status.\n\t * @internal\n\t */\n\tprivate isHttpNotFoundError(err: unknown): boolean {\n\t\treturn (\n\t\t\tIs.object<{ properties?: { httpStatus?: number } }>(err) && err.properties?.httpStatus === 404\n\t\t);\n\t}\n\n\t/**\n\t * Map the vault key type to the hashicorp type.\n\t * @param type The vault key type.\n\t * @returns The hashicorp type as a string.\n\t * @throws Error if the key type is not supported.\n\t * @internal\n\t */\n\tprivate mapVaultKeyType(type: VaultKeyType): string {\n\t\tswitch (type) {\n\t\t\tcase VaultKeyType.Ed25519:\n\t\t\t\treturn \"ed25519\";\n\t\t\tcase VaultKeyType.ChaCha20Poly1305:\n\t\t\t\treturn \"chacha20-poly1305\";\n\t\t\tdefault:\n\t\t\t\tthrow new GeneralError(HashicorpVaultConnector.CLASS_NAME, \"unsupportedKeyType\", { type });\n\t\t}\n\t}\n\n\t/**\n\t * Map the vault key type to the hashicorp type index.\n\t * @param type The vault key type.\n\t * @returns The hashicorp type as a string.\n\t * @throws Error if the key type is not supported.\n\t * @internal\n\t */\n\tprivate mapVaultKeyTypeToIndex(type: VaultKeyType): number {\n\t\t// https://github.com/hashicorp/vault/blob/7d89f7104ed6c98e06ca2c75da20c9ef1b113831/sdk/helper/keysutil/policy.go#L58\n\t\tswitch (type) {\n\t\t\tcase VaultKeyType.Ed25519:\n\t\t\t\treturn 2;\n\t\t\tcase VaultKeyType.ChaCha20Poly1305:\n\t\t\t\treturn 5;\n\t\t\tdefault:\n\t\t\t\tthrow new GeneralError(HashicorpVaultConnector.CLASS_NAME, \"unsupportedKeyType\", { type });\n\t\t}\n\t}\n\n\t/**\n\t * Map the hashicorp key type to the vault type.\n\t * @param type The hashicorp key type.\n\t * @returns The vault key type.\n\t * @throws Error if the key type is not supported.\n\t * @internal\n\t */\n\tprivate mapHashicorpKeyType(type: string): VaultKeyType {\n\t\tswitch (type) {\n\t\t\tcase \"ed25519\":\n\t\t\t\treturn VaultKeyType.Ed25519;\n\t\t\tcase \"chacha20-poly1305\":\n\t\t\t\treturn VaultKeyType.ChaCha20Poly1305;\n\t\t\tdefault:\n\t\t\t\tthrow new GeneralError(HashicorpVaultConnector.CLASS_NAME, \"unsupportedKeyType\", { type });\n\t\t}\n\t}\n\n\t/**\n\t * Check if the key type is asymmetric.\n\t * @param type The key type.\n\t * @returns True if the key type is asymmetric.\n\t * @internal\n\t */\n\tprivate isAsymmetricKeyType(type: VaultKeyType): boolean {\n\t\tswitch (type) {\n\t\t\tcase VaultKeyType.Ed25519:\n\t\t\t\treturn true;\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t * Fetch the versions of a secret.\n\t * @param name The name of the secret.\n\t * @returns The versions of the secret.\n\t * @throws Error if the secret is not found.\n\t * @internal\n\t */\n\tprivate async fetchSecretVersions(name: string): Promise<number[]> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, nameof(name), name);\n\n\t\ttry {\n\t\t\tconst path = this.getSecretMetadataPath(name);\n\t\t\tconst url = `${this._baseUrl}/${path}`;\n\n\t\t\tconst response = await FetchHelper.fetchJson<\n\t\t\t\tnever,\n\t\t\t\tIHashicorpVaultResponse<ISecretVersionResponse>\n\t\t\t>(HashicorpVaultConnector.CLASS_NAME, url, HttpMethod.GET, undefined, this._requestOptions);\n\n\t\t\tif (response?.data?.versions) {\n\t\t\t\tconst versions = Object.keys(response.data.versions).map(Number);\n\t\t\t\treturn versions;\n\t\t\t}\n\t\t\tthrow new NotFoundError(HashicorpVaultConnector.CLASS_NAME, \"secretNotFound\", name);\n\t\t} catch (err) {\n\t\t\tif (this.isHttpNotFoundError(err)) {\n\t\t\t\tthrow new NotFoundError(\n\t\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\t\t\"secretNotFound\",\n\t\t\t\t\tname,\n\t\t\t\t\tundefined,\n\t\t\t\t\terr\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (BaseError.isErrorName(err, NotFoundError.CLASS_NAME)) {\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t\tthrow new GeneralError(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\t\"getSecretVersionsFailed\",\n\t\t\t\t{ name },\n\t\t\t\terr\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Encode the name parameter.\n\t * @param name The name to encode.\n\t * @returns The encoded name.\n\t * @internal\n\t */\n\tprivate getEncodedName(name: string): string {\n\t\tconst safeName = name.replace(/[^\\dA-Za-z-]/g, \"_\").replace(/[_-]+$/, \"\");\n\n\t\treturn Is.stringValue(this._prefix)\n\t\t\t? `${encodeURIComponent(this._prefix)}_${safeName}`\n\t\t\t: safeName;\n\t}\n\n\t/**\n\t * Get the path for a secret.\n\t * @param name The name of the secret.\n\t * @returns The path for the secret.\n\t * @internal\n\t */\n\tprivate getSecretPath(name: string): string {\n\t\treturn `${this._kvMountPath}/data/${this.getEncodedName(name)}`;\n\t}\n\n\t/**\n\t * Get the path for the metadata of a secret.\n\t * @param name The name of the secret.\n\t * @returns The path for the metadata of the secret.\n\t * @internal\n\t */\n\tprivate getSecretMetadataPath(name: string): string {\n\t\treturn `${this._kvMountPath}/metadata/${this.getEncodedName(name)}`;\n\t}\n\n\t/**\n\t * Get the path for a Transit key.\n\t * @param name The name of the key.\n\t * @returns The path for the key.\n\t * @internal\n\t */\n\tprivate getTransitKeyPath(name: string): string {\n\t\treturn `${this._transitMountPath}/keys/${this.getEncodedName(name)}`;\n\t}\n\n\t/**\n\t * Get the path for exporting a Transit key.\n\t * @param name The name of the key.\n\t * @param keyType The type of the key.\n\t * @returns The path for exporting the key.\n\t * @internal\n\t */\n\tprivate getTransitExportKeyPath(name: string, keyType: string): string {\n\t\treturn `${this._transitMountPath}/export/${keyType}/${this.getEncodedName(name)}`;\n\t}\n\n\t/**\n\t * Get the path for the Transit key config.\n\t * @param name The name of the key to update.\n\t * @returns The path for the key config.\n\t * @internal\n\t */\n\tprivate getTransitKeyConfigPath(name: string): string {\n\t\treturn `${this._transitMountPath}/keys/${this.getEncodedName(name)}/config`;\n\t}\n\n\t/**\n\t * Get the path to backup a Transit key.\n\t * @param name The name of the key.\n\t * @returns The path for the backup key.\n\t * @internal\n\t */\n\tprivate getTransitBackupKeyPath(name: string): string {\n\t\treturn `${this._transitMountPath}/backup/${this.getEncodedName(name)}`;\n\t}\n\n\t/**\n\t * Get the path for restoring a Transit key.\n\t * @param name The name of the key.\n\t * @returns The path for the restore key.\n\t * @internal\n\t */\n\tprivate getTransitRestoreKeyPath(name: string): string {\n\t\treturn `${this._transitMountPath}/restore/${this.getEncodedName(name)}`;\n\t}\n\n\t/**\n\t * Get the path for importing a Transit key.\n\t * @param name The name of the key.\n\t * @returns The path for the import key.\n\t * @internal\n\t */\n\tprivate getTransitImportKeyPath(name: string): string {\n\t\treturn `${this._transitMountPath}/keys/${this.getEncodedName(name)}/import`;\n\t}\n\n\t/**\n\t * Get the path for signing data with a Transit key.\n\t * @param name The name of the key.\n\t * @returns The path for the sign.\n\t * @internal\n\t */\n\tprivate getTransitSignPath(name: string): string {\n\t\treturn `${this._transitMountPath}/sign/${this.getEncodedName(name)}`;\n\t}\n\n\t/**\n\t * Get the path for verifying data with a Transit key.\n\t * @param name The name of the key.\n\t * @returns The path for the verify.\n\t * @internal\n\t */\n\tprivate getTransitVerifyPath(name: string): string {\n\t\treturn `${this._transitMountPath}/verify/${this.getEncodedName(name)}`;\n\t}\n\n\t/**\n\t * Get the path for encrypting data with a Transit key.\n\t * @param name The name of the key.\n\t * @returns The path for encryption.\n\t * @internal\n\t */\n\tprivate getTransitEncryptPath(name: string): string {\n\t\treturn `${this._transitMountPath}/encrypt/${this.getEncodedName(name)}`;\n\t}\n\n\t/**\n\t * Get the path for decrypting data with a Transit key.\n\t * @param name The name of the key.\n\t * @returns The path for decryption.\n\t * @internal\n\t */\n\tprivate getTransitDecryptPath(name: string): string {\n\t\treturn `${this._transitMountPath}/decrypt/${this.getEncodedName(name)}`;\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"hashicorpVaultConnector.js","sources":["../../src/hashicorpVaultConnector.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EACN,cAAc,EACd,YAAY,EAGZ,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACN,kBAAkB,EAClB,SAAS,EACT,gBAAgB,EAChB,SAAS,EACT,YAAY,EACZ,MAAM,EACN,EAAE,EACF,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAG3D,OAAO,EAAwB,mBAAmB,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AED;;;;;OAKG;IACK,qBAAqB,CAAC,IAAY;QACzC,OAAO,GAAG,IAAI,CAAC,iBAAiB,YAAY,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;IACzE,CAAC;CACD","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport {\n\tHealthCategory,\n\tHealthStatus,\n\ttype IHealth,\n\ttype IHealthProviderComponent\n} from \"@3sixty/api-models\";\nimport {\n\tAlreadyExistsError,\n\tBaseError,\n\tComponentFactory,\n\tConverter,\n\tGeneralError,\n\tGuards,\n\tIs,\n\tLruCache,\n\tNotFoundError,\n\tRandomHelper,\n\tStringHelper\n} from \"@3sixty/core\";\nimport { ChaCha20Poly1305, Ed25519 } from \"@3sixty/crypto\";\nimport type { ILoggingComponent } from \"@3sixty/logging-models\";\n\nimport { type IVaultConnector, VaultEncryptionType, VaultKeyType } from \"@3sixty/vault-models\";\nimport { FetchHelper, HttpMethod, type IHttpHeaders } from \"@3sixty/web\";\nimport type { IBackupKeyResponse } from \"./models/IBackupKeyResponse.js\";\nimport type { ICreateKeyRequest } from \"./models/ICreateKeyRequest.js\";\nimport type { IDataKeyEnvelope } from \"./models/IDataKeyEnvelope.js\";\nimport type { IDecryptDataRequest } from \"./models/IDecryptDataRequest.js\";\nimport type { IDecryptDataResponse } from \"./models/IDecryptDataResponse.js\";\nimport type { IEncryptDataRequest } from \"./models/IEncryptDataRequest.js\";\nimport type { IEncryptDataResponse } from \"./models/IEncryptDataResponse.js\";\nimport type { IExportKeyResponse } from \"./models/IExportKeyResponse.js\";\nimport type { IHashicorpVaultConnectorConfig } from \"./models/IHashicorpVaultConnectorConfig.js\";\nimport type { IHashicorpVaultConnectorConstructorOptions } from \"./models/IHashicorpVaultConnectorConstructorOptions.js\";\nimport type { IHashicorpVaultRequest } from \"./models/IHashicorpVaultRequest.js\";\nimport type { IHashicorpVaultResponse } from \"./models/IHashicorpVaultResponse.js\";\nimport type { IImportKeyRequest } from \"./models/IImportKeyRequest.js\";\nimport type { IKeyDeleteConfigResponse } from \"./models/IKeyDeleteConfigResponse.js\";\nimport type { IReadKeyResponse } from \"./models/IReadKeyResponse.js\";\nimport type { IRestoreKeyRequest } from \"./models/IRestoreKeyRequest.js\";\nimport type { ISecretData } from \"./models/ISecretData.js\";\nimport type { ISecretVersionResponse } from \"./models/ISecretVersionResponse.js\";\nimport type { ISignDataRequest } from \"./models/ISignDataRequest.js\";\nimport type { ISignDataResponse } from \"./models/ISignDataResponse.js\";\nimport type { IUpdateKeyConfigRequest } from \"./models/IUpdateKeyConfigRequest.js\";\nimport type { IVerifyDataRequest } from \"./models/IVerifyDataRequest.js\";\nimport type { IVerifyDataResponse } from \"./models/IVerifyDataResponse.js\";\n\n/**\n * Class for performing vault operations using HashiCorp Vault.\n */\nexport class HashicorpVaultConnector implements IVaultConnector, IHealthProviderComponent {\n\t/**\n\t * Runtime name for the class.\n\t */\n\tpublic static readonly CLASS_NAME: string = \"HashicorpVaultConnector\";\n\n\t/**\n\t * The namespace supported by the vault connector.\n\t */\n\tpublic static readonly NAMESPACE: string = \"hashicorp\";\n\n\t/**\n\t * The prefix to strip from keys and encrypted data.\n\t * @internal\n\t */\n\tprivate static readonly _DATA_PREFIX: string = \"vault:v1:\";\n\n\t/**\n\t * The prefix marking data encrypted under a wrapped data key.\n\t * @internal\n\t */\n\tprivate static readonly _ENVELOPE_PREFIX: Uint8Array = Converter.utf8ToBytes(\"twin:env:v1:\");\n\n\t/**\n\t * The length in bytes of a data key.\n\t * @internal\n\t */\n\tprivate static readonly _DATA_KEY_LENGTH: number = 32;\n\n\t/**\n\t * The length in bytes of a ChaCha20Poly1305 nonce.\n\t * @internal\n\t */\n\tprivate static readonly _NONCE_LENGTH: number = 12;\n\n\t/**\n\t * The length in bytes of a ChaCha20Poly1305 authentication tag.\n\t * @internal\n\t */\n\tprivate static readonly _TAG_LENGTH: number = 16;\n\n\t/**\n\t * The default TTL in milliseconds for cached key metadata.\n\t * @internal\n\t */\n\tprivate static readonly _DEFAULT_KEY_METADATA_CACHE_TTL_MS: number = 30000;\n\n\t/**\n\t * The configuration for the vault connector.\n\t * @internal\n\t */\n\tprivate readonly _config: IHashicorpVaultConnectorConfig;\n\n\t/**\n\t * The KV mount path.\n\t * @internal\n\t */\n\tprivate readonly _kvMountPath: string;\n\n\t/**\n\t * The transit mount path.\n\t * @internal\n\t */\n\tprivate readonly _transitMountPath: string;\n\n\t/**\n\t * The base URL for the Vault API.\n\t * @internal\n\t */\n\tprivate readonly _baseUrl: string;\n\n\t/**\n\t * The request options for fetch calls.\n\t * @internal\n\t */\n\tprivate readonly _requestOptions: { headers: IHttpHeaders; timeoutMs?: number };\n\n\t/**\n\t * A prefix for the keys stored in the vault.\n\t * @internal\n\t */\n\tprivate readonly _prefix?: string;\n\n\t/**\n\t * The TTL in milliseconds for cached key metadata.\n\t * @internal\n\t */\n\tprivate readonly _keyMetadataCacheTtlMs: number;\n\n\t/**\n\t * Cache of key metadata by key name, undefined when caching is disabled.\n\t * @internal\n\t */\n\tprivate _keyMetadataCache?: LruCache<IReadKeyResponse>;\n\n\t/**\n\t * Create a new instance of HashicorpVaultConnector.\n\t * @param options The options for the vault connector.\n\t */\n\tconstructor(options: IHashicorpVaultConnectorConstructorOptions) {\n\t\tGuards.object(HashicorpVaultConnector.CLASS_NAME, \"options\", options);\n\t\tGuards.object<IHashicorpVaultConnectorConfig>(\n\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\"options.config\",\n\t\t\toptions.config\n\t\t);\n\t\tGuards.stringValue(\n\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\"options.config.endpoint\",\n\t\t\toptions.config.endpoint\n\t\t);\n\t\tGuards.stringValue(\n\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\"options.config.token\",\n\t\t\toptions.config.token\n\t\t);\n\n\t\tthis._config = options.config;\n\t\tthis._kvMountPath = this._config.kvMountPath ?? \"secret\";\n\t\tthis._transitMountPath = this._config.transitMountPath ?? \"transit\";\n\t\tthis._baseUrl = `${StringHelper.trimTrailingSlashes(this._config.endpoint)}/${this._config.apiVersion ?? \"v1\"}`;\n\t\tconst headers: IHttpHeaders = {\n\t\t\t\"X-Vault-Token\": this._config.token\n\t\t};\n\t\tif (Is.stringValue(this._config.namespace)) {\n\t\t\theaders[\"X-Vault-Namespace\"] = this._config.namespace;\n\t\t}\n\t\tthis._requestOptions = {\n\t\t\theaders,\n\t\t\ttimeoutMs: this._config.timeoutMs\n\t\t};\n\t\tthis._prefix = this._config.prefix;\n\t\tthis._keyMetadataCacheTtlMs =\n\t\t\tthis._config.keyMetadataCacheTtlMs ??\n\t\t\tHashicorpVaultConnector._DEFAULT_KEY_METADATA_CACHE_TTL_MS;\n\t\tthis._keyMetadataCache =\n\t\t\tthis._keyMetadataCacheTtlMs > 0\n\t\t\t\t? new LruCache<IReadKeyResponse>({ ttiMs: this._keyMetadataCacheTtlMs })\n\t\t\t\t: undefined;\n\t}\n\n\t/**\n\t * Returns the class name of the component.\n\t * @returns The class name of the component.\n\t */\n\tpublic className(): string {\n\t\treturn HashicorpVaultConnector.CLASS_NAME;\n\t}\n\n\t/**\n\t * Returns the health status of the component.\n\t * @returns The health status of the component.\n\t */\n\tpublic async health(): Promise<IHealth[]> {\n\t\tconst endpoint = `${this._baseUrl}/sys/health`;\n\t\ttry {\n\t\t\tawait FetchHelper.fetch(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\tendpoint,\n\t\t\t\tHttpMethod.GET,\n\t\t\t\tundefined,\n\t\t\t\tthis._requestOptions\n\t\t\t);\n\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tsource: HashicorpVaultConnector.CLASS_NAME,\n\t\t\t\t\tcategory: HealthCategory.Connectivity,\n\t\t\t\t\tstatus: HealthStatus.Ok,\n\t\t\t\t\tdescription: \"healthDescription\",\n\t\t\t\t\tdata: { endpoint }\n\t\t\t\t}\n\t\t\t];\n\t\t} catch {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tsource: HashicorpVaultConnector.CLASS_NAME,\n\t\t\t\t\tcategory: HealthCategory.Connectivity,\n\t\t\t\t\tstatus: HealthStatus.Error,\n\t\t\t\t\tdescription: \"healthDescription\",\n\t\t\t\t\tmessage: \"vaultHealthCheckFailed\",\n\t\t\t\t\tdata: { endpoint }\n\t\t\t\t}\n\t\t\t];\n\t\t}\n\t}\n\n\t/**\n\t * Bootstrap the vault connector and ensure connectivity.\n\t * @param nodeLoggingComponentType The node logging component type.\n\t * @returns True if the bootstrapping process was successful.\n\t */\n\tpublic async bootstrap(nodeLoggingComponentType?: string): Promise<boolean> {\n\t\tconst nodeLogging = ComponentFactory.getIfExists<ILoggingComponent>(nodeLoggingComponentType);\n\n\t\ttry {\n\t\t\tawait FetchHelper.fetch(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\t`${this._baseUrl}/sys/health`,\n\t\t\t\tHttpMethod.GET,\n\t\t\t\tundefined,\n\t\t\t\tthis._requestOptions\n\t\t\t);\n\n\t\t\tawait nodeLogging?.log({\n\t\t\t\tlevel: \"info\",\n\t\t\t\tsource: HashicorpVaultConnector.CLASS_NAME,\n\t\t\t\tts: Date.now(),\n\t\t\t\tmessage: \"hashicorpVaultConnected\",\n\t\t\t\tdata: {\n\t\t\t\t\taddress: this._config.endpoint\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn true;\n\t\t} catch (err) {\n\t\t\tawait nodeLogging?.log({\n\t\t\t\tlevel: \"error\",\n\t\t\t\tsource: HashicorpVaultConnector.CLASS_NAME,\n\t\t\t\tts: Date.now(),\n\t\t\t\tmessage: \"hashicorpVaultConnectionFailed\",\n\t\t\t\terror: BaseError.fromError(err),\n\t\t\t\tdata: {\n\t\t\t\t\taddress: this._config.endpoint\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t * Store a secret in the vault.\n\t * @param name The name of the item in the vault to set.\n\t * @param data The item to add to the vault.\n\t * @returns A promise that resolves when the secret has been stored.\n\t */\n\tpublic async setSecret<T>(name: string, data: T): Promise<void> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, \"name\", name);\n\t\tGuards.defined(HashicorpVaultConnector.CLASS_NAME, \"data\", data);\n\n\t\ttry {\n\t\t\tconst path = this.getSecretPath(name);\n\t\t\tconst url = `${this._baseUrl}/${path}`;\n\t\t\tconst payload = {\n\t\t\t\tdata: {\n\t\t\t\t\tsecret: data\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tawait FetchHelper.fetchJson<IHashicorpVaultRequest<T>, unknown>(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\turl,\n\t\t\t\tHttpMethod.POST,\n\t\t\t\tpayload,\n\t\t\t\tthis._requestOptions\n\t\t\t);\n\t\t} catch (err) {\n\t\t\tthrow new GeneralError(HashicorpVaultConnector.CLASS_NAME, \"setSecretFailed\", { name }, err);\n\t\t}\n\t}\n\n\t/**\n\t * Stop the component and release the key metadata cache.\n\t * @param nodeLoggingComponentType The node logging component type.\n\t * @returns A promise that resolves when the component has stopped.\n\t */\n\tpublic async stop(nodeLoggingComponentType?: string): Promise<void> {\n\t\tthis._keyMetadataCache?.destroy();\n\t\tthis._keyMetadataCache = undefined;\n\t}\n\n\t/**\n\t * Check if a secret exists in the vault.\n\t * @param name The name of the secret to check.\n\t * @returns True if the secret exists, false otherwise.\n\t */\n\tpublic async secretExists(name: string): Promise<boolean> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, \"name\", name);\n\n\t\ttry {\n\t\t\tawait this.getSecretVersions(name);\n\t\t\treturn true;\n\t\t} catch (err) {\n\t\t\tif (BaseError.isErrorName(err, NotFoundError.CLASS_NAME)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tthrow err;\n\t\t}\n\t}\n\n\t/**\n\t * Get a secret from the vault.\n\t * @param name The name of the item in the vault to get.\n\t * @returns The item from the vault.\n\t * @throws Error if the item is not found.\n\t */\n\tpublic async getSecret<T>(name: string): Promise<T> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, \"name\", name);\n\n\t\tawait this.getSecretVersions(name);\n\n\t\ttry {\n\t\t\tconst path = this.getSecretPath(name);\n\t\t\tconst url = `${this._baseUrl}/${path}`;\n\n\t\t\tconst response = await FetchHelper.fetchJson<never, IHashicorpVaultResponse<ISecretData<T>>>(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\turl,\n\t\t\t\tHttpMethod.GET,\n\t\t\t\tundefined,\n\t\t\t\tthis._requestOptions\n\t\t\t);\n\n\t\t\treturn response.data.data.secret;\n\t\t} catch (err) {\n\t\t\tif (\n\t\t\t\tIs.object<{ properties?: { httpStatus?: number } }>(err) &&\n\t\t\t\terr.properties?.httpStatus === 404\n\t\t\t) {\n\t\t\t\tthrow new NotFoundError(\n\t\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\t\t\"secretNotFound\",\n\t\t\t\t\tname,\n\t\t\t\t\tundefined,\n\t\t\t\t\terr\n\t\t\t\t);\n\t\t\t}\n\t\t\tthrow new GeneralError(HashicorpVaultConnector.CLASS_NAME, \"setSecretFailed\", { name }, err);\n\t\t}\n\t}\n\n\t/**\n\t * Remove a secret from the vault.\n\t * @param name The name of the item in the vault to remove.\n\t * @returns A promise that resolves when the secret has been removed.\n\t * @throws Error if the item is not found.\n\t */\n\tpublic async removeSecret(name: string): Promise<void> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, \"name\", name);\n\n\t\tawait this.getSecretVersions(name);\n\n\t\ttry {\n\t\t\tconst path = this.getSecretMetadataPath(name);\n\t\t\tconst url = `${this._baseUrl}/${path}`;\n\n\t\t\tawait FetchHelper.fetchJson<never, IHashicorpVaultResponse<unknown>>(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\turl,\n\t\t\t\tHttpMethod.DELETE,\n\t\t\t\tundefined,\n\t\t\t\tthis._requestOptions\n\t\t\t);\n\t\t} catch (err) {\n\t\t\tthrow new GeneralError(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\t\"removeSecretFailed\",\n\t\t\t\t{ name },\n\t\t\t\terr\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Generate a new key and store it in the vault.\n\t * @param name The name of the key to generate and store in the vault.\n\t * @param type The type of key to create.\n\t * @returns The public key for the key pair.\n\t */\n\tpublic async createKey(name: string, type: VaultKeyType): Promise<Uint8Array> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, \"name\", name);\n\t\tGuards.arrayOneOf<VaultKeyType>(\n\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\"type\",\n\t\t\ttype,\n\t\t\tObject.values(VaultKeyType)\n\t\t);\n\n\t\tconst path = this.getTransitKeyPath(name);\n\t\tconst url = `${this._baseUrl}/${path}`;\n\n\t\ttry {\n\t\t\t// Check if the key exists\n\t\t\tconst existingVaultKey = await this.readKey(name);\n\t\t\tif (existingVaultKey) {\n\t\t\t\tthrow new AlreadyExistsError(HashicorpVaultConnector.CLASS_NAME, \"keyAlreadyExists\", name);\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tif (!BaseError.isErrorName(err, NotFoundError.CLASS_NAME)) {\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\tconst vaultKeyType = this.mapVaultKeyType(type);\n\n\t\t\tconst payload: ICreateKeyRequest = {\n\t\t\t\ttype: vaultKeyType,\n\t\t\t\texportable: true,\n\t\t\t\tallow_plaintext_backup: true // eslint-disable-line camelcase\n\t\t\t};\n\n\t\t\tawait FetchHelper.fetchJson<ICreateKeyRequest, IHashicorpVaultResponse<unknown>>(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\turl,\n\t\t\t\tHttpMethod.POST,\n\t\t\t\tpayload,\n\t\t\t\tthis._requestOptions\n\t\t\t);\n\t\t\tthis._keyMetadataCache?.delete(name);\n\n\t\t\t// If the key is asymmetric, return the public key\n\t\t\tif (this.isAsymmetricKeyType(type)) {\n\t\t\t\tconst publicKey = await this.exportKey(name, \"public-key\");\n\t\t\t\treturn publicKey.key;\n\t\t\t}\n\n\t\t\t// If the key is symmetric, return the encryption key\n\t\t\tconst symmetricKey = await this.exportKey(name, \"encryption-key\");\n\t\t\treturn symmetricKey.key;\n\t\t} catch (err) {\n\t\t\tif (BaseError.isErrorName(err, AlreadyExistsError.CLASS_NAME)) {\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t\tthrow new GeneralError(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\t\"createKeyFailed\",\n\t\t\t\t{ name, type },\n\t\t\t\terr\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Add an existing key to the vault.\n\t * @param name The name of the key to add to the vault.\n\t * @param type The type of key to add.\n\t * @param privateKey The private key.\n\t * @param publicKey The public key, can be undefined if the key type is symmetric.\n\t * @returns A promise that resolves when the key has been stored.\n\t */\n\tpublic async addKey(\n\t\tname: string,\n\t\ttype: VaultKeyType,\n\t\tprivateKey: Uint8Array,\n\t\tpublicKey?: Uint8Array\n\t): Promise<void> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, \"name\", name);\n\t\tGuards.arrayOneOf<VaultKeyType>(\n\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\"type\",\n\t\t\ttype,\n\t\t\tObject.values(VaultKeyType)\n\t\t);\n\t\tGuards.uint8Array(HashicorpVaultConnector.CLASS_NAME, \"privateKey\", privateKey);\n\n\t\ttry {\n\t\t\t// Check if the key exists\n\t\t\tconst existingVaultKey = await this.readKey(name);\n\t\t\tif (existingVaultKey) {\n\t\t\t\tthrow new AlreadyExistsError(HashicorpVaultConnector.CLASS_NAME, \"keyAlreadyExists\", name);\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tif (!BaseError.isErrorName(err, NotFoundError.CLASS_NAME)) {\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\tconst internalType = this.mapVaultKeyTypeToIndex(type);\n\n\t\t\tlet publicKeyForPayload: string | null = null;\n\t\t\tlet privateKeyForPayload: string | null = null;\n\n\t\t\tif (type === VaultKeyType.Ed25519 || type === VaultKeyType.ChaCha20Poly1305) {\n\t\t\t\tconst combinedKey = new Uint8Array(privateKey.length + (publicKey?.length ?? 0));\n\t\t\t\tcombinedKey.set(privateKey);\n\t\t\t\tif (publicKey) {\n\t\t\t\t\tcombinedKey.set(publicKey, privateKey.length);\n\t\t\t\t}\n\t\t\t\tprivateKeyForPayload = Converter.bytesToBase64(combinedKey);\n\t\t\t\tif (!Is.undefined(publicKey)) {\n\t\t\t\t\tpublicKeyForPayload = Converter.bytesToBase64(publicKey);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst payload = {\n\t\t\t\tpolicy: {\n\t\t\t\t\tname,\n\t\t\t\t\tkeys: {\n\t\t\t\t\t\t\"1\": {\n\t\t\t\t\t\t\tkey: privateKeyForPayload,\n\t\t\t\t\t\t\thmac_key: Converter.bytesToBase64(RandomHelper.generate(32)), // eslint-disable-line camelcase\n\t\t\t\t\t\t\tpublic_key: publicKeyForPayload // eslint-disable-line camelcase\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\texportable: true,\n\t\t\t\t\tallow_plaintext_backup: true, // eslint-disable-line camelcase\n\t\t\t\t\tmin_decryption_version: 1, // eslint-disable-line camelcase\n\t\t\t\t\tmin_encryption_version: 0, // eslint-disable-line camelcase\n\t\t\t\t\tlatest_version: 1, // eslint-disable-line camelcase\n\t\t\t\t\ttype: internalType\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tconst json = JSON.stringify(payload);\n\n\t\t\tconst backup = Converter.bytesToBase64(Converter.utf8ToBytes(json));\n\n\t\t\tawait this.restoreKey(name, backup);\n\t\t} catch (err) {\n\t\t\tif (BaseError.isErrorName(err, AlreadyExistsError.CLASS_NAME)) {\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t\tthrow new GeneralError(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\t\"addKeyFailed\",\n\t\t\t\t{ name, type },\n\t\t\t\terr\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Get a key from the vault.\n\t * @param name The name of the key to get.\n\t * @param components Which key components to return, defaults to \"both\".\n\t * @returns The key, publicKey can be undefined if key is symmetric, privateKey can be undefined if only public was requested.\n\t * @throws GeneralError if \"private\" is requested for a symmetric key.\n\t */\n\tpublic async getKey(\n\t\tname: string,\n\t\tcomponents?: \"public\" | \"private\" | \"both\"\n\t): Promise<{\n\t\t/**\n\t\t * The type of the key e.g. Ed25519.\n\t\t */\n\t\ttype: VaultKeyType;\n\n\t\t/**\n\t\t * The private key, undefined if only public component was requested.\n\t\t */\n\t\tprivateKey?: Uint8Array;\n\n\t\t/**\n\t\t * The public key, which can be undefined if key type is symmetric or only private was requested.\n\t\t */\n\t\tpublicKey?: Uint8Array;\n\t}> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, \"name\", name);\n\n\t\tcomponents ??= \"both\";\n\n\t\tGuards.arrayOneOf<\"public\" | \"private\" | \"both\">(\n\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\"components\",\n\t\t\tcomponents,\n\t\t\t[\"public\", \"private\", \"both\"]\n\t\t);\n\n\t\tconst keyDetails = await this.readKeyCached(name);\n\n\t\tconst type = this.mapHashicorpKeyType(keyDetails.type);\n\t\tconst isAsymmetric = this.isAsymmetricKeyType(type);\n\n\t\tif (!isAsymmetric && components === \"private\") {\n\t\t\tthrow new GeneralError(HashicorpVaultConnector.CLASS_NAME, \"symmetricKeyHasNoPrivateKey\", {\n\t\t\t\tname\n\t\t\t});\n\t\t}\n\n\t\ttry {\n\t\t\tlet publicKey: Uint8Array | undefined;\n\t\t\tlet privateKey: Uint8Array | undefined;\n\n\t\t\tif (isAsymmetric) {\n\t\t\t\tif (components !== \"public\") {\n\t\t\t\t\tconst privateKeyData = await this.exportKey(name, \"signing-key\");\n\t\t\t\t\tprivateKey = privateKeyData.key;\n\t\t\t\t}\n\t\t\t\tif (components !== \"private\") {\n\t\t\t\t\tconst publicKeyData = await this.exportKey(name, \"public-key\");\n\t\t\t\t\tpublicKey = publicKeyData.key;\n\t\t\t\t}\n\t\t\t} else if (components !== \"public\") {\n\t\t\t\tconst privateKeyData = await this.exportKey(name, \"encryption-key\");\n\t\t\t\tprivateKey = privateKeyData.key;\n\t\t\t}\n\n\t\t\treturn { type, privateKey, publicKey };\n\t\t} catch (err) {\n\t\t\tif (BaseError.isErrorName(err, NotFoundError.CLASS_NAME)) {\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t\tthrow new GeneralError(HashicorpVaultConnector.CLASS_NAME, \"getKeyFailed\", { name }, err);\n\t\t}\n\t}\n\n\t/**\n\t * Check if a key exists in the vault.\n\t * @param name The name of the key to check.\n\t * @returns True if the key exists, false otherwise.\n\t */\n\tpublic async keyExists(name: string): Promise<boolean> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, \"name\", name);\n\n\t\ttry {\n\t\t\tawait this.readKey(name);\n\t\t\treturn true;\n\t\t} catch (err) {\n\t\t\tif (BaseError.isErrorName(err, NotFoundError.CLASS_NAME)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tthrow err;\n\t\t}\n\t}\n\n\t/**\n\t * Get the type of a key from the vault without retrieving the key material.\n\t * @param name The name of the key.\n\t * @returns The key type.\n\t * @throws NotFoundError if the key does not exist.\n\t */\n\tpublic async getKeyType(name: string): Promise<VaultKeyType> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, \"name\", name);\n\n\t\tconst keyDetails = await this.readKeyCached(name);\n\n\t\treturn this.mapHashicorpKeyType(keyDetails.type);\n\t}\n\n\t/**\n\t * Rename a key in the vault.\n\t * @param name The name of the key to rename.\n\t * @param newName The new name of the key.\n\t * @returns A promise that resolves when the key has been renamed.\n\t */\n\tpublic async renameKey(name: string, newName: string): Promise<void> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, \"name\", name);\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, \"newName\", newName);\n\n\t\tawait this.readKey(name);\n\n\t\tlet existingVaultKey;\n\t\ttry {\n\t\t\texistingVaultKey = await this.readKey(newName);\n\t\t} catch (err) {\n\t\t\tif (!BaseError.isErrorName(err, NotFoundError.CLASS_NAME)) {\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t}\n\t\tif (existingVaultKey) {\n\t\t\tthrow new AlreadyExistsError(HashicorpVaultConnector.CLASS_NAME, \"keyAlreadyExists\", newName);\n\t\t}\n\n\t\ttry {\n\t\t\tconst backup = await this.backupKey(name);\n\t\t\tawait this.restoreKey(newName, backup);\n\t\t\tawait this.removeKey(name);\n\t\t} catch (err) {\n\t\t\tthrow new GeneralError(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\t\"renameKeyFailed\",\n\t\t\t\t{ name, newName },\n\t\t\t\terr\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Remove a key from the vault.\n\t * @param name The name of the key to remove.\n\t * @returns A promise that resolves when the key has been removed.\n\t */\n\tpublic async removeKey(name: string): Promise<void> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, \"name\", name);\n\n\t\tawait this.readKey(name);\n\n\t\ttry {\n\t\t\tconst path = this.getTransitKeyPath(name);\n\t\t\tconst url = `${this._baseUrl}/${path}`;\n\n\t\t\tawait this.updateKeyConfig(name, true);\n\n\t\t\tawait FetchHelper.fetch(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\turl,\n\t\t\t\tHttpMethod.DELETE,\n\t\t\t\tundefined,\n\t\t\t\tthis._requestOptions\n\t\t\t);\n\t\t\tthis._keyMetadataCache?.delete(name);\n\t\t} catch (err) {\n\t\t\tthrow new GeneralError(HashicorpVaultConnector.CLASS_NAME, \"removeKeyFailed\", { name }, err);\n\t\t}\n\t}\n\n\t/**\n\t * Sign data.\n\t * @param name The name of the key to use.\n\t * @param data The data to sign.\n\t * @returns The signature.\n\t */\n\tpublic async sign(name: string, data: Uint8Array): Promise<Uint8Array> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, \"name\", name);\n\t\tGuards.uint8Array(HashicorpVaultConnector.CLASS_NAME, \"data\", data);\n\n\t\tawait this.readKeyCached(name);\n\n\t\ttry {\n\t\t\tconst path = this.getTransitSignPath(name);\n\t\t\tconst url = `${this._baseUrl}/${path}`;\n\n\t\t\tconst base64Data = Converter.bytesToBase64(data);\n\n\t\t\tconst payload = {\n\t\t\t\tinput: base64Data\n\t\t\t};\n\n\t\t\tconst response = await FetchHelper.fetchJson<\n\t\t\t\tISignDataRequest,\n\t\t\t\tIHashicorpVaultResponse<ISignDataResponse>\n\t\t\t>(HashicorpVaultConnector.CLASS_NAME, url, HttpMethod.POST, payload, this._requestOptions);\n\n\t\t\tif (response?.data?.signature) {\n\t\t\t\tconst signatureString = response.data.signature;\n\n\t\t\t\tconst cleanedSignature = signatureString.startsWith(HashicorpVaultConnector._DATA_PREFIX)\n\t\t\t\t\t? signatureString.slice(HashicorpVaultConnector._DATA_PREFIX.length)\n\t\t\t\t\t: signatureString;\n\n\t\t\t\tconst signatureBytes = Converter.base64ToBytes(cleanedSignature);\n\t\t\t\treturn signatureBytes;\n\t\t\t}\n\t\t\tthrow new GeneralError(HashicorpVaultConnector.CLASS_NAME, \"invalidSignResponse\", { name });\n\t\t} catch (err) {\n\t\t\tthrow new GeneralError(HashicorpVaultConnector.CLASS_NAME, \"signDataFailed\", { name }, err);\n\t\t}\n\t}\n\n\t/**\n\t * Verify a signature.\n\t * @param name The name of the key to use.\n\t * @param data The data to verify.\n\t * @param signature The signature to verify.\n\t * @returns True if the signature is valid.\n\t */\n\tpublic async verify(name: string, data: Uint8Array, signature: Uint8Array): Promise<boolean> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, \"name\", name);\n\t\tGuards.uint8Array(HashicorpVaultConnector.CLASS_NAME, \"data\", data);\n\t\tGuards.uint8Array(HashicorpVaultConnector.CLASS_NAME, \"signature\", signature);\n\n\t\tawait this.readKeyCached(name);\n\n\t\ttry {\n\t\t\tconst path = this.getTransitVerifyPath(name);\n\t\t\tconst url = `${this._baseUrl}/${path}`;\n\n\t\t\tconst base64Data = Converter.bytesToBase64(data);\n\t\t\tconst signatureBase64 = Converter.bytesToBase64(signature);\n\n\t\t\tconst prefixedSignature = `${HashicorpVaultConnector._DATA_PREFIX}${signatureBase64}`;\n\n\t\t\tconst payload = {\n\t\t\t\tinput: base64Data,\n\t\t\t\tsignature: prefixedSignature\n\t\t\t};\n\n\t\t\tconst response = await FetchHelper.fetchJson<\n\t\t\t\tIVerifyDataRequest,\n\t\t\t\tIHashicorpVaultResponse<IVerifyDataResponse>\n\t\t\t>(HashicorpVaultConnector.CLASS_NAME, url, HttpMethod.POST, payload, this._requestOptions);\n\n\t\t\tif (response?.data?.valid) {\n\t\t\t\treturn response.data.valid;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t} catch (err) {\n\t\t\tthrow new GeneralError(HashicorpVaultConnector.CLASS_NAME, \"verifyDataFailed\", { name }, err);\n\t\t}\n\t}\n\n\t/**\n\t * Encrypt data locally under a data key wrapped by the transit key.\n\t * @param name The name of the key to use.\n\t * @param encryptionType The type of encryption to use.\n\t * @param data The data to encrypt.\n\t * @returns The encrypted data.\n\t */\n\tpublic async encrypt(\n\t\tname: string,\n\t\tencryptionType: VaultEncryptionType,\n\t\tdata: Uint8Array\n\t): Promise<Uint8Array> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, \"name\", name);\n\t\tGuards.arrayOneOf<VaultEncryptionType>(\n\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\"encryptionType\",\n\t\t\tencryptionType,\n\t\t\tObject.values(VaultEncryptionType)\n\t\t);\n\t\tGuards.uint8Array(HashicorpVaultConnector.CLASS_NAME, \"data\", data);\n\n\t\tconst keyDetails = await this.readKeyCached(name);\n\n\t\tif (\n\t\t\tencryptionType === VaultEncryptionType.ChaCha20Poly1305 &&\n\t\t\tkeyDetails.type !== this.mapVaultKeyType(VaultKeyType.ChaCha20Poly1305)\n\t\t) {\n\t\t\tthrow new GeneralError(HashicorpVaultConnector.CLASS_NAME, \"keyTypeMismatch\", {\n\t\t\t\tencryptionType,\n\t\t\t\tkeyType: keyDetails.type\n\t\t\t});\n\t\t}\n\n\t\ttry {\n\t\t\tconst dataKey = RandomHelper.generate(HashicorpVaultConnector._DATA_KEY_LENGTH);\n\t\t\tconst wrappedKey = await this.transitEncrypt(name, dataKey);\n\t\t\tconst header = this.buildEnvelopeHeader(wrappedKey);\n\t\t\tconst nonce = RandomHelper.generate(HashicorpVaultConnector._NONCE_LENGTH);\n\t\t\tconst payload = new ChaCha20Poly1305(dataKey, nonce, header).encrypt(data);\n\t\t\tdataKey.fill(0);\n\n\t\t\tconst envelope = new Uint8Array(header.length + nonce.length + payload.length);\n\t\t\tenvelope.set(header);\n\t\t\tenvelope.set(nonce, header.length);\n\t\t\tenvelope.set(payload, header.length + nonce.length);\n\t\t\treturn envelope;\n\t\t} catch (err) {\n\t\t\tthrow new GeneralError(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\t\"encryptDataFailed\",\n\t\t\t\t{ name, encryptionType },\n\t\t\t\terr\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Decrypt data, either an envelope or data encrypted directly by the transit key.\n\t * @param name The name of the key to use.\n\t * @param encryptionType The type of encryption to use.\n\t * @param encryptedData The encrypted data to decrypt.\n\t * @returns The decrypted data.\n\t */\n\tpublic async decrypt(\n\t\tname: string,\n\t\tencryptionType: VaultEncryptionType,\n\t\tencryptedData: Uint8Array\n\t): Promise<Uint8Array> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, \"name\", name);\n\t\tGuards.arrayOneOf<VaultEncryptionType>(\n\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\"encryptionType\",\n\t\t\tencryptionType,\n\t\t\tObject.values(VaultEncryptionType)\n\t\t);\n\t\tGuards.uint8Array(HashicorpVaultConnector.CLASS_NAME, \"encryptedData\", encryptedData);\n\n\t\tawait this.readKeyCached(name);\n\n\t\ttry {\n\t\t\tif (!this.hasEnvelopePrefix(encryptedData)) {\n\t\t\t\treturn await this.transitDecrypt(\n\t\t\t\t\tname,\n\t\t\t\t\t`${HashicorpVaultConnector._DATA_PREFIX}${Converter.bytesToBase64(encryptedData)}`\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst envelope = this.parseEnvelope(encryptedData);\n\t\t\tconst dataKey = await this.transitDecrypt(name, envelope.wrappedKey);\n\t\t\tconst decrypted = new ChaCha20Poly1305(dataKey, envelope.nonce, envelope.header).decrypt(\n\t\t\t\tenvelope.payload\n\t\t\t);\n\t\t\tdataKey.fill(0);\n\t\t\treturn decrypted;\n\t\t} catch (err) {\n\t\t\tthrow new GeneralError(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\t\"decryptDataFailed\",\n\t\t\t\t{ name, encryptionType },\n\t\t\t\terr\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Get the versions of a secret.\n\t * @param name The name of the secret.\n\t * @returns The versions of the secret.\n\t * @throws Error if the secret is not found.\n\t */\n\tpublic async getSecretVersions(name: string): Promise<number[]> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, \"name\", name);\n\n\t\ttry {\n\t\t\tconst versions = await this.fetchSecretVersions(name);\n\t\t\treturn versions;\n\t\t} catch (err) {\n\t\t\tif (BaseError.isErrorName(err, NotFoundError.CLASS_NAME)) {\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t\tthrow new GeneralError(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\t\"getSecretVersionsFailed\",\n\t\t\t\t{ name },\n\t\t\t\terr\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Update the configuration of a key.\n\t * @param name The name of the key to update.\n\t * @param deletionAllowed Whether the key can be deleted.\n\t * @param exportable Whether the key can be exported.\n\t * @returns A promise that resolves when the key configuration has been updated.\n\t */\n\tpublic async updateKeyConfig(\n\t\tname: string,\n\t\tdeletionAllowed?: boolean,\n\t\texportable?: boolean\n\t): Promise<void> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, \"name\", name);\n\n\t\ttry {\n\t\t\tconst path = this.getTransitKeyConfigPath(name);\n\t\t\tconst url = `${this._baseUrl}/${path}`;\n\n\t\t\tconst payload = {\n\t\t\t\tdeletion_allowed: deletionAllowed, // eslint-disable-line camelcase\n\t\t\t\texportable\n\t\t\t};\n\n\t\t\tawait FetchHelper.fetchJson<IUpdateKeyConfigRequest, IHashicorpVaultResponse<unknown>>(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\turl,\n\t\t\t\tHttpMethod.POST,\n\t\t\t\tpayload,\n\t\t\t\tthis._requestOptions\n\t\t\t);\n\t\t} catch (err) {\n\t\t\tthrow new GeneralError(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\t\"updateKeyConfigFailed\",\n\t\t\t\t{ name },\n\t\t\t\terr\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Backup a key from the vault.\n\t * @param name The name of the key to backup.\n\t * @returns The Base64-encoded backup payload.\n\t * @throws Error if the key cannot be exported or found.\n\t */\n\tpublic async backupKey(name: string): Promise<string> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, \"name\", name);\n\n\t\tconst path = this.getTransitBackupKeyPath(name);\n\t\tconst url = `${this._baseUrl}/${path}`;\n\n\t\ttry {\n\t\t\tconst response = await FetchHelper.fetchJson<\n\t\t\t\tnever,\n\t\t\t\tIHashicorpVaultResponse<IBackupKeyResponse>\n\t\t\t>(HashicorpVaultConnector.CLASS_NAME, url, HttpMethod.GET, undefined, this._requestOptions);\n\n\t\t\tif (response?.data?.backup) {\n\t\t\t\tconst backup = response.data.backup;\n\t\t\t\treturn backup;\n\t\t\t}\n\n\t\t\tthrow new NotFoundError(HashicorpVaultConnector.CLASS_NAME, \"backupKeyNotFound\", name);\n\t\t} catch (err) {\n\t\t\tif (BaseError.isErrorName(err, NotFoundError.CLASS_NAME)) {\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t\tthrow new GeneralError(HashicorpVaultConnector.CLASS_NAME, \"backupKeyFailed\", { name }, err);\n\t\t}\n\t}\n\n\t/**\n\t * Restore a key to the vault.\n\t * @param name The name of the key to restore.\n\t * @param backup The Base64-encoded backup payload.\n\t * @returns A promise that resolves when the key has been restored.\n\t * @throws Error if the key cannot be restored.\n\t */\n\tpublic async restoreKey(name: string, backup: string): Promise<void> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, \"name\", name);\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, \"backup\", backup);\n\n\t\tconst path = this.getTransitRestoreKeyPath(name);\n\t\tconst url = `${this._baseUrl}/${path}`;\n\n\t\ttry {\n\t\t\tconst payload = { backup };\n\n\t\t\tawait FetchHelper.fetchJson<IRestoreKeyRequest, IHashicorpVaultResponse<unknown>>(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\turl,\n\t\t\t\tHttpMethod.POST,\n\t\t\t\tpayload,\n\t\t\t\tthis._requestOptions\n\t\t\t);\n\t\t\tthis._keyMetadataCache?.delete(name);\n\t\t} catch (err) {\n\t\t\tthrow new GeneralError(HashicorpVaultConnector.CLASS_NAME, \"restoreKeyFailed\", { name }, err);\n\t\t}\n\t}\n\n\t/**\n\t * Import a key to the vault.\n\t * @param name The name of the key to import.\n\t * @param type The type of key to import, e.g. \"ed25519\".\n\t * @param privateKeyPem The PEM bundle of the key to import.\n\t * @returns A promise that resolves when the key has been imported.\n\t * @throws Error if the key cannot be imported.\n\t */\n\tpublic async importKey(name: string, type: string, privateKeyPem: string): Promise<void> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, \"name\", name);\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, \"privateKeyPem\", privateKeyPem);\n\n\t\tconst path = this.getTransitImportKeyPath(name);\n\t\tconst url = `${this._baseUrl}/${path}`;\n\n\t\ttry {\n\t\t\tconst payload = {\n\t\t\t\ttype,\n\t\t\t\tkey: Converter.bytesToBase58(Converter.utf8ToBytes(privateKeyPem)),\n\t\t\t\texportable: true,\n\t\t\t\t// eslint-disable-next-line camelcase\n\t\t\t\tallow_plaintext_backup: true\n\t\t\t};\n\n\t\t\tawait FetchHelper.fetchJson<IImportKeyRequest, IHashicorpVaultResponse<unknown>>(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\turl,\n\t\t\t\tHttpMethod.POST,\n\t\t\t\tpayload,\n\t\t\t\tthis._requestOptions\n\t\t\t);\n\t\t\tthis._keyMetadataCache?.delete(name);\n\t\t} catch (err) {\n\t\t\tthrow new GeneralError(HashicorpVaultConnector.CLASS_NAME, \"importKeyFailed\", { name }, err);\n\t\t}\n\t}\n\n\t/**\n\t * Export the key from the vault.\n\t * @param name The name of the key.\n\t * @param keyPath The path of the key. Defaults to \"signing-key\".\n\t * @param version The version of the key. If omitted, all versions of the key will be returned.\n\t * @returns The key details.\n\t * @throws Error if the key cannot be exported or found.\n\t */\n\tpublic async exportKey(\n\t\tname: string,\n\t\tkeyPath: \"signing-key\" | \"encryption-key\" | \"public-key\",\n\t\tversion?: string\n\t): Promise<{\n\t\t/**\n\t\t * The type of the key e.g. Ed25519.\n\t\t */\n\t\ttype: VaultKeyType;\n\n\t\t/**\n\t\t * The key.\n\t\t */\n\t\tkey: Uint8Array;\n\n\t\t/**\n\t\t * The name of the key.\n\t\t */\n\t\tname: string;\n\t}> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, \"name\", name);\n\t\tconst versionPath = version ? `${version}` : \"latest\";\n\n\t\tconst path = this.getTransitExportKeyPath(name, keyPath);\n\t\tconst url = `${this._baseUrl}/${path}/${versionPath}`;\n\n\t\ttry {\n\t\t\tconst response = await FetchHelper.fetchJson<\n\t\t\t\tnever,\n\t\t\t\tIHashicorpVaultResponse<IExportKeyResponse>\n\t\t\t>(HashicorpVaultConnector.CLASS_NAME, url, HttpMethod.GET, undefined, this._requestOptions);\n\n\t\t\tif (response?.data) {\n\t\t\t\tconst { keys, type } = response.data;\n\t\t\t\tconst keyVersion = Object.keys(keys)[0];\n\t\t\t\tlet key;\n\n\t\t\t\tconst keyType = this.mapHashicorpKeyType(type);\n\t\t\t\tif (keyType === VaultKeyType.Ed25519) {\n\t\t\t\t\tkey = Converter.base64ToBytes(keys[keyVersion]).slice(\n\t\t\t\t\t\t0,\n\t\t\t\t\t\tkeyPath === \"public-key\" ? Ed25519.PUBLIC_KEY_SIZE : Ed25519.PRIVATE_KEY_SIZE\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\t// VaultKeyType.ChaCha20Poly1305\n\t\t\t\t\tkey = Converter.base64ToBytes(keys[keyVersion]);\n\t\t\t\t}\n\n\t\t\t\tconst keyData = {\n\t\t\t\t\ttype: keyType,\n\t\t\t\t\tkey,\n\t\t\t\t\tname: response?.data?.name\n\t\t\t\t};\n\n\t\t\t\treturn keyData;\n\t\t\t}\n\n\t\t\tthrow new NotFoundError(HashicorpVaultConnector.CLASS_NAME, \"exportKeyNotFound\", name);\n\t\t} catch (err) {\n\t\t\tif (BaseError.isErrorName(err, NotFoundError.CLASS_NAME)) {\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t\tthrow new GeneralError(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\t\"exportKeyFailed\",\n\t\t\t\t{ name, keyPath },\n\t\t\t\terr\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Get the key configuration.\n\t * @param name The name of the key to get the configuration for.\n\t * @returns True if the key can be deleted.\n\t */\n\tpublic async getKeyDeleteConfiguration(name: string): Promise<boolean> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, \"name\", name);\n\t\tconst path = this.getTransitKeyPath(name);\n\t\tconst url = `${this._baseUrl}/${path}`;\n\n\t\ttry {\n\t\t\tconst response = await FetchHelper.fetchJson<\n\t\t\t\tnever,\n\t\t\t\tIHashicorpVaultResponse<IKeyDeleteConfigResponse>\n\t\t\t>(HashicorpVaultConnector.CLASS_NAME, url, HttpMethod.GET, undefined, this._requestOptions);\n\n\t\t\treturn response.data.deletion_allowed;\n\t\t} catch (err) {\n\t\t\tthrow new GeneralError(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\t\"getKeyDeleteConfigurationFailed\",\n\t\t\t\t{ name },\n\t\t\t\terr\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Read key information from the vault.\n\t * @param name The name of the key.\n\t * @returns An object containing key information.\n\t * @internal\n\t */\n\tprivate async readKey(name: string): Promise<IReadKeyResponse> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, \"name\", name);\n\n\t\tconst path = this.getTransitKeyPath(name);\n\t\tconst url = `${this._baseUrl}/${path}`;\n\n\t\ttry {\n\t\t\tconst response = await FetchHelper.fetchJson<\n\t\t\t\tnever,\n\t\t\t\tIHashicorpVaultResponse<IReadKeyResponse>\n\t\t\t>(HashicorpVaultConnector.CLASS_NAME, url, HttpMethod.GET, undefined, this._requestOptions);\n\n\t\t\tif (response?.data?.name) {\n\t\t\t\tconst keyName = response.data.name;\n\t\t\t\treturn { name: keyName, type: response.data.type };\n\t\t\t}\n\t\t\tthrow new NotFoundError(HashicorpVaultConnector.CLASS_NAME, \"keyNotFound\", name);\n\t\t} catch (err) {\n\t\t\tif (this.isHttpNotFoundError(err)) {\n\t\t\t\tthrow new NotFoundError(\n\t\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\t\t\"keyNotFound\",\n\t\t\t\t\tname,\n\t\t\t\t\tundefined,\n\t\t\t\t\terr\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (BaseError.isErrorName(err, NotFoundError.CLASS_NAME)) {\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t\tthrow new GeneralError(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\t\"invalidReadKeyResponse\",\n\t\t\t\t{ name },\n\t\t\t\terr\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Read key metadata, served from the cache when it is enabled.\n\t * @param name The name of the key.\n\t * @returns An object containing key information.\n\t * @internal\n\t */\n\tprivate async readKeyCached(name: string): Promise<IReadKeyResponse> {\n\t\tconst cached = this._keyMetadataCache?.get(name);\n\t\tif (!Is.undefined(cached)) {\n\t\t\treturn cached;\n\t\t}\n\n\t\tconst keyDetails = await this.readKey(name);\n\t\tthis._keyMetadataCache?.set(name, keyDetails, Date.now() + this._keyMetadataCacheTtlMs);\n\t\treturn keyDetails;\n\t}\n\n\t/**\n\t * Encrypt bytes with the transit key.\n\t * @param name The name of the key.\n\t * @param data The bytes to encrypt.\n\t * @returns The transit ciphertext including its version prefix.\n\t * @internal\n\t */\n\tprivate async transitEncrypt(name: string, data: Uint8Array): Promise<string> {\n\t\tconst url = `${this._baseUrl}/${this.getTransitEncryptPath(name)}`;\n\t\tconst payload = { plaintext: Converter.bytesToBase64(data) };\n\n\t\tconst response = await FetchHelper.fetchJson<\n\t\t\tIEncryptDataRequest,\n\t\t\tIHashicorpVaultResponse<IEncryptDataResponse>\n\t\t>(HashicorpVaultConnector.CLASS_NAME, url, HttpMethod.POST, payload, this._requestOptions);\n\n\t\tif (Is.stringValue(response?.data?.ciphertext)) {\n\t\t\treturn response.data.ciphertext;\n\t\t}\n\t\tthrow new GeneralError(HashicorpVaultConnector.CLASS_NAME, \"invalidEncryptResponse\", { name });\n\t}\n\n\t/**\n\t * Decrypt a transit ciphertext with the transit key.\n\t * @param name The name of the key.\n\t * @param ciphertext The transit ciphertext including its version prefix.\n\t * @returns The decrypted bytes.\n\t * @internal\n\t */\n\tprivate async transitDecrypt(name: string, ciphertext: string): Promise<Uint8Array> {\n\t\tconst url = `${this._baseUrl}/${this.getTransitDecryptPath(name)}`;\n\t\tconst payload = { ciphertext };\n\n\t\tconst response = await FetchHelper.fetchJson<\n\t\t\tIDecryptDataRequest,\n\t\t\tIHashicorpVaultResponse<IDecryptDataResponse>\n\t\t>(HashicorpVaultConnector.CLASS_NAME, url, HttpMethod.POST, payload, this._requestOptions);\n\n\t\tif (Is.stringValue(response?.data?.plaintext)) {\n\t\t\treturn Converter.base64ToBytes(response.data.plaintext);\n\t\t}\n\t\tthrow new GeneralError(HashicorpVaultConnector.CLASS_NAME, \"invalidDecryptResponse\", { name });\n\t}\n\n\t/**\n\t * Check whether the data starts with the envelope prefix.\n\t * @param data The data to check.\n\t * @returns True if the data is an envelope.\n\t * @internal\n\t */\n\tprivate hasEnvelopePrefix(data: Uint8Array): boolean {\n\t\treturn HashicorpVaultConnector._ENVELOPE_PREFIX.every((byte, index) => data[index] === byte);\n\t}\n\n\t/**\n\t * Build the envelope header, the prefix followed by the length prefixed wrapped data key.\n\t * @param wrappedKey The transit ciphertext of the data key.\n\t * @returns The header bytes.\n\t * @internal\n\t */\n\tprivate buildEnvelopeHeader(wrappedKey: string): Uint8Array {\n\t\tconst prefix = HashicorpVaultConnector._ENVELOPE_PREFIX;\n\t\tconst wrappedBytes = Converter.utf8ToBytes(wrappedKey);\n\t\tconst header = new Uint8Array(prefix.length + 2 + wrappedBytes.length);\n\t\theader.set(prefix);\n\t\tnew DataView(header.buffer).setUint16(prefix.length, wrappedBytes.length);\n\t\theader.set(wrappedBytes, prefix.length + 2);\n\t\treturn header;\n\t}\n\n\t/**\n\t * Split an envelope into its header, wrapped data key, nonce and payload.\n\t * @param envelope The envelope bytes.\n\t * @returns The envelope parts.\n\t * @throws GeneralError if the envelope is shorter than its header declares.\n\t * @internal\n\t */\n\tprivate parseEnvelope(envelope: Uint8Array): IDataKeyEnvelope {\n\t\tconst lengthOffset = HashicorpVaultConnector._ENVELOPE_PREFIX.length;\n\t\tconst wrappedLength =\n\t\t\tenvelope.length >= lengthOffset + 2\n\t\t\t\t? new DataView(envelope.buffer, envelope.byteOffset).getUint16(lengthOffset)\n\t\t\t\t: 0;\n\t\tconst headerLength = lengthOffset + 2 + wrappedLength;\n\t\tconst payloadOffset = headerLength + HashicorpVaultConnector._NONCE_LENGTH;\n\n\t\tif (envelope.length < payloadOffset + HashicorpVaultConnector._TAG_LENGTH) {\n\t\t\tthrow new GeneralError(HashicorpVaultConnector.CLASS_NAME, \"invalidEnvelope\", {\n\t\t\t\tlength: envelope.length\n\t\t\t});\n\t\t}\n\n\t\treturn {\n\t\t\theader: envelope.slice(0, headerLength),\n\t\t\twrappedKey: Converter.bytesToUtf8(envelope, lengthOffset + 2, wrappedLength),\n\t\t\tnonce: envelope.slice(headerLength, payloadOffset),\n\t\t\tpayload: envelope.slice(payloadOffset)\n\t\t};\n\t}\n\n\t/**\n\t * Determine whether an error is a framework missing-key error.\n\t * @param err The error to inspect.\n\t * @returns True if the error is a NotFoundError.\n\t * @internal\n\t */\n\t/**\n\t * Determine whether a Vault request reported a missing key.\n\t * @param err The error to inspect.\n\t * @returns True if the error has an HTTP 404 status.\n\t * @internal\n\t */\n\tprivate isHttpNotFoundError(err: unknown): boolean {\n\t\treturn (\n\t\t\tIs.object<{ properties?: { httpStatus?: number } }>(err) && err.properties?.httpStatus === 404\n\t\t);\n\t}\n\n\t/**\n\t * Map the vault key type to the hashicorp type.\n\t * @param type The vault key type.\n\t * @returns The hashicorp type as a string.\n\t * @throws Error if the key type is not supported.\n\t * @internal\n\t */\n\tprivate mapVaultKeyType(type: VaultKeyType): string {\n\t\tswitch (type) {\n\t\t\tcase VaultKeyType.Ed25519:\n\t\t\t\treturn \"ed25519\";\n\t\t\tcase VaultKeyType.ChaCha20Poly1305:\n\t\t\t\treturn \"chacha20-poly1305\";\n\t\t\tdefault:\n\t\t\t\tthrow new GeneralError(HashicorpVaultConnector.CLASS_NAME, \"unsupportedKeyType\", { type });\n\t\t}\n\t}\n\n\t/**\n\t * Map the vault key type to the hashicorp type index.\n\t * @param type The vault key type.\n\t * @returns The hashicorp type as a string.\n\t * @throws Error if the key type is not supported.\n\t * @internal\n\t */\n\tprivate mapVaultKeyTypeToIndex(type: VaultKeyType): number {\n\t\t// https://github.com/hashicorp/vault/blob/7d89f7104ed6c98e06ca2c75da20c9ef1b113831/sdk/helper/keysutil/policy.go#L58\n\t\tswitch (type) {\n\t\t\tcase VaultKeyType.Ed25519:\n\t\t\t\treturn 2;\n\t\t\tcase VaultKeyType.ChaCha20Poly1305:\n\t\t\t\treturn 5;\n\t\t\tdefault:\n\t\t\t\tthrow new GeneralError(HashicorpVaultConnector.CLASS_NAME, \"unsupportedKeyType\", { type });\n\t\t}\n\t}\n\n\t/**\n\t * Map the hashicorp key type to the vault type.\n\t * @param type The hashicorp key type.\n\t * @returns The vault key type.\n\t * @throws Error if the key type is not supported.\n\t * @internal\n\t */\n\tprivate mapHashicorpKeyType(type: string): VaultKeyType {\n\t\tswitch (type) {\n\t\t\tcase \"ed25519\":\n\t\t\t\treturn VaultKeyType.Ed25519;\n\t\t\tcase \"chacha20-poly1305\":\n\t\t\t\treturn VaultKeyType.ChaCha20Poly1305;\n\t\t\tdefault:\n\t\t\t\tthrow new GeneralError(HashicorpVaultConnector.CLASS_NAME, \"unsupportedKeyType\", { type });\n\t\t}\n\t}\n\n\t/**\n\t * Check if the key type is asymmetric.\n\t * @param type The key type.\n\t * @returns True if the key type is asymmetric.\n\t * @internal\n\t */\n\tprivate isAsymmetricKeyType(type: VaultKeyType): boolean {\n\t\tswitch (type) {\n\t\t\tcase VaultKeyType.Ed25519:\n\t\t\t\treturn true;\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t * Fetch the versions of a secret.\n\t * @param name The name of the secret.\n\t * @returns The versions of the secret.\n\t * @throws Error if the secret is not found.\n\t * @internal\n\t */\n\tprivate async fetchSecretVersions(name: string): Promise<number[]> {\n\t\tGuards.stringValue(HashicorpVaultConnector.CLASS_NAME, \"name\", name);\n\n\t\ttry {\n\t\t\tconst path = this.getSecretMetadataPath(name);\n\t\t\tconst url = `${this._baseUrl}/${path}`;\n\n\t\t\tconst response = await FetchHelper.fetchJson<\n\t\t\t\tnever,\n\t\t\t\tIHashicorpVaultResponse<ISecretVersionResponse>\n\t\t\t>(HashicorpVaultConnector.CLASS_NAME, url, HttpMethod.GET, undefined, this._requestOptions);\n\n\t\t\tif (response?.data?.versions) {\n\t\t\t\tconst versions = Object.keys(response.data.versions).map(Number);\n\t\t\t\treturn versions;\n\t\t\t}\n\t\t\tthrow new NotFoundError(HashicorpVaultConnector.CLASS_NAME, \"secretNotFound\", name);\n\t\t} catch (err) {\n\t\t\tif (this.isHttpNotFoundError(err)) {\n\t\t\t\tthrow new NotFoundError(\n\t\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\t\t\"secretNotFound\",\n\t\t\t\t\tname,\n\t\t\t\t\tundefined,\n\t\t\t\t\terr\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (BaseError.isErrorName(err, NotFoundError.CLASS_NAME)) {\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t\tthrow new GeneralError(\n\t\t\t\tHashicorpVaultConnector.CLASS_NAME,\n\t\t\t\t\"getSecretVersionsFailed\",\n\t\t\t\t{ name },\n\t\t\t\terr\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Encode the name parameter.\n\t * @param name The name to encode.\n\t * @returns The encoded name.\n\t * @internal\n\t */\n\tprivate getEncodedName(name: string): string {\n\t\tconst safeName = name.replace(/[^\\dA-Za-z-]/g, \"_\").replace(/[_-]+$/, \"\");\n\n\t\treturn Is.stringValue(this._prefix)\n\t\t\t? `${encodeURIComponent(this._prefix)}_${safeName}`\n\t\t\t: safeName;\n\t}\n\n\t/**\n\t * Get the path for a secret.\n\t * @param name The name of the secret.\n\t * @returns The path for the secret.\n\t * @internal\n\t */\n\tprivate getSecretPath(name: string): string {\n\t\treturn `${this._kvMountPath}/data/${this.getEncodedName(name)}`;\n\t}\n\n\t/**\n\t * Get the path for the metadata of a secret.\n\t * @param name The name of the secret.\n\t * @returns The path for the metadata of the secret.\n\t * @internal\n\t */\n\tprivate getSecretMetadataPath(name: string): string {\n\t\treturn `${this._kvMountPath}/metadata/${this.getEncodedName(name)}`;\n\t}\n\n\t/**\n\t * Get the path for a Transit key.\n\t * @param name The name of the key.\n\t * @returns The path for the key.\n\t * @internal\n\t */\n\tprivate getTransitKeyPath(name: string): string {\n\t\treturn `${this._transitMountPath}/keys/${this.getEncodedName(name)}`;\n\t}\n\n\t/**\n\t * Get the path for exporting a Transit key.\n\t * @param name The name of the key.\n\t * @param keyType The type of the key.\n\t * @returns The path for exporting the key.\n\t * @internal\n\t */\n\tprivate getTransitExportKeyPath(name: string, keyType: string): string {\n\t\treturn `${this._transitMountPath}/export/${keyType}/${this.getEncodedName(name)}`;\n\t}\n\n\t/**\n\t * Get the path for the Transit key config.\n\t * @param name The name of the key to update.\n\t * @returns The path for the key config.\n\t * @internal\n\t */\n\tprivate getTransitKeyConfigPath(name: string): string {\n\t\treturn `${this._transitMountPath}/keys/${this.getEncodedName(name)}/config`;\n\t}\n\n\t/**\n\t * Get the path to backup a Transit key.\n\t * @param name The name of the key.\n\t * @returns The path for the backup key.\n\t * @internal\n\t */\n\tprivate getTransitBackupKeyPath(name: string): string {\n\t\treturn `${this._transitMountPath}/backup/${this.getEncodedName(name)}`;\n\t}\n\n\t/**\n\t * Get the path for restoring a Transit key.\n\t * @param name The name of the key.\n\t * @returns The path for the restore key.\n\t * @internal\n\t */\n\tprivate getTransitRestoreKeyPath(name: string): string {\n\t\treturn `${this._transitMountPath}/restore/${this.getEncodedName(name)}`;\n\t}\n\n\t/**\n\t * Get the path for importing a Transit key.\n\t * @param name The name of the key.\n\t * @returns The path for the import key.\n\t * @internal\n\t */\n\tprivate getTransitImportKeyPath(name: string): string {\n\t\treturn `${this._transitMountPath}/keys/${this.getEncodedName(name)}/import`;\n\t}\n\n\t/**\n\t * Get the path for signing data with a Transit key.\n\t * @param name The name of the key.\n\t * @returns The path for the sign.\n\t * @internal\n\t */\n\tprivate getTransitSignPath(name: string): string {\n\t\treturn `${this._transitMountPath}/sign/${this.getEncodedName(name)}`;\n\t}\n\n\t/**\n\t * Get the path for verifying data with a Transit key.\n\t * @param name The name of the key.\n\t * @returns The path for the verify.\n\t * @internal\n\t */\n\tprivate getTransitVerifyPath(name: string): string {\n\t\treturn `${this._transitMountPath}/verify/${this.getEncodedName(name)}`;\n\t}\n\n\t/**\n\t * Get the path for encrypting data with a Transit key.\n\t * @param name The name of the key.\n\t * @returns The path for encryption.\n\t * @internal\n\t */\n\tprivate getTransitEncryptPath(name: string): string {\n\t\treturn `${this._transitMountPath}/encrypt/${this.getEncodedName(name)}`;\n\t}\n\n\t/**\n\t * Get the path for decrypting data with a Transit key.\n\t * @param name The name of the key.\n\t * @returns The path for decryption.\n\t * @internal\n\t */\n\tprivate getTransitDecryptPath(name: string): string {\n\t\treturn `${this._transitMountPath}/decrypt/${this.getEncodedName(name)}`;\n\t}\n}\n"]}
|
package/dist/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wDAAwD,CAAC;AACvE,cAAc,4CAA4C,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./hashicorpVaultConnector.js\";\nexport * from \"./models/IHashicorpVaultConnectorConstructorOptions.js\";\nexport * from \"./models/IHashicorpVaultConnectorConfig.js\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IBackupKeyResponse.js","
|
|
1
|
+
{"version":3,"file":"IBackupKeyResponse.js","sources":["../../../src/models/IBackupKeyResponse.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Represents the response received after backing up a key in the Vault.\n */\nexport interface IBackupKeyResponse {\n\t/**\n\t * The backup data of the key, encoded in Base64.\n\t */\n\tbackup: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ICreateKeyRequest.js","
|
|
1
|
+
{"version":3,"file":"ICreateKeyRequest.js","sources":["../../../src/models/ICreateKeyRequest.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Request to create a new key in the vault.\n */\nexport interface ICreateKeyRequest {\n\t/**\n\t * The type of key (e.g., \"ed25519\").\n\t */\n\ttype: string;\n\n\t/**\n\t * Indicates whether the key is exportable.\n\t */\n\texportable: boolean;\n\n\t/**\n\t * Indicates whether the key can be backed up in plaintext.\n\t */\n\tallow_plaintext_backup: boolean;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IDataKeyEnvelope.js","
|
|
1
|
+
{"version":3,"file":"IDataKeyEnvelope.js","sources":["../../../src/models/IDataKeyEnvelope.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The parts of data encrypted under a wrapped data key.\n */\nexport interface IDataKeyEnvelope {\n\t/**\n\t * The prefix and wrapped data key, bound to the payload as additional authenticated data.\n\t */\n\theader: Uint8Array;\n\n\t/**\n\t * The transit ciphertext of the data key.\n\t */\n\twrappedKey: string;\n\n\t/**\n\t * The nonce of the payload.\n\t */\n\tnonce: Uint8Array;\n\n\t/**\n\t * The encrypted payload and its authentication tag.\n\t */\n\tpayload: Uint8Array;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IDecryptDataRequest.js","
|
|
1
|
+
{"version":3,"file":"IDecryptDataRequest.js","sources":["../../../src/models/IDecryptDataRequest.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Request to decrypt data.\n */\nexport interface IDecryptDataRequest {\n\t/**\n\t * The ciphertext to be decrypted, encoded in Base64.\n\t */\n\tciphertext: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IDecryptDataResponse.js","
|
|
1
|
+
{"version":3,"file":"IDecryptDataResponse.js","sources":["../../../src/models/IDecryptDataResponse.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Response received after decrypting.\n */\nexport interface IDecryptDataResponse {\n\t/**\n\t * The decrypted plaintext, encoded in Base64.\n\t */\n\tplaintext: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IEncryptDataRequest.js","
|
|
1
|
+
{"version":3,"file":"IEncryptDataRequest.js","sources":["../../../src/models/IEncryptDataRequest.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Request to encrypt data.\n */\nexport interface IEncryptDataRequest {\n\t/**\n\t * The plaintext to be encrypted, encoded in Base64.\n\t */\n\tplaintext: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IEncryptDataResponse.js","
|
|
1
|
+
{"version":3,"file":"IEncryptDataResponse.js","sources":["../../../src/models/IEncryptDataResponse.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Represents the response received after encrypting.\n */\nexport interface IEncryptDataResponse {\n\t/**\n\t * The encrypted ciphertext, encoded in Base64.\n\t */\n\tciphertext: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IExportKeyResponse.js","
|
|
1
|
+
{"version":3,"file":"IExportKeyResponse.js","sources":["../../../src/models/IExportKeyResponse.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Represents the response containing the key.\n */\nexport interface IExportKeyResponse {\n\t/**\n\t * The public key, encoded in Base64.\n\t */\n\tkeys: {\n\t\t[version: string]: string;\n\t};\n\n\t/**\n\t * The type of the key (e.g., \"ed25519\").\n\t */\n\ttype: string;\n\n\t/**\n\t * The name of the key.\n\t */\n\tname: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IHashicorpVaultConnectorConfig.js","
|
|
1
|
+
{"version":3,"file":"IHashicorpVaultConnectorConfig.js","sources":["../../../src/models/IHashicorpVaultConnectorConfig.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Configuration for the Hashicorp Vault Connector.\n */\nexport interface IHashicorpVaultConnectorConfig {\n\t/**\n\t * The address of the Hashicorp Vault (e.g., \"http://localhost:8200\").\n\t */\n\tendpoint: string;\n\n\t/**\n\t * The authentication token for the Hashicorp Vault.\n\t */\n\ttoken: string;\n\n\t/**\n\t * The mount path for the KV Secrets Engine (e.g., \"secret\").\n\t */\n\tkvMountPath?: string;\n\n\t/**\n\t * The mount path for the Transit Secrets Engine (e.g., \"transit\").\n\t */\n\ttransitMountPath?: string;\n\n\t/**\n\t * The version of the Hashicorp Vault API (e.g., \"v1\").\n\t */\n\tapiVersion?: string;\n\n\t/**\n\t * The request timeout in milliseconds.\n\t */\n\ttimeoutMs?: number;\n\n\t/**\n\t * The namespace for the Hashicorp Vault if using Vault Enterprise.\n\t */\n\tnamespace?: string;\n\n\t/**\n\t * A prefix for the keys stored in the Hashicorp Vault.\n\t */\n\tprefix?: string;\n\n\t/**\n\t * TTL in ms for caching key metadata read before transit operations, 0 disables caching.\n\t * @default 30000\n\t */\n\tkeyMetadataCacheTtlMs?: number;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IHashicorpVaultConnectorConstructorOptions.js","
|
|
1
|
+
{"version":3,"file":"IHashicorpVaultConnectorConstructorOptions.js","sources":["../../../src/models/IHashicorpVaultConnectorConstructorOptions.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IHashicorpVaultConnectorConfig } from \"./IHashicorpVaultConnectorConfig.js\";\n\n/**\n * Options for the hashicorp vault connector constructor.\n */\nexport interface IHashicorpVaultConnectorConstructorOptions {\n\t/**\n\t * The hashicorp vault connector configuration.\n\t */\n\tconfig: IHashicorpVaultConnectorConfig;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IHashicorpVaultRequest.js","
|
|
1
|
+
{"version":3,"file":"IHashicorpVaultRequest.js","sources":["../../../src/models/IHashicorpVaultRequest.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Base interface for all Hashicorp Vault API requests.\n */\nexport interface IHashicorpVaultRequest<T> {\n\t/**\n\t * The request data.\n\t */\n\tdata: {\n\t\tsecret: T;\n\t};\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IHashicorpVaultResponse.js","
|
|
1
|
+
{"version":3,"file":"IHashicorpVaultResponse.js","sources":["../../../src/models/IHashicorpVaultResponse.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Base interface for all Hashicorp Vault API responses.\n */\nexport interface IHashicorpVaultResponse<T> {\n\t/**\n\t * The response data.\n\t */\n\tdata: T;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IImportKeyRequest.js","
|
|
1
|
+
{"version":3,"file":"IImportKeyRequest.js","sources":["../../../src/models/IImportKeyRequest.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Request to import a key.\n */\nexport interface IImportKeyRequest {\n\t/**\n\t * The type of the key to be imported.\n\t */\n\ttype: string;\n\n\t/**\n\t * The data of the key to be imported.\n\t */\n\tkey: string;\n\n\t/**\n\t * Whether the key should be exportable.\n\t */\n\texportable?: boolean;\n\n\t/**\n\t * Whether the key should allow plaintext backup.\n\t */\n\tallow_plaintext_backup?: boolean;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IKeyDeleteConfigResponse.js","
|
|
1
|
+
{"version":3,"file":"IKeyDeleteConfigResponse.js","sources":["../../../src/models/IKeyDeleteConfigResponse.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Represents the response payload for deleting a key from the Vault.\n */\nexport interface IKeyDeleteConfigResponse {\n\t/**\n\t * Indicates whether the deletion is allowed.\n\t */\n\tdeletion_allowed: boolean;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IReadKeyResponse.js","
|
|
1
|
+
{"version":3,"file":"IReadKeyResponse.js","sources":["../../../src/models/IReadKeyResponse.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Represents the response payload for reading a key from the Vault.\n */\nexport interface IReadKeyResponse {\n\t/**\n\t * The name of the key.\n\t */\n\tname: string;\n\n\t/**\n\t * The type of the key.\n\t */\n\ttype: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IRestoreKeyRequest.js","
|
|
1
|
+
{"version":3,"file":"IRestoreKeyRequest.js","sources":["../../../src/models/IRestoreKeyRequest.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Request to restore a key.\n */\nexport interface IRestoreKeyRequest {\n\t/**\n\t * The backup data of the key to be restored, encoded in Base64.\n\t */\n\tbackup: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ISecretData.js","
|
|
1
|
+
{"version":3,"file":"ISecretData.js","sources":["../../../src/models/ISecretData.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Interface for secret data responses.\n */\nexport interface ISecretData<T> {\n\t/**\n\t * The secret data.\n\t */\n\tdata: {\n\t\tsecret: T;\n\t};\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ISecretVersionResponse.js","
|
|
1
|
+
{"version":3,"file":"ISecretVersionResponse.js","sources":["../../../src/models/ISecretVersionResponse.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Represents the response received when fetching the versions of a secret from vault.\n */\nexport interface ISecretVersionResponse {\n\t/**\n\t * A dictionary mapping the version numbers to their respective metadata.\n\t */\n\tversions: {\n\t\t[version: string]: {\n\t\t\tcreated_time: string;\n\t\t\tdeletion_time: string;\n\t\t\tdestroyed: boolean;\n\t\t};\n\t};\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ISignDataRequest.js","
|
|
1
|
+
{"version":3,"file":"ISignDataRequest.js","sources":["../../../src/models/ISignDataRequest.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Request to sign data.\n */\nexport interface ISignDataRequest {\n\t/**\n\t * The data to be signed, encoded in Base64.\n\t */\n\tinput: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ISignDataResponse.js","
|
|
1
|
+
{"version":3,"file":"ISignDataResponse.js","sources":["../../../src/models/ISignDataResponse.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Represents the response received after signing the data.\n */\nexport interface ISignDataResponse {\n\t/**\n\t * The signature of the data, prefixed with the vault version token.\n\t */\n\tsignature: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IUpdateKeyConfigRequest.js","
|
|
1
|
+
{"version":3,"file":"IUpdateKeyConfigRequest.js","sources":["../../../src/models/IUpdateKeyConfigRequest.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Request to update the configuration of a key.\n */\nexport interface IUpdateKeyConfigRequest {\n\t/**\n\t * Indicates whether the key is allowed to be deleted.\n\t */\n\tdeletion_allowed?: boolean;\n\n\t/**\n\t * Indicates whether the key is allowed to be exported.\n\t */\n\texportable?: boolean;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IVerifyDataRequest.js","
|
|
1
|
+
{"version":3,"file":"IVerifyDataRequest.js","sources":["../../../src/models/IVerifyDataRequest.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Request to verify a signature.\n */\nexport interface IVerifyDataRequest {\n\t/**\n\t * The original data that was signed, encoded in Base64.\n\t */\n\tinput: string;\n\n\t/**\n\t * The signature to be verified, prefixed with the vault version token.\n\t */\n\tsignature: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IVerifyDataResponse.js","
|
|
1
|
+
{"version":3,"file":"IVerifyDataResponse.js","sources":["../../../src/models/IVerifyDataResponse.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Represents the response received after verifying a signature.\n */\nexport interface IVerifyDataResponse {\n\t/**\n\t * Indicates whether the signature is valid.\n\t */\n\tvalid: boolean;\n}\n"]}
|
package/docs/changelog.md
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.20.0-next.1](https://github.com/3sixtyglobal/vault/compare/vault-connector-hashicorp-v0.20.0-next.0...vault-connector-hashicorp-v0.20.0-next.1) (2026-10-23)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* publish packages under the [@3sixty](https://github.com/3sixty) namespace ([a32b1e0](https://github.com/3sixtyglobal/vault/commit/a32b1e0dfc861076908bb8c9532f37f24cbc6baf))
|
|
9
|
+
* updated ts compile ([77b7687](https://github.com/3sixtyglobal/vault/commit/77b76879092f9be9408b43e3136a29e69f14972c))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* parallel test flake ([a893c75](https://github.com/3sixtyglobal/vault/commit/a893c75d6e90a9dcf0691c46891313f34738a3d6))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Dependencies
|
|
18
|
+
|
|
19
|
+
* The following workspace dependencies were updated
|
|
20
|
+
* dependencies
|
|
21
|
+
* @3sixty/vault-models bumped from 0.20.0-next.0 to 0.20.0-next.1
|
|
@@ -115,7 +115,7 @@ Store a secret in the vault.
|
|
|
115
115
|
|
|
116
116
|
#### Type Parameters
|
|
117
117
|
|
|
118
|
-
##### T
|
|
118
|
+
##### T {#t}
|
|
119
119
|
|
|
120
120
|
`T`
|
|
121
121
|
|
|
@@ -205,7 +205,7 @@ Get a secret from the vault.
|
|
|
205
205
|
|
|
206
206
|
#### Type Parameters
|
|
207
207
|
|
|
208
|
-
##### T
|
|
208
|
+
##### T {#t-1}
|
|
209
209
|
|
|
210
210
|
`T`
|
|
211
211
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@3sixty/vault-connector-hashicorp",
|
|
3
|
-
"version": "0.20.0-next.
|
|
3
|
+
"version": "0.20.0-next.1",
|
|
4
4
|
"description": "HashiCorp Vault connector for transit cryptography and KV secret workflows",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@3sixty/entity-storage-models": "next",
|
|
25
25
|
"@3sixty/logging-models": "next",
|
|
26
26
|
"@3sixty/nameof": "next",
|
|
27
|
-
"@3sixty/vault-models": "0.20.0-next.
|
|
27
|
+
"@3sixty/vault-models": "0.20.0-next.1",
|
|
28
28
|
"@3sixty/web": "next"
|
|
29
29
|
},
|
|
30
30
|
"main": "./dist/es/index.js",
|