Liking cljdoc? Tell your friends :D

vault.client

Main Vault client namespace. Contains functions for generic client operations, constructing new clients, and using clients as components in a larger system.

Main Vault client namespace. Contains functions for generic client
operations, constructing new clients, and using clients as components in a
larger system.
raw docstring

auth-infoclj

(auth-info client)

Return the client's current auth information, a map containing the :vault.auth/token and other metadata keys from the vault.auth namespace. Returns nil if the client is unauthenticated.

Return the client's current auth information, a map containing the
`:vault.auth/token` and other metadata keys from the [[vault.auth]]
namespace. Returns nil if the client is unauthenticated.
sourceraw docstring

authenticate!clj

(authenticate! client auth-info)

Manually authenticate the client by providing a map of auth information containing a :vault.auth/token. As a shorthand, a Vault token string may be provided directly. Returns the client.

Manually authenticate the client by providing a map of auth information
containing a `:vault.auth/token`. As a shorthand, a Vault token string may
be provided directly. Returns the client.
sourceraw docstring

authenticate-wrapped!clj

(authenticate-wrapped! client wrap-token)

Authenticate the client by unwrapping a limited-use auth token. Returns the client.

Authenticate the client by unwrapping a limited-use auth token. Returns the
client.
sourceraw docstring

client?clj

(client? x)

True if the value satisfies the client protocol.

True if the value satisfies the client protocol.
sourceraw docstring

config-clientclj

(config-client & {:as opts})

Configure a client from the environment if possible. Returns the initialized client, or throws an exception.

This looks for the following configuration, preferring JVM system properties over environment variables:

  • VAULT_ADDR / vault.addr

    The URL of the vault server to connect to.

  • VAULT_TOKEN / vault.token

    A token to use directly for the client authentication. If neither are set, this will also try the user's ~/.vault-token file.

Accepts the same options as new-client.

Configure a client from the environment if possible. Returns the initialized
client, or throws an exception.

This looks for the following configuration, preferring JVM system properties
over environment variables:

- `VAULT_ADDR` / `vault.addr`

  The URL of the vault server to connect to.

- `VAULT_TOKEN` / `vault.token`

  A token to use directly for the client authentication. If neither are set,
  this will also try the user's `~/.vault-token` file.

Accepts the same options as [[new-client]].
sourceraw docstring

new-clientclj

(new-client address & {:as opts})

Constructs a new Vault client from a URI address by dispatching on the scheme. The client will be returned in an initialized but not started state.

Options:

  • :flow (vault.client.flow/Handler)

    Custom control flow handler to use with the client. Defaults to vault.client.flow/sync-handler.

  • :maintenance-period (integer)

    How frequently (in seconds) to check the client auth token and leased secrets for renewal or rotation. Defaults to 10 seconds.

  • :maintenance-executor (ScheduledExecutorService)

    Custom executor to use for maintenance tasks. Defaults to a new single-threaded executor.

  • :callback-executor (ExecutorService)

    Custom executor to use for lease callbacks. Defaults to the Clojure agent send-off pool, same as future calls.

  • :http-opts (map)

    Additional options to pass to all HTTP requests.

Constructs a new Vault client from a URI address by dispatching on the
scheme. The client will be returned in an initialized but not started state.

Options:

- `:flow` ([[vault.client.flow/Handler]])

  Custom control flow handler to use with the client. Defaults to
  [[vault.client.flow/sync-handler]].

- `:maintenance-period` (integer)

  How frequently (in seconds) to check the client auth token and leased
  secrets for renewal or rotation. Defaults to `10` seconds.

- `:maintenance-executor` (`ScheduledExecutorService`)

  Custom executor to use for maintenance tasks. Defaults to a new
  single-threaded executor.

- `:callback-executor` (`ExecutorService`)

  Custom executor to use for lease callbacks. Defaults to the Clojure agent
  send-off pool, same as `future` calls.

- `:http-opts` (map)

  Additional options to pass to all HTTP requests.
sourceraw docstring

startclj

(start client)

Start the Vault client, returning an updated component with a periodic maintenance task. See new-client for options which control maintenance behavior.

Start the Vault client, returning an updated component with a periodic
maintenance task. See [[new-client]] for options which control maintenance
behavior.
sourceraw docstring

stopclj

(stop client)

Stop the Vault client, canceling any existing maintenance task. Returns a stopped version of the component.

Stop the Vault client, canceling any existing maintenance task. Returns a
stopped version of the component.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close