Sitemap

Spring Cloud Gateway OpenID Connect with Keycloak

9 min readJun 23, 2025

In this story, we’ll explore how to secure microservices architectures with Spring Cloud Gateway, Resource Servers, and Keycloak.

Press enter or click to view image in full size

· Prerequisites
· Overview
How the authentication flow works
· Setting up a Keycloak Instance
Start Keycloak instance
Create a realm
Creating a Client
Create Users
· Spring Cloud Gateway implementation
application.yml
Security Configuration
· Spring Resource Server implementation
Configure application settings
JwtGrantedAuthoritiesConverter
Security Configuration
Resource server Endpoints
· Testing
· Conclusion
· References

If you are not a Medium member, then click here to read for free.

Prerequisites

This is the list of all the prerequisites:

--

--

No responses yet