Dynamic User Groups (DUGs) automatically update their membership based on tags associated with users, rather than a static list of usernames. This enables policies that dynamically adapt to changing conditions like user behavior or potential threats without needing manual updates.
Benefits:
You define a DUG by specifying tag-based criteria using logical AND / OR operators (negation is not supported). When a user gains a tag (or combination of tags) that matches the DUG's filter, they are automatically added to the group. When the tag(s) are removed or expire, the user is automatically removed from the DUG.
Example: A DUG named `Require-MFA-Group` could be defined with the filter matching the tag `require-mfa`. Any user who gets tagged with `require-mfa` instantly becomes a member of this group.
graph LR subgraph Tag_Sources [Tag Sources] API(XML API) UIDAgent(User-ID Agent
/AD Monitor) AutoTag(Auto-Tagging
/Log Forwarding) Manual(Manual/Panorama) end subgraph User_Identity U1[User: Alice
Tags: low-risk] U2[User: Bob
Tags: high-risk, require-mfa] U3[User: Charlie
Tags: contractor, temp-access] end subgraph DUG_Definitions [DUG Definitions] DUG_Risky("DUG: Risky-Users
Filter: 'high-risk'") DUG_MFA("DUG: Require-MFA-Group
Filter: 'require-mfa'") DUG_Temp("DUG: Temp-Access
Filter: 'temp-access'") end subgraph Policy_Enforcement [Policy Enforcement] Policy1("Security Policy
Source User: Risky-Users
Action: Deny") Policy2("Authentication Policy
Source User: Require-MFA-Group
Action: Enforce MFA") Policy3("Security Policy
Source User: Temp-Access
Action: Allow to Specific Apps") end API --> U2 & U3; UIDAgent --> U1; AutoTag --> U2; Manual --> U3; U1 -- No Match --> DUG_Risky; U2 -- Match --> DUG_Risky; U3 -- No Match --> DUG_Risky; U1 -- No Match --> DUG_MFA; U2 -- Match --> DUG_MFA; U3 -- No Match --> DUG_MFA; U1 -- No Match --> DUG_Temp; U2 -- No Match --> DUG_Temp; U3 -- Match --> DUG_Temp; DUG_Risky --> Policy1; DUG_MFA --> Policy2; DUG_Temp --> Policy3; style DUG_Risky fill:#ffc,stroke:#333,stroke-width:1px style DUG_MFA fill:#ffc,stroke:#333,stroke-width:1px style DUG_Temp fill:#ffc,stroke:#333,stroke-width:1px
Tags are metadata labels associated with users (or IP addresses). They can be:
Dynamic tags for users can be registered (associated with a user) via:
Tags dynamically registered on one firewall can be redistributed to other firewalls (often via Panorama hub or direct firewall-to-firewall redistribution) to ensure consistent DUG membership across the network. PAN-OS 9.1 or later is generally required on receiving firewalls for dynamic tag redistribution.
Auto-tagging is the mechanism that allows the firewall or Panorama to automatically apply or remove tags based on specific criteria found in generated logs. This links observed behavior or events directly to dynamic policy enforcement through DUGs.
If a user submits credentials to a site flagged in the URL Filtering log as potentially malicious (
credential-detected eq yes
), auto-tagging can apply a `require-mfa` tag to that user. An Authentication Policy rule using a DUG matching the `require-mfa` tag can then force MFA for that user's subsequent network access attempts, mitigating the risk from the potentially compromised credential.
sequenceDiagram participant User participant Firewall participant Logger as Log Processing Engine participant LogFwd as Log Fwd Profile /
Log Settings participant UserTagDB as User-ID / Tag Database participant PolicyEngine as Policy Engine User->>Firewall: Accesses Risky Site / Event Occurs Firewall->>Logger: Generates Log (e.g., Threat, URL) Logger->>LogFwd: Log Sent for Processing LogFwd->>LogFwd: Evaluate Filter Criteria (e.g., threat ID, URL category) alt Log Matches Filter LogFwd->>UserTagDB: Execute Built-in Action: Add/Remove Tag for User/IP Note over UserTagDB: User/IP tag mapping updated end Note over Firewall, PolicyEngine: Later Traffic from User/IP... Firewall->>PolicyEngine: Evaluate Policy for New Session PolicyEngine->>UserTagDB: Check User/IP Tags UserTagDB-->>PolicyEngine: Provide Current Tags PolicyEngine->>PolicyEngine: Match Policy Rule using DUG/DAG PolicyEngine->>Firewall: Apply Policy Action (Allow/Deny/MFA)
For log types handled by Log Forwarding Profiles (Threat, URL, Traffic, etc.), simply creating the profile isn't enough. The firewall needs to know *which traffic* should have its logs processed by that profile's filters and actions.
You **must** assign the Log Forwarding Profile you created (the one containing your auto-tagging filter and action) to the specific Security Policy rule(s) that allow the traffic which generates the trigger logs.
Think of it this way:
Without attaching the profile to the Security Rule (under the rule's Actions tab), the firewall allows the traffic and generates the standard logs, but it doesn't perform the extra check defined in the Log Forwarding Profile, so no auto-tagging occurs for these log types.
(This assignment step is *not* needed for log types configured directly under Device > Log Settings, like User-ID or GlobalProtect logs, as their tagging actions are tied directly to the log generation itself.)