
From Root CA to User Authorization in nginx and Apache: Client Certificate Login Explained
This is the third installment in a detailed tutorial series covering the deployment of a two-tier PKI infrastructure with Root CA and intermediate CAs for Person, Server, and Code. The article provides comprehensive configuration guidance for enabling mTLS in nginx and Apache, including full references for all ssl_client_* variables and SSL directives. It explains the differences between password-based and certificate-based authentication, the TLS handshake steps involving CertificateRequest and CertificateVerify, and the importance of proper extendedKeyUsage settings such as clientAuth. Readers learn how to issue client certificates, package them in PKCS#12 format, enforce revocation checks via CRL and OCSP, and safely pass certificate fields to backend applications while mitigating risks from header spoofing. The guide also covers scenarios where the application itself terminates TLS without a reverse proxy and demonstrates login flows protected against CSRF using one-time tokens.
HabrAug 27, 2026Translated from Russian