@grow-codes/hashicorp-vault - v0.1.1
    Preparing search index...

    Class VaultConfig

    Immutable configuration of VaultClient.

    Implements

    Index
    connectTimeoutMs: number

    Connection setup timeout in ms.

    headers: Readonly<Record<string, string>>

    Extra request headers (values redacted in debug output).

    hooks?: Hooks

    Request/response hooks.

    kvMount: string

    Default KV mount.

    kvVersion?: KvVersion

    Fixed KV version, or undefined for auto-detection.

    logger?: ClientLogger

    Diagnostic logger (silent by default).

    namespace?: string

    Namespace (X-Vault-Namespace).

    proxy?: string

    Proxy URL (environment proxies are ignored).

    requestTimeoutMs: number

    Per-attempt timeout in ms.

    Retry policy.

    secretsPath: string

    Base path of client.secrets() inside the KV mount ("" = the mount root).

    tls: Readonly<TlsOptions>

    TLS settings.

    token?: Secret

    Client token (redacted in every string form).

    totalTimeoutMs: number

    Whole-call timeout in ms, including retries.

    url: string

    Endpoint base URL.

    userAgentSuffix?: string

    Appended after the standard User-Agent.

    valueField: string

    KV data field of a client.secrets() value.

    DEFAULT_KV_MOUNT: "secret"

    Default KV mount.

    DEFAULT_URL: string = ...

    Default endpoint (http://127.0.0.1:8200).

    DEFAULT_VALUE_FIELD: "value"

    Default KV data field of a client.secrets() value.

    ENV_PREFIX: "GROW_HASHICORP_VAULT_"

    Prefix of every environment variable.

    • util.inspect form (credentials redacted).

      Returns string

    • Credential values to redact from error messages and logs.

      Returns string[]

    • Debug form with every credential redacted.

      Returns Record<string, unknown>

    • Returns a string representation of an object.

      Returns string

    • Builds a config from the environment. Precedence: explicit overrides > GROW_HASHICORP_VAULT_<NAME> > vendor variables (VENDOR_ENV: VAULT_*) > defaults. Reads URL, TOKEN, NAMESPACE, CA_CERT, CLIENT_CERT, CLIENT_KEY, INSECURE_SKIP_VERIFY, PROXY, the timeouts, MAX_RETRIES, KV_MOUNT, KV_VERSION (1, 2; 0 = auto-detect) and SECRETS_PATH.

      Parameters

      Returns VaultConfig