> For clean Markdown of any page, append .md to the page URL. For a complete documentation index, see https://ibee.ai/docs/llms.txt (full text of every page: https://ibee.ai/docs/llms-full.txt). For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://ibee.ai/docs/_mcp/server.

# Secret Manager concepts

> How IBEE Secret Manager is organized - workspaces as environments, the namespace, locations and addresses, the secret/ and ibee-managed/ stores, paths and folders, versions and retention, check-and-set, delete versus destroy, roll back, and read-only or suspended workspaces.

Secret Manager gives each workspace its own isolated store, reached at an **address** with a **namespace**. Inside, secrets live at **paths** such as `payments/db`, and every save adds a **version**. This page explains each idea once, with the rules that apply to it. For the numbers, see [Limits](/docs/tools/secret-manager/limits).

## The workspace is the environment

Each workspace that enables Secret Manager gets its own store. Nothing is shared between workspaces.

Use one workspace per environment, for example **Production** and **Staging**, and keep the same paths in each: `payments/db` in both, not `prod/payments/db` and `staging/payments/db`. Your application then reads the same path everywhere, and only the namespace (and the app credential) changes between environments. The portal doesn't accept a name whose first folder is `prod`, `production`, `dev`, `development`, `staging`, `stage` or `test`, and says "Leave out the environment: the workspace already is the environment".

## Namespace

The **namespace** is the name of your workspace's store. You choose it when you [enable Secret Manager](/docs/tools/secret-manager/enable), and every client sends it with every request: as the `VAULT_NAMESPACE` (or `BAO_NAMESPACE`) environment variable for the CLI, the `namespace` setting of an SDK, or the `X-Vault-Namespace` header over HTTP.

| Rule       | Detail                                                                                                                                                                                                                                                                       |
| ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Characters | 3–32 lowercase letters, digits and single hyphens, starting and ending with a letter or digit. For example `acme-payments`.                                                                                                                                                  |
| Reserved   | Names made only of digits; names starting with `ibee`, `i-bee`, `ws-`, `sm-`, `openbao`, `vault`, `hashicorp`, `kube`, `k8s-`, `admin`, `internal`, `official` or `support`; and common words such as `prod`, `dev`, `test`, `api`, `app`, `secret`, `billing` and `default` |
| Unique     | No two workspaces can have the same namespace                                                                                                                                                                                                                                |
| Permanent  | It can't be changed or renamed, and it is never given to anyone else, even after the workspace is deleted                                                                                                                                                                    |

Workspaces enabled before namespaces could be chosen use `ws-<workspace ID>`. Renaming a workspace doesn't change its namespace.

## Location and address

You choose a **location**, for example **Amaravati** (`VGA`), when you enable Secret Manager. Your secrets are stored there, and the location can't be changed later.

The **address** is the HTTPS endpoint clients connect to, for example `https://secrets.ibee.ai`. The portal shows it as `VAULT_ADDR` on the **Connect** tab. Always copy it from there rather than hard-coding it.

If your workspace uses more than one location, each location is a separate store with its own secrets, address and app credentials. Nothing is copied between locations.

## Stores: `secret/` and `ibee-managed/`

| Store           | Who writes                                            | Who reads                     | Use                                                                                 |
| --------------- | ----------------------------------------------------- | ----------------------------- | ----------------------------------------------------------------------------------- |
| `secret/`       | You, from the portal or a read & write app credential | You and your apps             | Everything you store                                                                |
| `ibee-managed/` | Only the IBEE product that created the secret         | You and your apps (read only) | Credentials IBEE products create for your workspace. Empty until a product uses it. |

In the CLI, pick the store with `-mount=secret` or `-mount=ibee-managed`. Over HTTP, the store is the first part of the path: `/v1/secret/data/payments/db`.

## Paths and folders

A secret's **path**, such as `payments/db`, is its name. Slashes divide it into folders, which the portal shows as a folder tree; folders exist only as part of a path.

* Up to 20 folder levels and 512 characters in all.
* Each part: 1–128 characters from letters, digits, `_`, `.` and `-`, starting with a letter, digit or `_`. A part can't be `.` or `..`.
* Case is kept: `Payments/db` and `payments/db` are different secrets.
* The path can't be changed after you create the secret. To rename, create a new secret and delete the old one.

A good layout is `<application>/<purpose>`: `payments/db`, `payments/stripe`, `billing/smtp`. An [app credential](/docs/tools/secret-manager/app-credentials) can be limited to one folder, such as `payments`, so group each application's secrets under one folder.

## What a secret holds

A secret is a set of key/value pairs, stored as one JSON object:

```json
{ "username": "app", "password": "s3cr3t", "host": "db.internal", "port": "5432" }
```

A read returns the whole object, so keep values that are used together in one secret: one read gives your app everything it needs to connect. A secret can be up to 48 KiB. Store large files in [Object Storage](/docs/infrastructure/object-storage) and keep only the access details here.

## Versions

Every save creates a new **version**, numbered `1`, `2`, `3`…. Reads return the latest version unless you ask for an older one (`bao kv get -version=2 …`).

* **Versions to keep.** Each secret keeps its last N versions. N is the workspace default you choose when you enable Secret Manager (1–1,000; 10 if you don't change it). The workspace default can't be changed later, but you can set a different number on any secret.
* **The oldest goes first.** When a save would exceed the limit, the oldest version is destroyed permanently.
* **Every kept version is billed**, including deleted ones that haven't been destroyed. See [Pricing](/docs/tools/secret-manager/pricing).

### Check-and-set

Check-and-set (CAS) stops two people or programs from overwriting each other's changes. A write says which version it expects to replace:

| CAS value | Meaning                                                                                  |
| --------- | ---------------------------------------------------------------------------------------- |
| `0`       | Create only. Fails if the secret already exists.                                         |
| `N`       | Replace version N. Fails if someone saved a newer version in the meantime.               |
| Not sent  | Overwrite whatever is there (allowed unless the secret has **Require check-and-set** on) |

The portal always uses check-and-set. If someone else saved first, it shows **Someone else saved a newer version** and saves nothing.

### Delete, undelete, destroy and roll back

| Action                     | What happens                                                                     | Can it be undone? | Still billed?                            |
| -------------------------- | -------------------------------------------------------------------------------- | ----------------- | ---------------------------------------- |
| **Delete** a version       | The version is hidden; reads of it fail                                          | Yes: **Undelete** | Yes, until destroyed                     |
| **Undelete** a version     | A deleted version is readable again                                              | –                 | Yes                                      |
| **Destroy** a version      | The version's value is erased                                                    | No                | No                                       |
| **Roll back** to a version | The old version's values are saved as a new, latest version. Nothing is deleted. | Roll back again   | The new version is billed like any other |
| **Delete secret**          | The secret, all its versions and its settings are removed                        | No                | No                                       |

Destroying or deleting the latest version means apps reading the secret fail until you save a new version.

**Hide versions after** (a secret setting, also called `delete_version_after`) deletes versions automatically once they are older than 30 or 90 days. Deleted versions are still stored and billed, so it isn't a way to save money; lower **Versions to keep** instead.

## Who can sign in

| Who                                    | How                                                                                           | Lifetime                                | Can do                                                                                            |
| -------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------- | ------------------------------------------------------------------------------------------------- |
| People in the portal                   | Your IBEE sign-in                                                                             | Your portal session                     | What your [workspace role](/docs/tools/secret-manager/access-and-security#workspace-roles) allows |
| People at a terminal                   | **Get a 60-second CLI session** on the **Connect** tab                                        | 60 seconds, not renewable               | What your workspace role allows                                                                   |
| Applications, VMs, CI jobs, Kubernetes | An [app credential](/docs/tools/secret-manager/app-credentials) (AppRole Role ID + Secret ID) | Token: 1 hour, renewable up to 24 hours | Read only or read & write; every secret or one folder                                             |

## Workspace states

| State                      | Shown in the portal | What works                                                                                                                                                        |
| -------------------------- | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Active**                 | –                   | Everything                                                                                                                                                        |
| **Read-only** (restricted) | **Read-only** chip  | Reading values, listing and cleanup (delete, destroy). Saving values, new app credentials and new Secret IDs are refused; every app credential becomes read only. |
| **Suspended**              | **Suspended** chip  | No one can read secret values: not the portal, the CLI or your apps. Metadata, history and cleanup still work in the portal.                                      |

A workspace becomes read-only or suspended when IBEE restricts the organization, for example over unpaid billing. It returns to **Active** when the restriction is lifted; no client changes are needed.

## Related pages

* [Enable Secret Manager](/docs/tools/secret-manager/enable)
* [Manage secrets in the portal](/docs/tools/secret-manager/manage-secrets)
* [Access and security](/docs/tools/secret-manager/access-and-security)