-
|
Hi, we've been waiting for the persistent-user-sessions feature for a long time, really happy it's finally released. We are currently running KC 22, two pods connected using headless service. In the upgrading guide, there is no way for existing in-memory session to be persisted into DB. So I had to ask, is there a workaround? I'm thinking about connecting an external Infinispan first, and somehow let KC sync the existing sessions into this external cache. And then backup this external Infinispan, and upgrade to KC 25 and hope that it will migrate the existing sessions to the database. Is this workable? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Sorry, I've missed this question, maybe it would better be asked in #28271. There is an incompatible change in Infinispan when you upgrade to KC24+ which wouldn't allow you to do a rolling upgrade. So you would first need to add some persistent storage of sessions to the database. The most likely thing to work is adding an external Infinispan. Still, this setup isn't supported although the community has found some ways to do this. AFAIK Keycloak will in such will not transfer the sessions to the external Infinispan on startup, but only if it updated the next time. Not sure if this is sufficient for your setup. Alternatively, you'll need to write some custom Java code to copy over the sessions in KC22 from the local Infinispan to the external Infinispan. |
Beta Was this translation helpful? Give feedback.
Sorry, I've missed this question, maybe it would better be asked in #28271.
There is an incompatible change in Infinispan when you upgrade to KC24+ which wouldn't allow you to do a rolling upgrade. So you would first need to add some persistent storage of sessions to the database. The most likely thing to work is adding an external Infinispan. Still, this setup isn't supported although the community has found some ways to do this. AFAIK Keycloak will in such will not transfer the sessions to the external Infinispan on startup, but only if it updated the next time. Not sure if this is sufficient for your setup.
Alternatively, you'll need to write some custom Java code to copy over the sess…