<div dir="ltr">The tokens themselves are not stored, but can be verified by Keycloak as long as the user session is active. So your question is how to make user sessions persisted. We do not support persisting user sessions at the moment. You have two choices:<div><br></div><div>1. Add an additional node and configure set owners to 2 for the user session caches, or change it to a replicated cache. See the clustering section in the docs for more details.</div><div>2. Try to configure Infinispan to persist the sessions. See <a href="https://docs.jboss.org/author/display/WFLY10/Infinispan+Subsystem">https://docs.jboss.org/author/display/WFLY10/Infinispan+Subsystem</a> for more details.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 1 March 2016 at 20:56, Edgar Vonk - Info.nl <span dir="ltr"><<a href="mailto:Edgar@info.nl" target="_blank">Edgar@info.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi all,<div><br></div><div>What would we need to do to make Keycloak user sessions persistent in the database?</div><div><br></div><div>I think the information in: <a href="http://lists.jboss.org/pipermail/keycloak-user/2015-April/001921.html" target="_blank">http://lists.jboss.org/pipermail/keycloak-user/2015-April/001921.html</a> is not relevant anymore with Keycloak 1.9.0? Specifically:</div><div><br></div><div><pre style="background-color:rgb(255,255,255)">"userSessions": {
"provider": "jpa"
}
</pre></div><div><br></div><div>Does not seem to work (“Failed to find provider jpa for userSessions”). User sessions are now managed using Infinispan by default if I understand correctly: <a href="http://keycloak.github.io/docs/userguide/keycloak-server/html/clustering.html#d4e3292" target="_blank">http://keycloak.github.io/docs/userguide/keycloak-server/html/clustering.html#d4e3292</a> ?</div><div><br></div><div>Is there a way to make user sessions persistent? </div><div><br></div><div>Our issue is that we send out a lot of activation (‘update password’) emails from our (single) Keycloak server to new users and since we have a continuous delivery pipeline Keycloak does down and up quite a bit and every time it restarts all temporary log in tokens used for these update password actions are lost (since they are stored in memory only). And if I understand correctly these tokens are actually a sort of user sessions.</div><div><br></div><div>cheers</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Edgar</div></font></span><span class=""><div><br></div><div><br><div><blockquote type="cite"><div>On 29 Feb 2016, at 17:52, Edgar Vonk - <a href="http://info.nl" target="_blank">Info.nl</a> <<a href="mailto:Edgar@info.nl" target="_blank">Edgar@info.nl</a>> wrote:</div><br><div><div>Hi,<br><br>See if I understand this correctly: in the default set up of Keycloak sessions and temporary tokens are not persisted in the Keycloak database? So consider this scenario:<br><br>1/ login as admin to master realm<br>2/ go to Users - Credentials and send a ‘Update Password’ reset action email<br>3/ user receives an email with a link with a unique token to update his/her password in Keycloak<br>4/ Keycloak server is restarted for whatever reason<br>5/ the temporary ‘login action token’ no longer exists and the link from 3/ no longer works<br><br>Is this correct and expected behaviour?<br><br>And if so, can somebody maybe point us in the direction to solve this? I.e. by making sessions/tokens by persistent I guess.<br><br>cheers<br><br>Edgar</div></div></blockquote></div><br></div></span></div><br>_______________________________________________<br>
keycloak-user mailing list<br>
<a href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br></blockquote></div><br></div>