Search code examples
spring-bootspring-data-redis

Cookie Value Different than httpSession.getId Spring Boot 2.0.0.1


Am working on multinode spring boot application where authentication is done on one server and redis session data is stored into redis database.On Subsequent request after login- authentication from first server ,request is passed to another server where based on authority data is served. Here Cookie is used to maintain the state but as Cookie value is different than session id it fails to PreAuthorize in Spring boot 2.0.0.1


Solution

  • It is basically an change in code i.e session value is encoded and stored in SESSION cookie after version 2.0.0 ... After version 2.0.0 Session value is encoded in base64 format and then saved.