User-ID provides many different methods for mapping IP addresses to usernames. Before you begin configuring user mapping, consider where your users are logging in from, what services they are accessing, and what applications and data you need to control access to. This will inform which types of agents or integrations would best allow you to identify your users.
Once you have your plan, you can begin configuring user mapping using one or more of the following methods as needed to enable user-based access and visibility to applications and resources:
graph TD A[Identify User Type/Environment] --> B{Client OS?} B -- Windows Domain Client --> C[Use User-ID Agent Windows or Integrated] B -- Linux/Non-Domain Client --> D{Need Web Auth?} D -- Yes --> E[Use Authentication Portal] D -- No --> F[Consider XML API or Syslog] B -- Multi-User Windows (Citrix/TS) --> G[Use TS Agent] B -- Multi-User Non-Windows --> H[Use XML API for Terminal Servers] A --> I{Existing Auth Service?} I -- Yes (Wireless Controller, NAC, Proxy) --> J[Monitor Syslog Senders] I -- No --> K[Choose Agent or Auth Portal based on OS] A --> L{Custom Application?} L -- Yes --> M[Use XML API for General]
While you can configure either the Windows agent or the PAN-OS integrated User-ID agent on the firewall to listen for authentication syslog messages from the network services, because only the PAN-OS integrated agent supports syslog listening over TLS, it is the preferred configuration.
Which User-ID method maps IP addresses to usernames for users connecting through a web proxy that has already authenticated the user?
Which source is generally considered the most reliable for collecting User-ID user mapping when available?
Which data flow describes redistribution of user mappings?
To use the Windows-based User-ID agent or the PAN-OS integrated User-ID agent to map users as they log in to your Exchange servers, domain controllers, eDirectory servers, or Windows clients, create a dedicated service account for the User-ID agent on a domain controller in each domain that the agent will monitor.
flowchart TD A[Log in to Domain Controller] --> B(Open Active Directory Users & Computers) B --> C{Create New User Account} C --> D[Define Username/Password] D --> E{Assign Required Permissions} E -- Windows Agent --> F[Logon as Service Local/GPO and Event Log Readers and DCOM Users Optional for WMI and CIMV2 Optional for WMI and Folder/Registry Permissions] E -- PAN-OS Agent --> G[Event Log Readers and Server Operator Optional for Session Mon and DCOM Users Optional for WMI and CIMV2 Optional for WMI] F --> H{Deny Unnecessary Permissions} G --> H H --> I[Deny Interactive Logon and Deny Remote Access] I --> J(Service Account Ready)
The User-ID agent maps users based on logs for security events. To ensure that the User-ID agent can successfully map users, verify that the source for your mappings generates logs for Audit Logon, Audit Kerberos Authentication Service, and Audit Kerberos Service Ticket Operations events. At a minimum, the source must generate logs for the following events:
The required permissions for the service account depend on the user mapping methods and settings you plan to use. For example, if you are using the PAN-OS integrated User-ID agent, the service account requires Server Operator privileges to monitor user sessions. If you are using the Windows-based User-ID agent, the service account does not require Server Operator privileges to monitor user sessions. To reduce the risk of compromising the User-ID service account, always configure the account with the minimum set of permissions necessary for the agent.
User-ID provides many methods for safely collecting user mapping information. Some legacy features designed for environments that only required user mapping on Windows desktops attached to the local network require privileged service accounts. If the privileged service account is compromised, this would open your network to attack. As a best practice, avoid using legacy features that require privileges that would pose a threat if compromised, such as client probing and session monitoring.
Create a dedicated Active Directory (AD) service account for the Windows User-ID agent to access the services and hosts it will monitor to collect user mappings. You must create a service account in each domain the agent will monitor. After you enable the required permissions for the service account, Configure User Mapping Using the Windows User-ID Agent.
The following workflow details all required privileges and provides guidance for the User-ID features that require privileges that could pose a threat so that you can decide how to best identify users without compromising your overall security posture.
You must create a service account in each domain the agent will monitor.
The permission to log on as a service is only needed locally on the Windows server that is the agent host.
(Administrators have this privilege by default.)
For more information, refer to the following documentation.
Do not enable client probing on high-security networks. Client probing can generate a large amount of network traffic and can pose a security threat when misconfigured. Instead collect user mapping information from more isolated and trusted sources, such as domain controllers and through integrations with Syslog or the XML API, which have the added benefit of allowing you to safely capture user mapping information from any device type or operating system, instead of just Windows clients.
Perform this task on each client system that the User-ID agent will probe for user mapping information:
(You might have to change the Locations or click Advanced to query for account names. See the dialog help for details.)
(You only need to perform this step if the service account you configured for the User-ID agent is not a domain administrator or a local administrator on the User-ID agent server host.)
(If you do not want to configure individual permissions, you can Allow the Full Control permission instead.)
By ensuring that the User-ID service account has the minimum set of account privileges, you can reduce the attack surface if the account ever becomes compromised.
To ensure that the User-ID account has the minimum privileges necessary, deny the following privileges on the account.
Create a dedicated Active Directory (AD) service account for the PAN-OS Integrated User-ID agent to access the services and hosts it will monitor to collect user mappings.You must create a service account in each domain the agent will monitor. After you enable the required permissions for the service account, Configure User Mapping Using the PAN-OS Integrated User-ID Agent.
The following workflow details all required privileges and provides guidance for the User-ID features which require privileges that could pose a threat so that you can decide how to best identify users without compromising your overall security posture.
You must create a service account in each domain the agent will monitor.
For more information, refer to the following documentation.
Do not enable client probing on high-security networks. Client probing can generate a large amount of network traffic and can pose a security threat when misconfigured. Instead collect user mapping information from more isolated and trusted sources, such as domain controllers and through integrations with Syslog or the XML API, which have the added benefit of allowing you to safely capture user mapping information from any device type or operating system, instead of just Windows clients.
Perform this task on each client system that the User-ID agent will probe for user mapping information:
(You might have to change the Locations or click Advanced to query for account names. See the dialog help for details.)
Because this group also has privileges for shutting down and restarting servers, only assign the account to this group if monitoring user sessions is very important.
By ensuring that the User-ID service account has the minimum set of account privileges, you can reduce the attack surface should the account be compromised.
To ensure that the User-ID account has the minimum privileges necessary, deny the following privileges on the account:
Which built-in Active Directory group membership is required for a User-ID service account (Windows or PAN-OS agent) if it needs to perform Server Monitoring by reading security event logs?
Which User-ID feature requires assigning the service account to the 'Server Operators' group for the PAN-OS Integrated agent, but is generally NOT recommended due to the high privileges granted?
Why is Client Probing (using WMI) generally discouraged in high-security networks?
In most cases, the majority of your network users will have logins to your monitored domain services. For these users, the Palo Alto Networks User-ID agent monitors the servers for login events and performs the IP address to username mapping. The way you configure the User-ID agent depends on the size of your environment and the location of your domain servers. As a best practice, locate your User-ID agents near the servers it will monitor (that is, the monitored servers and the Windows User-ID agent should not be across a WAN link from each other). This is because most of the traffic for user mapping occurs between the agent and the monitored server, with only a small amount of traffic—the delta of user mappings since the last update—from the agent to the firewall.
sequenceDiagram participant Client participant WinUserIDAgent as Windows User-ID Agent participant DC as Domain Controller/Exchange participant Firewall Client->>+DC: User Logs In (Event 4624, etc.) DC-->>-Client: Authentication Success Note over DC: Security Log Updated loop Periodically/Event Driven WinUserIDAgent->>+DC: Query Security Logs (WMI/RPC) DC-->>-WinUserIDAgent: Return New Logon Events (IP, User, Timestamp) end WinUserIDAgent->>+Firewall: Send User Mapping Update (IP -> User) Firewall-->>-WinUserIDAgent: Acknowledge Update Note over Firewall: Updates User-ID Mapping Table
The following topics describe how to install and configure the User-ID Agent and how to configure the firewall to retrieve user mapping information from the agent:
The following procedure shows how to install the User-ID agent on a member server in the domain and set up the service account with the required permissions. If you are upgrading, the installer will automatically remove the older version; however, it is a good idea to back up the config.xml file before running the installer.
For information about the system requirements for installing the Windows-based User-ID agent and for information on supported server OS versions, refer to the User-ID agent release notes and the Palo Alto Networks Compatibility Matrix.
Create a Dedicated Service Account for the User-ID Agent and grant the necessary permissions for the Windows User-ID agent.
The User-ID agent queries the Domain Controller and Exchange server logs using Microsoft Remote Procedure Calls (MSRPCs). During the initial connection, the agent transfers the most recent 50,000 events from the log to map users. On each subsequent connection, the agent transfers events with a timestamp later than the last communication with the domain controller. Therefore, always install one or more User-ID agents at each site that has servers to be monitored.
Install the User-ID agent version that is the same as the PAN-OS version running on the firewalls. If there is not a User-ID agent version that matches the PAN-OS version, install the latest version that is closest to the PAN-OS version.
(If you are using the User-ID agent to prevent credential phishing, download the UaCredInstall64-x.x.x.msi file instead. Only download and install the UaCredInstall64-x.x.x.msi if you are using the User-ID for credential detection.)
C:\Users\administrator.acme>cd Desktop
C:\Users\administrator.acme\Desktop>UaInstall-6.0.0-1.msi
Open the Windows Start menu, right-click the User-ID Agent program, and select Run as administrator .
You must run the User-ID Agent application as an administrator to install the application, commit configuration changes, or uninstall the application.
By default, the agent uses the administrator account used to install the .msi file. To change the account to a restricted account:
You can only assign one certificate profile for Windows User-ID agents and Terminal Server (TS) agents. Therefore, your certificate profile must include all certificate authorities that issued certificates uploaded to connected User-ID and TS agents.
To use the Windows-based User-ID agent to detect credential submissions and prevent credential phishing, you must install the User-ID credential service on the Windows-based User-ID agent. You can only install this add-on on a read-only domain controller (RODC).
The Palo Alto Networks Windows User-ID agent is a Windows service that connects to servers on your network—for example, Active Directory servers, Microsoft Exchange servers, and Novell eDirectory servers—and monitors the logs for login events. The agent uses this information to map IP addresses to usernames. Palo Alto Networks firewalls connect to the User-ID agent to retrieve this user mapping information, enabling visibility into user activity by username rather than IP address and enables user- and group-based security enforcement.
For information about the server OS versions supported by the User-ID agent, refer to “Operating System (OS) Compatibility User-ID Agent” in the User-ID Agent Release Notes.
(The User-ID agent can monitor up to 100 servers, of which up to 50 can be syslog senders.)
( To collect all of the required mappings, the User-ID agent must connect to all servers that your users log in to in order to monitor the security log files on all servers that contain login events.)
(Auto-discovery locates domain controllers in the local domain only; you must manually add Exchange servers, eDirectory servers, and syslog senders.)
Ensure that the Enable Server Session Read setting is not selected. This setting requires that the User-ID agent have an Active Directory account with Server Operator privileges so that it can read all user sessions. Instead, use a syslog or XML API integration to monitor sources that capture login and logout events for all device types and operating systems (instead of just Windows), such as wireless controllers and Network Access Controllers (NACs).
(By default, the User-ID maps all users accessing the servers you are monitoring.)
As a best practice, always specify which networks to include and exclude from User-ID to ensure that the agent is only communicating with internal resources and to prevent unauthorized users from being mapped. You should only enable User-ID on the subnetworks where users internal to your organization are logging in.
If you add Exclude profiles without adding any Include profiles, the User-ID agent excludes all subnetworks, not just the ones you added.
dc=domain1,dc=example, dc=com
.
cn=admin,ou=IT, dc=domain1, dc=example, dc=com
.
objectClass=Person
).
Palo Alto Networks strongly recommends disabling client probing on high-security networks. Client probing can pose a security threat if not correctly configured. For more information, see client probing.
Palo Alto Network strongly recommends that you collect user mapping information from isolated and trusted sources, such as domain controllers or integrations with Syslog or the XML API, to safely capture user mapping information from any device type or operating system.
(If you must enable client probing, select the Enable WMI Probing check box and on the Client Probing tab. Then add a remote administration exception to the Windows firewall for each probed client to ensure the Windows firewall will allow client probing. Each probed client PC must allow port 139 in the Windows firewall and must also have file and printer sharing services enabled.)
Click OK to save the User-ID agent setup settings and then click Commit to restart the User-ID agent and load the new settings.
Save the
ignore-user
list as a text document on the agent host using the title
ignore_user_list
and use the .txt file extension to save it to the User-ID Agent folder on the domain server where the agent is installed.
List the user accounts to ignore; there is no limit to the number of accounts you can add to the list. Each user account name must be on a separate line. For example:
SPAdmin
SPInstall
TFSReport
You can use an asterisk as a wildcard character to match multiple usernames, but only as the last character in the entry. For example,
corpdomain\it-admin*
would match all administrators in the
corpdomain
domain whose usernames start with the string
it-admin
. You can also use the
ignore-user
list to identify users whom you want to force to authenticate using Authentication Portal.
After adding entries to the Ignore User list, you must stop and restart the connection to the service.
(The firewall can connect to only one Windows-based User-ID agent that is using the User-ID credential service add-on to detect corporate credential submissions. See Configure Credential Detection with the Windows User-ID Agent for more details on how to use this service.)
Complete the following steps on each firewall you want to connect to the User-ID agent to receive user mappings:
Your company has 10 Active Directory domain controllers spread across multiple WAN links. The firewall's management plane is highly utilized. Which type of User-ID agent deployment is considered a best practice?
An administrator configures a Windows User-ID agent to monitor four Active Directory servers and two Exchange servers. What information is needed in the agent's Discovery settings?
The following procedure describes how to configure the PAN-OS® integrated User-ID™ agent on the firewall for IP address-to-username mapping. The integrated User-ID agent performs the same tasks as the Windows-based agent.
sequenceDiagram participant Client participant Firewall as Firewall (Integrated Agent) participant DC as Domain Controller/Exchange Client->>+DC: User Logs In (Event 4624, etc.) DC-->>-Client: Authentication Success Note over DC: Security Log Updated loop Periodically Firewall->>+DC: Query Security Logs (WMI/WinRM) DC-->>-Firewall: Return New Logon Events (IP, User, Timestamp) end Note over Firewall: Updates Internal User-ID Mapping Table
Create a Dedicated Service Account for the User-ID Agent.
(Within the total maximum of 100 monitored servers per firewall, you can define no more than 50 syslog senders for any single virtual system.)
( To collect all the required mappings, the firewall must connect to all servers that your users log in to so that the firewall can monitor the Security log files on all servers that contain login events.)
(If you are using WinRM with Kerberos, you must enter a fully qualified domain name (FDQN). If you want to use WinRM with basic authentication or use WMI to monitor the server, you can enter an IP address or FQDN.)
(To monitor servers using WMI, specify an IP address, the service account name (if all server monitoring is in the same domain), or a fully qualified domain name (FQDN). If you specify an FQDN, use the down-level logon name in the (DLN)\sAMAccountName format instead of the FQDN\sAMAccountName format. For example, use
example\user.services
not
example.com\user.services
. If you specify an FQDN, the firewall will attempt to authenticate using Kerberos, which does not support WMI.)
(The auto-discovery feature is for domain controllers only; you must manually add any Exchange servers or eDirectory servers you want to monitor.)
(If the domain controller is processing many requests, delays between queries may exceed the specified value.)
Ensure that the Enable Session option is not enabled. This option requires that the User-ID agent have an Active Directory account with Server Operator privileges so that it can read all user sessions. Instead, use a Syslog or XML API integration to monitor sources that capture login and logout events for all device types and operating systems (instead of just Windows), such as wireless controllers and network access control (NAC) devices.
(By default, the User-ID maps all users accessing the servers you are monitoring.)
As a best practice, always specify which networks to include and, optionally, which networks to exclude from User-ID to ensure that the agent is communicating only with internal resources and to prevent unauthorized users from being mapped. You should enable user mapping only on the subnetworks where users internal to your organization are logging in.
If you add Exclude profiles without adding any Include profiles, the User-ID agent excludes all subnetworks, not just the ones you added.
domain\username
syntax.
Do not enable WMI probing on high-security networks. Client probing can generate a large amount of network traffic and can pose a security threat when misconfigured.
(If necessary, increase the value to ensure the User-ID agent has sufficient time to probe all the learned IP addresses (range is 1 to 1440; default is 20).)
(If the request load is high, the observed delay between requests might significantly exceed the specified interval.)
(Define the ignore user list on the firewall that is the User-ID agent, not the client. If you define the ignore user list on the client firewall, the users in the list are still mapped during redistribution.)
On the
Ignore User List
tab,
Add
each username you want to exclude from user mapping. You can also use the ignore user list to identify the users you want to force to use Authentication Portal to authenticate. You can use an asterisk as a wildcard character to match multiple usernames but only as the last character in the entry. For example,
corpdomain\it-admin*
would match all administrators in the
corpdomain
domain whose usernames start with the string
it-admin
. You can add up to 5,000 entries to exclude from user mapping.
Click OK and Commit .
> show user server-monitor state all
You can configure the PAN-OS integrated User-ID agent to monitor servers using Windows Remote Management (WinRM) . Using the WinRM protocol improves speed, efficiency, and security when monitoring server events to map user events to IP addresses. The PAN-OS integrated User-ID agent supports the WinRM protocol on Windows Server 2012 Active Directory and Microsoft Exchange Server 2012 or later versions of both.
There are three ways to configure server monitoring using WinRM:
—The firewall authenticates to the monitored server using the username and password of the service account for the User-ID agent and the firewall authenticates the monitored server using the User-ID certificate profile.
—The firewall and the monitored servers use Kerberos for mutual authentication and the monitored server encrypts the communication with the firewall using a negotiated Kerberos session key.
—The firewall and the monitored server use HTTPS to communicate and use Kerberos for mutual authentication.
sequenceDiagram participant Firewall participant WinRMServer as Windows Server (WinRM Service) Note over Firewall, WinRMServer: Prerequisite: WinRM Listener configured on Server (HTTPS, Basic Auth Enabled) Note over Firewall, WinRMServer: Prerequisite: Server Cert configured for WinRM, Root CA trusted by Firewall Note over Firewall, WinRMServer: Prerequisite: Service Account Credentials configured on Firewall Firewall->>+WinRMServer: Establish HTTPS Connection (TLS Handshake) Note right of Firewall: Firewall validates Server Cert using User-ID Cert Profile WinRMServer-->>-Firewall: HTTPS Connection Established Firewall->>+WinRMServer: Send WinRM Request (e.g., Query Logs) + Basic Auth Credentials (Username/Password) WinRMServer->>+WinRMServer: Authenticate User (Basic) WinRMServer->>+WinRMServer: Authorize User (Remote Mgmt Users group, etc.) WinRMServer-->>-Firewall: Return WinRM Response (Log Data) / Auth Failure
When you configure WinRM to use HTTPS with basic authentication, the firewall transfers the credentials for the service account in a secure tunnel using SSL.
(Ensure that you use an account with administrator privileges to configure WinRM on the server you want to monitor. As a best practice for security, this account should not be the same account as the service account in Step 1.)
(If you do not see the Local Computer certificate store, launch the Microsoft Management Console ( Start > Run > MMC ) and add the Certificates snap-in ( File > Add/Remove Snap-in > Certificates > Add > Computer account > Next > Finish ).)
winrm quickconfig
.
y
to confirm the changes and then confirm the output displays
WinRM service started
.
(If WinRM is enabled, the output displays
WinRM service is already running on this machine.
You will be prompted to confirm any additional required configuration changes.)
winrm enumerate winrm/config/listener
and confirm that the output displays
Transport = HTTPS
.
(By default, WinRM/HTTPS uses port 5986.)
winrm create winrm/config/Listener?Address=*+Transport=HTTPS @{Hostname=”<hostname>”;CertificateThumbprint=”Certificate Thumbprint”}
, where
<hostname>
is the hostname of the Windows server and
Certificate Thumbprint
is the value you copied from the certificate.
Use the command prompt (not Powershell) and remove any spaces in the Certificate Thumbprint to ensure that WinRM can validate the certificate.
c:\> winrm set winrm/config/client/auth @{Basic="true"}
winrm get winrm/config/service/Auth
and confirm that
Basic = true
.
domain\username
format, enter the
User Name
for the service account that the User-ID agent will use to monitor servers.
sequenceDiagram participant Firewall participant KDC as Kerberos KDC participant WinRMServer as Windows Server (WinRM Service) Note over Firewall, WinRMServer: Prerequisite: WinRM Listener configured on Server (HTTP, Kerberos Auth Enabled) Note over Firewall, KDC: Prerequisite: Firewall configured with Kerberos Profile, Service Account Credentials, Time Synced Firewall->>+KDC: Request Service Ticket for WinRM/ServerFQDN KDC-->>-Firewall: Issue Service Ticket Firewall->>+WinRMServer: Send WinRM Request (e.g., Query Logs) + Kerberos Ticket (HTTP SPNEGO) WinRMServer->>+KDC: Verify Service Ticket (optional, depends on config) KDC-->>-WinRMServer: Ticket Valid / Invalid alt Ticket Valid WinRMServer->>+WinRMServer: Authorize User (Remote Mgmt Users group, etc.) WinRMServer-->>-Firewall: Return WinRM Response (Log Data) - Encrypted with Session Key else Ticket Invalid or Authz Failed WinRMServer-->>-Firewall: Authentication/Authorization Failure end
When you configure WinRM over HTTP with Kerberos, the firewall and the monitored servers use Kerberos for mutual authentication and the monitored server encrypts the communication with the firewall using a negotiated Kerberos session key.
WinRM with Kerberos supports the aes128-cts-hmac-sha1-96 and aes256-cts-hmac-sha1-96 ciphers. If the server you want to monitor uses RC4, you must download the Windows update and disable RC4 for Kerberos in the registry settings of the server you want to monitor.
(Ensure that you use an account with administrator privileges to configure WinRM on the server you want to monitor. As a best practice for security, this account should not be the same account as the service account in Step 1.)
winrm quickconfig
.
y
to confirm the changes and then confirm the output displays
WinRM service started
.
(If WinRM is enabled, the output displays
WinRM service is already running on this machine.
You will be prompted to confirm any additional required configuration changes.)
winrm enumerate winrm/config/listener
and confirm that the output displays
Transport = HTTP
.
(By default, WinRM/HTTP uses port 5985.)
winrm get winrm/config/service/Auth
and confirm that
Kerberos = true
.
domain\username
format, enter the
User Name
for the service account that the User-ID agent will use to monitor servers.
(Kerberos uses the domain name to locate the service account.)
( If you are using Kerberos, the network address must be a fully qualified domain name (FDQN). )
sequenceDiagram participant Firewall participant KDC as Kerberos KDC participant WinRMServer as Windows Server (WinRM Service) Note over Firewall, WinRMServer: Prerequisite: WinRM Listener configured on Server (HTTPS, Kerberos Auth Enabled) Note over Firewall, WinRMServer: Prerequisite: Server Cert configured for WinRM, Root CA trusted by Firewall Note over Firewall, KDC: Prerequisite: Firewall configured with Kerberos Profile, Service Account Credentials, Time Synced Firewall->>+KDC: Request Service Ticket for WinRM/ServerFQDN KDC-->>-Firewall: Issue Service Ticket Firewall->>+WinRMServer: Establish HTTPS Connection (TLS Handshake) Note right of Firewall: Firewall validates Server Cert using User-ID Cert Profile WinRMServer-->>-Firewall: HTTPS Connection Established Firewall->>+WinRMServer: Send WinRM Request (e.g., Query Logs) + Kerberos Ticket (SPNEGO over HTTPS) WinRMServer->>+KDC: Verify Service Ticket (optional, depends on config) KDC-->>-WinRMServer: Ticket Valid / Invalid alt Ticket Valid WinRMServer->>+WinRMServer: Authorize User (Remote Mgmt Users group, etc.) WinRMServer-->>-Firewall: Return WinRM Response (Log Data) over HTTPS else Ticket Invalid or Authz Failed WinRMServer-->>-Firewall: Authentication/Authorization Failure over HTTPS end
When you configure WinRM over HTTPS with Kerberos, the firewall and the monitored server use HTTPS to communicate and use Kerberos for mutual authentication.
WinRM with Kerberos supports the aes128-cts-hmac-sha1-96 and aes256-cts-hmac-sha1-96 ciphers. If the server you want to monitor uses RC4, you must download the Windows update and disable RC4 for Kerberos in the registry settings of the server you want to monitor.
(Ensure that you use an account with administrator privileges to configure WinRM on the server you want to monitor. As a best practice for security, this account should not be the same account as the service account in Step 1.)
(If you do not see the Local Computer certificate store, launch the Microsoft Management Console ( Start > Run > MMC ) and add the Certificates snap-in ( File > Add/Remove Snap-in > Certificates > Add > Computer account > Next > Finish ).)
winrm quickconfig
.
y
to confirm the changes and then confirm the output displays
WinRM service started
.
(If WinRM is enabled, the output displays
WinRM service is already running on this machine.
You will be prompted to confirm any additional required configuration changes.)
winrm enumerate winrm/config/listener
. Then confirm that the output displays
Transport = HTTPS
.
(By default, WinRM/HTTPS uses 5986.)
winrm create winrm/config/Listener?Address=*+Transport=HTTPS @{Hostname=”<hostname>”;CertificateThumbprint=”Certificate Thumbprint”}
, where
<hostname>
is the hostname of the Windows server and
Certificate Thumbprint
is the value you copied from the certificate.
Use the command prompt (not Powershell) and remove any spaces in the Certificate Thumbprint to ensure that WinRM can validate the certificate.
winrm get winrm/config/service/Auth
and confirm that
Basic = false
and
Kerberos= true
.
domain\username
format, enter the
User Name
for the service account that the User-ID agent will use to monitor servers.
(Kerberos uses the domain name to locate the service account.)
( If you are using Kerberos, the network address must be a fully qualified domain name (FDQN). )
(The firewall uses the same certificate to authenticate with all monitored servers.)
To obtain IP address-to-username mappings from existing network services that authenticate users, you can configure the PAN-OS integrated User-ID agent or Windows-based User-ID agent to parse Syslog messages from those services. To keep user mappings up to date, you can also configure the User-ID agent to parse syslog messages for logout events so that the firewall automatically deletes outdated mappings.
sequenceDiagram participant Client participant SyslogSender as Syslog Sender (e.g., WiFi Controller) participant Firewall as Firewall (Integrated Agent) Client->>+SyslogSender: Authenticates (e.g., joins WiFi) SyslogSender-->>-Client: Auth Success SyslogSender->>+Firewall: Send Syslog Message (Login Event: User, IP) over UDP/SSL activate Firewall Firewall->>Firewall: Check if Sender IP is configured Firewall->>Firewall: Parse Syslog using configured Filter Profile Firewall->>Firewall: Extract User and IP Address Firewall->>Firewall: Update User-ID Mapping Table (IP -> User) deactivate Firewall Firewall-->>-SyslogSender: Acknowledge (if TCP/SSL) Note over Client, Firewall: Later... User disconnects Client->>+SyslogSender: Disconnects/Logs out SyslogSender-->>-Client: Acknowledge SyslogSender->>+Firewall: Send Syslog Message (Logout Event: User, IP) over UDP/SSL activate Firewall Firewall->>Firewall: Check if Sender IP is configured Firewall->>Firewall: Parse Syslog using configured Filter Profile Firewall->>Firewall: Extract User and IP Address Firewall->>Firewall: Remove User-ID Mapping (IP -> User) deactivate Firewall Firewall-->>-SyslogSender: Acknowledge (if TCP/SSL)
To configure the PAN-OS Integrated User-ID agent to create new user mappings and remove outdated mappings through syslog monitoring, start by defining Syslog Parse profiles. The User-ID agent uses the profiles to find login and logout events in syslog messages. In environments where syslog senders (the network services that authenticate users) deliver syslog messages in different formats, configure a profile for each syslog format. Syslog messages must meet certain criteria for a User-ID agent to parse them (see Syslog). This procedure uses examples with the following formats:
[Tue Jul 5 13:15:04 2016 CDT] Administratorauthentication success User:johndoe1 Source:192.168.3.212
[Tue Jul 5 13:18:05 2016CDT] User logout successful User:johndoe1 Source:192.168.3.212
After configuring the Syslog Parse profiles, you specify syslog senders for the User-ID agent to monitor.
(Palo Alto Networks provides several predefined profiles through Application content updates. The predefined profiles are global to the firewall, whereas custom profiles apply to a single virtual system only.)
(Any new Syslog Parse profiles in a given content release is documented in the corresponding release note along with the specific regex used to define the filter.)
( Each profile filters syslog messages to identify either login events (to create user mappings) or logout events (to delete mappings) , but no single profile can do both.)
(While reviewing syslog messages, also determine whether they include the domain name. If they don't, and your user mappings require domain names, enter the Default Domain Name when defining the syslog senders that the User-ID agent monitors (later in this procedure).)
(The following steps describe how to configure these parsing types.)
(If the syslog message contains a standalone space or tab as a delimiter, use
\s
for a space and
\t
for a tab.)
(authentication\ success){1}
extracts the first
{1}
instance of the string
authentication success
.
(logout\ successful){1}
extracts the first
{1}
instance of the string
logout successful
.
\
) before the space is a standard regex escape character that instructs the regex engine not to treat the space as a special character.)
(In the example message, the regex
User:([a-zA-Z0-9\\\._]+)
matches the string
User:johndoe1
and identifies
johndoe1
as the username.)
(In the example message, the regular expression
Source:([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})
matches the IPv4 address
Source:192.168.3.212
.)
(The following is an example of a completed Syslog Parse profile that uses regex to identify login events:)
authentication success
identifies login events.
logout successful
identifies logout events.
\s
(for a space) or
\t
(for a tab).
(In the example messages,
User:
identifies the start of the username field.)
\s
to indicate a standalone space (as in the sample message) and
\t
to indicate a tab.
\s
(for a space) or
\t
(for a tab).
(In the example messages,
Source:
identifies the start of the address field.)
(For example, enter
\n
to indicate the delimiter is a line break.)
(The following is an example of a completed Syslog Parse profile that uses string matching to identify login events:)
(Within the total maximum of 100 monitored servers per firewall, you can define no more than 50 syslog senders for any single virtual system.)
( The firewall discards any syslog messages received from senders that are not on this list. )
To select the TLS certificate that the firewall uses to receive syslog messages, select Device > User Identification > User Mapping > Palo Alto Networks User-ID Agent Setup . Edit the settings and select Server Monitor , then select the Syslog Service Profile that contains the TLS certificate you want to the firewall to use to receive syslog messages.
The PAN-OS integrated User-ID agent accepts syslogs over SSL and UDP only. However, you must use caution when using UDP to receive syslog messages because it is an unreliable protocol and as such there is no way to verify that a message was sent from a trusted syslog sender. Although you can restrict syslog messages to specific source IP addresses, an attacker can still spoof the IP address, potentially allowing the injection of unauthorized syslog messages into the firewall.
Always use SSL to listen for syslog messages
because the traffic is encrypted (UDP sends the traffic in cleartext). If you must use UDP, make sure that the syslog sender and client are both on a dedicated, secure network to prevent untrusted hosts from sending UDP traffic to the firewall.
A syslog sender using SSL to connect will show a Status of Connected only when there is an active SSL connection. Syslog senders using UDP will not show a Status value.
( The listening ports (514 for UDP and 6514 for SSL) are not configurable ; they are enabled through the management service only.)
Even after enabling the User-ID Syslog Listener service on the interface, the interface only accepts syslog connections from senders that have a corresponding entry in the User-ID monitored servers configuration. The firewall discards connections or messages from senders that are not on the list.
(You can use CLI commands to see additional information about syslog senders, syslog messages, and user mappings.)
> show user ip-user-mapping ip <ip-address>
IP address: 192.0.2.1 (vsys1) User: localdomain\username From: SYSLOG
> show user ip-user-mapping ip <ip-address>
No matched record
sequenceDiagram participant Client participant SyslogSender as Syslog Sender (e.g., WiFi Controller) participant WinUserIDAgent as Windows User-ID Agent participant Firewall Client->>+SyslogSender: Authenticates (e.g., joins WiFi) SyslogSender-->>-Client: Auth Success SyslogSender->>+WinUserIDAgent: Send Syslog Message (Login Event: User, IP) over TCP/UDP activate WinUserIDAgent WinUserIDAgent->>WinUserIDAgent: Check if Sender IP is configured WinUserIDAgent->>WinUserIDAgent: Parse Syslog using configured Filter Profile WinUserIDAgent->>WinUserIDAgent: Extract User and IP Address WinUserIDAgent->>WinUserIDAgent: Update Internal Mapping Table deactivate WinUserIDAgent loop Periodically/Event Driven WinUserIDAgent->>+Firewall: Send User Mapping Update (IP -> User) Firewall-->>-WinUserIDAgent: Acknowledge Update Note over Firewall: Updates User-ID Mapping Table end Note over Client, Firewall: Later... User disconnects Client->>+SyslogSender: Disconnects/Logs out SyslogSender-->>-Client: Acknowledge SyslogSender->>+WinUserIDAgent: Send Syslog Message (Logout Event: User, IP) over TCP/UDP activate WinUserIDAgent WinUserIDAgent->>WinUserIDAgent: Check if Sender IP is configured WinUserIDAgent->>WinUserIDAgent: Parse Syslog using configured Filter Profile WinUserIDAgent->>WinUserIDAgent: Extract User and IP Address WinUserIDAgent->>WinUserIDAgent: Remove Internal Mapping (IP -> User) deactivate WinUserIDAgent WinUserIDAgent->>+Firewall: Send User Mapping Deletion (IP -> User) Firewall-->>-WinUserIDAgent: Acknowledge Update Note over Firewall: Removes User-ID Mapping
To configure the Windows-based User-ID agent to create new user mappings and remove outdated mappings through syslog monitoring, start by defining Syslog Parse profiles. The User-ID agent uses the profiles to find login and logout events in syslog messages. In environments where syslog senders (the network services that authenticate users) deliver syslog messages in different formats, configure a profile for each syslog format. Syslog messages must meet certain criteria for a User-ID agent to parse them (see Syslog). This procedure uses examples with the following formats:
[Tue Jul 5 13:15:04 2016 CDT] Administrator authentication success User:johndoe1 Source:192.168.3.212
[Tue Jul 5 13:18:05 2016 CDT] User logout successful User:johndoe1 Source:192.168.3.212
After configuring the Syslog Parse profiles, you specify the syslog senders that the User-ID agent monitors.
The Windows User-ID agent accepts syslogs over TCP and UDP only. However, you must use caution when using UDP to receive syslog messages because it is an unreliable protocol and as such there is no way to verify that a message was sent from a trusted syslog sender. Although you can restrict syslog messages to specific source IP addresses, an attacker can still spoof the IP address, potentially allowing the injection of unauthorized syslog messages into the firewall. As a best practice, use TCP instead of UDP. In either case, make sure that the syslog sender and client are both on a dedicated, secure VLAN to prevent untrusted hosts from sending syslogs to the User-ID agent.
(Each profile filters syslog messages to identify either login events (to create user mappings) or logout events (to delete mappings), but no single profile can do both.)
(While reviewing syslog messages, also determine whether they include the domain name. If they don't, and your user mappings require domain names, enter the Default Domain Name when defining the syslog senders that the User-ID agent monitors (later in this procedure).)
(The following steps describe how to configure these parsing types.)
(If the syslog message contains a standalone space or tab as a delimiter, use
\s
for a space and
\t
for a tab.)
(authentication\ success){1}
extracts the first
{1}
instance of the string
authentication success
.
(logout\ successful){1}
extracts the first
{1}
instance of the string
logout successful
.
(In the example message, the regex
User:([a-zA-Z0-9\\\._]+)
matches the string
User:johndoe1
and identifies
johndoe1
as the username.)
(In the example message, the regular expression
Source:([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})
matches the IPv4 address
Source:192.168.3.212
.)
(The following is an example of a completed Syslog Parse profile that uses regex to identify login events:)
authentication success
identifies login events.
logout successful
identifies logout events.
\s
(for a space) or
\t
(for a tab).
(In the example messages,
User:
identifies the start of the username field.)
\s
to indicate a standalone space (as in the sample message) and
\t
to indicate a tab.
\s
(for a space) or
\t
(for a tab).
(In the example messages,
Source:
identifies the start of the address field.)
(For example, enter
\n
to indicate the delimiter is a line break.)
(The following is an example of a completed Syslog Parse profile that uses string matching to identify login events:)
(Within the total maximum of 100 servers of all types that the User-ID agent can monitor, up to 50 can be syslog senders.)
( The User-ID agent discards any syslog messages received from senders that are not on this list. )
(You can use CLI commands to see additional information about syslog senders, syslog messages, and user mappings.)
> show user ip-user-mapping ip <ip-address>
If the firewall received the user mapping, the output resembles the following:
IP address: 192.0.2.1 (vsys1) User: localdomain\username From: SYSLOG
> show user ip-user-mapping ip <ip-address>
If the firewall deleted the user mapping, the output displays:
No matched record
When a user initiates web traffic (HTTP or HTTPS) that matches an Authentication Policy rule, the firewall prompts the user to authenticate through Authentication Portal . This ensures that you know exactly who is accessing your most sensitive applications and data. Based on user information collected during authentication, the firewall creates a new IP address-to-username mapping or updates the existing mapping for that user. This method of user mapping is useful in environments where the firewall cannot learn mappings through other methods such as monitoring servers. For example, you might have users who are not logged in to your monitored domain servers, such as users on Linux clients.
sequenceDiagram participant User participant ClientBrowser as User's Browser participant Firewall participant AuthServer as Authentication Server (LDAP/RADIUS/SAML etc.) User->>+ClientBrowser: Attempts to access web resource ClientBrowser->>+Firewall: HTTP/S Request for resource activate Firewall Firewall->>Firewall: Evaluate Security Policy (No User-ID mapping initially) Firewall->>Firewall: Match Authentication Policy Rule requiring Auth Portal Firewall-->>-ClientBrowser: HTTP 302 Redirect to Auth Portal Host (Layer 3 Interface) deactivate Firewall ClientBrowser->>+Firewall: Request Auth Portal page (HTTPS) activate Firewall alt Kerberos SSO Enabled & Successful Firewall->>ClientBrowser: HTTP 401 Negotiate (Request Kerberos Ticket) ClientBrowser->>ClientBrowser: Obtain Kerberos Ticket for Auth Portal Host ClientBrowser->>Firewall: Re-request Auth Portal page + Kerberos Ticket Firewall->>+AuthServer: Verify Kerberos Ticket (via Kerberos Profile) AuthServer-->>-Firewall: Ticket Valid/Invalid opt Ticket Valid Firewall->>Firewall: Create User-ID Mapping (IP -> User from Ticket) Firewall-->>ClientBrowser: Redirect back to original resource URL / Success Page end else Web Form / Fallback Firewall-->>ClientBrowser: Present Auth Portal Login Form (HTML) deactivate Firewall User->>+ClientBrowser: Enters Credentials ClientBrowser->>+Firewall: POST Credentials to Auth Portal activate Firewall Firewall->>+AuthServer: Validate Credentials (via Auth Profile - LDAP/RADIUS/SAML etc.) AuthServer-->>-Firewall: Authentication Success/Failure alt Auth Success Firewall->>Firewall: Create User-ID Mapping (IP -> User) Firewall-->>ClientBrowser: Redirect back to original resource URL / Success Page else Auth Failure Firewall-->>ClientBrowser: Show Login Failed message end deactivate Firewall else Certificate Auth Firewall->>ClientBrowser: Request Client Certificate (TLS Handshake) ClientBrowser->>User: Prompt User to select Certificate User->>ClientBrowser: Selects Certificate ClientBrowser->>Firewall: Present Client Certificate Firewall->>Firewall: Validate Cert against Certificate Profile (CA, Username Field) alt Cert Valid Firewall->>Firewall: Create User-ID Mapping (IP -> User from Cert) Firewall-->>ClientBrowser: Redirect back to original resource URL / Success Page else Cert Invalid Firewall-->>ClientBrowser: Show Authentication Failed message end deactivate Firewall end
Authentication Portal uses the following methods to authenticate users whose web requests match Authentication Policy rules:
Authentication Method | Description |
---|---|
Kerberos SSO |
The firewall uses Kerberos single sign-on (SSO) to transparently obtain user credentials from the browser. To use this method, your network requires a Kerberos infrastructure, including a key distribution center (KDC) with an authentication server and ticket granting service. The firewall must have a Kerberos account. If Kerberos SSO authentication fails, the firewall falls back to web form or client certificate authentication, depending on your Authentication policy and Authentication Portal configuration. |
Web Form |
The firewall redirects web requests to a web form for authentication. For this method, you can configure Authentication policy to use Multi-Factor Authentication (MFA), SAML, Kerberos, TACACS+, RADIUS, or LDAP authentication. Although users have to manually enter their login credentials, this method works with all browsers and operating systems. |
Client Certificate Authentication |
The firewall prompts the browser to present a valid client certificate to authenticate the user. To use this method, you must provision client certificates on each user system and install the trusted certificate authority (CA) certificate used to issue those certificates on the firewall. |
The Authentication Portal mode defines how the firewall captures web requests for authentication:
Mode | Description |
---|---|
Transparent |
The firewall intercepts the browser traffic per the Authentication policy rule and impersonates the original destination URL, issuing an HTTP 401 to invoke authentication. However, because the firewall does not have the real certificate for the destination URL, the browser displays a certificate error to users attempting to access a secure site. Therefore, use this mode only when absolutely necessary , such as in Layer 2 or virtual wire deployments. |
Redirect |
The firewall intercepts unknown HTTP or HTTPS sessions and redirects them to a Layer 3 interface on the firewall using an HTTP 302 redirect to perform authentication. This is the preferred mode because it provides a better end-user experience (no certificate errors). However, it does require additional Layer 3 configuration. Another benefit of the Redirect mode is that it provides for the use of session cookies, which enable the user to continue browsing to authenticated sites without requiring re-mapping each time the timeouts expire. This is especially useful for users who roam from one IP address to another (for example, from the corporate LAN to the wireless network) because they won't need to re-authenticate when the IP address changes as long as the session stays open. If you use Kerberos SSO, you must use Redirect mode because the browser will provide credentials only to trusted sites. Redirect mode is also required if you use Multi-Factor Authentication to authenticate Authentication Portal users. |
The following procedure shows how to set up Authentication Portal authentication by configuring the PAN-OS integrated User-ID agent to redirect web requests that match an Authentication Policy rule to a firewall interface (redirect host).
SSL Inbound Inspection does not support Authentication Portal redirect . To use Authentication Portal redirect and decryption, you must use SSL Forward Proxy.
Based on their sensitivity, the applications that users access through Authentication Portal require different authentication methods and settings. To accommodate all authentication requirements, you can use default and custom authentication enforcement objects. Each object associates an Authentication rule with an authentication profile and an Authentication Portal authentication method.
Keep in mind that authentication profiles are necessary only if users authenticate through a Authentication Portal Web Form or Kerberos SSO. Alternatively, or in addition to these methods, the following procedure also describes how to implement Client Certificate Authentication.
If you use Authentication Portal without the other User-ID functions (user mapping and group mapping), you don't need to configure a User-ID agent.
(When the firewall connects to authentication servers or User-ID agents, it uses the management interface by default. As a best practice, isolate your management network by configuring service routes to connect to the authentication servers or User-ID agents.)
(If your network doesn't support access to the directory servers from any firewall interface, you must Configure User Mapping Using the Windows User-ID Agent.)
(To verify proper resolution, ping the server FQDN. For example:)
> ping host dc1.acme.com
(Required for redirect mode—to transparently redirect users without displaying certificate errors. You can generate a self-signed certificate or import a certificate that an external certificate authority (CA) signed.)
(To use a self-signed certificate, create a root CA certificate and use it to sign the certificate you will use for Authentication Portal:)
(If you don't assign an SSL/TLS Service Profile, the firewall uses TLS 1.2 by default. To use a different TLS version, configure an SSL/TLS Service Profile for the TLS version you want to use.)
(You don't need an authentication profile or sequence for client certificate authentication. If you configure both an authentication profile/sequence and certificate authentication, users must authenticate using both.)
(This step is only required if you are using Authentication Portal with the Apple Captive Network Assistant (CNA). To use Authentication Portal with CNA, perform the following steps.)
set deviceconfig setting ctd cap-portal-ask-requests <threshold-value>
(By default, the firewall has a rate limit threshold for Authentication Portal that limits the number of requests to one request every two seconds. The CNA sends multiple requests that can exceed this limit, which can result in a TCP reset and an error from the CNA. The recommended threshold value is 5 (default is one). This value will allow up to 5 requests every two seconds. Based on your environment, you may need to configure a different value. If the current value is not sufficient to handle the number of requests, increase the value.)
When evaluating the Authentication Portal Timer and the Timeout value in each Authentication policy rule, the firewall prompts the user to re-authenticate for whichever setting expires first. Upon re-authenticating, the firewall resets the time count for the Authentication Portal Timer and records new authentication timestamps for the user. Therefore, to enable different Timeout periods for different Authentication rules, set the Authentication Portal Timer to a value the same as or higher than any rule Timeout .
(If users authenticate through Kerberos single sign-on (SSO), the Redirect Host must be the same as the hostname specified in the Kerberos keytab.)
The firewall does not display the Authentication Portal web form to users until you Configure Authentication Policy rules that trigger authentication when users request services or applications.
Which Authentication Portal mode must be configured to support MFA authentication?
Which Authentication Portal mode is preferred because it avoids browser certificate errors for HTTPS sites and supports session cookies?
An Authentication Policy rule requires users to authenticate via Authentication Portal. What determines how long a user's IP-to-username mapping remains active after successful authentication before they might be prompted again?
Individual terminal server users appear to have the same IP address and therefore an IP address-to-username mapping is not sufficient to identify a specific user. To identify specific users on Windows-based terminal servers, the Palo Alto Networks Terminal Server agent (TS agent) allocates a port range to each user . The TS agent then notifies every connected firewall about the allocated port range, which allows the firewall to create an IP address-port-user mapping table and enable user- and group-based security policy enforcement. For non-Windows terminal servers, configure the PAN-OS XML API to extract user mapping information. The following values apply for both methods:
For information about the terminal servers supported by the TS agent and the number of TS agents supported on each firewall model, refer to the Palo Alto Networks Compatibility Matrix and the Product Comparison Tool.
sequenceDiagram participant User participant TSAgentHost as TS Agent Host (Windows Server) participant TSAgent as TS Agent Process/Driver participant Firewall User->>+TSAgentHost: Logs into Terminal Server Session TSAgentHost->>+TSAgent: Notify Agent of New User Session (User, Session ID) TSAgent->>TSAgent: Allocate Port Range (e.g., 20000-20199) for User TSAgent->>Firewall: Send Mapping Update (TS_IP:PortRange -> User) Firewall->>Firewall: Update TS Agent Mapping Table TSAgent-->>-TSAgentHost: Acknowledge Port Allocation Note over User, TSAgentHost: User launches application, initiates traffic User->>+TSAgentHost: Application sends traffic TSAgentHost->>+TSAgent: Driver intercepts outbound packet TSAgent->>TSAgent: Select source port from User's allocated range (e.g., 20001) TSAgent-->>-TSAgentHost: Modify packet source port TSAgentHost->>+Firewall: Send traffic (Source: TS_IP:20001) activate Firewall Firewall->>Firewall: Lookup mapping for TS_IP:20001 Firewall->>Firewall: Identify User based on TS Agent mapping Firewall->>Firewall: Apply User-based Security Policy deactivate Firewall Firewall->>Internet: Allow/Deny Traffic based on Policy Note over User, TSAgentHost: Later... User Logs Out User->>+TSAgentHost: Logs out of Terminal Server Session TSAgentHost->>+TSAgent: Notify Agent of Session End TSAgent->>TSAgent: Deallocate Port Range for User TSAgent->>Firewall: Send Mapping Deletion (TS_IP:PortRange -> User) Firewall->>Firewall: Remove mapping from TS Agent Table TSAgent-->>-TSAgentHost: Acknowledge Session End
Use the following procedure to install and configure the TS agent on the terminal server. To map all your users, you must install the TS agent on all terminal servers to which your users log in.
If you are using TS agent 7.0 or a later version, disable any Sophos antivirus software on the TS agent host. Otherwise, the antivirus software overwrites the source ports that the TS agent allocates.
For information about default values, ranges, and other specifications, refer to Configure User Mapping for Terminal Server Users. For information about the terminal servers supported by the TS agent and the number of TS agents supported on each firewall model, refer to the Palo Alto Networks Compatibility Matrix.
TaInstall.x64-x.x.x-xx.msi
or
TaInstall-x.x.x-xx.msi
file on the systems where you plan to install the agent; be sure to select the appropriate version based on whether the Windows system is running a 32-bit or a 64-bit OS.
TaInstall-9.0.msi
file to the Desktop, then enter the following:
C:\Users\administrator.acme>cd Desktop
C:\Users\administrator.acme\Desktop>TaInstall-9.0.0-1.msi
To ensure correct port allocation, you must use the default Terminal Server agent installation folder location.
(If you are upgrading to a TS agent version that has a newer driver than the existing installation, the installation wizard prompts you to reboot the system after you upgrade.)
(The System Source Port Allocation Range and System Reserved Source Ports specify the range of ports that are allocated to non-user sessions. Make sure the values in these fields do not overlap with the ports you designate for user traffic. These values can be changed only by editing the corresponding Windows registry settings. The TS agent does not allocate ports for network traffic emitted by session 0. )
2000-3000,3500,4000-5000
).
You can assign only one certificate profile for Windows User-ID agents and TS agents. Therefore, your certificate profile must include all certificate authorities that issued certificates uploaded to connected Windows User-ID and TS agents.
(Complete the following steps on each firewall you want to connect to the Terminal Server agent to receive user mappings:)
(The hostname or IP address must resolve to a static IP address. If you change the existing hostname, the TS agent resets when you commit the changes to resolve the new hostname. If the hostname resolves to multiple IP addresses, the TS agent uses the first address in the list.)
(The hostname or IP address must resolve to a static IP address. You can enter up to 8 IP addresses or hostnames.)
(This task is not necessary for other browsers, such as Google Chrome or Mozilla Firefox.)
(To disable Enhanced Protected Mode for all users, use Local Security Policy.)
Perform these steps on the Windows Server:
An administrator has users accessing network resources through Citrix XenApp (a multi-user Windows environment). Which User-ID mapping solution is specifically designed for this scenario?
How does the TS Agent allow the firewall to distinguish between different users originating from the same Terminal Server IP address?
sequenceDiagram participant User participant TermServer as Terminal Server (Non-Windows) participant Script as External Monitoring Script participant Firewall User->>+TermServer: Logs in TermServer-->>-User: Session Established Script->>+TermServer: Monitor/Detect User Login (e.g., parse logs, PAM module) TermServer-->>-Script: Login Event Details (User, TS_IP) Script->>Script: Determine available 'blockstart' port Script->>+Firewall: Send XML API Update (type=login, user=..., ip=TS_IP, blockstart=...) activate Firewall Firewall->>Firewall: Process XML, update User-ID TS Mapping Table deactivate Firewall Firewall-->>-Script: XML API Response (Success/Failure) Note over User, TermServer: User initiates traffic User->>+TermServer: Application sends traffic TermServer->>TermServer: NAT traffic source port to allocated range (using iptables, etc.) TermServer->>+Firewall: Send traffic (Source: TS_IP:AllocatedPort) activate Firewall Firewall->>Firewall: Lookup mapping for TS_IP:AllocatedPort Firewall->>Firewall: Identify User based on TS Mapping Table Firewall->>Firewall: Apply User-based Security Policy deactivate Firewall Firewall->>Internet: Allow/Deny Traffic based on Policy Note over User, TermServer: Later... User Logs Out User->>+TermServer: Logs out TermServer-->>-User: Session Terminated Script->>+TermServer: Monitor/Detect User Logout TermServer-->>-Script: Logout Event Details (User, TS_IP, blockstart) Script->>+Firewall: Send XML API Update (type=logout, user=..., ip=TS_IP, blockstart=...) activate Firewall Firewall->>Firewall: Process XML, remove mapping from TS Table deactivate Firewall Firewall-->>-Script: XML API Response (Success/Failure)
The PAN-OS XML API uses standard HTTP requests to send and receive data. API calls can be made directly from command line utilities such as cURL or using any scripting or application framework that supports RESTful services.
To enable a non-Windows terminal server to send user mapping information directly to the firewall, create scripts that extract the user login and logout events and use them for input to the PAN-OS XML API request format. Then define the mechanisms for submitting the XML API request(s) to the firewall using cURL or wget and providing the firewall's API key for secure communication. Creating user mappings from multi-user systems such as terminal servers requires use of the following API messages:
<multiusersystem>
—Sets up the configuration for an XML API Multi-user System on the firewall. This message allows for definition of the terminal server IP address (this will be the source address for all users on that terminal server). In addition, the
<multiusersystem>
setup message specifies the range of source port numbers to allocate for user mapping and the number of ports to allocate to each individual user upon login (called the
block size
). If you want to use the default source port allocation range (1025-65534) and block size (200), you do not need to send a
<multiusersystem>
setup event to the firewall. Instead, the firewall will automatically generate the XML API Multi-user System configuration with the default settings upon receipt of the first user login event message.
<blockstart>
—Used with the
<login>
and
<logout>
messages to indicate the starting source port number allocated to the user. The firewall then uses the block size to determine the actual range of port numbers to map to the IP address and username in the login message. For example, if the
<blockstart>
value is 13200 and the block size configured for the multi-user system is 300, the actual source port range allocated to the user is 13200 through 13499. Each connection initiated by the user should use a unique source port number within the allocated range, enabling the firewall to identify the user based on its IP address-port-user mappings for enforcement of user- and group-based security rules. When a user exhausts all the ports allocated, the terminal server must send a new
<login>
message allocating a new port range for the user so that the firewall can update the IP address-port-user mapping. In addition, a single username can have multiple blocks of ports mapped simultaneously. When the firewall receives a
<logout>
message that includes a
<blockstart>
parameter, it removes the corresponding IP address-port-user mapping from its mapping table. When the firewall receives a
<logout>
message with a username and IP address, but no
<blockstart>
, it removes the user from its table. And, if the firewall receives a
<logout>
message with an IP address only, it removes the multi-user system and all mappings associated with it.
The XML files that the terminal server sends to the firewall can contain multiple message types and the messages do not need to be in any particular order within the file. However, upon receiving an XML file that contains multiple message types, the firewall will process them in the following order: multiusersystem requests first, followed by logins, then logouts.
The following workflow provides an example of how to use the PAN-OS XML API to send user mappings from a non-Windows terminal server to the firewall.
(Any special characters in the password must be URL/percent-encoded.)
(From a browser, log in to the firewall. Then, to generate the API key for the firewall, open a new browser window and enter the following URL:)
https://<Firewall-IPaddress>/api/?type=keygen&user=<username>&password=<password>
(Where
<Firewall-IPaddress>
is the IP address or FQDN of the firewall and
<username>
and
<password>
are the credentials for the administrative user account on the firewall. For example:)
https://10.1.2.5/api/?type=keygen&user=admin&password=admin
(The firewall responds with a message containing the key, for example:)
<response status="success">
<result>
<key>k7J335J6hI7nBxIqyfa62sZugWx7ot%2BgzEA9UOnlZRg=</key>
</result>
</response>
(If the Terminal Server agent does not send a setup message, the firewall will automatically create a Terminal Server agent configuration using the following default settings upon receipt of the first login message:)
(The following shows a sample setup message:)
<uid-message>
<payload>
<multiusersystem>
<entry ip="10.1.1.23" startport="20000" endport="39999" blocksize="100"/>
</multiusersystem>
</payload>
<type>update</type>
<version>1.0</version>
</uid-message>
(where
entry ip
specifies the IP address assigned to terminal server users,
startport
and
endport
specify the port range to use when assigning ports to individual users, and
blocksize
specifies the number of ports to assign to each user. The maximum blocksize is 4000 and each multi-user system can allocate a maximum of 1000 blocks.)
(If you define a custom blocksize and or port range, keep in mind that you must configure the values such that every port in the range gets allocated and that there are no gaps or unused ports. For example, if you set the port range to 1000–1499, you could set the block size to 100, but not to 200. This is because if you set it to 200, there would be unused ports at the end of the range.)
(Make sure the script enforces assignment of port number ranges at fixed boundaries with no port overlaps. For example, if the port range is 1000–1999 and the block size is 200, acceptable blockstart values would be 1000, 1200, 1400, 1600, or 1800. Blockstart values of 1001, 1300, or 1850 would be unacceptable because some of the port numbers in the range would be left unused.)
(The login event payload that the terminal server sends to the firewall can contain multiple login events.)
(The following shows the input file format for a PAN-OS XML login event:)
<uid-message>
<payload>
<login>
<entry name="acme\jjaso" ip="10.1.1.23" blockstart="20000"/>
<entry name="acme\jparker" ip="10.1.1.23" blockstart="20100"/>
<entry name="acme\ccrisp" ip="10.1.1.23" blockstart="21000"/>
</login>
</payload>
<type>update</type>
<version>1.0</version>
</uid-message>
(The firewall uses this information to populate its user mapping table. Based on the mappings extracted from the example above, if the firewall received a packet with a source address and port of 10.1.1.23:20101, it would map the request to user jparker for policy enforcement.)
(Each multi-user system can allocate a maximum of 1,000 port blocks.)
(Upon receipt of a
<logout>
event message with a
<blockstart>
parameter, the firewall removes the corresponding IP address-port-user mapping. If the
<logout>
message contains a username and IP address, but no
<blockstart>
parameter, the firewall removes all mappings for the user. If the
<logout>
message contains an IP address only, the firewall removes the multi-user system and all associated mappings.)
(The following shows the input file format for a PAN-OS XML logout event:)
<uid-message>
<payload>
<logout>
<entry name="acme\jjaso" ip="10.1.1.23" blockstart="20000"/>
<entry name="acme\ccrisp" ip="10.1.1.23"/>
<entry ip="10.2.5.4"/>
</logout>
</payload>
<type>update</type>
<version>1.0</version>
</uid-message>
(You can also clear the multiuser system entry from the firewall using the following CLI command:
clear xml-api multiusersystem
)
(One way to do this would be to use netfilter NAT rules to hide user sessions behind the specific port ranges allocated via the XML API based on the uid. For example, to ensure that a user with the user ID jjaso is mapped to a source network address translation (SNAT) value of 10.1.1.23:20000-20099, the script you create should include the following:)
[root@ts1 ~]# iptables -t nat -A POSTROUTING -m owner --uid-owner jjaso -p tcp -j SNAT --to-source 10.1.1.23:20000-20099
(Similarly, the scripts you create should also ensure that the IP table routing configuration dynamically removes the SNAT mapping when the user logs out or the port allocation changes:)
[root@ts1 ~]# iptables -t nat -D POSTROUTING 1
To apply the files to the firewall using wget:
> wget --post file <filename> “https://<Firewall-IPaddress>/api/?type=user-id&key=<key>&file-name=<input_filename.xml>&client=wget&vsys=<VSYS_name>”
(For example, the syntax for sending an input file named
login.xml
to the firewall at 10.2.5.11 using key
k7J335J6hI7nBxIqyfa62sZugWx7ot%2BgzEA9UOnlZRg
using wget would look as follows:)
> wget --post file login.xml “https://10.2.5.11/api/?type=user-id&key=k7J335J6hI7nBxIqyfa62sZugWx7ot%2BgzEA9UOnlZRg&file-name=login.xml&client=wget&vsys=vsys1”
To apply the file to the firewall using cURL:
> curl --form file=@<filename> https://<Firewall-IPaddress>/api/?type=user-id&key=<key>&vsys=<VSYS_name>
(For example, the syntax for sending an input file named
login.xml
to the firewall at 10.2.5.11 using key
k7J335J6hI7nBxIqyfa62sZugWx7ot%2BgzEA9UOnlZRg
using cURL would look as follows:)
> curl --form file@login.xml “https://10.2.5.11/api/?type=user-id&key=k7J335J6hI7nBxIqyfa62sZugWx7ot%2BgzEA9UOnlZRg&vsys=vsys1”
(Verify the configuration by opening an SSH connection to the firewall and then running the following CLI commands:)
To verify if the terminal server is connecting to the firewall over XML:
admin@PA-5250> show user xml-api multiusersystem Host Vsys Users Blocks ---------------------------------------- 10.5.204.43 vsys1 5 2
To verify that the firewall is receiving mappings from a terminal server over XML:
admin@PA-5250> show user ip-port-user-mapping all Global max host index 1, host hash count 1 XML API Multi-user System 10.5.204.43 Vsys 1, Flag 3 Port range: 20000 - 39999 Port size: start 200; max 2000 Block count 100, port count 20000 20000-20199: acme\administrator Total host: 1
sequenceDiagram participant ExternalSystem as External System / Script participant Firewall Note over ExternalSystem: Detects user login event (e.g., from custom app, VPN, etc.) ExternalSystem->>ExternalSystem: Extract Username and IP Address ExternalSystem->>+Firewall: Send XML API Update (type=login, user=..., ip=...) activate Firewall Firewall->>Firewall: Process XML, add mapping to User-ID Table deactivate Firewall Firewall-->>-ExternalSystem: XML API Response (Success/Failure) Note over ExternalSystem: Later... Detects user logout event ExternalSystem->>+Firewall: Send XML API Update (type=logout, user=..., ip=...) activate Firewall Firewall->>Firewall: Process XML, remove mapping from User-ID Table deactivate Firewall Firewall-->>-ExternalSystem: XML API Response (Success/Failure)
User-ID provides many out-of-the box methods for obtaining user mapping information. However, you might have applications or devices that capture user information but cannot natively integrate with User-ID. For example, you might have a custom, internally developed application or a device that no standard user mapping method supports. In such cases, you can use the PAN-OS XML API to create custom scripts that send the information to the PAN-OS integrated User-ID agent or directly to the firewall. The PAN-OS XML API uses standard HTTP requests to send and receive data. API calls can be made directly from command line utilities such as cURL or using any scripting or application framework that supports POST and GET requests.
To enable an external system to send user mapping information to the PAN-OS integrated User-ID agent, create scripts that extract user login and logout events and use the events as input to the PAN-OS XML API request. Then define the mechanisms for submitting the XML API requests to the firewall (using cURL, for example) and use the API key of the firewall for secure communication. For more details, refer to the PAN-OS XML API Usage Guide.
Which User-ID method allows a custom script to push IP-to-user mappings obtained from a non-standard source (like an 802.1x system without native integration) directly to the firewall?