spring-projects / spring-projects/spring-session

Provide ClientHttpRequestInterceptor to pass Session along

Open
#1,109 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: waiting-for-triage
Dominant language
Java
Stars
1.9k
Forks
1.2k
Avg merge
4h 27m
Merged PRs (30d)
55

Description

In Microservice based applications especially, you have the task to do requests on behalf of the user.

With Spring session the behavior suddenly changed and the session is now base64 encoded. This leads to duplicated code and more "fun" when this changes again.
So it's not feasible in the long run to add the sessionID in the right encoding by yourself in every service that depends on other services.

As the RestTemplate provides support for ClientHttpRequestInterceptors to modify the request it would be nice to be able to rely on a implementation that generates a cookie that is definitively the same that the spring session implementation is configured for.

Is there a chance that spring session ships such a ClientHttpRequestInterceptor?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing Spring Session's configured session-cookie behavior and RestTemplate's ClientHttpRequestInterceptor extension point. Define how an interceptor should pass the session between services without duplicating encoding logic, then identify coverage needed to verify that its cookie matches the active Spring Session configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.