Opscraft
How SSL/TLS works · Lesson 8 of 8 · 4 min read

Interview questions and model answers

"Explain how TLS works."

The client sends a ClientHello with supported versions, cipher suites, a random value and the hostname via SNI. The server responds with its choice and its certificate chain, and both sides perform an ephemeral Diffie-Hellman exchange. The client validates the chain up to a trusted root, checks dates and that the hostname is in the SANs, and verifies the server's signature proving it holds the private key. Both derive symmetric session keys and encrypt all data with an AEAD cipher like AES-GCM. In TLS 1.3 this takes one round trip, it's always forward secret, and resumption can use 0-RTT.

"Why does TLS use both symmetric and asymmetric encryption?"

Asymmetric cryptography solves identity and key exchange over an untrusted network but is slow; symmetric encryption is fast but needs a shared key. TLS uses asymmetric crypto during the handshake to authenticate the server and agree a secret, then symmetric keys for the bulk data.

"A site works in Chrome but curl says 'unable to get local issuer certificate'. Why?"

Almost always the server isn't sending the intermediate certificate. Chrome fills the gap with AIA fetching or a cached intermediate, while curl and most libraries verify strictly. I'd confirm with openssl s_client -showcerts -servername, then configure the full chain on the server or load balancer. If it's an internal service, the client may simply lack the private root CA.

"Where would you terminate TLS in an EKS setup?"

Usually at the ALB via the AWS Load Balancer Controller with an ACM certificate, a modern TLS 1.2/1.3 security policy and an HTTP→HTTPS redirect. If compliance requires encryption to the pod, re-encrypt with an HTTPS target group and certificates on pods from cert-manager or Private CA, or rely on a service mesh for mTLS between services. For non-HTTP or client-certificate use cases, an NLB with TLS passthrough.

"How do you make sure certificates never expire in production?"

Automate everything — ACM with DNS validation, cert-manager with Let's Encrypt or Private CA — keep an inventory including imported, internal and client certificates, alert at 30/14/7 days through ACM metrics, cert-manager metrics and blackbox probes, and make rotations zero-downtime with graceful reloads. Postmortems for any manual renewal.

"What is mTLS and when would you use it?"

Both sides present certificates, so the server authenticates the client cryptographically. It's the basis of zero-trust service-to-service communication — usually via a service mesh issuing short-lived workload certificates tied to ServiceAccounts with strict PeerAuthentication and authorization policies — and for partner or device APIs where client certificates replace shared secrets.

"What does forward secrecy mean?"

Session keys come from ephemeral Diffie-Hellman keys that are discarded, so compromising the server's long-term private key later doesn't let an attacker decrypt previously recorded traffic. TLS 1.3 requires it; for TLS 1.2 you choose ECDHE cipher suites.

"What's the difference between DNS-01 and HTTP-01 validation?"

HTTP-01 proves control by serving a token over port 80 on the domain — easy but needs public reachability and can't issue wildcards. DNS-01 proves control with a TXT record — works for wildcards and internal hosts, and suits cert-manager with Route 53 through IRSA.