EXERCISE 1 — mTLS vs normal TLS ================================ WHO AUTHENTICATES WHOM: - NORMAL TLS: only the SERVER proves its identity (via its certificate). The CLIENT is anonymous at the TLS layer -- it authenticates separately and later (password, token, cookie) at the application layer. - MUTUAL TLS (mTLS): BOTH sides present certificates. The server proves identity to the client AND the client proves identity to the server, each verifying the other's cert the same way (chain to a trusted CA, validity, identity match). Both ends are cryptographically authenticated before any application data flows. THE ONE EXTRA HANDSHAKE STEP (tie to Chapter 6): - It's the same handshake from Chapter 6 with one addition: after sending its own Certificate, the server sends a CertificateRequest asking the client for a cert. The client then sends its Certificate plus a CertificateVerify (a signature with its private key proving it owns the cert). The server verifies that before completing the handshake. - So: normal TLS authenticates one direction; mTLS adds the mirror-image client-side certificate + verify. TWO SCENARIOS WHERE mTLS IS APPROPRIATE: 1. Service-to-service / microservices: each service holds a client cert, so service A and service B mutually authenticate (e.g. a service mesh like Istio issuing certs to every pod). Zero-trust: even inside the network, every connection proves identity. 2. Machine API clients / partners: a payment gateway or B2B API requires each client to present an issued cert, so only provisioned clients can connect -- stronger than a shared API key, and the key can't be phished/replayed as easily. (Also: VPNs, IoT device fleets, admin access to sensitive infra.) ONE SCENARIO WHERE mTLS IS NOT APPROPRIATE: - The PUBLIC WEB / a consumer website. You can't issue and manage a client certificate for every anonymous visitor, and users have no cert. Normal server-only TLS + application login (password/passkey) is the right model there. mTLS is for closed sets of known clients, not the open web. SUMMARY: mTLS = TLS where the client is also a first-class authenticated party. Great for known machine-to-machine clients; impractical for the open web.