Connect HashiCorp Vault to Toolspoke
Map a Vault cluster, its secret engines, secret paths, policies, auth methods and health, without reading any secret value. Toolspoke gives your agents 11 of its actions, and you decide which ones each project allows.
- Connection
- Provider REST API
- Authentication
- Vault token
- Actions exposed
- 11
- What a call bills
- Nothing
- Adapter
- Maintained by Toolspoke
- Category
- Security
Connected in three steps
Install HashiCorp Vault
Open the marketplace in your workspace, add HashiCorp Vault to the project your agents work in, and it appears on the gateway immediately.
Connect the credential
Provide the credential HashiCorp Vault asks for. Where to get it, and what it has to be able to reach, is the next section.
Give it to an agent
Describe the job in one sentence and the builder proposes the instructions, the toolkits it needs, a schedule and where it should answer, or start from a catalogue agent. It can use every HashiCorp Vault action the project leaves on.
The whole setup, from HashiCorp Vault's side to the first question: How to connect HashiCorp Vault to Toolspoke
Where the agent answers
Slack
Ask it in a channel or a thread, and it replies in the thread it was asked in.
Email
Email it. Each write waits for a person's go-ahead unless that action is allowed in advance.
GitHub
Mention it on a pull request, and it answers there.
Schedule
A routine wakes it on a schedule, or when a new item matches.
Any agent in the project can use HashiCorp Vault, and only the actions the project leaves on.
What HashiCorp Vault asks for
Vault token. You provide it once, when you install the connector. Toolspoke encrypts it at rest and decrypts it only for the length of a single call, and the gateway attaches it to the outbound request itself, so it is never part of the arguments an agent sends.
- Vault addressRequired
- The root address of your Vault cluster, with no trailing path, the same value you would put in VAULT_ADDR. The /v1 prefix is added by this connector. It has to be reachable from this gateway.
- https://vault.acme.internal:8200
- Vault tokenRequired
- A Vault token whose policy grants read on the sys endpoints and list/read on the KV metadata paths this connection should see. Do not grant it read on any KV data path: nothing here calls one, and a policy that withholds it is the guarantee that survives a change to this file. Vault tokens expire, use a periodic token or a renewable one with a long enough TTL that the connection does not go dead unnoticed.
- hvs.…
- NamespaceOptional
- Vault Enterprise only. Leave blank for open-source Vault, which has no namespaces. When set it is sent as X-Vault-Namespace and every path below is resolved inside it.
- admin/engineering
What an agent can do in HashiCorp Vault
11 actions, each one declared by name in the connector. A workspace policy grants a person all of them, a hand-picked selection, everything on the read side, everything on the write side, or none.
11 read, none write, none destructive
Reads
11Fetches data and changes nothing.
get_token_infoDescribe the token this connection is using, its display name, the policies attached to it, when it was issued, when it expires, whether it is renewable and which auth path minted it. Every valid Vault token can make this call whatever its policy, which is why it is the health check: it proves the address and the token together without needing any particular permission. Vault returns the token itself in the response; that key is stripped inside the gateway before anything sees it, and the rest of the answer is not written to the audit log either. Read it first when a call is refused, the `policies` list is usually the explanation.
list_mountsList the secret engines mounted on this cluster, keyed by their mount path, kv/, database/, pki/, transit/ and so on, with each one's type, description, options and lease settings. Call it first: every secrets operation here needs a mount path, and for a KV engine the `options.version` field is what says whether it is v1 or v2. Only v2 mounts have the metadata paths list_secrets and read_secret_metadata read. This returns configuration, not contents.
list_secretsList the secret names under one path in a KV v2 engine. It reads the engine's `metadata` path, so it returns keys and nothing else, a name ending in a slash is a folder to descend into, a name without one is a secret. This is the map of where secrets live, and it is the operation to reach for when the question is "what is stored under apps/billing". It does not recurse: call it again for each folder. Nothing here can read what any of these names holds. A nested folder is written with ordinary slashes here, apps/billing, and reaches Vault percent-encoded, which is how a path can never walk up out of the metadata endpoint.
read_secret_metadataRead one secret's metadata: when it was created and last updated, how many versions exist, which of them are deleted or destroyed, the configured maximum version count, and any custom metadata attached to it. This is how to answer "when was this credential last rotated" and "is anything still reading the old version" without reading the credential. It reads the engine's `metadata` path; the sibling `data` path that would return the value is not reachable from this connector at all. Write the path with ordinary slashes; it is sent percent-encoded, so no value of secret_path can address the sibling data endpoint.
list_policiesList the names of the ACL policies configured on this cluster. Policies are how Vault decides who may reach which path, so this plus read_policy is the answer to "who can read production database credentials". Names only, read_policy returns what each one actually grants.
read_policyRead one ACL policy document by name. The document is HCL naming paths and the capabilities granted on each, create, read, update, delete, list, sudo, deny. It says what a holder of the policy may do; it holds no secret of its own. Use it to audit whether a policy reaches further than intended, particularly whether anything grants read on a KV `data` path it should not.
list_auth_methodsList the auth methods enabled on this cluster, keyed by their mount path, token/, userpass/, oidc/, approle/, kubernetes/ and so on, with each one's type, description and default lease settings. This is how people and machines get a token in the first place, so it is the second half of the access map that list_policies starts. Configuration only: no credential belonging to any method is returned.
list_namespacesList the child namespaces under the current one. Vault Enterprise only, an open-source cluster answers 404 here, which is the expected result and not a broken install. Namespaces are how one cluster is divided between teams, and each has its own mounts, policies and tokens, so a path that exists in one does not exist in another. Set the namespace credential on the connection to work inside a particular one.
list_leasesList the lease ids outstanding under one prefix, the dynamic credentials Vault has issued and not yet expired, such as database logins minted by the database engine. Ids only: this returns which leases exist, never the credentials behind them, and this connector has no operation that looks one up or revokes one. Prefixes look like database/creds/readonly or auth/token/create. This endpoint requires the `sudo` capability on sys/leases/lookup, so a deliberately narrow token will be refused here and that is a reasonable outcome rather than a misconfiguration. Prefixes are written with ordinary slashes and sent percent-encoded.
get_healthReport the cluster's health: whether it is initialised, sealed, a standby or a performance standby, its version, cluster name and replication mode. Vault normally signals these states through the HTTP status code rather than the body, 429 for standby, 503 for sealed, 501 for uninitialised, which would surface here as a failed call rather than an answer, so this operation asks Vault to return 200 for every one of them and report the state in the body instead. Read it before concluding a cluster is down.
get_seal_statusReport the seal state in detail: whether the cluster is sealed, how many unseal key shares its threshold requires and how many have been supplied, the seal type, the storage type and the version. A sealed Vault answers every other call in this connector with an error, so this is the operation that explains why. It cannot unseal anything, this connector has no writes at all.
What it will not do
The gateway enforces each of these, so they can be stated flatly.
- It cannot call anything else
- The 11 actions above are the whole of it. A call to any other name is refused before it reaches HashiCorp Vault rather than forwarded on, and connecting your account does not add to the list: it is fixed by the connector, not discovered at run time.
- It only reads
- Every action here reads. Nothing this connector can do changes anything in HashiCorp Vault.
- It reaches no further than your credential
- Toolspoke holds no access to HashiCorp Vault of its own. Every call carries the credential you stored and nothing besides, so whatever that credential cannot reach, this connector cannot reach either.
- It never hears from HashiCorp Vault
- Nothing is pushed to it. There is no webhook, no subscription and no polling, so this connector cannot notice by itself that something changed in HashiCorp Vault. An agent has to ask.
- It does not smooth over provider limits
- Toolspoke does not retry, queue or back off around HashiCorp Vault's own rate limits. A call that HashiCorp Vault refuses comes back to the agent as a failed call.
Before you connect it
What can an agent do in HashiCorp Vault?
11 named actions: 11 that only read. They include get_token_info, list_mounts and list_secrets. Nothing outside that list is reachable: the connector declares each operation by name rather than proxying whatever an agent asks for.
What credentials does the HashiCorp Vault connector need?
Vault token. The connector asks for vault address and vault token, and optionally namespace. Values are encrypted at rest and attached to the outbound request by the gateway, so they are never part of the arguments an agent sends and never reach the audit log.
How does an agent get to use HashiCorp Vault?
Install HashiCorp Vault in a project and every agent in that project can use the actions the project leaves on. Describe a job in one sentence and the builder proposes the instructions, the toolkits it needs, a schedule and where it should answer, or start from a catalogue agent. The agent answers when someone asks it in Slack, emails it or mentions it on a GitHub pull request, or when its routine wakes it.
What does the HashiCorp Vault connector not do?
The 11 actions above are the whole of it. A call to any other name is refused before it reaches HashiCorp Vault rather than forwarded on, and connecting your account does not add to the list: it is fixed by the connector, not discovered at run time. Every action here reads. Nothing this connector can do changes anything in HashiCorp Vault. Toolspoke holds no access to HashiCorp Vault of its own. Every call carries the credential you stored and nothing besides, so whatever that credential cannot reach, this connector cannot reach either. Nothing is pushed to it. There is no webhook, no subscription and no polling, so this connector cannot notice by itself that something changed in HashiCorp Vault. An agent has to ask. Toolspoke does not retry, queue or back off around HashiCorp Vault's own rate limits. A call that HashiCorp Vault refuses comes back to the agent as a failed call.
Can I limit which actions an agent can call?
Yes, in two places. The project switches HashiCorp Vault's actions on and off one at a time, for everyone in the project at once, and the screen groups them by read, write and destructive so turning off everything that deletes is one click. An individual agent key can then be narrowed further, to particular toolkits in a project and to particular actions in a toolkit. Whatever it was granted, a key never reaches a project its owner cannot.
What gets recorded when an agent calls HashiCorp Vault?
Every attempt, with the agent that made it and the person that agent belongs to, the full request payload, the response payload, the status, the duration, and what the call cost in sandbox time and model tokens. Values whose key names a secret are masked out before the record is shown to anyone. An operation the connector marks as not retained never has its response body written at all, so the gateway keeps no second copy of what was read.
More security connectors
Browse all of themConnect HashiCorp Vault to Toolspoke
Add HashiCorp Vault to a project and give it to an agent.