View Source OnePassword.Connect.Configuration (one_password_connect v0.0.3)

This module takes the configuration for a request to a connect server and is the main way to use a OnePassword.Connect.Client.

base_vault_url is where to find the server and much be reachable as a http request. Samples include:

If url contains "https" and skip_ssl_check is not truthy (defaults to false) the ssl certificate will be validated. If you are using self signed certs on internal private networks and you are not worried about MITM attacks etc.

Add configurations and use them with clients as needed to retrieve configuration you are after.

The vaults entry is a list where each entry takes either a String with a vault name of a tuple of vault name and a list of fields.

The minimum required config in vaults is a list with one string "sample vault" which will fetch all entries in sample vault.

The initial vault list that always fires only fetches metadata like the name etc so the overhead of fetching an item is one more HTTP request per item.

Generally the api from 1Password and thesystem is created to support hammering so unless you have a truly massive vault you should not worry too much about the extra requests needed if you have a couple of items you don't care about.

Multiple vaults with the same name is undefined behaviour and it will simply pick the first one. Future release will let you specify a {:with_id, vault_id_string, _items} entry instead of name based.

Link to this section Summary

Link to this section Types

@type t() :: %OnePassword.Connect.Configuration{
  base_vault_url: String.t(),
  skip_ssl_check: true | false | nil,
  token: String.t(),
  vaults: [{String.t(), [String.t()]} | String.t()]
}

Link to this section Functions