Certificate Authentication Overview

This guide covers configuring certificate-based authentication for administrator access to the Palo Alto Networks firewall web interface and for GlobalProtect deployments.

Using certificates enhances security by replacing or supplementing password-based authentication with cryptographic verification.

Key areas covered:

Certificate management, profiles, and their application in authentication (Web UI, GlobalProtect) are important topics for PCNSE.

Certificate Profiles: Introduction & Configuration

Certificate profiles define user and device authentication parameters for various firewall features including Authentication Portal, MFA, GlobalProtect, IPSec VPNs, administrative web interface access, and more.

They specify:

Steps to Configure a Certificate Profile:

  1. Obtain CA Certificates: Ensure the CA certificate(s) that signed the client/server certificates you intend to validate are present on the firewall ( Device > Certificate Management > Certificates ). You can Generate them on the firewall or Import them from your PKI.
  2. Identify the Profile:
    • Navigate to Device > Certificate Management > Certificate Profile and click Add .
    • Enter a descriptive Name (e.g., `GP-Client-Cert-Validation`, `Admin-WebUI-Cert-Auth`).
    • (Multi-VSYS) Select the appropriate Location (VSYS or Shared).
  3. Assign CA Certificates:
    • In the CA Certificates table, click Add .
    • Select the relevant CA Certificate from the dropdown or Import it directly.
    • (Optional) Configure Default OCSP URL or OCSP Verify CA Certificate if overriding default behavior is needed (rare).
    • Click OK . Repeat for all necessary CAs (e.g., Root and Intermediate CAs in a chain).
  4. Configure Username Extraction (Important for Cert-Only Auth):
    • Select the Username Field dropdown to specify how the firewall should extract the username if the certificate is used as the primary authentication factor (e.g., for Web UI admin access or GlobalProtect cert-only auth).
      • Subject: Typically uses the Common Name (CN) field.
      • Subject Alt: Uses an attribute from the Subject Alternative Name (SAN) extension (Email or Principal Name).
      • None: Does not extract a username. Use this if certificate validation is secondary to another authentication method (like RADIUS/LDAP) that provides the username.
    • If configuring certificate-only authentication (no separate username/password prompt), you *must* select 'Subject' or 'Subject Alt' to extract the username for authorization and logging. Leaving it as 'None' will cause failures.

  5. Configure Revocation Checking (Recommended): See next section.
  6. Click OK to save the profile.
  7. Commit the changes.

Understand that Certificate Profiles link trusted CAs to specific validation settings (revocation, username field) and are applied to features like GlobalProtect or Admin Auth settings.

Certificate Profiles: Revocation Checking (CRL/OCSP)

Configuring revocation checking ensures that compromised or invalid certificates are not accepted, even if they haven't expired.

It is highly recommended to enable revocation checking for security.

Configuration Options within Certificate Profile:

Carefully consider the "Block session..." options. Blocking on unknown status or timeout enhances security but can cause connection issues if CRL/OCSP responders are unreliable. Allowing sessions in these cases reduces availability impact but increases risk.

Understand the difference between CRL and OCSP and the implications of the various "Block session..." options.

Web UI Cert Auth: Overview

As a more secure alternative to password-based authentication to the firewall web interface, you can configure certificate-based authentication for administrator accounts.

This method relies on administrators having a valid client certificate (issued by a CA trusted by the firewall) installed in their browser. Authentication involves the browser presenting the certificate and the firewall verifying its validity and signature, instead of prompting for a password.

Enabling certificate-based authentication for *any* administrator disables the username/password logins for *all* administrators accessing the web interface. Plan the rollout carefully.

Benefits:

Prerequisites:

Web UI Cert Auth: Configuration Steps

Ensure you have completed the prerequisites: a CA certificate exists on the firewall, and administrators can receive/install client certificates.

  1. Generate/Import CA Certificate: (If not already done) Ensure the CA certificate that will sign/has signed the admin client certificates is loaded on the firewall ( Device > Certificate Management > Certificates ). Mark it as a trusted CA if imported.
  2. Configure Certificate Profile: Create a Certificate Profile specifically for admin web UI authentication ( Device > Certificate Management > Certificate Profile ).
    • Add the CA certificate from step 1 to the CA Certificates list.
    • Set the Username Field to Subject (or potentially Subject Alt if usernames are stored there). This tells the firewall how to map the certificate to an Administrator Account name.
    • Configure CRL/OCSP revocation checking as needed (highly recommended).
    • Click OK .

    The 'Username Field' setting is crucial for mapping the certificate to the admin account.

  3. Apply Certificate Profile Globally for Admin Auth:
    • Navigate to Device > Setup > Management .
    • Edit the Authentication Settings section.
    • In the Certificate Profile dropdown, select the profile created in step 2.
    • Click OK .

    This step globally enables certificate authentication for the web UI and disables password logins.

  4. Configure Administrator Accounts: For each administrator using certificate authentication:
    • Navigate to Device > Administrators . Add or Edit the administrator account.
    • Ensure the Name field exactly matches the username extracted from the certificate based on the Certificate Profile setting (e.g., the CN in the Subject field).
    • Check the box Use only client certificate authentication (Web) .
    • Assign the appropriate Administrator Type (Role Based or Dynamic). The Authentication Profile setting on the admin account itself is ignored when this checkbox is selected for web UI access.
    • Click OK .
  5. Issue & Distribute Client Certificates: Generate a client certificate signed by the designated CA for each administrator. Ensure the Subject CN (or relevant field) matches their firewall username. Securely export (with private key, e.g., P12/PFX) and distribute these certificates.
  6. Install Client Certificates: Administrators must import their P12/PFX file into their browser's certificate store.
  7. Commit Changes: Commiting the change in Step 3 (applying the Certificate Profile globally) will likely restart the management server, terminating your session. You will need your *own* client certificate installed in your browser to log back in after the commit.
  8. Verify Access: Administrators should access the firewall's web UI URL. The browser should prompt for certificate selection. After selecting the correct certificate, they should be logged in without a password prompt.
Simplified sequence diagram of successful Web UI certificate authentication.

Simplified sequence diagram of successful Web UI certificate authentication.

GP & Troubleshooting: Client/Server Certificate Requirements

Using certificates effectively in GlobalProtect requires specific certificate attributes and configurations.

Server Certificate (Portal/Gateway) Requirements:

Client Certificate (User/Machine) Requirements:

Knowing the required EKUs (Server Auth, Client Auth) and the importance of SAN matching for server certificates is crucial for troubleshooting GP certificate issues.

GP Example: Certificate-Only Authentication

This configuration allows GlobalProtect clients to authenticate using *only* a client certificate, without any user credential prompt.

This simplifies the login process but relies entirely on the security and proper issuance/revocation of client certificates.

Configuration Steps:

  1. Certificates: Ensure Server and Client certificates meeting the requirements (see previous section ) are generated/imported. Ensure the Root CA (and any Intermediates) for the client certificates are on the firewall.
  2. Certificate Profile: Create a Certificate Profile ( Device > Certificate Management > Certificate Profile ).
    • Add the CA(s) that sign the client certificates.
    • Set Username Field to Subject (or Subject Alt) to extract the username from the certificate for policy and logging.
    • Configure revocation checking (recommended).
  3. SSL/TLS Service Profile: Create or use an existing SSL/TLS Profile ( Device > Certificate Management > SSL/TLS Service Profile ) that references the correct Server Certificate for the Portal/Gateway.
  4. GlobalProtect Portal Configuration: ( Network > GlobalProtect > Portals )
    • Go to the Authentication tab. Click Add.
    • Give the Client Authentication configuration a name.
    • Set Authentication Profile to None .
    • Set Certificate Profile to the one created in Step 2.
    • (Optional) Configure OS check, etc.
    • Click OK.
    • Go to the Agent > [Agent Config] > App tab.
    • Ensure Save User Credentials is disabled/unchecked.
    • Set Authentication Override settings appropriately if needed (e.g., specify allowed cookie lifetime if generating cookies). Consider disabling cookie authentication if relying solely on certificates per connection attempt.
    • Ensure Enable Single Sign-On (SSO) is *unchecked*.
  5. GlobalProtect Gateway Configuration: ( Network > GlobalProtect > Gateways )
    • Go to the Authentication tab. Click Add.
    • Give the Client Authentication configuration a name.
    • Set Authentication Profile to None .
    • Set Certificate Profile to the one created in Step 2.
    • (Optional) Configure OS check, etc.
    • Click OK.
  6. Install Certificates on Client:
    • Install the Root CA (and any Intermediates) into the client's Trusted Root Certification Authorities store (Machine store recommended for reliability).
    • Install the Client Certificate (with private key, P12/PFX) into the client's Personal store (User store for user-logon/on-demand, Machine store for pre-logon).
  7. Commit changes on the firewall.
  8. Verify Connection: The GlobalProtect client should connect automatically (or after clicking Connect) without prompting for username/password, using the installed client certificate. The username seen in logs/policy should be the one extracted from the certificate.

Key elements for cert-only auth: Auth Profile = None, Certificate Profile selected (with username extraction), client certificate installed correctly with private key and trusted chain.

GP Example: iOS Certificate Authentication

Configuring GlobalProtect certificate authentication on Apple iOS devices requires careful certificate deployment, often using tools like Apple Configurator or an MDM solution.

Requires GlobalProtect App 5.0+ and iOS 12.0+.

Configuration Steps (Summary):

  1. Firewall Configuration: Configure Portal, Gateway, Certificate Profile, and SSL/TLS profile as described previously (similar to Cert-Only Auth or combined with user credentials if needed). Ensure certificates meet requirements (see Requirements ).
  2. Certificate Deployment (using Apple Configurator 2 as example):
    • Install Apple Configurator 2 on a macOS machine.
    • Create a new Configuration Profile ( File > New Profile ).
    • Under the Certificates payload:
      • Add the Root CA certificate that signed the server certificate.
      • Add any Intermediate CA certificates for the server certificate chain.
      • Add the Client Certificate (Identity Certificate) in .p12 format (including private key). Provide the password if the .p12 is encrypted.
    • Under the VPN payload:
      • Configure a new VPN connection.
      • Set Connection Type to Custom SSL .
      • Set Identifier to net.paloaltonetworks.GlobalProtect.vpn .
      • Enter the Server address (Portal address).
      • Set User Authentication to Certificate .
      • Select the Client Certificate (Identity Credential) added in the Certificates payload.
      • Set Provider Bundle Identifier to net.paloaltonetworks.GlobalProtect.client .
    • Save the Configuration Profile (.mobileconfig file).
    • Deploy the profile to the iOS device using Apple Configurator (connect via USB) or an MDM solution.
  3. Trust Root CA on iOS Device: This is a crucial step often missed.
    • On the iOS device, after the profile is installed, go to Settings > General > About > Certificate Trust Settings .
    • Find the Root CA certificate (and any Intermediate CAs) that signed the Portal/Gateway's server certificate.
    • Toggle the switch to Enable Full Trust for these CAs.
  4. Connect via GlobalProtect App: Launch the GP app. It should use the deployed configuration and certificate to connect.

Failure to enable "Full Trust" for the server's Root CA in iOS settings is a common cause of connection failures, even if the profile and certificates are deployed correctly.

GP Troubleshooting: Empty CN in Client Certificate

Symptom: GlobalProtect client certificate authentication fails. Firewall logs (detailed below) or packet captures may show errors related to parsing the client certificate, specifically mentioning issues finding the common name (CN).

Firewall Global Counters ( show counter global filter packet-filter yes delta yes after failed attempt) might show increments in:

Packet diag logs ( debug dataplane packet-diag set log feature flow basic ssl basic proxy basic ) might show:

debug: pan_proxy_cfg_client_cert_handler(pan_proxy_cfg.c:1244): receive client cert
debug: pan_x509_parse_dn(pan_x509.c:519): didn't find common name
debug: pan_x509_parse_tbs_certificate(pan_x509.c:1998): pan_x509_parse_dn() failed
...
Error: pan_proxy_cfg_client_cert_handler(pan_proxy_cfg.c:1292): failed to parse client cert

(Logs from PAN-OS 8.0 example in source)

Cause:

Resolution:

  1. Re-issue Client Certificate: The most reliable solution is to have the CA re-issue the client certificate with a non-empty, meaningful Subject Common Name.
  2. Check SAN Critical Flag (8.1+): If using PAN-OS 8.1+ and an empty Subject CN is absolutely necessary, ensure the Subject Alternative Name (SAN) extension exists AND is marked as 'critical' within the certificate structure itself. Consult your CA documentation on how to achieve this.
  3. Upgrade PAN-OS: If running a version prior to 8.1, upgrading might improve compatibility, but ensuring a valid CN or correctly formatted critical SAN is preferred.

Empty Subject CNs in client certificates can cause unexpected authentication failures, especially on older PAN-OS versions or if SAN extensions are not correctly marked critical.

GP Troubleshooting: Kerberos SSO & Cert Auth Conflict

Symptom: GlobalProtect connection fails when using Kerberos SSO combined with Client Certificate authentication ( Client Authentication set to User Credentials AND Client Certificate Required ). The specific error seen in the firewall system logs ( less mp-log gpsvc.log ) is:

Authentication failed. Username in client cert ([CertUsername]) is different from the input ([KerberosUsername]). User name from certificate is [CertUsername]. Input user name is [KerberosUsername]

Cause:

Resolution:

  1. Navigate to the Certificate Profile used for client authentication ( Device > Certificate Management > Certificate Profile > [profile-name] ).
  2. Change the Username Field setting from 'Subject' or 'Subject Alt' to None .
  3. Click OK .
  4. Commit the changes.

Explanation: By setting the Username Field to 'None', you tell the firewall *not* to extract a username from the certificate for comparison purposes when Kerberos is also used. The firewall will still validate the certificate against the trusted CA and check revocation status, but it will rely solely on the username provided by the successful Kerberos SSO authentication for identity. The certificate acts purely as a required *factor* for authentication, not as the source of the username in this combined scenario.

Understand how combining multiple authentication factors (Kerberos + Certificate) requires careful configuration of how usernames are derived and compared.

When requiring both credentials (obtained via Kerberos SSO in this case) AND a client certificate, set the Certificate Profile's Username Field to 'None' to avoid username mismatch errors.

Interactive Quiz: Certificate Authentication

Test your understanding of Palo Alto Networks Certificate Profiles and Authentication.

1. What is the primary purpose of a Certificate Profile on a Palo Alto Networks firewall?

2. When configuring Certificate-Based Authentication for the Web UI, what happens immediately after committing the change that applies the Certificate Profile in Authentication Settings?

3. In a Certificate Profile, what does setting the 'Username Field' to 'Subject' typically instruct the firewall to do?

4. Which Extended Key Usage (EKU) is typically required for a GlobalProtect Portal/Gateway server certificate?

5. What is a critical requirement for the Subject Alternative Name (SAN) extension in a GlobalProtect Portal/Gateway server certificate?

6. When configuring GlobalProtect for certificate-only authentication (no user credentials prompt), what should the 'Authentication Profile' typically be set to in the Portal and Gateway authentication settings?

7. Which certificate store on a Windows client machine should a user's client certificate (with private key) typically be imported into for GlobalProtect 'user-logon' or 'on-demand' connections?

8. On an iOS device using GlobalProtect with certificate authentication, what extra step is often required after deploying the configuration profile containing the certificates?

9. If GlobalProtect fails with the error "Username in client cert is different from the input" when using Kerberos SSO and Certificate Authentication together, what is the likely misconfiguration?

10. On PAN-OS 8.0 and earlier, what issue might arise if a client certificate used for GlobalProtect authentication has an empty Subject Common Name (CN)?

11. When configuring a Certificate Profile for revocation checking, what is the recommended approach if both OCSP and CRL are available?

12. In a Certificate Profile, what does checking "Block sessions if certificate status cannot be retrieved within timeout" achieve?

13. Which file format is typically used when exporting a client or machine certificate *with its private key* for installation on a client device (Windows/macOS/iOS)?

14. For GlobalProtect certificate-only authentication, where do you specify the CA certificate(s) that the firewall should use to validate incoming client certificates?

15. When deploying certificates to iOS using Apple Configurator for GlobalProtect, what 'Connection Type' should be selected in the VPN payload?

16. What is the primary function of an SSL/TLS Service Profile in the context of GlobalProtect?

17. If a server certificate used by GlobalProtect is signed by an Intermediate CA, what must be ensured for successful client validation?

18. When is a 'Machine Certificate' typically used in GlobalProtect?

19. In the Certificate Profile setting "Block sessions if the certificate was not issued to the authenticating device", what two pieces of information are compared?

20. Which is NOT a primary function of a Certificate Profile?