HashiCorp Vault KV
HashiCorp Vault KV v2 secrets engine connector.
hashicorp-vault-kv_1.2.1.tgz
Community code that runs on your platform. A maintainer reviewed this exact source; the download is rebuilt from it. Follow the to install it.
Configuration · 5 fields
- Server URL
servertext requiredBase URL of the HashiCorp Vault server, for example http://10.0.0.1:8200.
- Token
tokenpassword requiredVault token used for authentication. Grant only what your playbooks use: read/list on metadata and patch on data is enough to find tagged secrets and update them without being able to read them.
- KV v2 Mount Path
mounttextMount path of the KV version 2 secrets engine. Default: secret.
Default
secret - Verify SSL
verify_sslcheckboxSpecifies whether the SSL certificate of the Vault server is to be verified. Uncheck for self-signed certificates.
Default
true - Request Timeout (seconds)
timeouttextPer-request timeout in seconds applied to every Vault HTTP call.
Default
30
Operations · 10
Get Health
get_healthget_healthVerify connectivity and token validity against Vault by looking up the token itself (auth/token/lookup-self).
No parameters.
ReturnstypepropertiesRead Secret 2 params
read_secretread_secretRead a secret from the KV v2 mount. Optionally read a specific (historic) version; by default the latest version is returned. The result includes the secret's data, the version number and the metadata.
- Secret Path
pathtext requiredPath of the secret under the mount, without the leading mount name (e.g. myapp/api for secret/myapp/api).
- Version
versiontext(Optional) Read this historic version instead of the latest one.
ReturnstypepropertiesWrite Secret 3 params
write_secretwrite_secretWrite a secret to the KV v2 mount. This creates a NEW VERSION of the secret (existing fields are not merged, so include every field you want kept). Downstream consumers watching version changes will observe the bump. Returns the new version number.
- Secret Path
pathtext requiredPath of the secret under the mount.
- Secret Data (JSON)
secret_datatext requiredJSON object with all fields of the secret. Every existing field you omit is dropped by the versioning semantics - resend fields you want kept.
- Create Only
create_onlycheckboxRefuse the write if a secret already exists at the path (Vault check-and-set 0), so a new secret never overwrites one.
Default
false
ReturnstypepropertiesUpdate Secret Fields 3 params
patch_secretpatch_secretChange only the given fields of an existing secret, keeping every other field (an HTTP PATCH, which creates a new version). Needs only the patch capability on the data path - not read. Retried on network errors and server errors; a refused policy (403) or a missing secret (404) is not retried.
- Secret Path
pathtext requiredPath of an existing secret under the mount.
- Fields (JSON)
secret_datatext requiredJSON object of only the fields to change. Fields you leave out keep their current values.
- Retries
retriesinteger(Optional) Extra attempts after a network or server error. Default 3, at most 10.
ReturnstypepropertiesGet Secret Metadata 2 params
read_metadataread_metadataRead a secret's metadata: its custom metadata tags, current version and whether that version is deleted. Never returns the secret's value.
- Secret Path
pathtext requiredPath of the secret under the mount.
- Missing Is OK
missing_okcheckboxAnswer exists=false for a path with no secret, instead of failing.
Default
false
ReturnstypepropertiesUpdate Secret Metadata 2 params
patch_metadatapatch_metadataAdd or change custom metadata tags on a secret, keeping its other tags. Set a tag to null to remove it. Values are stored as text. Does not create a new secret version.
- Secret Path
pathtext requiredPath of the secret under the mount.
- Custom Metadata (JSON)
custom_metadatatext requiredJSON object of tags to set, for example {"faig_key_id": "<uuid>"}. A null value removes that tag.
ReturnstypepropertiesFind Secrets by Metadata 4 params
find_secrets_by_metadatafind_secrets_by_metadataFind the secrets under a path whose custom metadata carries a tag, and its value. Vault cannot search, so this lists every secret under the path (including sub-folders) and reads each one's metadata - never a secret value. A secret whose latest version is deleted does not count. Given values, sorts each into matches (exactly one secret), unmatched (none) and conflicts (more than one).
- Path
pathtext(Optional) Folder to search, including its sub-folders. Empty searches the whole mount.
- Metadata Key
metadata_keytext requiredCustom metadata tag to look for.
- Values
valuestext(Optional) Tag values to look up, as a JSON array or comma-separated text. Adds matches, unmatched and conflicts to the result.
- Max Secrets
max_pathsinteger(Optional) Stop with an error past this many secrets, so a wrong path cannot walk the whole mount. Default 1000.
ReturnstypepropertiesList Secrets 1 param
list_secretslist_secretsList the secret keys under a path in the KV v2 mount.
- Path
pathtext(Optional) List keys under this path. Empty lists keys directly under the mount root.
ReturnstypepropertiesDelete Secret Version 1 param
delete_secretdelete_secretSoft-delete the latest version of a secret in the KV v2 mount. Earlier versions remain readable by version number.
- Secret Path
pathtext requiredPath of the secret under the mount.
ReturnstypepropertiesExecute API Request 4 params
execute_api_requestexecute_api_requestCalls any Vault HTTP API endpoint with the configured token. A full URL is refused so the token only ever goes to the configured server.
- Endpoint
endpointtext requiredPath on the Vault server, for example /v1/sys/health or /v1/secret/data/myapp. /v1 is added when missing.
- Method
methodselectHTTP method. Defaults to GET. LIST is Vault's list verb.
Default
GETOptions GETPOSTPUTPATCHDELETELIST - Query Parameters
query_paramsjson(Optional) JSON object of query string parameters.
- Request Body
request_bodyjson(Optional) JSON object sent with POST, PUT and PATCH.