Palo Alto Networks' Authentication Policy, a core feature within PAN-OS, provides a robust mechanism for verifying user identity before granting access to network resources, applications, or specific URL categories. It acts as a critical enforcement point, ensuring that only legitimate, authenticated users can proceed, aligning with Zero Trust security principles. Authentication Policy is evaluated before Security Policy, adding an essential layer of identity-based access control. When a user's traffic matches an Authentication Policy rule requiring authentication, the firewall prompts the user for credentials via an Authentication Portal (often referred to as Captive Portal) or other configured methods. Successful authentication can then populate the User-ID mapping table, allowing for user and group-based Security Policies.
To effectively implement and manage Authentication Policies, a clear understanding of its components and workflow is essential.
Several objects and settings come together to form a functional Authentication Policy:
The general workflow when traffic hits an Authentication Policy rule is as follows:
High-level workflow of a user being authenticated via an Authentication Policy rule using a web form and an external authentication server.
Configuration involves several steps, typically performed via the PAN-OS web interface (Panorama or firewall GUI) or through the CLI/API for automation.
# Example target for LDAP Server Profile Name: AD-LDAP-Server Type: ldap Server: ldap-server.corp.paloaltonetworks.com Port: 389 (or 636 for LDAPS) Base: dc=corp,dc=paloaltonetworks,dc=com Bind DN: cn=ldapbind,ou=ServiceAccounts,dc=corp,dc=paloaltonetworks,dc=com
# Example conceptual PAN-OS CLI structure for an Authentication Policy rule # (Actual configuration is more complex and usually done via GUI/XML API) configure edit Vsys_Name vsys1 # or your specific vsys edit rulebase authentication edit Rule_Name "Auth_for_Internet_Unknown_Users" set from any set to any set source any set destination any set source-user unknown # Key part for initial auth set service any set action authenticate enforcement "Web-Form-Corporate-Auth" # Links to Auth Enforcement Object top # or before/after specific rule exit exit
By placing Authentication Policy rules in front of access to critical internal resources (e.g., financial systems, development servers, databases), organizations can ensure that only authenticated users can attempt to connect.
Authentication Policy is a key enabler for MFA within the Palo Alto Networks ecosystem, particularly for web-based access or step-up authentication scenarios.
Conceptual flow of MFA enforcement using Authentication Policy integrated with an external MFA provider.
Authentication Policy can be used to provide controlled network access for guests, contractors, or partners.
By leveraging User-ID information (which Authentication Policy helps populate), you can create highly granular access controls.
Even if a user is already known to the firewall (e.g., via GlobalProtect or a previous Captive Portal authentication), you can enforce re-authentication for access to highly sensitive applications or data.
# PAN-OS CLI command to view recent authentication logs > show log authentication direction equal backward
When Authentication Policy isn't behaving as expected, consider these Palo Alto Networks-specific troubleshooting steps:
Symptom | Potential Palo Alto Networks Cause | Troubleshooting Steps (PAN-OS) |
---|---|---|
Users not prompted for authentication |
- No matching Authentication Policy rule.
- Rule is shadowed by a preceding rule. - Incorrect zone, address, or service specified in the rule. - Traffic not hitting the firewall or interface configured for Authentication Portal. - User already authenticated and mapping is still valid. |
- Verify rule order and matching criteria (GUI: `Policies > Authentication`).
- Check session browser (`Monitor > Session Browser`) to see if traffic is hitting the firewall and what policy it matches. - Use `show counter global filter aspect authd` and `show counter global filter delta yes aspect authd` to see if authd counters are incrementing. - Check `show user ip-user-mapping ip |
Authentication Portal page not loading or shows certificate error |
- Incorrect interface configured for Authentication Portal (`Device > Authentication Portal`).
- No valid SSL/TLS certificate assigned to the portal (for HTTPS). - DNS resolution issue for the portal redirect hostname. - Client browser blocking pop-ups or JavaScript (less common for primary page load). - Firewall management interface not enabled for HTTP/HTTPS service. |
- Verify Authentication Portal settings (`Device > Authentication Portal`).
- Ensure a valid certificate is imported and assigned. - Check Interface Management Profile on the interface serving the portal; it must allow "Response Pages" or "User-ID Agent" (depending on method). - Test DNS resolution from client. |
Authentication fails with correct credentials |
- Incorrect Authentication Profile settings (server IP, port, Bind DN/password for LDAP, shared secret for RADIUS).
- Communication issue between firewall and authentication server (routing, firewall policies on intermediate devices). - User not in "Allow List" of Authentication Profile or Sequence. - Account locked out or disabled in the backend directory. - Incorrect login attribute (e.g., `sAMAccountName` vs `userPrincipalName` for LDAP). |
- Test Authentication Profile: `Device > Authentication Profile > [Select Profile] > Test Authentication Profile`.
- Check Authentication Logs (`Monitor > Logs > Authentication`) for detailed error messages. - Use CLI: `test authentication authentication-profile - `debug authenticationd on debug` (use with caution in production, generates verbose logs). - Packet captures on firewall for traffic to/from authentication server. |
User authenticates, but User-ID mapping not created/updated |
- User-ID not enabled on the relevant zones.
- Issues with the User-ID agent process (`userid`) on the firewall. - Group mapping issues (if relying on group membership from auth server). |
- Verify User-ID enabled on zones: `Network > Zones > [Zone Name] > Enable User Identification`.
- Check `show user ip-user-mapping all` or `show user user-id-agent state all` (if agent is involved). - Review User-ID logs: `Monitor > Logs > User-ID`. - Ensure group mapping is correctly configured in Authentication Profile or `Device > User Identification > Group Mapping Settings`. |
MFA challenges not occurring |
- SAML IdP or RADIUS server not correctly configured for MFA.
- Authentication Profile not using the correct SAML/RADIUS server configured for MFA. - Firewall not properly configured as SAML SP, or RADIUS client configuration mismatch. |
- Verify MFA configuration on the IdP/RADIUS server and MFA provider side.
- Double-check SAML IdP Profile or RADIUS Server Profile on PAN-OS. - Authentication Logs may show if the primary auth succeeded but MFA step was expected by the server. |
Decision tree illustrating the Palo Alto Networks Authentication Policy evaluation flow when new traffic arrives at the firewall.
Key Palo Alto Networks objects involved in an Authentication Policy challenge and their relationships. The Authentication Policy Rule triggers the Authentication Enforcement object, which uses an Authentication Profile (or Sequence) to validate credentials against an authentication server, often presenting an Authentication Portal to the user.
Simplified packet flow within a Palo Alto Networks firewall highlighting the stage where Authentication Policy is evaluated, relative to Security Policy and other processing stages. Successful authentication can provide User-ID context for subsequent Security Policy evaluation.
Note: The original base HTML sequence diagram remains relevant for the basic user interaction workflow.