Manage account secrets
This guide covers creating, listing, updating and deleting account secrets, and choosing the projects that may use each one.
Account secrets can be shared with specific projects in your account. Use them for credentials that more than one project needs.
Secret names cannot begin with WORKFLOW_ — that prefix is reserved for the platform's own entries in the secrets namespace. See Secrets.
Everything here requires the Admin or Owner role on the account; in an organization, Secrets appears in the main navigation only for Admins and Owners. Creating, updating and deleting a secret, and changing its allowed projects, also need a verified email. Updating, deleting and changing allowed projects need a sign-in from the last two hours as well: when yours is older, the platform asks you to sign in again. See Permissions and restrictions.
Create an account secret
With the CLI:
swale secret account add \
--name SHARED_API_KEY \
--value my-secret-value \
--allowed-project project-a \
--allowed-project project-b
In the UI:
- Open Secrets in the main navigation.
- Click Create secret.
- Enter a name in Secret name (for example,
SHARED_API_KEY). - Enter the value in Secret value.
- Under Allowed projects, check each project that may use the secret.
- Click Create secret.
The value is write-only — you cannot read it back after saving.
List account secrets
With the CLI:
swale secret account list
To see one secret's allowed projects:
swale secret account get --name SHARED_API_KEY
In the UI: open Secrets in the main navigation. Click the Edit icon for a secret to see its allowed projects.
Neither shows a secret's value.
Update a secret value
With the CLI:
swale secret account update \
--name SHARED_API_KEY \
--value my-updated-secret-value
In the UI:
- Open Secrets in the main navigation.
- Find the secret.
- Click the Edit icon for the secret.
- Enter the new value in New secret value and click Save changes.
Configure allowed projects
Only the projects in an account secret's allowed projects can use it:
With the CLI:
Add a project:
swale secret account allowed-projects add \
--name SHARED_API_KEY \
--project-name project-c
Remove a project:
swale secret account allowed-projects remove \
--name SHARED_API_KEY \
--project-name project-b
In the UI:
- Open Secrets in the main navigation.
- Find the secret.
- Click the Edit icon for the secret.
- Check or uncheck projects in the Allowed projects section to grant or revoke access.
- Click Save changes.
A secret with no allowed projects is available to no project.
Deleting a project removes it from every secret's allowed projects, and restoring the project does not add it back.
Delete a secret
With the CLI:
swale secret account delete \
--name SHARED_API_KEY
In the UI:
- Open Secrets in the main navigation.
- Find the secret.
- Click the Delete icon and confirm by clicking Delete.
Workflows that reference this secret after deletion receive an empty string for the secret expression. Tasks that depend on the secret value may fail at runtime.