liveBook · Manning

HTTPS

As explained in Spring Security in Action, Second Edition

HTTPS is HTTP transmitted through TLS to provide encrypted communication and server authentication.

HTTPS transmits HTTP through TLS, protecting communication and authenticating the server. It is especially important for HTTP Basic authentication, whose Base64-encoded credentials are not encrypted. section 2.2

HTTPS can be enabled at several layers:

  • Configure it in the application with Spring Boot. section 2.2
  • Terminate it through a service mesh or infrastructure layer. section 2.2
  • Use a certificate keystore, such as PKCS12, with the server SSL settings. section 2.2

A local Spring Boot endpoint

Generate a certificate, package it as PKCS12, configure the keystore, and call the endpoint over https://localhost:8080/hello. The curl example uses HTTP Basic credentials and returns “Hello!”. section 2.2

openssl req -newkey rsa:2048 -x509 -keyout key.pem -out cert.pem -days 365

Generate a self-signed certificate for a local HTTPS setup with OpenSSL. section 2.2

How Spring Security in Action, Second Edition covers it

How deep it goes
Explains confidentiality, deployment choices, certificate preparation, Spring Boot settings, and curl testing without detailing TLS internals.
Examples
Uses OpenSSL commands, a PKCS12 keystore configuration, a Spring endpoint, and a curl request to localhost.
What it assumes
Assumes basic Spring Security and HTTP familiarity while clarifying why Base64 credentials require HTTPS for confidentiality.
What you can do after
Configure and test HTTPS for a Spring Boot endpoint using a certificate, PKCS12 keystore, and curl.
How it connects
Connects HTTPS with TLS, HTTP Basic authentication, Spring Security, Spring Boot, certificates, and PKCS12 keystores.

Also explained in

Compare how 7 books explain HTTPS →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Spring Security in Action, Second Edition. The section links point to the parts of the book it draws on.