Skip to main content

Secrets

Secrets are sensitive values — signing keys, account IDs, passwords, tokens — stored encrypted in your project. Workflows reference a secret by name, so the value never appears in the workflow definition, and Blokkio masks the value wherever it would otherwise show up in a run.

Secrets or connections?​

Secrets hold values that aren't credentials to a service: a webhook signing key, an account ID, a setting that differs per environment. For API keys, tokens and passwords that sign you in to a service, use a connection: connections handle sign-in, token refresh, domain pinning and health checks for you.

The two work together. A connection field can reference a secret with Use secret, which stores secret://NAME instead of the value. The connection then always uses the secret's current value, for the run's environment. See Secrets vs. connections.

The Secrets page shows this as a short explainer at the top.

Creating a secret​

Go to Secrets in the sidebar and click New Secret.

FieldRequiredDescription
NameYesThe name you use in expressions, e.g. SLACK_SIGNING_SECRET. Case-sensitive, unique within the project.
Stored inYesBlokkio (encrypted), or one of your workspace's secret stores (Azure Key Vault, AWS Secrets Manager, HashiCorp Vault). Only shown when the workspace has a store; the default store is preselected.
Name in the vaultWith a storeThe entry in the vault, e.g. stripe-api-key or prod/db#password.
ValueYes (Blokkio)Same value in every environment (the default) or Different value per environment. Then the secret value, write-only: it is never shown or returned by the API after you save it. With a store it is optional: leave it empty to use the entry already in the vault, or enter a value to save it there. With different values it is the default value.
Value per environmentNoWith Different value per environment: a value (or, with a store, a vault entry name) for any of the project's environments. See per-environment values.
ExpiryNoOptional expiry date. Blokkio notifies you before and after it passes.
DescriptionNoA note about what the secret is for (max 250 characters).

To change a value later, open the secret and type a new value. Leaving Value blank keeps the current one.

When you open an existing secret you also see where it is used (see Used by) and can change its per-environment values. Update saves everything together; Cancel discards it.

Used by​

Open a secret to see its Used by list: the workflows and connections that reference it.

EntryWhen it is listed
Workflow (workflow icon)An expression in the workflow uses $secrets.NAME or $secrets['NAME']
Connection (plug icon)A connection field, or one of the connection's environment overrides, holds secret://NAME. The field name is shown next to the connection, for example token

If nothing references the secret, the list says No workflow or connection references this secret yet. Check the list before you rename or delete a secret: a renamed secret no longer matches secret://OLD_NAME, and a connection whose referenced secret is missing fails with an error that names the field and the secret.

Viewing a secret (Viewers)​

Members with the Viewer role see the Secrets list and can open any secret read-only: in the list, open the ⋯ menu of a secret and choose View. They see:

  • where the value is stored (Blokkio (encrypted) or the secret store) and, for a store, the name in the vault;
  • the description and expiry date;
  • whether the value is the same in every environment, or which environments have their own value (or vault entry), when each changed and who changed it;
  • the Used by list.

They never see a value: Blokkio doesn’t return values to anyone after they are saved. There are no fields or buttons to change the secret; the API refuses changes from Viewers (SecretsWrite). See Roles and permissions.

Using secrets in expressions​

Reference a secret with the $secrets root:

{{ $secrets.SLACK_TOKEN }}
{{ $secrets['signing-key'] }}

Use bracket notation when the name contains characters such as -. For example, an HTTP Request header:

HeaderValue
AuthorizationBearer {{ $secrets.CRM_API_TOKEN }}

:::warning Reference secrets literally Blokkio looks up the secrets an expression needs before it runs, by scanning for $secrets.NAME and $secrets['NAME']. A name built at runtime (for example $secrets['KEY_' + $vars.region]) is not resolved. Write the full name, and use If/Else or Switch to choose between secrets. :::

In the editor's expression preview, secret values are shown as •••••• — previews never reveal the real value.

For credentials that belong to an external service (OAuth2 tokens, API keys, basic-auth passwords), prefer a connection: connections also handle authentication headers, token refresh and domain pinning for you. If the value must also live in a secret, reference it from the connection field with Use secret.

Using secrets in connections​

In the connect dialog of an app, click Use secret next to a field and pick a secret. The field stores secret://NAME and shows the secret's name as a chip. Each time the connection is used, Blokkio resolves the reference with the run's environment: the secret's environment value if it has one, otherwise its default value. Rotating the secret therefore updates every connection that references it. See Secrets vs. connections for which fields accept references and the full resolution order.

Masking in outputs, logs and errors​

While a workflow runs, Blokkio remembers every secret value it resolves for that execution. Before anything is stored or displayed, those values are replaced with ••••. This covers:

  • node outputs, inputs and variables shown in execution logs
  • node error messages
  • server-side application logs

For example, if an HTTP Request node echoes back a header containing your token, the stored output shows:

{ "headers": { "authorization": "Bearer ••••" } }

The JSON-escaped form of a value is masked too, so secrets embedded in serialized payloads are caught.

note

Values shorter than 4 characters are not masked (masking them would corrupt unrelated text). Masking replaces exact matches. If a workflow transforms a secret (for example base64-encodes or splits it), the transformed text is not recognised. Don't write secrets into outputs you don't need.

Per-environment values​

A secret can hold a different value for each environment. When a run executes in an environment, $secrets.NAME returns that environment's value. Runs without an environment, and environments without a value of their own, use the default value.

Set them when you create the secret or later in Edit:

  1. Under Value, choose Different value per environment.
  2. Enter the Default value.
  3. Each of the project's environments has a row that shows Uses default until you enter a value. For secrets kept in a secret store, each row asks for the name of a vault entry instead. Stores read by self-hosted workers only take entry names: set the values in the vault itself.
  4. Click Create or Update. The secret and every environment value are saved together: if one environment fails (for example a vault entry that doesn't exist), nothing is saved and the error shows on that environment's row.

To replace an environment's value, type the new value in its row. The field stays blank when the value is set: leave it blank to keep the current value. Runs in that environment keep using the old value until you save, then the new one; they never fall back to the default in between.

To clear an environment's value, click Clear on its row and confirm. Once you save, runs in that environment use the default value again. Choosing Same value in every environment clears all of them (after a confirmation that names the environments).

Each row also shows when its value last changed and who changed it. Values set before this was recorded show Unknown.

The Environments column of the Secrets list shows Same everywhere or the environments with a value of their own, for example Production · Staging. Choose Differs per environment next to the search box to list only those secrets.

If the project has no environments yet, the section links to Settings → Project → Environments.

Viewers can open a secret with View to see which environments have their own value, when it changed and who changed it (see Viewing a secret). They never see a value and can’t change anything.

:::note API POST /api/projects/{projectId}/secrets and PUT …/secrets/update accept environmentValues: [{ environmentId, value?, externalKey?, clear? }]. Errors about one environment are keyed environmentValues.{environmentId}. The older PUT / DELETE …/secrets/{secretId}/environments/{environmentId} endpoints still work for one environment at a time. :::

Expiry notifications​

If you set an expiry date, a daily check sends a notification:

  • Expiring soon: a warning when the secret expires within 7 days, with the number of days left
  • Expired: an error once the expiry date has passed

Notifications appear under the bell icon, and the Secrets page shows a banner while any secret needs attention. Rotate the value (open the secret, enter a new value, update the expiry) before workflows that use it start failing.

Security​

  • Values are encrypted at rest with AES-256-GCM, using a project-scoped context. Each stored value records which key version encrypted it, so keys can be rotated without breaking existing secrets.
  • Values are write-only: the API never returns them after creation.
  • Secrets are resolved server-side at execution time and are masked in outputs, logs and errors.
  • Secrets belong to one project and are never shared between projects.
  • Creating, updating and deleting secrets is recorded in the audit log, with one entry for each environment value set or cleared. Values are never logged.