scottfrederick / messaging-redis-ssl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Securing Spring Boot and Redis with SSL/TLS

This repository contains a sample of configuring a Spring Boot client application to use a Redis server with SSL/TLS.

The source code for the sample is from Spring Guides.

The Redis SSL/TLS configuration is derived from https://github.com/allen-munsch/docker-redis-ssl-example.

Running the sample

Generate client and server SSL certificates with a root certificate authority and copy them to the server and application:

./scripts/gen-redis-certs.sh

Build and run the application:

./gradlew bootRun

The project includes a docker-compose.yml file to start the Redis server in a Docker container. You don’t need to manually run docker compose up, as Spring Boot will do that for you.

If successful, you will see two messages at the end of the log output containing:

Sending message...
Received <Hello from Redis!>

About


Languages

Language:Java 50.5%Language:Shell 48.7%Language:Dockerfile 0.8%