Methods
# async authenticateWithAppRole() → {Promise.<void>}
Authenticate using the AppRole method.
Resolves when a client token is assigned.
Promise.<void>
# async deleteSecret(key) → {Promise.<boolean>}
Delete a secret from HashiCorp Vault.
Parameters:
| Name | Type | Description |
|---|---|---|
key |
string
|
Secret path to delete. |
True when deletion succeeded.
Promise.<boolean>
# async getSecret(optionalKeyopt) → {Promise.<(Record.<string, string>|null)>}
Retrieve a secret from HashiCorp Vault (with optional key override).
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
optionalKey |
string
|
<optional> |
Optional secret path; defaults to configured mount. |
Secret payload or null when missing.
Promise.<(Record.<string, string>|null)>
# async hasSecret(key) → {Promise.<boolean>}
Check if a secret exists in HashiCorp Vault.
Parameters:
| Name | Type | Description |
|---|---|---|
key |
string
|
Secret path to check. |
True when the secret exists.
Promise.<boolean>
# async healthCheck() → {Promise.<boolean>}
Check if HashiCorp Vault is healthy and accessible.
True when Vault operations succeed.
Promise.<boolean>
# async initialize() → {Promise.<void>}
Initialize the HashiCorp Vault service.
Resolves when initialization completes.
Promise.<void>
# async listKeys() → {Promise.<Array.<string>>}
List all keys in the vault (requires list capability on the mount path).
Collection of stored secret keys.
Promise.<Array.<string>>
# async setSecret(key, value) → {Promise.<void>}
Store a secret in HashiCorp Vault.
Parameters:
| Name | Type | Description |
|---|---|---|
key |
string
|
Path to store the secret under. |
value |
Record.<string, string>
|
Secret payload map. |
Resolves when the value is persisted.
Promise.<void>