Secret Manager quickstart
In about five minutes you enable Secret Manager in a workspace, save a database password as the secret payments/db, and read it back from your terminal with the bao CLI. At the end you’ll know the three values every client needs: the address, the namespace and a token.
Before you begin
- A workspace where you can create resources: you’re the Owner, an Admin, or a Technical member with access to it. See Team members & access roles.
- Your organization’s identity verification is complete, and your wallet passes the billing check.
- A Vault-compatible CLI on your computer: the OpenBao CLI
bao(download) or HashiCorp’svault. Both use the same commands; this page usesbao.
Steps
Enable it
On Enable Secret Manager:
- Location: keep the location shown, for example Amaravati (
VGA). It can’t be changed later. - Namespace: enter a name such as
acme-payments: 3–32 lowercase letters, digits and single hyphens. Wait for Available. The namespace can’t be changed later. - Versions to keep: keep the default (10 per secret) or click Change.
- Check the prices under Pricing · pay as you go, excl. GST, then click Enable Secret Manager.
The page shows Setting up Secret Manager, usually for a few seconds, then Secret Manager is ready.
Create a secret
Click Create secret. In Name, enter payments/db. Under Key/value pairs, add the key username with the value app, click Add value, then add the key password with a value. Click Create Secret.
The toast Secret created appears. The secret’s first version is v1.
Point your terminal at the workspace
Click the Connect tab. Under Point your client at this workspace, copy the two lines and run them:
Use the address and namespace your Connect tab shows: they belong to your workspace and location.
Verify it worked
The command prints the secret’s metadata, then its data:
The CLI prints values in plain text, so don’t run it where others can see your screen or where the output is logged.
To read one value in a script, use -field:
The same read over plain HTTP:
Each read is one billed operation (₹4 per 10,000). See Pricing.
Give your application its own login
The CLI session is for people. For an application, VM, CI job or Kubernetes cluster, create an app credential: it signs in with a Role ID and a Secret ID and gets a token that lasts an hour and renews for up to a day.
See App credentials to create one, and Read secrets from your app for Python, Node.js, bao agent and curl.
Troubleshooting
More errors are in Troubleshooting.
Related pages
- Concepts: namespaces, versions, stores and paths
- Manage secrets in the portal: versions, roll back and delete
- Pricing
