Documentation ¶
Index ¶
Constants ¶
const DefaultField = "value"
DefaultField is the default field name the provider expects to find the secret value.
Variables ¶
This section is empty.
Functions ¶
func ProviderFactory ¶
func ProviderFactory(options plugin_v1.ProviderOptions) (plugin_v1.Provider, error)
ProviderFactory constructs a Provider. The API client is configured from environment variables. Underlying Vault API client by default uses: - VAULT_ADDR: endpoint of Vault, e.g. http://vault:8200/ - VAULT_TOKEN: token to login to Vault See Vault API docs at https://godoc.org/github.com/hashicorp/vault/api
Types ¶
type Provider ¶
Provider provides data values from the Conjur vault.
func (*Provider) GetValue ¶
GetValue obtains a value by id. The id should contain the path in Vault to the secret. It may be appended with a hash following the object property path to the secret value; defaults to DefaultField. For example:
- `kv/database/password` returns the value of field `value` in the secret object at given path.
- `kv/database#password` returns the value of field `password` in the secret object at path `kv/database`.
- `secret/data/database#data.value` returns the value of field `value` wrapped in object `data` in secret object at path `secret/data/database`.
Secrets in Vault are stored as (JSON) objects in the shape of map[string]interface{}. Both path to the secret and fields to the value in the secret must follow Vault API client conventions. Please see documentation of Vault for details.