Skip to content

The Client Certificate Authentication/mTLS Architecture in Apache

License

Notifications You must be signed in to change notification settings

sonnyyu/mtls-apache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Use mtls-cert-manage generate server/client/ca certificate

https://github.com/sonnyyu/mtls-cert-manage

Copy Certificate from mtls-cert-manage

cd ~/mtls-cert-manage/pki
./server.sh
./client.sh

Build it:

git clone https://github.com/sonnyyu/mtls-apache
cd mtls-apache

Copy Certificate from mtls-cert-manage

cd ~/mtls-cert-manage/pki/servercerts 
cp * ~/mtls-apache/certs
cd ~/mtls-cert-manage/pki/clientcerts
cp * ~/mtls-apache/certs
cd ~/mtls-apache/certs
cp 192.168.1.204.crt 192.168.1.204.key ca.crt ~/mtls-apache/httpd/certs

Getting started nginx with certificate

cd ~/mtls-apache
docker-compose up -d 

Quit

cd ~/mtls-apache
docker-compose down 

Quit and remove Volume

cd ~/mtls-apache
docker-compose down -v

Test mTlS

cd ~/mtls-apache/certs
curl --cert client1.crt --key client1.key --cacert ca.crt https://192.168.1.204
curl --cert-type P12 --cert client1.p12:p12pass --cacert ca.crt https://192.168.1.204

Install certificate at PC

Install certificate

Open Browser

https://192.168.1.204