Shared Secrets
A shared secret belongs to the organization instead of one agent. You store its value once and link it to each agent that needs it. A linked agent reads the value as an environment variable, under the name the link sets.
Add a secret
Organization > Shared Secrets lists the organization's secrets, the agents that use each one, and the actions for it. Organization admins and developers can add, link, replace, and delete secrets.
- Choose Add secret and enter a name and a value. Values are write-only: no page or API response shows them again.
- Choose Link agent on the secret's row.
- Pick the agent and the environment variable name it reads the value as, such as
FIRM_DATA_URL.
Linking also needs permission to change the agent. A secret links only to agents of its own organization.
Names
A link is refused when the agent already defines a secret of the same name, in any scope or branch. Defining an agent secret under a linked name is refused too. Names reserved for the runtime environment cannot be linked.
The agent's Secrets page lists linked secrets as shared from the organization. Change or unlink them on the Shared Secrets page.
Least privilege
Two secrets can link under the same environment name to different agents. For a database that one agent writes and others read, store a writer URL and a read-only role URL. Link the writer URL to the writing agent and the read-only URL to the reading agents, both as FIRM_DATA_URL.
Any tool code in a linked agent can read the secret.
Rotation
Choose Replace to set a new value. The linked agents receive it at their next machine boot or deploy. Running deploys keep the value they started with, so redeploy an agent that needs the value at once.
A secret that is still linked cannot be deleted. Unlink it from every agent first.