Articles tagged spring-session
Session Clustering for OAuth 2.0 Applications
![Session Clustering for OAuth 2.0 Applications](/assets-jekyll/blog/oauth-sessions-with-java/social-c93a21db4c9c38a979bc210005d447e16bf8a90a503d79a0ad2e7806eeae4583.png)
A common OAuth 2.0 question we get: "How do I deal with OAuth in a load-balanced application?" The short answer: There’s nothing specific about session clustering for OAuth. The longer answer is—you likely still need to worry about cluster session management. This post will discuss how an OAuth login relates to your application’s session. And we’ll build a simple, secure, load-balanced application to demonstrate. Table of Contents Sessions and OAuth 2.0 Applications Stateless with JWTs...
Scaling Secure Applications with Spring Session and Redis
![Scaling Secure Applications with Spring Session and Redis](/assets-jekyll/blog/spring-session-redis/spring-session-redis-f9648e3c9882613b8ac9fc9430f25d33671d6967e6b6b2d5a5cfda1810fc6790.png)
Spring Boot and Spring Security have delighted developers with their APIs for quite some time now. Spring Security has done an excellent job of implementing OAuth and OpenID Connect (OIDC) standards for the last few years. If you’re using Spring Security’s default authorization code flow with OIDC, it’ll establish a session on the server and serve up old fashion session cookies. If you want to scale your services, you’ll need to share session information. This...
Easy Session Sharing in Spring Boot with Spring Session and MySQL
![Easy Session Sharing in Spring Boot with Spring Session and MySQL](/assets-jekyll/blog/spring-session/spring-session-c03b949e483a6f9ccf194260de2342ff214e26fb9871889a50586dbe46280dff.png)
Session management in multi-node applications presents multiple challenges. When the architecture includes a load balancer, client requests might be routed to different servers each time, and the HTTP session might be lost. In this tutorial, I’ll walk you through the configuration of session sharing in a multi-node Spring Boot application. Prerequisites: Java 8+ Docker Docker Compose Table of Contents Session Persistence Session Sharing with Spring Session Learn More about Spring Session and OAuth 2.0 Session...