Skip to main content
By the end of this guide a workflow calls an API with a bearer key, and the key is in no step input, run state, log, message or model context. The worker fetches the value for one step attempt and writes it only into the outgoing request header. HTTP: secrets is the full rule set; this guide walks through one call.

Before you begin

  • The reliant CLI, 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 staging of a project named guides-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. secret set reads the value from stdin, so it stays out of your shell history:
terminal
Nothing reads a hosted value back, this command included. 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
Keep the URL a literal you trust. The key goes to whatever host the request starts at, so never build that origin from an input, a webhook payload or model output. The response is under nodes.call.data (status, headers, json, text). nodes.call.is_error is true when the call failed.
3

Check it locally

terminal
Both pass. Lint warns [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:
terminal
When someone enables an automation of this workflow, its approval card lists the secret too.
5

Run it and verify

Commit the workflow, then run it:
terminal
The run ends at 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)
The input holds a placeholder, never the value. The worker replaced the echoed value with [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 run step 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 FileSecrets store has none.

Troubleshooting

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