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

Published
Length
3 min read

Luis Felipe Dias

All posts

Teams use fortigate and step functions together to automate network rule updates in production. The state machine runs cloud tasks that send rule changes to the firewall API. This workflow saves time for platform teams. Engineers do not need to log in to the firewall console by hand. Instead, an event triggers a state machine run. The state machine checks the request, gets approval, and updates the firewall policy. How fortigate and step functions share keys and data Data moves between these

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 use fortigate and step functions together to automate network rule updates in production. The state machine runs cloud tasks that send rule changes to the firewall API.

This workflow saves time for platform teams. Engineers do not need to log in to the firewall console by hand. Instead, an event triggers a state machine run. The state machine checks the request, gets approval, and updates the firewall policy.

How fortigate and step functions share keys and data

Data moves between these two tools over HTTPS calls. The cloud state machine acts as the orchestrator for each step. It calls a compute function that sends requests to the firewall management port. The firewall reads the request, updates its local table, and returns a status code.

To log in, the compute task needs an API key from the firewall. Admins create an admin profile on the firewall with tight limits. They then generate a token for that profile. The cloud secret store holds this token so tasks can read it at run time.

The state machine passes small JSON payloads from one step to the next. These payloads hold source IP addresses, port numbers, and rule actions. If the firewall rejects a change, the state machine catches the error code. It can then retry the call or run a rollback task to fix the state.

Common failure modes and how to scope roles

Many teams make mistakes when they first link these two systems. The biggest risk is using a shared admin key with full system rights. If that key leaks, an attacker can wipe out every firewall rule. Another failure mode is leaving the firewall management port open to the public internet.

Unlogged changes also cause big problems during an audit. When five different workflows use the same token, firewall logs show one user. You cannot tell which workflow or person changed a rule. Also, state machine logs might record sensitive data like emails or phone numbers in plain text.

Cloud Functions IAM + End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

You can fix these issues with strict role limits and private network paths. First, create a separate firewall admin role for each workflow. Give a blocklist workflow rights to edit only address groups, not system settings. Second, give the cloud compute task a tight IAM role. It should read only the single secret it needs for that job.

Always route traffic over a private link, a transit network, or a site-to-site tunnel. Never send management traffic over public routes. Finally, turn on full logging in both tools and mask sensitive fields. Masking rewrites matched fields like card numbers or national IDs in results before logs save them.

Building a reliable approval and rollback flow

Network changes can break live apps if they run without a check. Good workflows pause before they push a big change to the firewall. The state machine can send a pause token to a chat room or ticket tool. A senior engineer checks the planned IP range and clicks approve.

Once the engineer approves, the workflow resumes and writes the new rule. After the firewall confirms the write, the next step runs a health check. If the app fails the health check, the state machine triggers a rollback step. This step deletes the new rule and puts the old setting back right away.

Govern statements and responses across databases and APIs

Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev runs beside each supported service as an open-source proxy, a sidecar for your database or API.

First, hoop.dev guardrails block banned queries before they run. Then hoop.dev data masking rewrites matched sensitive values in responses in memory. The audit trail records every statement and verdict per resource. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.

Frequently asked questions

How does a cloud state machine reach an on-prem firewall?

The state machine triggers a serverless task inside your private cloud network. That task sends HTTPS requests over a VPN tunnel or direct link to the firewall.

What happens if the firewall API times out during a run?

You can set retry rules on the task step in your workflow. If all retries fail, the state machine jumps to a catch block and alerts your team.

How should we rotate the firewall API token used by workflows?

Run a scheduled task in your secret manager to generate a new firewall key. Update the stored secret so the next workflow run reads the fresh key right away.

The query runs. The emails stay hidden.