0

I'm using the Druid Pac4j library for authentication for druid web console, which is deployed in kubernetes using terraform. Currently, I'm encountering an issue where the session token obtained through Pac4j expires after 15 minutes (900 seconds), causing users to be logged out frequently.

I suspect that the expiration time is controlled by the maxAge property for the session token stored in the cookie. Is there a way to increase the maxAge value for the session token in the cookie, thereby extending the session duration?

I've reviewed the Pac4j documentation and code, but couldn't find a straightforward method for modifying the maxAge specifically for the session token cookie. Is it possible to configure the maxAge property directly in the Kubernetes deployment or Terraform configuration? Or do I need to make changes to the underlying Druid Pac4j library itself?

I would appreciate any insights, examples, or recommended approaches for extending the maxAge property in a Kubernetes and Terraform deployment with Druid Pac4j.

Thank you in advance for your help!

ragav ravi
  • 23
  • 4

1 Answers1

0

Indeed, it seems so. I see: cookie.setMaxAge(900); hard-coded in the Pac4jSessionStore.

As a first approach, did you try to re-create this class (same name, same package) with a different setMaxAge call?

jleleu
  • 2,309
  • 1
  • 13
  • 9