In the Palo Alto Networks security platform, User-ID is a foundational technology that enables visibility and control over network traffic based on user identity rather than just IP addresses. A critical component of User-ID is Group Mapping , which allows PAN-OS Next-Generation Firewalls (NGFWs) and Panorama to integrate with enterprise directory services to retrieve user group membership information. This information is then used to enforce granular security policies, simplify administration, and enhance reporting.
By basing policies on groups, administrators can manage access dynamically. When a user's role changes and they are moved to a different group in the directory service, their network access permissions, as defined by Palo Alto Networks security policies, update automatically without requiring manual changes to firewall rules. This is significantly more scalable and efficient than managing policies based on individual user accounts, especially in large or rapidly changing organizations.
PAN-OS offers several methods to map users to groups, primarily leveraging existing directory services. The choice of method depends on the organization's infrastructure, directory type, and specific security requirements.
This is the most common method for integrating with on-premises directory services like Microsoft Active Directory, OpenLDAP, or Novell eDirectory. The Palo Alto Networks firewall directly queries the LDAP server(s) to fetch user and group information.
Device > Server Profiles > LDAP
) contains the necessary information for the firewall to connect and authenticate to the LDAP server. This includes:
active-directory
,
edirectory
,
sun-directory-server
,
open-ldap
, or
custom
. Selecting the correct type pre-populates some attribute fields.
DC=example,DC=com
for an Active Directory domain named
example.com
.
Device > User Identification > Group Mapping Settings
. Here, you link an LDAP Server Profile to a group mapping configuration.
group
for AD).
sAMAccountName
for username,
member
or
memberOf
for group membership in Active Directory). PAN-OS uses these attributes to correctly parse the information returned by the LDAP server.
sAMAccountName
for AD.
userPrincipalName
,
mail
. This allows users to be identified by different usernames they might use.
cn
(Common Name) or
sAMAccountName
for groups in AD.
member
for groups, or
memberOf
for users (if using user-centric queries, less common for group mapping itself).
Detailed flow of LDAP-based group mapping where the Palo Alto Networks firewall queries an LDAP server to retrieve group and user membership information after initial configuration by an administrator.
sAMAccountName
,
userPrincipalName
,
memberOf
) and group attributes (like
cn
,
member
). Typically, domain user privileges are sufficient, but explicit read access to relevant OUs is best practice.
This method is an extension of LDAP-based group mapping. Instead of relying solely on pre-existing groups in the LDAP directory, administrators can define "custom groups" directly on the Palo Alto Networks firewall using LDAP filters. These custom groups are formed by users who match specific attribute criteria defined in the filter.
Device > User Identification > Group Mapping Settings
) by specifying an LDAP filter in the "Custom Groups" tab.
(&(objectCategory=person)(objectClass=user)(department=Engineering))
- Creates a group of all users in the Engineering department.
(&(objectCategory=person)(objectClass=user)(physicalDeliveryOfficeName=NewYork))
- Creates a group of users in the New York office.
When a custom group is defined, the firewall queries the LDAP server using the specified filter. Users matching the filter are considered members of this firewall-defined custom group. These groups can then be used in security policies just like groups retrieved directly from LDAP.
Flow for defining and using custom groups on a Palo Alto Networks firewall. The firewall uses an admin-defined LDAP filter to query the directory and dynamically create a group usable in policies.
The Palo Alto Networks Cloud Identity Engine (CIE) provides a scalable, cloud-based solution for identity information, including group memberships. It allows PAN-OS devices (NGFWs, VM-Series, CN-Series, Prisma Access) to retrieve user and group information from various cloud-based and on-premises identity providers (IdPs) without requiring direct connectivity from each firewall to every IdP.
Architecture of Cloud Identity Engine (CIE) integrating with various IdPs and providing consolidated user and group information to Palo Alto Networks devices.
This section details the configuration process for LDAP-based group mapping on a PAN-OS firewall. Configuration for CIE involves setup within the Palo Alto Networks cloud services portal and then subscribing the firewall to CIE.
The LDAP Server Profile is the first component required for LDAP-based group mapping.
Device > Server Profiles > LDAP
in the PAN-OS web interface.
AD-Primary-LDAP
).
DC1
).
389
for LDAP,
636
for LDAPS,
3268
for Global Catalog,
3269
for Global Catalog over SSL/TLS).
active-directory
). This pre-fills some default LDAP attribute names.
OU=Users,DC=corp,DC=paloaltonetworks,DC=com
or simply
DC=corp,DC=paloaltonetworks,DC=com
.
CN=svc-panldap,OU=ServiceAccounts,DC=corp,DC=paloaltonetworks,DC=com
.
Device > Certificate Management > Certificates
) and select it in the LDAP Server Profile.
DC=domain,DC=com
) is common but can be slow in very large directories if not coupled with efficient filters.
Once the LDAP Server Profile is created, configure Group Mapping Settings to define how the firewall retrieves and uses group information.
Device > User Identification > Group Mapping Settings
tab. (On older PAN-OS versions, this might be under the User-ID Agent tab, ensure you are in the correct section for direct firewall group mapping).
AD-Finance-Groups
).
DOMAIN\user
, this field can be used to populate the domain part if the directory doesn't provide it in the desired format, or if multiple domains are being aggregated.
CN=FinanceUsers,OU=Departments,DC=corp,DC=paloaltonetworks,DC=com
.
(description=PolicyGroup_*)
could retrieve all groups whose description starts with "PolicyGroup_".
user
for Active Directory.
sAMAccountName
.
userPrincipalName
,
mail
.
group
for Active Directory.
cn
or
sAMAccountName
(for groups).
member
(attribute on the group object listing members) or
memberOf
(attribute on the user object listing group memberships). PAN-OS typically uses the
member
attribute of group objects.
The correct mapping of LDAP attributes is vital for User-ID to function. The specific attributes depend on your LDAP directory schema.
For Microsoft Active Directory, common attributes include:
sAMAccountName
(e.g.,
jdoe
)
userPrincipalName
(e.g.,
jdoe@corp.paloaltonetworks.com
),
mail
memberOf
cn
(Common Name) or
sAMAccountName
(for groups with this attribute)
member
(This attribute on a group object lists the DNs of its members)
group
For OpenLDAP, common attributes might include:
uid
mail
cn
memberUid
(if using posixGroup schema) or
uniqueMember
(if using groupOfUniqueNames schema)
posixGroup
or
groupOfUniqueNames
You can use an LDAP browser tool (like JXplorer, Softerra LDAP Browser, or even
ldp.exe
on Windows) to inspect your directory's schema and verify attribute names and values before configuring them in PAN-OS.
Effective group mapping is key to leveraging User-ID. The following Palo Alto Networks recommended best practices help ensure a stable, secure, and performant configuration:
sAMAccountName
) and relevant "Alternate Usernames" (e.g.,
userPrincipalName
,
mail
) in the Group Mapping attributes. This allows User-ID to correctly identify users regardless of the username format provided by various User-ID sources (e.g., GlobalProtect, Captive Portal, XML API).
Device > Virtual Systems > {vsys_name} > User-ID
).
show user group-mapping state all show user group list show user group name <group_name_from_directory> debug user-id refresh group-mapping all // To force a refresh test ldap-profile profile-name <profile_name> host <host_ip> port <port> username <username_for_test>
Decision tree highlighting key best practice stages for Palo Alto Networks Group Mapping: Planning, Configuration, and Optimization/Maintenance.
Panorama, the Palo Alto Networks network security management solution, can leverage group mapping information for centralized policy creation across multiple managed firewalls. To enable this, one of the managed firewalls within a Device Group is designated as a "Master Device." Panorama then retrieves user and group mapping information from this Master Device.
Panorama > Managed Devices > Summary
. Ensure the firewall intended to be the Master Device is connected and in sync.
Panorama > Device Groups
.
Panorama > Setup > Management
.
Commit > Commit to Panorama
).
Commit > Push to Devices
, select the appropriate Device Group, and ensure "Include Device and Network Templates" and "Include Policies and Objects" are selected as needed).
Once these steps are completed and changes are committed and pushed, Panorama will start polling the designated Master Device for user and group mapping information. This information will then populate the group lists available when creating Security, NAT, QoS, and other policies in Panorama for that Device Group.
Alternative: Panorama as a User-ID Hub (with Dedicated Log Collectors): In larger deployments, Panorama itself (especially when paired with Dedicated Log Collectors or M-Series appliances in Panorama mode) can act as a User-ID hub, collecting IP-to-user mappings from various sources (including User-ID agents on firewalls). While this is more about IP-to-user mapping distribution, group mapping information from the Master Device complements this by providing the group context for those users.
Process flow for configuring a Master Device in Panorama. The Master Firewall retrieves group information from LDAP, and Panorama polls the Master Firewall for this data to enable centralized group-based policy creation.
Palo Alto Networks firewalls support Virtual Systems (vSys), allowing a single physical firewall to be partitioned into multiple logical firewalls. User-ID and group mapping can be configured in vSys environments in a couple of ways:
Device > Virtual Systems
. Select the vSys intended to be the hub.
User-ID
tab.
User-ID
tab and select the option to
"Use User-ID Hub"
, specifying the hub vSys.
Architecture of Group Mapping Centralization using a vSys Hub on a Palo Alto Networks firewall. The Hub vSys handles LDAP communication and shares User-ID information with Spoke vSys.
Effective monitoring and troubleshooting are essential for maintaining reliable group mapping.
The following CLI commands are invaluable for checking status and diagnosing issues:
Command | Description |
---|---|
show user group-mapping state all
|
Displays the status of all configured group mapping instances, including the LDAP server, Base DN, filter, number of groups found, and last update time. Look for "success" status. |
show user group list
|
Lists all groups currently known to the firewall through group mapping. Provides the group name as known by the firewall. |
show user group name "<group-name>"
|
Displays detailed information about a specific group, including its source and the users who are members of that group. The group name should be in the format
DOMAIN\group
or just
group
as seen in
show user group list
.
|
show user ip-user-mapping all
|
Shows the IP-to-user mappings. While not directly group mapping, it helps confirm if users are being identified. The group information is then correlated with these identified users. |
show user user-id-agent state all
|
If using User-ID agents, shows their status. Not directly for firewall group mapping but part of overall User-ID health. |
test ldap-profile profile-name <profile_name> host <host_ip_or_fqdn> port <port> [username <test_username_to_lookup>]
|
Tests connectivity to the LDAP server using a specified LDAP Server Profile. Can optionally lookup a specific username. This helps verify bind credentials, server reachability, and SSL/TLS setup. |
debug user-id refresh group-mapping all
|
Forces an immediate refresh of all group mapping information from the configured sources. Useful after making changes to LDAP or group mapping settings. |
debug user-id dump group-mapping [name <mapping_name>]
|
Dumps detailed information about the group mapping cache, including raw data retrieved from LDAP. Can be verbose but very useful for deep troubleshooting. |
less mp-log useridd.log
|
Views the User-ID daemon log on the management plane. Contains detailed logging about LDAP queries, responses, and errors. |
less dp-log useridd.log
|
Views the User-ID daemon log on the dataplane (for specific dataplane if multiple). Contains logs related to dataplane processing of User-ID information. |
admin@PA-VM> show user group-mapping state all Group Mapping: LDAP-AD-Corp Type: ldap Server Profile: AD-Primary-LDAP Base: dc=corp,dc=example,dc=com Filter: (objectClass=group) User Domain: Group Include List: cn=Domain Admins,cn=users,dc=corp,dc=example,dc=com cn=Engineering,ou=departments,dc=corp,dc=example,dc=com cn=Sales,ou=departments,dc=corp,dc=example,dc=com State: success Last Action Time: 2023/10/27 10:00:00 Action: Query Total Groups Found:3 Groups: corp\Domain Admins corp\Engineering corp\Sales admin@PA-VM> show user group name "corp\Engineering" Users for group corp\Engineering: corp\user1 corp\user2 corp\user5 Total: 3 users
test ldap-profile
.
show user ip-user-mapping
.
debug user-id refresh group-mapping all
.
useridd.log
(
less mp-log useridd.log
) for detailed error messages when troubleshooting group mapping. It often provides specific reasons for failures that are not visible in the GUI or basic show commands.
This guide is developed based on established Palo Alto Networks principles and knowledge derived from official PAN-OS Administrator's Guides, User-ID Technical Documentation, Cloud Identity Engine Documentation, and Panorama Administrator's Guides. For the most current and detailed information, always refer to the official Palo Alto Networks documentation portal for your specific PAN-OS, Panorama, or CIE version.