Skip to content

Integration with spring-session #7141

@jgogstad

Description

@jgogstad

Using spring-session to implement persistent database sessions, one can no longer use the session configuration in the spring-boot documentation, like server.session.cookie.secure or server.session.cookie.http-only.

Spring-boot configures javax.servlet.SessionCookieConfig through org.springframework.boot.autoconfigure.web.ServerProperties.SessionConfiguringInitializer and relies on the servlet container to use this configuration for cookies. For some reason, spring-session is configured its own way and doesn't even consider reading any SessionCookieConfig.

Spring-boot should either provide a org.springframework.session.web.http.CookieSerializer that propagates configuration from SessionCookieConfiguration, or the problem should be fixed in spring-session.

Maybe we could get a maven artifact spring-boot-starter-session that configures this? Spring session seems to be configured differently from any other spring framework with Spring Boot (documentation)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions