How To Setup CCP Client Certificate Authorization

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Welcome Idira to LIVEcommunity!

Our community just got stronger! Explore new identity security resources, connect with experts, and discover more ways to learn and collaborate.

Meet Idira

Idira Success Blogs
18 min read
L4 Transporter

The following article is a repurposed version of a post authored by Logan Zellem, Principal Cybersecurity Architect at NR Labs, a Idira Certified Partner, originally published on his personal blog, Logs-&-Locks.

 

Table of contents

01 - Getting Started

02 - Certificates

03 - Configure CCP

04 - Applications & Permissions

05 - API Calls

06 - Creating-Separate-Endpoints

07 - Troubleshooting & Common Pain Points

08 - Extras & Helpful Tips

09 - Conclusion

10 - Resources

 

Part 1: Getting Started

This guide assumes a few things

  • CCP already installed ✅
  • Basic Idira Knowledge ✅
  • On Prem Solution ✅

[!Tip]- Leading Practice I’ll try to provide leading practice tips throughout. But this is a lab and everything is tailored toward “ease of use”.

The Environment

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000asZc0.png

SimpleLab.png

Environment Details

  • Virtual Box version 7.1.6
  • Virtual Box Extension Pack 7.1.6

Node Address Info

Vault 192.168.1.205 Enterprise Password Vault Idira v14.2

CCP 192.168.1.195 Central Credential Idira v14.2

PVWA 192.168.1.36 Password Web Vault Access Idira v14.2

DC 192.168.1.38 Domain Controller & Certificate Authority Installed

 

Health Check

A good place to start before continuing is by testing your CCP. This guide does assume you have the CCP already installed.

Test CCP Post Install

Open a browser navigate to the health check page at the URL below (adjust accordingly)

https://<your machine>/AIMWebService/V1.1/AIM.asmx

My lab:

https://lab-ccp.clab.com/AIMWebService/v1.1/Aim.asmx

[!info]- > If you see certificate issues here, it is most likely the certificate used for https not being trusted

 

Part 2: Certificates

You’ll need two certificates. The HTTPS Certificate created when you installed the CCP (not covered here) and the Client Certificate which is what we will cover here.

[!example]- 08 - Extras & Helpful Tips#HTTPS Certificate

[!tip]- Leading Practice As security architects we would provide the Application Team needing the Client Auth Certificate the steps to generate the Certificate. This helps ensures the private-key stays private.

HTTPS Cert - Used for HTTPS - CCP - Binded to 443 on the CCP via IIS

CLIENT Cert - Certificate for requesting applications - Serial Number will be added to the relevant applications

Of course including certificate chains or intermediate certs is needed, but in most environments the CCP machine is a domain joined machine and the trust is inherited


Certificate Signing Request

When creating a certificate you first start with creating a Certificate Signing Request(CSR)

[!Tip] Auto Generating Certificates If you are more comfortable with certificates check out 08 - Extras & Helpful Tips#Automating Certificate Creation

When you submit the CSR the certificate will get created based off a certificate template in your certificate authority.

What does this mean…..?

If your CSR has parameters that aren’t in the template then those parameters won’t be on your certificate. For example, you can create and submit a CSR with Enhanced Key Usage having 2 Extensions.

  • Client Authentication
  • Server Authentication

But if the corresponding template only has server authentication available then your certificate will only have server authentication, dropping the client authentication. Most environments will have a template that can be used.

[!Warning]- Certificate Template Creation You can potentially run into issues if no templates have “Client Authentication”. If you are in lab, I suggest you create a certificate template. I provided the links below for reference. I have create one for this lab

Microsoft Creating & Publishing Certificate Templates Default Templates

What’s needed for the Client Auth Certificate?

Requirements - Enhanced Key Usage - Client Authentication - Subject Alternatives Name - Set Correctly - FQDN

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000atmbz.png

Pasted image 20250418143904.png

 

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000auHz9.png

Pasted image 20250418144124.png

 

02.1 Creating CSR and Certificate - MMC

[!Tip]- Leading Practice

It’s easiest if you generate the CSR from the requesting application machine so when you get the certificate back and install it, the private key is where it needs to be.

In the lab our requesting applications is my laptop so I did this from the PVWA

  1. Open MMC > Add/Remove Snap-in > Certificates > Add > Computer Account > Next > Local computer > Finish > Ok

  2. In the Left Pane Click Personal.

  3. Now Click in the Middle Pane > Right Click > Advanced Operations > Create Custom Request

  4. A prompt will appear for Certificate Enrollment. Click Next

  5. Select Proceed Without enrollment policy

[!Note]- Extra Info

You can choose Active Directory Enrollment Policy if you knew what template you needed to create from. To avoid template conflicts choose “Select Proceed Without enrollment policy”

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000atsZK.png

Pasted image 20250418154626.png

 

  1. The default values are correct click next again

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000auKLu.png

Pasted image 20250418155433.png

 

  1. Select Properties ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000auQcb.png
  2. Provide a Friendly Name for example: ClientAuthApp01
  3. Select Subject → Add the certificate properties

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000auQaz.png

Pasted image 20250418161139.png


CommonName(CN) ------ lab-ccp.clab.com 
Country —------------- US 
Organization —-------- ClAB 
Organizational Unit --  SEC 
State—-------------  NY 
Locality—-----------   NY

Alternative Name: 
DNS        lab-ccp.clab.com
           lab-ccp
           ccp

  1. Select Private Key Tab > Expand Key Options
    1. Key Size = 4096
    2. Check Make Private Key Exportable

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000auQXl.png

Pasted image 20250418161232.png

 

  1. Select Extensions > Expand Extended Key Usage
    1. Select Client Authentication > Add

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000auQj3.png

Pasted image 20250418161304.png

  1. We can now click Apply > Ok
  2. This will return you to the Certificate Enrollment Prompt > Click Next

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000auQUX.png

 13. Name and Save the File in Base64 format

🥂 Congrats you now have a CSR 🥂

 

02.2 Submitting CSR

It will be different for all environments so I will show you the most common method

In this lab I am using Microsoft’s Certificate Authority - Web Enrollment. I just need to open up a browser and login to the CA Web Enrollment Page.

Since I created the CSR from the PVWA machine I can do it from here

  1. Navigate http://clab.com/certsrv & Login

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000atzxS.png

Pasted image 20250418174623.png

  1. Click > Request a Certificate > Advanced User Request

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000auLzW.png

     3. Open the CSR you generated and Select All & Copy

  1. Go back to the Advanced User Page
    • Paste the entire contents in the Base64 Box
    • Select the Correct Template - AppClientAuth (In my lab)
    • Click Submit ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000atnxr.png
  1. Select Base64 & Download Certificate

[!info] You can download the Chain if needed

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000auQW9.png

 🥂 Congrats you now have a Certificate for Client Authentication 🥂

 

02.3 Install & Export the Certificate

Now that we have the Certificate you can install it. This allows us to export it with it’s private key (PFX format).

[!info] These same install steps can be used for installing the certificate on the CCP machine

 

  1. Double Click on the Certificate you previously created & Click Install certificate
  2. Select Local Machine & Click Next

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000auQZN.png

Screenshot 2025-04-18 at 6.19.28 PM.png

  1. Select Place all certificates in the following store and chose Personal
    1. Click Next

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000atVw7.png

Screenshot 2025-04-18 at 6.21.42 PM.png

    4. Click Finish

 

02.3.1 Exporting the Certificate as a PFX

  1. Open MMC > Add/Remove Snap-in > Certificates > Add > Computer Account > Next > Local computer > Finish > Ok

  2. In the Left Pane Click Personal, select your newly installed certificate

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000auO2w.png

Screenshot 2025-04-18 at 6.27.07 PM.png

     3. Right Click -> All Task -> Export -> Click Next

  1. Choose Yes, export the private key > Click Next ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000ats9X.png
  2. Check Include all Certs and Click Next

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000auQeD.png

 

    6. Set a Password Click Next

    • My Password is CCP

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000atucl.png

 

7. Select Where to Save the File and Name it -> Click next ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000auQO5.png

8. Click Finish

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000auCbH.png

 

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000auQG1.png

 

Where do I install the certificate…..?

For clarity, installing the certificate where the CSR was generated is typically needed so you can export it with the private-key in the PFX format

Requesting Application Machine

You have a few options depending on where and how you are making your API calls

If you are using the PFX format there may not be a need to install it all since you are sending the private-key via the PFX.

“Essentially” you can move the PFX anywhere and makes calls successfully

If you aren’t using the PFX you can install the certificate on the Requesting Application machine and pull it from the corresponding certificate store when sending the request

This might require you to install the full certificate chain due to trust issues especially on linux machines due to them not being domain joined

I cover this slightly in 08 - Extras & Helpful Tips#Configure Linux Node (Requesting applications)

CCP Machine

Typically you just need to install the certificate(.cer) in the personnel store on the CCP machine. you can review the steps in the above 01 - Projects/CCP-Client Cert Auth/02 - Certificates#02.3 Install & Export the Certificate

If you are facing issues with trust on the CCP then installing the full chain on the CCP machine can...

 

Part 3: Configuring CCP

Idira does a good job at covering the install at a high-level

CyberArk’s Client Auth Configuration

Will start from the same place, adding IIS Roles and will continue on where they left off ## 3.1 Folder Permissions

  1. Log into your CCP Machine

[!warning] 🤔 Not sure what “Default User” is being referenced in CyberArk’s Documentation so I’ll share my permissions on that same folder c:/inetpub/wwwroot/AIMWebService

2. Give the default user access to the AIMWebService folder under

    • Read and execute
    • List folder contents
    • Read

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000au08i.png

FilePermissionsons.png

[!NOTE] No changes were made LAB-CCP- has identical permissions as the IIS_IUSRS. All other permissions were standard

3.2 Install the client certificate mapping authentication roles

  1. Go to Server Manager > Add Roles and Features. Click Next.
  2. Select Server Roles, and under Web Server (IIS) > Web Server > Security, install the following:
    1. Client certificate mapping authentication
    2. IIS Client certificate mapping authentication

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000auBaM.png

AddIISRoles01.png

3.3 IIS Configuration

💡Starting here is where we began to address the gaps 💡

After the roles are installed CA’s Instructions direct you to create a PEM file, containing all CCP client auth certs and move it to the CCP Machine with very little instruction afterwards.

I wouldn’t suggest moving everything to one PEM file, managing that long term would be a pain.

 

  1. Open IIS -> Default Web Site -> AIMWebService - Configuration Editor

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000atzKh.png

IIS-ConfigurationEditor.png

     2. In the Section block navigate to the below

    1. system.webServer/security/authentication/clientCertificateMappingAuthentication
      1. Set Enabled = True ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000auQfp.png

    3. In the Section block navigate to the below

[!Tip]- OnetoOneMappings & ManytoOneMappings Idira Recommends One-to-OneMappings, and generally they’re slightly more secure. But in this guide I will use Many-to-OneMappings because if you do chose to bind the client certificates to a user(s) it can become difficult to manage if only set to a single user and can create a single point of failure

In this lab I chose to not associate a user directly to the certificate and leave UserName and PW blank when adding the rule

  1. system.webServer/security/authentication/iisClientCertificateMappingAuthentication
  2. Set enabled = True
  3. ManyToOneMappings -> Click the the ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000auQBB.png

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000auQPh.png

SystemWebIISClientAuth.png

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000auQRJ.png

ManytoOneMappings.png

    4. Click Add

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000auJw6.png

AddManytoOneMappings.png

  1. Fill out the properties
    • description = "Can be anything"
    • enabled = True
    • name = "Can be anything"
    • password - leave empty
    • permissionMode = Allow
    • rule = Will cover this in the next step
    • userName = leave empty
    1. Rules -> Click the ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000auQCn.png

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000auBFO.png

AddRuleManytoOneMappings.png

    6. This opens a similar window (Window Inception).

    1. Click Add and create a new rule.
    2. Fill out the properties based on your client certificate. Certificate example properties image is below
    3. Properties
      • certificateField = Issuer
      • certificateSubField = CN
      • compareCaseSensitive = True (Optional)
      • matchCriteria = clab-DC01-CA

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000auQHd.png

AddedRuleConfiguration.png

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000au0wh.png

Client Certificate.png

    7. Close the previous panes until you are back at the Configuration Editor Panel

    1. Click Apply

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000auH6I.png

ConfigurationEditorClickApply.png

3.4 IIS SSL Settings

These can be tailored to your exact needs for testing I usually set it to the following

  1. Open IIS -> Default Site -> AIMWebService -> SSL Settings

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000atdLn.png

Screenshot 2025-04-22 at 4.41.00 PM.png

2. Adjust settings

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000au7q7.png

 

In a production environment I would set it as below

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000auQkf.png

 

3.5 IIS Authentication

  1. Open IIS -> Default Site -> AIMWebService -> Authentication

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000atIxG.png

 

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000auQhR.png

 

[!Tip] Authentication Settings This configuration works because no other API calls are being made wi...

 

Part 4: applications and permissions

Creating the application and assigning the correct permissions

[!tip] When creating application names, it’s best to create more complex names TeamName-Env-Application-0001

04.1-Create & Configure Application

  1. Add an Application
    1. Login to PVWA –Applications –> Add Application –> Provide Name –> Click Add

Idira Add Applications

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000auIjv.png

Pasted image 20250422080256.png

2. Add Authentication Method

    1. Click Add
    2. Choose Certificate Serial Number
    3. Copy and Paste your Certificate Serial Number
    4. Click Add

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000auQJF.png

Screenshot 2025-04-22 at 7.48.00 AM 1.png

04.2 Safe Permissions

Will need to add the ApplicationID and the CCP Account to the safe where our credential we wish to retrieve is located (CCPSafe01)

[!Caution] Permissions Listed Under ApplicationID, I have “List & Retrieve”. As you can see from the images of the permissions. I just have Retrieve, and was making successful calls but I listed both because it was apart of CyberArk’s documentation

ApplicationID = App01

- List
- Retrieve Accounts

CCP Machine = Prov_Lab-CCP

- List
- Use
- Retrieve

- View Safe Members

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000auQMT.png

Screenshot 2025-04-22 at 7.50.12 AM.png

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000auQSv.png

Pasted image 20250422105801.png

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000atGp3.png

Screenshot 2025-04-22 at 7.51.03 AM.png

 

Part 5: API Calls

Acting as our requesting applications will use two different methods to make the API Calls. Both will be using the PFX certificate, from my laptop

PowerShell Example

Script Parameters

The line below is to avoid TLS 1.3 issues

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

  • URI = “Resource Identifier”
  • certpath = Path to your PFX file
  • cert = provides the cert in the call
  • res = sending the Call

This will prompt you for the PFX passcode that you set when exporting the certificate, here it’s “CCP”

```cpp title:“long filename.cpp”

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

$URI = “https://lab-ccp.clab.com/AIMWebService/api/Accounts?AppId=App01&Safe=CCPSafe01&Object=AccName-GrabMe”

$certPath = “/Users/Tom/Desktop/ccpapp01.pfx”

$cert = Get-PfxCertificate -FilePath $certPath

$res = (Invoke-RestMethod -Method Get -Uri $URI -Certificate $cert)

echo $res

#PassCode for PFX — “CCP”


![[Pasted image 20250422123012.png]]

# Curl Example

### Script Parameters

- --tlsv1.2 --tls-max 1.2 ---- set tls version to avoid issues
- --cert-type P12 ---- set certificate type p12 or pem will work
- --cert /Users/Tom/Desktop/ccpapp01.pfx:CCP ---- pfx location and pfx passcode
- --http1.1 ---- set to avoid http versioning issues

```cpp title: "CurlfromMac"
curl --tlsv1.2 --tls-max 1.2 \

--cert-type P12 \

--cert /Users/logan/Desktop/ccpapp01.pfx:CCP \

"https://lab-ccp.clab.com/AIMWebService/api/Accounts?AppId=App01&Safe=CCPSafe01&Object=AccName-GrabMe" --http1.1

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000atZ6w.png

Screenshot 2025-04-22 at 1.00.55 PM.png

[!NOTE] These scripts are basic and are can be used for testing. But be sure to adjust your code acc...

 

Part 6: Creating Separate Endpoints

This is optional but you can have different authentication methods without effecting the default endpoint “AIMWebService”.

  1. Log into your CCP machine and navigate to “C:”
  2. Copying the entire AIMWebService folder and paste it with a new name, in my case I used AIMWebServiceCert.

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000au830.png

Screenshot from 2025-01-25 17-34-00.png

3. Launch inetmgr, and expand the default sites. You should see a folder with the name AIMWebServiceCert (or whatever name you chose).

4. You will need to right click, and select Convert to Application

5. You can select the default settings and click “Ok”.

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000at58q.png

6. Now it should appear as an application

  • ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000auQEP.png

If all went well you should be able to hit your new endpoint at it’s health-tab.

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000auOEE.png

[!Info] You can configure this endpoint just like you would the default application. Just be sure to update your calls to reach the new endpoint

 

Part 7: Troubleshooting and Common Pain Points

Enable Logging for ISS

When troubleshooting the first step should be enabling the logging. The link covers how to enable the correct logging

Idira Reference Link

Certificates

  • Ensure the Key for the certificate Is exportable
  • Certain Templates can cause problems
  • Client Authentication is required on the Certificate
    • Other Key Usages can be on certificate

API Request

  • TLS 1.3 can cause issues when making the request
    • You can set the TLS Version to use TLS v1.2 in following tools for testing
      • PostMan
      • Powershell
      • Curl

403.16 Error

Probably the most common error I run into when configuring CCP for Client Certificate Authentication

Cyber Reference Link

 

Part 8: Extras and Helpful Tips

Configure Linux Node (Requesting applications)

When making calls from nix nodes you can run into trust issues when using curl or for the machine itself. The steps below can help prevent those errors by adding the certificate(s) to the trusted store on machine. In the example below I was making a call from RedHat 8.

Using Curl (Linux Node)

  • Logged into my Linux Machine(making the call from)
  • Transferred the PFX to the machine using WinScp

Converting PFX to PEM file

openssl pkcs12 -in TeamAPI-DEV.pfx -out Teamapp.pem -nodes

On redhat, upload it the directory below(default)

cp Teamapp.pem /etc/pki/ca-trust/source/anchors/

Then you run the following command

update-ca-trust

To verify the certificate is trusted you run the following command

openssl verify -untrusted /etc/ssl/certs/ca-bundle.crt Teamapp.pem

openssl s_client -connect NameofMachine.uni.org:443

Curl Command using the PFX

curl --tlsv1.2 --tls-max 1.2 --cert-type P12 --cert TeamAPI.p12:passcode "https://NameofMachine.uni.org/AIMWebServiceCert/api/Accounts?AppId=AppIdHere&Safe=SafeNameHere&Object=ObjectNameHere" --http1.1

Helpful Commands

IIS Reset

To Restart IIS to take Changes

In an Administrative Command prompt

iisreset

ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000au5ul.png

Screenshot 2025-04-22 at 4.48.12 PM.png

Refresh CCP Cache

When you make changes to your applicationId such as serial numbers, allowed machines…etc It can take a few minutes to propagate the changes to the CCP machine.

To push the changes quickly you can run the the RefreshCache Command

  1. Login to your CCP
  2. Navigate to your CCP Directory
    1. C:Files
  3. Open a CMD prompt or Powershell Window in the Directory
  4. Run ..exe RefreshCache

      ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000auPoc.png

      Screenshot 2025-04-22 at 4.56.21 PM.png

      Automating Certificate Creation

      You could use either method to create any number of certificates. Here I just use them to simplify creating HTTPS and Client Auth Certificates.

      HTTPS Certificate

      I really like Reinout Seger’s Script can be found here for generating CSR’s used for HTTPS certificates when needed.

      It prompts you for all relevant information and stores the CSR in your clipboard

      ka3Vy00000BCqXZIA1__eid=ka3Vy00000BCqXZ&feoid=00N2J00000APFDu&refid=0EMVy00000auQmH.png

      Screenshot 2025-04-24 at 2.06.34 PM.png

      Client Authentication Certificate

       Rhoderick Milne blog was great!    You can fully automate the process but I like to automate the CSR generation. Mainly because deepening on the environment. Submitting the CSR will be different

      [!example] example.inf


      #"https://blog.rmilne.ca/2022/02/01/how-to-request-certificate-without-using-iis-or-exchange-updated-2022/"

      [Version]
      Signature="$Windows NT$"

      [NewRequest]
      FriendlyName = "lab-ccp.clab.com"  ; Edit the friendly name.

      Subject = "CN=lab-ccp.clab.com" ; Remove to use an empty Subject name.

      ;TLS does not require a Subject name.  SAN extension to be used as per RFC2818. The certificate Subject name can be empty.

      Exportable = TRUE ; TRUE = Private key is exportable

      KeyLength = 4096 ; Valid key sizes: 1024, 2048, 4096, 8192, 16384

      KeySpec = 1 ; Key Exchange – Required for encryption

      KeyUsage = 0xA0 ; Digital Signature, Key Encipherment

      MachineKeySet = True

      ProviderName = "Microsoft RSA SChannel Cryptographic Provider"

      RequestType = PKCS10 ; or CMC.

      [EnhancedKeyUsageExtension]
      ; If you are using an Enterprise CA the EnhancedKeyUsageExtension section can be omitted

      #OID=1.3.6.1.5.5.7.3.1 ; Server Authentication

      OID=1.3.6.1.5.5.7.3.2 ; Client Authentication

      [Extensions]
      ; SANs can be included in the Extensions section by using the following text format. Note 2.5.29.17 is the OID for a SAN extension.
      ; Three SAN entries are listed below for the STS, EnterprseRegistration and Zorg FQDNs

      2.5.29.17 = "{text}"

      _continue_ = "dns=lab-ccp.clab.com&"

      _continue_ = "dns=lab-ccp&"

      _continue_ = "dns=ccp&"

      [RequestAttributes]
      CertificateTemplate = AppClientAuth ; Modify for your environment by using the LDAP common name of the template.
      ;Required only for Windows Enterprise CAs.

      Running the command will generate a CSR that can be submitted and used for Client Authentication

      Certreq.exe -New Example.inf CertNew.req

       

      Part 9: Conclusion:

      If you're seeking expert support for your Identity and Access Management (IAM) and Privileged Access Management (PAM) initiatives, NR Labs offers hands-on engineering capabilities backed by deep industry experience. As a Idira Certified Partner, NR Labs specializes in secure architecture design, Vault implementation, credential lifecycle automation, onboarding, policy engineering, compliance hardening, and lab and training environment development.

      Founded by leaders from Mandiant and Big 4 risk management practices, NR Labs was created with a clear purpose: to deliver practical, cost-effective cybersecurity and risk management services grounded in real-world operational experience. As a pure-play cybersecurity services provider, security and risk management are our sole focus. Our team includes industry-recognized experts such as a former Mandiant Director with visibility into over 2,400 commercial-sector breach investigations, one of only twelve global CISM exam developers, contributors to the CISSP certification content program, and a former Incident Response lead for a global cryptocurrency firm.

      NR Labs professionals have been published in GovTech, delivered keynote presentations at MetricsCon, and shared expertise through appearances on Federal News Radio and at FireEye CDS—demonstrating our ongoing commitment to advancing enterprise security practices.

       

      Part 10: Resources

      Idira Resources

      Idira CCP Guide

      Idira CCP Logging

      CyberArk’s Client Auth Configuration

      InfamousJoe Video guide

      CyberArk’s Central Credential Provider - Client Certificate Authentication

      Microsoft

      Microsoft Creating & Publishing Certificate Templates

      Default Templates

       

      • 2809 Views
      • 0 comments
      • 0 Likes
      Top Liked Authors