The Simplest Way to Make 1Password and Step Functions Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Teams pair 1password and step functions to pull stored secrets into cloud workflows. This setup lets state machines call external tools without hardcoding keys in code. In production, state machines orchestrate tasks across databases, APIs, and internal services. Those tasks need valid keys or passwords to log in and run work. Keeping those secrets inside a vault reduces secret sprawl across cloud accounts. How 1password and step functions share keys and permissions 1Password stores API toke

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

Teams pair 1password and step functions to pull stored secrets into cloud workflows. This setup lets state machines call external tools without hardcoding keys in code.

In production, state machines orchestrate tasks across databases, APIs, and internal services. Those tasks need valid keys or passwords to log in and run work. Keeping those secrets inside a vault reduces secret sprawl across cloud accounts.

How 1password and step functions share keys and permissions

1Password stores API tokens, database passwords, and service keys inside isolated vaults. AWS Step Functions runs multi-step workflows that coordinate compute tasks and API calls. The workflow itself should never hold raw passwords in its state payload.

Instead, a workflow step triggers a small compute task to fetch the secret. That compute task uses a scoped service token to read from a specific vault. Once the task gets the key, it calls the downstream service right away.

After the call finishes, the task drops the key from memory. It returns only the safe status data back to the state machine. This keeps secrets out of execution history logs and state payloads. Your team can debug failed steps without exposing passwords in the cloud console.

Common failure modes with shared tokens and state logs

Many teams start by sharing one broad service token across all workflows. If one workflow leaks that token, an attacker can read every vault item. A better rule is to create one vault per workflow or team. Then you scope each token to read only the vault it needs.

Another common failure happens when a task passes a secret between two steps. Step Functions logs the input and output of every state transition by default. If a secret sits in that payload, anyone reading the logs can see it. Always fetch the secret inside the exact step that uses it.

Application-to-Application Password Management + Cloud Functions IAM: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Unlogged database queries also create blind spots during security reviews. A state machine might pull a database password from a vault and run SQL. The vault log shows that a token read the password at a specific time. Still, it does not show which SQL queries ran or what data returned.

Scoping network paths and roles for production runs

To lock down your workflows, start with strict IAM roles for each state machine. Give each state machine permission to invoke only its required compute tasks. Never attach broad admin roles to a workflow that handles production data.

Next, place your workflow compute tasks inside a private network subnet. Use network rules to control where those tasks can send traffic. Allow outbound calls only to your vault endpoints and the exact target services.

You should also rotate service tokens on a fixed schedule. When you keep vault scopes small, rotating a token will not break other workflows. Check your vault read logs often to spot unusual spikes in secret requests. Clear role separation makes every automated run easier to audit and fix.

Check database and API queries on the wire

Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.

Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.

Frequently asked questions

Should Step Functions store secrets in state payloads?

No, you should never put secrets into state payloads. State history logs record all inputs and outputs, which exposes secrets to console viewers.

How do compute tasks log in to a 1Password vault?

A compute task uses a scoped service account token to log in. This token grants read rules for one vault without needing a human user.

How can teams protect PII returned to a workflow?

Keep raw PII out of state payloads whenever you can. Masking tools can also rewrite emails, phone numbers, and card numbers in query results.

The query runs. The emails stay hidden.