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
- A workspace admin creates the credential and copies the Role ID and Secret ID.
- You give both to the application: environment variables, files, or a Kubernetes Secret.
- 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.
- 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.
Before you begin
- Secret Manager is enabled in the workspace.
- Your organization’s identity verification is complete.
Choose the access
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 underpayments/.
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:
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:
Give the credential to your application
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
Manage app credentials with the API
The IBEE API 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
Logins, token renewals and lookups aren’t billed.
