liveBook · Manning

TLS

As explained in Grokking Web Application Security

TLS is a cryptographic protocol that provides confidentiality, integrity, and authentication for network communications.

TLS protects network traffic while it travels between computers. HTTPS is HTTP carried over a TLS connection, providing confidentiality, authentication, and detection of unexpected changes. Its older, less secure predecessor is SSL. section 3.3

During the initial TLS handshake, the client and server negotiate a cipher suite containing:

  • A key-exchange algorithm, which securely exchanges keys for faster bulk encryption. section 3.3
  • An authentication algorithm, which helps confirm that data is reaching the intended destination. section 3.3
  • A bulk-encryption algorithm, which protects the exchanged traffic. section 3.3
  • A message-authentication-code algorithm, which detects altered data packets. section 3.3

A digital certificate contains the public key used to establish a secure connection for a domain or IP address. Certificate authorities issue certificates, while browsers trust a configured list of authorities; unrecognized self-signed certificates trigger warnings. section 3.3

Application owners should treat TLS as an operational responsibility:

  • Obtain a certificate, host it with the web application, and encourage every user agent to use HTTPS. section 3.4
  • Revoke and replace certificates when they expire or their private keys may be compromised. section 3.4
  • Use HSTS, require at least TLS 1.3 where applicable, restrict access to private keys, and monitor certificate transparency logs. section 7.13

Practical HTTPS protection

Acquire a certificate for the web domain and serve the application through HTTPS. Enable HSTS so communication consistently uses HTTPS, require a minimal TLS version to reduce downgrade attacks, and maintain a scripted process for revoking and reissuing certificates after suspected unauthorized access. section 7.13 section 3.4

How Grokking Web Application Security covers it

How deep it goes
Explains certificates, handshakes, and cipher-suite roles, then stops short of implementation internals.
Examples
Uses browser padlocks, self-signed certificate warnings, AWS Certificate Manager, HSTS, and certificate-transparency monitoring.
What you can do after
Operate/configure HTTPS by obtaining certificates, enforcing secure transport, and revoking compromised or expired credentials.
How it connects
Connects HTTPS with certificates, certificate authorities, HSTS, downgrade attacks, and man-in-the-middle attacks.

Also explained in

Compare how 15 books explain TLS →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Web Application Security. The section links point to the parts of the book it draws on.