-
1. Re: Picketbox 4.0.21 Final caching ?
hohmsen Jan 21, 2016 11:06 AM (in response to sergiu_pienar)This happens, because you set the cache-type to default: <security-domain name="ApplicationRealm" cache-type="default">
The Server caches the query-results, so changes to the database will not be picked up.
You can see that in the Logs with
<logger category="org.jboss.security"> <level name="TRACE"/> </logger> Hitting the Cache looks like this in the logs:
17:02:51,548 TRACE [org.jboss.security] (default task-11) PBOX00200: Begin isValid, principal: org.wildfly.extension.undertow.security.AccountImpl$AccountPrincipal@586034f, cache entry: org.jboss.security.authentication.JBossCachedAuthenticationManager$DomainInfo@10cdeafd
17:02:51,548 TRACE [org.jboss.security] (default task-11) PBOX00204: Begin validateCache, domainInfo: org.jboss.security.authentication.JBossCachedAuthenticationManager$DomainInfo@10cdeafd, credential class: class [C
17:02:51,548 TRACE [org.jboss.security] (default task-11) PBOX00205: End validateCache, result = true
17:02:51,548 TRACE [org.jboss.security] (default task-11) PBOX00201: End isValid, result = true
17:02:51,564 TRACE [org.jboss.security] (default task-11) PBOX00354: Setting security roles ThreadLocal: null
You can disable the cache by removing the cache-type="default" in the security-domain. Other alternative is to change the cache-type to infinispan, where you can set timeouts for the caching.
Maybe there is a possibility to flush the cache manually, when you changed the roles in the database?