OHDSI / OHDSI/WebAPI

Problems with session when i create more than one webapi replicas

Open
#2,356 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
151
Forks
183
Avg merge
14m
Merged PRs (30d)
2

Description

Expected behavior

We are deploying atlas in a k8s cluster. When we scale more than one replica the webapi pod, the login process crash.

2024-01-31 17:34:37.126 ERROR http-nio-8080-exec-6 org.ohdsi.webapi.shiro.filters.ExceptionHandlerFilter - [] - Error during filtering
javax.servlet.ServletException: org.pac4j.core.exception.TechnicalException: State parameter is different from the one sent in authentication request. Session expired or possible threat of cross-site request forgery

We have configured google auth as a login provider and with one webapi replica works fine.

Is possible keep the session in a redis ? Where are the session stored ? Any suggestions?

Contributor guide

No contributing guide indexed for this repository

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 with the reported ExceptionHandlerFilter stack trace and the Kubernetes multi-replica deployment configuration. Trace where the authentication session and state are stored and how requests are handled across replicas; done means login works reliably with more than one webapi replica and the resulting session behavior is documented or configured.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, kubernetes
Domain
authentication, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.