Problem We want to have a way to automatically instruct a Spring Boot application to do a graceful shutdown. This is useful for example when we use CodeDeploy to deploy the application to an EC2 instance, because it allows us to let the application shutdown gracefully when we are deploying a new version. Assumptions ForContinue reading “How to secure the graceful shutdown of a Spring Boot application running on AWS EC2 instance”
Tag Archives: Spring Boot
How to secure an API endpoint with HTTP basic authentication in Spring Boot
Problem Given a Spring Boot application that exposes a REST API, we want to control access to one of its API endpoints using HTTP basic authentication. HTTP basic authentication HTTP basic authentication is an extension to the HTTP protocol meant to protect access to a web resource. It works defining a username and password forContinue reading “How to secure an API endpoint with HTTP basic authentication in Spring Boot”
Setting up HTTPS / SSL in a Spring Boot Web application
Problem We want to be able to exchange HTTP requests and responses with our application over an encrypted connection. HTTPS and SSL SSL (Secure Sockets Layer) is a standard for secure communication over the transport layer. It defines a set of protocols and algorithms via which a client can establish an encrypted communication channel toContinue reading “Setting up HTTPS / SSL in a Spring Boot Web application”