Dagster Agent Workflow
A dagster agent workflow uses a local worker to poll a control plane for jobs. The agent then starts isolated compute tasks inside your own private network. Data teams often set up this agent with one broad cloud role. That role lets the agent start containers and read secret keys. When that role is too wide, every pipeline shares the same database permissions. A bad script or a mistake in one job can change production tables. How the dagster agent workflow operates The architecture splits or
Agentic Workflow Security + Open Policy Agent (OPA): the complete guide
Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.
A dagster agent workflow uses a local worker to poll a control plane for jobs. The agent then starts isolated compute tasks inside your own private network. Data teams often set up this agent with one broad cloud role. That role lets the agent start containers and read secret keys. When that role is too wide, every pipeline shares the same database permissions. A bad script or a mistake in one job can change production tables.
How the dagster agent workflow operates
The architecture splits orchestration into a control plane and a user data plane. The control plane manages schedules, checks asset status, and holds the job queue. It does not touch your raw code or your private data stores. Your data plane runs inside your own cloud account or local server cluster. The agent sits inside this private network and makes outbound calls for work.
When a schedule triggers a run, the control plane logs a new request. The agent polls the queue, sees the request, and pulls the job metadata. Next, the agent talks to your container host to launch an isolated worker. That worker loads your pipeline code and runs the data steps. During the run, the worker sends status logs back to the control plane. Once the job finishes, the container shuts down and frees up compute resources.
What native agent roles solve and what they miss
This hybrid design solves a major network security problem for data teams. You do not need to open inbound firewall ports to your private network. You also keep your source code and raw data inside your own boundary. Cloud roles let you pick which servers the agent can start and stop. You can also set rules for which secret keys a worker can read.
Still, host roles only check who logs in when a container starts up. They do not inspect the actual queries or commands a job sends later. Once a worker gets a database key, it has full power for that role. A broken asset script can drop a table or read raw customer rows. Standard agent logs show job status, not the exact SQL queries in flight. Plus, static keys in worker memory can leak if a log dumps variables. Masking tools that rewrite emails, phone numbers, or card numbers in results are absent. Teams need a way to check every command and hide sensitive fields live.
Agentic Workflow Security + Open Policy Agent (OPA): architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Scoping permissions across pipeline workers
To reduce risk, teams should split permissions by job type and data stage. Do not give the main agent role direct rights to read data tables. The agent only needs rights to start workers and pass down task roles. Give each pipeline worker its own narrow role for the tables it needs. A marketing job should not hold keys for finance tables or production apps.
You should also separate test runs from production runs at the worker level. When developers test code, their workers should use read-only database roles. Only scheduled production jobs should hold write keys for core tables. Even with narrow roles, a worker with read rights can pull sensitive fields. Teams must pair narrow worker roles with query checks and field masking rules. Rewriting national IDs or card numbers in query results keeps test logs safe.
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
Does the control plane ever read my raw database rows?
No, the control plane only reads job metadata, asset names, and status logs. Your local worker runs the code and talks to your database inside your network.
What happens if the agent loses contact with the control plane?
Running jobs will keep working inside your network until they finish their steps. New queued jobs will wait until the agent reconnects and polls the queue again.
How can I stop a pipeline job from reading raw customer fields?
Worker roles alone cannot filter individual columns or rows inside a SQL query. You must route worker database traffic through a layer that rewrites emails or card numbers.
Related guides
In this post