Today’s Lesson
Security for Legal SaaS — Episode 13: TLS and HTTPS from Scratch
The Illusion of “Just Add HTTPS”
Every developer knows their application needs HTTPS. Few understand what that actually means at a protocol level — which cipher suites are negotiated, how certificate validation works, what happens when certificates expire at 2am on a Friday, and why TLS 1.0 connections from a court’s legacy system represent a genuine security risk. TLS is the single most important transport security mechanism on the internet, and for legal SaaS carrying privileged communications, getting it right is non-negotiable.
Key stat: SSL Labs' SSL Pulse survey consistently finds that approximately 25-30% of surveyed sites still have TLS configuration issues — from supporting deprecated protocols to using weak cipher suites. These aren't obscure services; they include enterprise SaaS platforms handling sensitive data.
For legal tech specifically, the data in transit includes attorney-client privileged communications, litigation strategy documents, client financial records, and court filings. A TLS misconfiguration doesn’t just expose data — it potentially waives privilege and triggers regulatory obligations.
How TLS Actually Works
The Handshake (TLS 1.3)
TLS 1.3, finalised in 2018, reduced the handshake from two round-trips to one:
| Step | Client | Server |
|---|---|---|
| 1 | ClientHello: supported cipher suites + key share | |
| 2 | ServerHello: chosen cipher, certificate, key share | |
| 3 | Verify certificate chain → derive session keys | |
| 4 | Application data (encrypted) | Application data (encrypted) |
The critical security properties:
- Forward secrecy — Ephemeral Diffie-Hellman key exchange means even if the server’s private key is later compromised, past sessions cannot be decrypted
- Authenticated encryption — Only AEAD cipher suites (AES-GCM, ChaCha20-Poly1305) are permitted in TLS 1.3
- No legacy baggage — RSA key exchange, CBC mode ciphers, MD5, SHA-1 — all removed
Certificate Validation
When your browser connects to app.lawfirm.com, the server presents a certificate chain. The browser validates:
1. The certificate is signed by a trusted Certificate Authority (CA)
2. The certificate hasn’t expired
3. The domain name matches the certificate’s Subject Alternative Name
4. The certificate hasn’t been revoked (via CRL or OCSP)
If any check fails, the connection is refused. This is why expired certificates cause outages — not warnings, outages.
Let’s Encrypt and Automated Certificates
Let’s Encrypt fundamentally changed TLS deployment by providing free, automated certificates with a 90-day validity period. The short lifetime is a feature — it forces automation and limits the window if a private key is compromised.
Automation with Certbot/ACME
| Component | Role |
|---|---|
| ACME protocol | Standardised certificate issuance automation |
| Certbot / acme.sh | Client tools that handle challenge-response and renewal |
| HTTP-01 challenge | Prove domain control by serving a file at /.well-known/acme-challenge/ |
| DNS-01 challenge | Prove control by creating a DNS TXT record (required for wildcards) |
Best practice: Configure automated renewal with at least 30 days before expiry. Monitor certificate expiry dates with alerting. A certificate that expires at 3am during a court filing deadline is not a theoretical risk — it's a known failure mode.
Common Misconfigurations
1. Supporting Deprecated Protocols
TLS 1.0 and 1.1 were deprecated by RFC 8996 in 2021. Known vulnerabilities include BEAST, POODLE, and Lucky 13. Yet some legal SaaS platforms maintain support for legacy court systems that haven’t upgraded.
The risk: An attacker performing a downgrade attack forces the connection to TLS 1.0 and exploits known vulnerabilities. POODLE demonstrated this by recovering encrypted content one byte at a time.
The fix: Disable TLS 1.0 and 1.1 entirely. If a court system requires them, use a dedicated proxy with network-level isolation — don’t expose your entire application to downgrade attacks for one integration.
2. Weak Cipher Suites
| Avoid | Use Instead |
|---|---|
| RC4 (biased keystream) | AES-256-GCM |
| DES/3DES (64-bit block) | ChaCha20-Poly1305 |
| CBC mode without encrypt-then-MAC | AEAD suites only |
| RSA key exchange (no forward secrecy) | ECDHE key exchange |
3. Mixed Content
Loading HTTP resources (scripts, stylesheets, images) on an HTTPS page. Modern browsers block mixed active content (scripts, iframes) but may allow mixed passive content (images). A single HTTP-loaded script gives an attacker full control of the page.
4. Certificate Expiry
In 2020, Microsoft Teams suffered a global outage because a certificate expired. The fix took hours. For legal SaaS with filing deadlines, hours of downtime can mean missed court dates.
TLS 1.3: Why It Matters
TLS 1.3 isn’t just faster — it’s fundamentally more secure:
| Feature | TLS 1.2 | TLS 1.3 |
|---|---|---|
| Handshake round-trips | 2 | 1 |
| Forward secrecy | Optional (depends on cipher) | Mandatory |
| Cipher suites | 300+ (many insecure) | 5 (all secure) |
| 0-RTT resumption | No | Yes (with replay caveats) |
| CBC mode | Permitted | Removed |
| RSA key exchange | Permitted | Removed |
0-RTT resumption caveat: 0-RTT data is replayable. For legal SaaS, never allow state-changing operations (document sharing, payment processing) in 0-RTT — only idempotent reads.
Testing with SSL Labs
Qualys SSL Labs Server Test is the industry standard for TLS configuration assessment. It grades your configuration A through F and identifies specific issues.
What an A+ Grade Requires
| Criterion | Requirement |
|---|---|
| Protocol support | TLS 1.2+ only (TLS 1.3 preferred) |
| Key exchange | ECDHE with P-256 or X25519 |
| Cipher strength | 128-bit+ AEAD only |
| Certificate | SHA-256+, 2048-bit+ RSA or P-256 ECDSA |
| HSTS | Configured with long max-age |
| No known vulnerabilities | BEAST, POODLE, Heartbleed, ROBOT all patched |
Run this test after every infrastructure change. Automate it in your deployment pipeline — testssl.sh provides a command-line alternative for CI/CD integration.
Legal-Specific TLS Considerations
Court Integration Endpoints
Some court e-filing systems run legacy TLS configurations. When integrating:
- Never downgrade your main application’s TLS to accommodate them
- Use a dedicated outbound proxy with strict network isolation
- Log all connections to legacy endpoints for audit purposes
- Maintain a deprecation timeline and communicate it to court IT
Client Portal Certificate Pinning
For high-value clients (large litigation, M&A), consider certificate pinning in custom client applications — ensuring the app only accepts your specific certificate, not any CA-signed certificate for your domain.
Conclusion
TLS is not a checkbox — it’s a living configuration that requires monitoring, testing, and maintenance. Certificates expire, cipher suites become deprecated, and protocol vulnerabilities are discovered. For legal SaaS, where a single intercepted communication can waive attorney-client privilege, your TLS configuration is as critical as your authentication system. Test it today. Automate the testing. Alert on degradation.
Next episode: API Gateway Patterns and Rate Limiting — where we’ll see how a single enforcement point protects your entire API surface.