Docs
/
Security

Keys and secrets

Hub env secrets stay on the server—reference {{env.KEY}} in graphs, redacted in traces and audit, with Pro role-based key grants.

All plans

Hub secrets (env vars and OAuth connection credentials) never leave Smia's server. You name keys in tool config; you never paste values into chat or caller arguments.

Public trust summary: smia.io/security (encryption at rest, tokens not returned to the browser).

Authoring: {{env.KEY}}

Interpolation runs on saved text fields—http.request URL/headers/body, file.fetch, templates, and similar. Pattern:

Authorization: Bearer {{env.ACME_API_TOKEN}}

Redaction

SurfaceBehavior
Run traces (Pro stored detail)Expanded env values become [redacted:env.KEY]; OAuth/header secrets stripped (src/usage/trace.ts)
Audit logSecret-bearing keys removed entirely—no placeholders (src/audit/redact.ts)
Errors to callersSensitive inputs scrubbed; env values not echoed (src/graph/sensitiveInputs.ts)

Webhook tokens (smia_wh_…) and Stripe-style keys are scrubbed from audit strings.

Key grants (Pro)

On Pro, hubUsesRoleRbac enables role-based key access:

CapabilityMeaning
keys.manageCreate/view/edit secret values; holders may build with any key
keys.grantChoose which roles may use a secret (required with tools.build or server.members.manage on roles that use keys)
keys.bindBind secrets to tools; bind/save checks enforce grants

A builder without a grant for a key used in a graph gets 403 env_access_denied on save or test. Already-saved tools keep running if a grant is removed later—only new edits and binds are blocked.

Free and Hobby do not use role-based key limits (rbac: false); hub admins manage env vars; every member can call every tool on granted servers.

Assign grants via API/MCP (set_env_var_roles, role capabilities) or hub settings—not via the unreleased unified Roles UI.

Example

Ops stores ZAPIER_HOOK_SECRET in hub env. The ingest_lead tool references {{env.ZAPIER_HOOK_SECRET}} in an HTTP node. Sales calls ingest_lead from the product server URL with only business fields in args—never the secret. Traces show [redacted:env.ZAPIER_HOOK_SECRET] if Pro run detail is stored.

Verified against commit aae68ddd0a3c9597d8481c376d33eb3ca2effcb3 on 2026-11-26.