PURISTA API / @purista/vault-secret-store / VaultSecretStore
Class: VaultSecretStore
Defined in: vault-secret-store/src/VaultSecretStore.impl.ts:32
The secret store adapter for HashiCorp Vault. It will store, retrieve, update or remove secrets in HashiCorp Vault.
Extends
Constructors
Constructor
new VaultSecretStore(
config):VaultSecretStore
Defined in: vault-secret-store/src/VaultSecretStore.impl.ts:35
Parameters
config
cacheTtl?
number
Cache time to live in ms
enableCache?
boolean
Enable cache
enableGet?
boolean
Enable generally get method
enableRemove?
boolean
Enable generally remove method
enableSet?
boolean
Enable generally set method
endpoint
string
Vault HTTP endpoint
Example
'http://localhost:8200'logger?
A logger instance
logLevel?
A log level for new logger if logger is not set
mount?
string
Secret engine mount path
Default
'secret'token
string
Authentication token
Returns
VaultSecretStore
Overrides
SecretStoreBaseClass.constructor
Properties
cache
cache:
SecretStoreCacheMap
Defined in: core/dist/commonjs/core/SecretStore/SecretStoreBaseClass.impl.d.ts:23
Inherited from
client
client:
client
Defined in: vault-secret-store/src/VaultSecretStore.impl.ts:33
config
config:
object
Defined in: core/dist/commonjs/core/SecretStore/SecretStoreBaseClass.impl.d.ts:21
cacheTtl?
optionalcacheTtl:number
Cache time to live in ms
enableCache?
optionalenableCache:boolean
Enable cache
enableGet?
optionalenableGet:boolean
Enable generally get method
enableRemove?
optionalenableRemove:boolean
Enable generally remove method
enableSet?
optionalenableSet:boolean
Enable generally set method
endpoint
endpoint:
string
Vault HTTP endpoint
Example
'http://localhost:8200'logger?
optionallogger:Logger
A logger instance
logLevel?
optionallogLevel:LogLevelName
A log level for new logger if logger is not set
mount?
optionalmount:string
Secret engine mount path
Default
'secret'token
token:
string
Authentication token
Inherited from
logger
logger:
Logger
Defined in: core/dist/commonjs/core/SecretStore/SecretStoreBaseClass.impl.d.ts:20
Inherited from
name
name:
string
Defined in: core/dist/commonjs/core/SecretStore/SecretStoreBaseClass.impl.d.ts:22
Inherited from
Methods
destroy()
destroy():
Promise<void>
Defined in: core/dist/commonjs/core/SecretStore/SecretStoreBaseClass.impl.d.ts:31
Returns
Promise<void>
Inherited from
getSecret()
getSecret<
SecretNames>(...secretNames):Promise<ObjectWithKeysFromStringArray<SecretNames,string|undefined>>
Defined in: core/dist/commonjs/core/SecretStore/SecretStoreBaseClass.impl.d.ts:26
Type Parameters
SecretNames
SecretNames extends string[]
Parameters
secretNames
...SecretNames
Returns
Promise<ObjectWithKeysFromStringArray<SecretNames, string | undefined>>
Inherited from
SecretStoreBaseClass.getSecret
getSecretImpl()
protectedgetSecretImpl<SecretNames>(...secretNames):Promise<ObjectWithKeysFromStringArray<SecretNames,string|undefined>>
Defined in: vault-secret-store/src/VaultSecretStore.impl.ts:54
Type Parameters
SecretNames
SecretNames extends string[]
Parameters
secretNames
...SecretNames
Returns
Promise<ObjectWithKeysFromStringArray<SecretNames, string | undefined>>
Overrides
SecretStoreBaseClass.getSecretImpl
removeSecret()
removeSecret(
secretName):Promise<void>
Defined in: core/dist/commonjs/core/SecretStore/SecretStoreBaseClass.impl.d.ts:28
Parameters
secretName
string
Returns
Promise<void>
Inherited from
SecretStoreBaseClass.removeSecret
removeSecretImpl()
protectedremoveSecretImpl(secretName):Promise<void>
Defined in: vault-secret-store/src/VaultSecretStore.impl.ts:76
Parameters
secretName
string
Returns
Promise<void>
Overrides
SecretStoreBaseClass.removeSecretImpl
setSecret()
setSecret(
secretName,secretValue):Promise<void>
Defined in: core/dist/commonjs/core/SecretStore/SecretStoreBaseClass.impl.d.ts:30
Parameters
secretName
string
secretValue
string
Returns
Promise<void>
Inherited from
SecretStoreBaseClass.setSecret
setSecretImpl()
protectedsetSecretImpl(secretName,secretValue):Promise<void>
Defined in: vault-secret-store/src/VaultSecretStore.impl.ts:87
Parameters
secretName
string
secretValue
string
Returns
Promise<void>
