Module: vaulted

Vaulted is a nodejs-based wrapper for the Vault HTTP API.

Author:

Classes

Vaulted

Methods


<inner> prepare( [vault_token])

Attempt to load the Vault state.

Parameters:
Name Type Argument Description
vault_token String <optional>

an auth token

Returns:
Type
Promise

<inner> setInitialized()

Sets the initialized flag to true to indicated the Vault has been intialized.

Returns:

instance of Vaulted

Type
Vaulted

<inner> setStatus(status)

Set status hash

Parameters:
Name Type Description
status Object

representing vaulted status, which includes 'sealed' property.

Returns:

instance of Vaulted

Type
Vaulted

<inner> setToken(vault_token)

Sets the token to use when accessing the vault, also sets the 'X-Vault-Token' header with token value

Parameters:
Name Type Description
vault_token String

the root/master token

Throws:
  • Vault token not provided, or has zero-length.
Type
Error
Returns:

instance of Vaulted

Type
Vaulted

<inner> validateEndpoint(endpoint [, mountName] [, defaultName])

Validate the request endpoint and that the Vault is prepared for use.

Parameters:
Name Type Argument Description
endpoint string

the name / path of the defined endpoint.

mountName string <optional>

path name an endpoint is mounted on

defaultName string <optional>

default path name an endpoint is mounted on

Throws:
  • Vault has not been initialized.

    Type
    Error
  • Vault has not been unsealed.

    Type
    Error
Returns:

An instance matching the specificed name.

Type
EndPoint