> 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.

# App credentials

> Give each application, VM, CI job or Kubernetes cluster its own login to IBEE Secret Manager - an AppRole Role ID and Secret ID with read-only or read-write access to every secret or one folder. Create, hand over, rotate and revoke app credentials.

An **app credential** is a login for software, not a person. It has a **Role ID** (like a username, not secret) and a **Secret ID** (like a password, shown once). Your application exchanges them for a token at `auth/approle/login` and reads secrets with that token. Each credential is **read only** or **read & write**, for **every secret** in the workspace or **one folder**. Give every application its own credential, with the least access it needs.

## How it works

1. A workspace admin creates the credential and copies the Role ID and Secret ID.
2. You give both to the application: environment variables, files, or a Kubernetes Secret.
3. The application signs in and gets a token that lasts **1 hour** and can be renewed for up to **24 hours**. After that it signs in again.
4. To change the Secret ID, you issue a new one; the old one stops working at once. To cut the application off entirely, you revoke the credential.

```bash
export VAULT_ADDR=https://secrets.ibee.ai
export VAULT_NAMESPACE=acme-payments
export VAULT_TOKEN=$(bao write -field=token auth/approle/login \
  role_id="$ROLE_ID" secret_id="$SECRET_ID")
bao kv get -mount=secret payments/db
```

## Before you begin

* Secret Manager is [enabled](/docs/tools/secret-manager/enable) in the workspace.
* Your organization's [identity verification](/docs/getting-started/account-setup/verify-your-identity) is complete.

## Choose the access

| Access                      | Folder                                                                                         | The application can                                                                    |
| --------------------------- | ---------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| **Read only** (recommended) | None: "Every secret in the workspace, and read access to IBEE-managed secrets."                | Read and list every secret in `secret/` and `ibee-managed/`                            |
| **Read only**               | For example `payments`: "Only secrets under payments/. IBEE-managed secrets are not included." | Read and list `secret/payments/…` only                                                 |
| **Read & write**            | None or a folder                                                                               | Also create secrets, save new versions, and delete or undelete versions, in that scope |

A read & write credential can't destroy versions, delete a whole secret, or change a secret's settings (metadata). People do those in the portal.

## Create an app credential

### Open app credentials

Open your organization. In the sidebar, under **Organization**, click **API Tokens**, then the **Secret Manager** tab. You can also start from the workspace: **Secret Manager → Connect**, under **Sign in**.

### Start a credential

Click **Create App Credential**. The dialog says "A login your app uses to read secrets from one workspace and location."

### Fill in the details

* **Name**: for example `payments-api`. Letters, numbers, dots, dashes or underscores, up to 64 characters, unique in the workspace.
* **Workspace** and **Location**: where the secrets are.
* **Access**: **Read only** ("Recommended for apps that only use secrets") or **Read & write** ("Also create, update and delete secrets").
* **Folder (optional)**: for example `payments`, to limit the credential to secrets under `payments/`.

Click **Create credential**. Setup takes a few seconds; the portal then issues the first Secret ID.

### Copy the Secret ID

A dialog titled with the credential's name, for example **payments-api is ready**, says "Copy the secret ID now. It is shown only once." It shows the **Role ID**, the **Secret ID**, the address and the namespace. Click **Copy all as environment variables** to copy:

```bash
export VAULT_ADDR=https://secrets.ibee.ai
export VAULT_NAMESPACE=acme-payments
export ROLE_ID=<role id>
export SECRET_ID=<secret id>
```

Store them where the application reads its configuration (see below), then click **I saved the secret ID**.

### Verify it worked

The credential appears in the list with the status **Active** and **Issued** and the date under **Secret ID**. From a terminal with the four variables set:

```bash
export VAULT_TOKEN=$(bao write -field=token auth/approle/login role_id="$ROLE_ID" secret_id="$SECRET_ID")
bao token lookup    # shows the token's policies and remaining time
```

## Give the credential to your application

| Where it runs                  | How to hand it over                                                                                                                                                  |
| ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| A server, VM or container      | Environment variables `ROLE_ID` and `SECRET_ID`, or files readable only by the app's user                                                                            |
| A long-running process         | [`bao agent`](/docs/tools/secret-manager/connect-apps#keep-a-token-fresh-with-bao-agent) with `role_id` and `secret_id` files; the agent signs in and renews for you |
| Kubernetes                     | A Kubernetes Secret holding the Secret ID, referenced by External Secrets Operator. See [Kubernetes](/docs/tools/secret-manager/kubernetes).                         |
| CI (GitHub Actions, GitLab CI) | Two masked CI secrets, `ROLE_ID` and `SECRET_ID`; sign in at the start of the job                                                                                    |

Never put the Secret ID in source code, a container image, or logs.

## Issue a new Secret ID (rotate)

In the credential's row, click **New secret ID**, then **Issue new secret ID** in **Issue a new secret ID**.

* The new Secret ID is shown once. Copy it and update the application.
* The previous Secret ID stops working **at once**: the application can't sign in with it again.
* Applications already signed in keep their token until it expires, within a day.

Issue a new Secret ID when someone who had it leaves, if it may have leaked, or on a regular schedule. Update the application before its current token runs out.

## Revoke an app credential

In the credential's row, click **Revoke**, then **Revoke credential**. Apps using the credential "lose access within seconds, including ones already signed in." The toast reads **App credential revoked**. Revoking can't be undone; create a new credential if you need one again.

## The credentials list

| Column          | Shows                                                         |
| --------------- | ------------------------------------------------------------- |
| **Name**        | The credential's name ("AppRole")                             |
| **Access**      | "All secrets" or `{folder}/`, with the workspace and location |
| **Permissions** | **Read only** or **Read & write**                             |
| **Created**     | When it was created                                           |
| **Secret ID**   | **Issued** with the date, or **Not issued**                   |
| **Status**      | **Active**, **Setting up** or **Revoking**                    |

## Manage app credentials with the API

The [IBEE API](/docs/tools/secret-manager/api#app-credentials) has the same actions: list, create, issue a Secret ID and revoke. The token needs `secret-manager.read` to list credentials and `secret-manager.write` to change them.

## Limits

|                               | Value                                                                                                                         |
| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| App credentials per workspace | 50 (revoked ones don't count)                                                                                                 |
| Name                          | 1–64 characters: letters, digits, `.`, `_` and `-`, starting with a letter or digit; unique among the workspace's credentials |
| Secret ID                     | No expiry and no use limit, until you issue a new one or revoke the credential                                                |
| Token from a login            | 1 hour, renewable up to 24 hours                                                                                              |
| Logins                        | 5 per second from one IP address                                                                                              |

Logins, token renewals and lookups aren't billed.

## Troubleshooting

| You see                                                                      | What it means                                                                                         | What to do                                                                                                                           |
| ---------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `409` `app_credential_limit` — "This workspace has the most app credentials" | 50 credentials exist                                                                                  | Revoke unused ones                                                                                                                   |
| `409` `app_credential_name_taken`                                            | Another credential has the name                                                                       | Choose another name                                                                                                                  |
| `409` `app_credential_pending`                                               | The credential is still being set up                                                                  | Wait a few seconds and try again                                                                                                     |
| `400` on `auth/approle/login`, saying the role or secret ID is invalid       | The Secret ID was replaced, the credential was revoked, or a value was copied wrongly                 | Issue a new Secret ID and update the app                                                                                             |
| `403` `permission denied` when reading                                       | The secret is outside the credential's folder, or in `ibee-managed/` with a folder-limited credential | Use a credential for that folder, or one with no folder                                                                              |
| `403` `permission denied` when writing                                       | The credential is read only, or the workspace is read-only                                            | Use a read & write credential; see [Workspace states](/docs/tools/secret-manager/concepts#workspace-states)                          |
| `403` on login at the root namespace (`bao agent`)                           | The namespace is set only in the agent's `vault {}` block                                             | Set `namespace` on the `approle` method. See [bao agent](/docs/tools/secret-manager/connect-apps#keep-a-token-fresh-with-bao-agent). |

## Related pages

* [Read secrets from your app](/docs/tools/secret-manager/connect-apps)
* [Kubernetes with External Secrets](/docs/tools/secret-manager/kubernetes)
* [Access and security](/docs/tools/secret-manager/access-and-security)