4. mTLS in Apache HTTPD using a Self-Signed CA and Client Certificates
Creating a Self-Signed CA and Client Certificate Using Keystore Explorer (PKCS#12) for mTLS in Apache HTTPD
Overview
This guide walks you through the process of generating a self-signed Certificate Authority (CA) and a client certificate using Keystore Explorer, with certificates stored in PKCS#12 (.p12) format. These certificates will be used to enable mutual TLS (mTLS) authentication in Apache HTTPD for the specific path /access/authn/cert.
Select PKCS#12, set a password for the key pair and the path for the Export File.
Click Export.
Save the keystore if you would like to keep the client certificate in the keystore.
Step 4: Configure Apache HTTPD for mTLS on /access/authn/cert
Copy ca.crt to the Apache configuration directory.
Edit the Apache configuration file (httpd.conf or ssl.conf) and add the following configuration:
Add the ca certificate and disable TLS1.3, add our change the following settings:
Add the Location section:
Restart Apache:
Step 6: Import the client keystore
Import the certificate to the OS using the OS tool.
Conclusion
You have successfully created a self-signed CA, a client certificate, and configured Apache HTTPD for mTLS authentication on the specific path /access/authn/cert using Keystore Explorer, with certificates stored in PKCS#12 (.p12) format.