Liking cljdoc? Tell your friends :D

vault.lease

High-level namespace for tracking and maintaining leases on dynamic secrets read by a vault client.

High-level namespace for tracking and maintaining leases on dynamic secrets
read by a vault client.
raw docstring

delete!clj

(delete! client lease-id)

Remove an entry for the given lease, if present.

Remove an entry for the given lease, if present.
sourceraw docstring

expired?clj

(expired? lease)

True if the given lease is expired.

True if the given lease is expired.
sourceraw docstring

expires-within?clj

(expires-within? lease ttl)

True if the lease will expire within ttl seconds.

True if the lease will expire within `ttl` seconds.
sourceraw docstring

find-dataclj

(find-data client cache-key)

Retrieve an existing leased secret from the store by cache key. Returns the secret data, or nil if not found or expired.

Retrieve an existing leased secret from the store by cache key. Returns the
secret data, or nil if not found or expired.
sourceraw docstring

get-leaseclj

(get-lease client lease-id)

Retrieve a lease from the store. Returns the lease information, including secret data, or nil if not found or expired.

Retrieve a lease from the store. Returns the lease information, including
secret data, or nil if not found or expired.
sourceraw docstring

invalidate!clj

(invalidate! client cache-key)

Remove entries matching the given cache key.

Remove entries matching the given cache key.
sourceraw docstring

maintain!clj

(maintain! client renew-fn)

Maintain all the leases in the store, blocking until complete.

Maintain all the leases in the store, blocking until complete.
sourceraw docstring

new-storeclj

(new-store)

Construct a new stateful store for leased secrets.

Construct a new stateful store for leased secrets.
sourceraw docstring

put!clj

(put! client lease data)

Persist a leased secret in the store. Returns the lease data.

Persist a leased secret in the store. Returns the lease data.
sourceraw docstring

renewable-leaseclj

(renewable-lease lease opts)

Helper to apply common renewal settings to the lease map.

Options may contain:

  • :renew? If true, attempt to automatically renew the lease when near expiry. (Default: false)
  • :renew-within Renew the lease when within this many seconds of the lease expiry. (Default: 60)
  • :renew-increment How long to request the lease be renewed for, in seconds.
  • :on-renew A function to call with the updated lease information after a successful renewal.
  • :on-error A function to call with any exceptions encountered while renewing or rotating the lease.
Helper to apply common renewal settings to the lease map.

Options may contain:

- `:renew?`
  If true, attempt to automatically renew the lease when near expiry.
  (Default: false)
- `:renew-within`
  Renew the lease when within this many seconds of the lease expiry.
  (Default: 60)
- `:renew-increment`
  How long to request the lease be renewed for, in seconds.
- `:on-renew`
  A function to call with the updated lease information after a successful
  renewal.
- `:on-error`
  A function to call with any exceptions encountered while renewing or
  rotating the lease.
sourceraw docstring

rotatable-leaseclj

(rotatable-lease lease opts rotate-fn)

Helper to apply common rotation settings to the lease map. The rotation function will be called with no arguments and should synchronously return a new secret data result, and update the lease store as a side-effect.

Options may contain:

  • :rotate? If true, attempt to read a new secret when the lease can no longer be renewed. (Default: false)
  • :rotate-within Rotate the secret when within this many seconds of the lease expiry. (Default: 60)
  • :on-rotate A function to call with the new secret data after a successful rotation.
  • :on-error A function to call with any exceptions encountered while renewing or rotating the lease.
Helper to apply common rotation settings to the lease map. The rotation
function will be called with no arguments and should synchronously return
a new secret data result, and update the lease store as a side-effect.

Options may contain:

- `:rotate?`
  If true, attempt to read a new secret when the lease can no longer be
  renewed. (Default: false)
- `:rotate-within`
  Rotate the secret when within this many seconds of the lease expiry.
  (Default: 60)
- `:on-rotate`
  A function to call with the new secret data after a successful rotation.
- `:on-error`
  A function to call with any exceptions encountered while renewing or
  rotating the lease.
sourceraw docstring

update!clj

(update! client updates)

Merge some updated information into an existing lease. Updates should contain a ::lease/id. Returns the updated lease, or nil if no such lease was present.

Merge some updated information into an existing lease. Updates should
contain a `::lease/id`. Returns the updated lease, or nil if no such lease
was present.
sourceraw docstring

valid?clj

(valid? lease)

True if the lease information map conforms to the spec.

True if the lease information map conforms to the spec.
sourceraw docstring

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

× close