PVWA - How To Configure PKIPN (CAC / PIV) Authentication for v10.6 and Above

PVWA - How To Configure PKIPN (CAC / PIV) Authentication for v10.6 and Above

148
Created On 11/10/26 10:54 AM - Last Modified 11/10/26 13:01 PM


Objective


As of PAS version 10.6, PKI and PKIPN authentication methods are BOTH able to be configured for PVWA authentication.  In earlier versions, we were forced to choose one or the other, but not both.  This article will outline the steps for integrating the PVWA with PKIPN authentication for CAC / PIV logon to the PVWA web interface.

NOTE:  PKIPN will not work for logon to the PrivateArk Client.  PKIPN pulls the username from the subject-alternative name on the certificate, and PKI pulls the username from the subject name on the certificate.  The PrivateArk Client is not coded to differentiate between the two and is not configurable at this time to choose one or the other, or both.  PKI (NOT PKIPN) is the only PKI-based authentication method that will currently work for accessing the vault via the PrivateArk Client.



Environment


10.10;11.5;12.2;12.6;14.0;14.2;14.6 Privileged Access Manager (PAM, self-hosted) Password Vault Web Access

Procedure


Whether you are matching the "Subject" or "Principal Name", one of these MUST match an Active Directory attribute.

  • If matching with Distinguished Name (DN) from the "Subject", use standard PKI integration.
  • If matching with "Principal Name" from the "Subject-Alternative Name" use PKIPN as described in this article.



PREREQUISITES:

  1. Make sure the PVWA server(s) have an SSL Certificate that has been signed by a Certificate Authority (CA) - Root level CA cert.
    NOTE: See install guide section “Add a CA to the local computer certificate store” for more details.
  2. LDAP integration configured and tested.

INTEGRATION STEPS:

  1. Enable PKIPN authentication within the PVWA system configuration (Click on the gear icon, then Configuration Options -> Options -> Authentication Methods)
  2. Right-click on Authentication Methods, and select Add AuthMethod

  3. Set the ID of the new Authentication Method to pkipn (all lowercase), then set it to enabled=Yes (shown below).

  4. Edit the web.config file found in <DRIVE>:\inetpub\wwwroot\PasswordVault (open as administrator). 
    1. Under the tag <appSettings>, add the following key:

      <add key="UsePKIPNAlternateUserName" value="yes”/>

      NOTE:  This will allow us to continue using the samAccountName for regular LDAP authentication, but also allow the PKIPN to work with the Subject Alternative Name and userPrincipalName.

  5. Create a folder under <DRIVE>:\inetpub\wwwroot\PasswordVault called "CustomAuthenticationDlls" (case sensitive) and copy the CyberArk.Authentication.CustomPKIPN.dll file from the PasswordVault\Bin directory into the newly created CustomAuthenticationDlls directory.
    NOTE:  Some Windows servers will block the DLL from running and may result in an IIS error.  To avoid this, it may be necessary to copy the DLL file to the Desktop first, then right-click on the file and view properties, then click "Unblock" as shown below before copying it to the CustomAuthenticationDlls folder.

  6. Modify applicationHost.config file located in C:\Windows\System32\inetsrv\config
    NOTE:  These steps will enable PKIPN authentication for the modern user interface. 
    1. Using Notepad (not Notepad++), open the applicationHost.config.
    2. At the END of the file (above the last </configuration> tag, add the following lines:

      <location path="Default Web Site/PasswordVault/api/auth/pkipn/logon">
          <system.webServer>
              <security>
                  <access sslFlags="Ssl, SslNegotiateCert, SslRequireCert" />
              </security>
          </system.webServer>
      </location>
    3. Restart IIS from an administrative CMD terminal, run "iisreset"

  7. Verify PKIPN SAN Attribute
    1. Confirm the attribute that we want to look at on the PIV/CAC certificate that is linked to AD. The attribute used must match EXACTLY – it cannot contain additional text or data like an altsecID etc. It must be a like for like match.
      Example: Compare Certificate: in this instance, SAN Principal Name | To AD Attribute: userPrincipalName:
  8. Make sure LDAP integration in the PVWA is appropriately configured:
    1. Go to the System Configuration  > LDAP integration
    2. Find the relevant profile (under the Profiles heading) that was configured in the LDAP integration (if using AD, then the correct profile will most likely be "Microsoft AD Profile".
    3. Find the property ‘userPrincipalName’ and verify that the value for this property matches the attribute we want to match the SAN from the certificate/PiV/CaC card too. Default is userPrincipalName but this can be modified to match your directory. (See below)
    4. Click Apply to commit any changes to the configuration and stay in LDAP integration for the next step.

  9. In order to allow the customer to have a ‘friendly name’ for their vault user (instead of a UPN like 000001@agency.gov) we can allow the customer to edit the UserLogonName attribute within the directory profile.
    1. Within System Configuration > LDAP integration
    2. Find the relevant profile (under the Profiles heading) that was configured in the LDAP integration (if using AD, then the correct profile will most likely be "Microsoft AD Profile".
    3. Find the property 'UserLogonName' and change the value to the matching AD attribute which the customer would like to use for usernames (Default is sAMAccountName). The SAN will be mapped to userPrincipalName attribute setup in the previous step automatically, but we can use a different LDAP attribute to provision the user with a friendly name. (see below):

Test PKI Authentication into the PVWA

On the PVWA logon screen, in the list of available authentication methods, click pkipn (or the sign in label / display name that was set in step 3).

  1. Depending on your browser and the security configurations, either of the following scenarios will happen:
    1. The PVWA will automatically locate the user’s certificate and prompt the user for a PIN and log the user onto the PVWA
    2. A list of certificates will be displayed where the user can select a certificate, prompt for a PIN and log the user onto the PVWA



 

TROUBLESHOOTING:

  1. 403 error message:



    In the IIS logs, you'll see that it could be either a 403.7 or a 403.16 depending on whether SendTrustedIssuerList on the PVWA is enabled or not.
    Knowledge article with more detail here: https://community.cyberark.com/s/article/PVWA-PKI-Auth-After-enabling-users-encounter-403-error

    The 403.7 error could also be the result of communication issues from the PVWA to a Certificate Revocation List (CRL).
    You can confirm if there are issues communicating by utilizing the certutil.exe tool on the PVWA server:
    1. If you can get the certificate saved to the PVWA server you're testing:
      certutil -f –urlfetch -verify [Path:\To\Certificate\File.cer]
    2. If you want to test just the CRL URLs from the certificate:
      certutil -URL [URL]

  2. ITATS729E Alternate user identifier was not found
    This is most likely to occur due to previous testing with LDAP, where the user was already transparently provisioned. Using the PA Client, delete the user and attempt PIV/CAC authentication again.
    More detail here: https://community.cyberark.com/s/article/00001861

  3. Missing mandatory parameter [certificate]
    This error will show up on the v10 UI when step #6 in the above document is not followed. Confirm you completed step #6, perform an IIS reset and test again
    More info here: https://community.cyberark.com/s/article/PKI-logon-to-v10-interface-fails-with-error-Missing-mandatory-parameter-certificate

  4. PKI 403 debugging suggestion
    If the 403 suggestion above does not resolve the issue, it’s a good idea to build a quick test website, PKI enable it, and verify that IIS / CA certificates, CRL lookups etc. are working (all outside of CyberArk’s control):
    1. Create a "Test" folder under C:\inetpub\wwwroot\
    2. Using Notepad, create a test webpage (name the file: index.html) within the Test folder.
    3. Through IIS Manager, enforce SSL on the new "Test" Website by:
      1. Selecting the test folder on the left pane
      2. Double click "SSL Settings" in the "IIS" section in the middle pane
      3. Ensure "Require SSL" is checked and set Client certificates to Require
      4. Click Apply on the far right hand side under the header "Actions"
    4. Browse to the Test webpage <FQDN>\Test\index.html from your client machine.
    5. If you see a 403 error this indicates an issue with your certificate or certificate chain and this will need to be rectified by the Windows Admins that manage the PVWA server before PKI auth will work as expected.

  5. The user may face the following error: User 'xyz' is not allowed to use this authentication method.
    When installing a Vault server from scratch in v14.4 or newer, the parameter "ExternalAuthenticationMode" is added to the dbparm.ini file, and is set to "AllowAutomaticConfig".
    You will need to update that setting to "AllowAll", then restart the PrivateArk Server service.
    More details here: https://docs.cyberark.com/pam-self-hosted/latest/en/content/pas%20inst/defining-authentication-methods-in-pvwa.htm#Configureallowedexternalauthenticationpermissions

  6. Receive the error "Missing mandatory parameter [username]" or "Access is denied due to invalid credentials"
    You would likely see that the user is not prompted to choose a certificate after selecting the PKIPN authentication tile when receiving one of those errors.
    On Windows 2022, by default, TLS 1.3 is enabled on the HTTPS binding. This needs to be disabled:
    1. In IIS Manager expand and select <Server Name> -> Sites -> "Default Web Site"
    2. In the pane on the far right under the header "Edit Site" click on "Bindings.."
    3. Select type "https" and click "Edit"
    4. Check "Disable TLS 1.3 over TCP" and click "Ok"
    5. Run the command "iisreset" in an elevated command prompt

       image.png


Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj0000000r18CAA&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail