
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
@commander-lol/vault-client
Advanced tools
A pluggable convenience wrapper around the Hashicorp Vault HTTP API
npm install @commander-lol/vault-client
This library provides the VaultClient class, which encapsulates
1 auth method and 0 or more named stores. Construction overhead amounts
to a few class instantiations with no long-lived resource allocations, so
creating a VaultClient per HTTP request is ok (e.g. for short lease JWT based
auth against the Vault instance with a client token)
const { VaultClient, VaultSimpleAuth, VaultKVStore } = require('@commander-lol/vault-client')
const client = new VaultClient('https://vault.host.example.com', {
auth: VaultSimpleAuth,
stores: {
kv: VaultKVStore,
},
options: {
auth: {
path: '/v1/auth/approle/login',
credentials: {
role_id: '...',
secret_id: '...',
},
},
kv: {
path: '/v1/some/path'
}
}
})
const value = await client.stores.kv.read('some_key')
NB: In real world use cases, you should create a utility function elsewhere for creating a configured client, to keep your route handlers tidy.
const { VaultClient, VaultSimpleAuth, VaultKVStore } = require('@commander-lol/vault-client')
/* ... */
router.get('/secrets/:id', async ctx => {
const getCredentials = async () => {
let header = ctx.get('Authorization')
if (header.startsWith('Bearer ')) {
header = header.substr(7)
}
const values = await someDecodeFn(header)
return {
jwt: header,
role: values.role,
}
}
const client = new VaultClient('https://vault.example.com', {
auth: VaultSimpleAuth,
stores: {
secrets: VaultKVStore,
},
options: {
auth: {
path: '/v1/auth/jwt/login',
credentials: getCredentials,
},
secrets: {
path: '/v1/kvpath',
},
},
})
ctx.body = await client.stores.secrets.read(ctx.params.id)
})
/* ... */
FAQs
A pluggable convenience wrapper around the Hashicorp Vault HTTP API
We found that @commander-lol/vault-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.