सभी SSL articles SSL और Certificates

What is Mutual TLS (mTLS)? Client Certificate Authentication

Normal HTTPS में, सिर्फ server अपनी identity certificate के साथ prove करता है। Client (browser) anonymous होता है — server को नहीं पता कि कौन connect हो रहा है।

Mutual TLS (mTLS) एक extra step add करता है: client भी एक certificate present करता है। दोनों sides एक-दूसरे को authenticate करते हैं। Server client के certificate को एक trusted CA के against verify करता है, और client server के certificate को verify करता है — इसलिए “mutual” कहा जाता है।

Normal TLS vs Mutual TLS

Normal TLSMutual TLS (mTLS)
Server identity prove करता हैYes Certificate + CA signatureYes Same
Client identity prove करता हैNo AnonymousYes Client certificate
AuthenticationOne-way (सिर्फ server)Two-way (दोनों)
Use casePublic websitesInternal APIs, zero trust
Client को चाहिएबस एक browserCertificate + private key
Setup complexityStandardज़्यादा — client certs manage करने होते हैं

mTLS कब use करें

Service-to-service communication

Microservices network पर एक-दूसरे से communicate करती हैं। mTLS ensure करता है कि सिर्फ authorized services connect कर सकती हैं — न कि कोई भी जो URL जानता हो।

Service A ←──mTLS──→ Service B
दोनों verify करते हैं: "क्या आप वही हैं जो आप claim करते हैं?"

Zero Trust architecture

Zero trust में, कोई भी network connection default रूप से trusted नहीं है — corporate network के अंदर भी नहीं। mTLS network-level trust (firewalls, VPNs) को identity-level trust (certificates) से replace कर देता है।

API security

Sensitive APIs को सिर्फ API keys से beyond secure करें। एक stolen API key कोई भी use कर सकता है। एक client certificate एक specific private key से bound होता है — steal करना और use करना harder है।

IoT device authentication

Devices manufacturing के दौरान provisioned client certificates के साथ backend से connect होते हैं। Server जानता है कि वह एक genuine device से communicate कर रहा है, fake से नहीं।

mTLS कैसे काम करता है

  1. Client connect होता है और TLS handshake start करता है (normal TLS के same)
  2. Server अपना certificate भेजता है — client इसे verify करता है (normal TLS के same)
  3. Server client certificate request करता है — एक CertificateRequest message भेजता है
  4. Client अपना certificate भेजता है — server इसे trusted CA के against verify करता है
  5. दोनों sides session keys calculate करते हैं और encrypted communication start होता है

Steps 3-4 इसे “mutual” बनाते हैं।

Nginx mTLS configuration

server {
    listen 443 ssl;
    server_name api.example.com;

    # Server certificate (normal HTTPS के same)
    ssl_certificate     /etc/ssl/server-fullchain.pem;
    ssl_certificate_key /etc/ssl/server-privkey.pem;

    # Client certificate verification
    ssl_client_certificate /etc/ssl/client-ca.pem;  # CA that signed client certs
    ssl_verify_client on;                            # Require client cert

    # Optional: pass client cert info to your app
    proxy_set_header X-Client-DN $ssl_client_s_dn;
    proxy_set_header X-Client-Verify $ssl_client_verify;
}

mTLS vs other authentication methods

MethodSecurity levelComplexityBest for
API keyLow (shareable)LowPublic APIs, rate limiting
OAuth/JWTMediumMediumUser-facing APIs
mTLSHigh (crypto-bound)HighService-to-service, zero trust
mTLS + JWTHighestHighTransport और application दोनों auth

mTLS और GetHTTPS

GetHTTPS server certificates issue करता है — वे certificates जो आपका web server अपनी identity prove करने के लिए use करता है। ये हर HTTPS website द्वारा use किए जाने वाले standard SSL certificates हैं।

mTLS के लिए client certificates आमतौर पर एक private CA (आपके organization का internal CA) द्वारा issue किए जाते हैं, Let’s Encrypt जैसे public CA द्वारा नहीं। Let’s Encrypt client certificates issue नहीं करता — वे सिर्फ public domains के लिए server certificates issue करते हैं।

FAQ

क्या मैं mTLS के लिए Let’s Encrypt use कर सकता हूँ?

Server certificate के लिए: हाँ। Client certificates के लिए: नहीं। Client certs को आपके द्वारा controlled private CA से issue किया जाना चाहिए — ताकि आप decide कर सकें कि कौन से clients authorized हैं। openssl, cfssl, या step-ca जैसे tools आपके private CA के रूप में काम कर सकते हैं।

क्या mTLS “client certificate authentication” के same है?

हाँ। “Mutual TLS,” “mTLS,” “two-way TLS,” और “client certificate authentication” सभी same चीज़ refer करते हैं — TLS handshake के दौरान दोनों sides certificates present करते हैं।

क्या mTLS API keys replace करता है?

यह कर सकता है, लेकिन वे different purposes serve करते हैं। mTLS transport-level identity (कौन सी service connect हो रही है) prove करता है। API keys/JWTs application-level identity (कौन सा user/permission) prove करते हैं। कई systems defense in depth के लिए दोनों together use करती हैं।

mTLS commonly कहाँ use होता है?

Kubernetes (Istio/Linkerd के साथ service mesh), Cloudflare Access, AWS API Gateway (mutual TLS), Google Cloud का BeyondCorp, और ज़्यादातर enterprise zero-trust implementations में।

संबंधित लेख

SSL और Certificates 2026-05-07
SSL/TLS कैसे काम करता है: TLS Handshake explained
TLS handshake का visual walkthrough — आपका browser और server milliseconds में encrypted connection कैसे establish करते हैं। TLS 1.2, TLS 1.3, session resumption, और forward secrecy covered है।
SSL और Certificates 2026-05-08
Public Key Cryptography: SSL Encryption Actually कैसे काम करता है
Public key cryptography एक key pair use करती है — एक public, एक private — HTTPS connections secure करने के लिए। जानें asymmetric encryption, digital signatures, और key exchange कैसे SSL/TLS को possible बनाते हैं।
SSL और Certificates 2026-05-08
SSL Certificate क्या है?
SSL certificate एक digital file है जो website authenticate करती है और encrypted HTTPS connection enable करती है। जानें certificate के अंदर क्या है, कैसे काम करता है, free में कैसे लें, और हर site को क्यों चाहिए।
अपने browser में मुफ़्त SSL certificate पाएँ
कोई installation नहीं, कोई account नहीं। आपकी private key कभी आपका device नहीं छोड़ती।
अपना certificate पाएँ