The Simplest Way to Make Active Directory and Fortigate Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Teams pair Active Directory and Fortigate to map user groups directly to firewall rules. This setup lets admins control network traffic based on real user roles. Instead of managing static IP addresses, you manage people and teams. When a user logs into a domain computer, the firewall learns their group. Then the firewall applies the right network rules for that specific person. This workflow keeps network rules clean and easy to audit across offices. How Active Directory and Fortigate share

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 Active Directory and Fortigate to map user groups directly to firewall rules. This setup lets admins control network traffic based on real user roles.

Instead of managing static IP addresses, you manage people and teams. When a user logs into a domain computer, the firewall learns their group. Then the firewall applies the right network rules for that specific person. This workflow keeps network rules clean and easy to audit across offices.

How Active Directory and Fortigate share identity data

The directory holds all user accounts, passwords, and security groups in one place. The firewall needs to read this group data to enforce network policies. You can link the two systems using standard directory lookups or logon collectors.

In a standard lookup, the firewall asks the directory to check a user password. This happens when someone logs into a VPN or a web portal. The directory checks the password and sends back the list of user groups. The firewall matches those groups to its own rule table right away.

For office networks, teams often use a logon collector on the domain controller. The collector watches for domain logons and maps each user to their current IP. It sends this user and IP map to the firewall every few seconds. Users get the right network rules without typing their password a second time.

Common failure modes and how to scope roles

Many teams hit trouble when they use a domain admin account for directory lookups. If that shared account password changes or locks, every firewall check fails at once. Even worse, an overly broad service account puts the whole domain at risk. Instead, create a dedicated service account that only has permission to read user groups.

Nested groups also cause silent failures during policy checks. A user might sit inside a team group that sits inside a department group. If the firewall only reads one level deep, the user gets blocked by mistake. Flatten the groups you use for firewall rules so lookups stay fast and clear.

Active Directory + End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Stale IP mappings create another big risk on busy office networks. When a laptop leaves the network, another device might take its old IP address. If the collector misses the logoff event, the new device gets the old permissions. Set short timers on IP mappings and keep collector traffic on a locked VLAN.

Auditing network rules and database queries

Linking user groups to firewall ports solves only the first half of security. A firewall can let an engineer reach a database subnet based on their role. Once the network port opens, the firewall stops looking at what happens inside.

To pass security audits, teams still need to check every query and command. Network rules let the right people in, while query logs prove what they did. Data masking can also rewrite emails, phone numbers, card numbers, and national IDs in results. Pairing clean network boundaries with deep session visibility gives teams complete control.

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

Should we use direct LDAP queries or a logon collector agent?

Use direct queries for VPN logons where users type a password. Use a logon collector for office networks so users do not see extra prompts.

Why do firewall rules fail when we move users to new groups?

The firewall caches group lists for active users to save time. Clear the user cache on the firewall or wait for the session timer to expire.

Always turn on TLS encryption for all traffic between the firewall and domain controllers. Also limit the lookup account so it can only read user and group names.

The query runs. The emails stay hidden.