Before you begin
- The
reliantCLI, v1.21 or later, signed in (Sign in and tokens), as an organization owner or admin: only they can store a secret or allow a workflow to use it. - A forge project with a hosted environment to hold the secret. This guide uses
stagingof a project namedguides-sandbox-webhook(Secrets). - A Reliant project for the repository the workflow lives in, and its ID (
reliant project list).
1
Store the key
Run this in the forge project. Nothing reads a hosted value back, this command included.
secret set reads the value from stdin, so it stays out of your shell history:terminal
reliant forge env secret list --env staging calls the key “inert”, because no workload declares it. A workflow-only secret is meant to look like that.2
Declare the secret and put it in a header
secrets: names the environment as <forge project>/<env>. The reference {{ secrets.DEMO_API_KEY }} is allowed only in a credential slot: an http/request@1 header, or credential: { secret: NAME } on an integration action..reliant/workflows/check-api-key.yaml
nodes.call.data (status, headers, json, text). nodes.call.is_error is true when the call failed.3
Check it locally
terminal
[scenario-none] until you add scenarios; a scenario mocks the call step, so no secret is fetched. A secret anywhere but a credential slot fails validation:4
Allow the workflow to use it
A secret’s access list names the workflows that may use it, by Reliant project and workflow name:When someone enables an automation of this workflow, its approval card lists the secret too.
terminal
5
Run it and verify
Commit the workflow, then run it:The run ends at The input holds a placeholder, never the value. The worker replaced the echoed value with
terminal
report with The API answered 200; authenticated: true. httpbin’s /bearer echoes the token it received, which makes it a good test of what the run kept. The call step’s recorded input and output:call step (recorded)
[secret] before anything recorded it. An agent step that reads nodes.call.data sees only that.6
Revoke and clean up
terminal
deny takes effect on the next step that asks for the value: the next run of check-api-key failed with the access-list refusal below. unset soft-deletes the value and keeps its version history.What this does not do
- It does not make the API you call trustworthy. The remote server receives the key. Only an exact echo is replaced with
[secret]; an API that returns the key encoded or reworded returns it readable. Send a secret only to the API it belongs to. - Agents and commands never get the value. A
runstep can’t take a secret at all, and text that reaches a step as data, such as a prompt, a model’s output or an input, is never treated as a secret reference, even if it contains{{ secrets.NAME }}. - The access list names a workflow, not a URL or a step. Any step of an allowed workflow may put the secret in a header, so the workflow’s URLs are the boundary. Review them like code.
- Access lists are for hosted environments. A local
FileSecretsstore has none.
Troubleshooting
workflow "check-api-key" may not use secret DEMO_API_KEY in guides-sandbox-webhook/staging
workflow "check-api-key" may not use secret DEMO_API_KEY in guides-sandbox-webhook/staging
The workflow is not on the secret’s access list. The message suggests
forge env secret allow DEMO_API_KEY --env staging --workflow check-api-key. Add --project <Reliant project id>, which the command requires. The step reports the refusal as is_error, so the run above ended at failed.CEL compilation error: undefined field 'status'
CEL compilation error: undefined field 'status'
An action’s result is under
data: write nodes.call.data.status, not nodes.call.status.Next steps
Start an agent from a webhook
Start a run from an incoming request, then call out with the key.
HTTP integration
Every
http/request@1 parameter, credential slots and transport rules.Reliant security model
How write-only hosted secrets and credential slots fit together.
Secrets reference
Hosted secret stores, versions and protected environments.