Hi Folks,

I have some questions about the Topics TGC (aka TGT), RememberMe and the 
integrated Ehcache.

So first, everything works fine but after a review we've seen that the long 
term TGC (aka remember me) will
be removed in the ehcache.

In the "ticketExpirationPolicies.xml" we've configured four policies with 
different lifetimes (ServiceTicket, standardTGT, longTermTGT 
with RememberMeDelegatingExpirationPolicy).

<bean id="serviceTicketExpirationPolicy"
class="org.jasig.cas.ticket.support.MultiTimeUseOrTimeoutExpirationPolicy"
c:numberOfUses="${st.numberOfUses:1}" 
c:timeToKill="${st.timeToKillInSeconds:15}"
c:timeUnit-ref="SECONDS" />


<bean id="standardSessionTGTExpirationPolicy"
class="org.jasig.cas.ticket.support.TicketGrantingTicketExpirationPolicy"
c:maxTimeToLive="${tgt.maxTimeToLiveInSeconds:14400}"
c:timeToKill="${tgt.timeToKillInSeconds:3600}"
c:timeUnit-ref="SECONDS" />

<bean id="longTermSessionTGTExpirationPolicy" 
class="org.jasig.cas.ticket.support.TimeoutExpirationPolicy"
c:timeToKill="${tgt.rememberMeDuration:15768000}"
c:timeUnit-ref="SECONDS" />

<bean id="grantingTicketExpirationPolicy"
class="org.jasig.cas.ticket.support.RememberMeDelegatingExpirationPolicy"
p:sessionExpirationPolicy-ref="standardSessionTGTExpirationPolicy"
p:rememberMeExpirationPolicy-ref="longTermSessionTGTExpirationPolicy" />


All variables are stored in a property file

tgt.maxTimeToLiveInSeconds=14400
tgt.timeToKillInSeconds=3600
tgt.rememberMeDuration=15768000 
st.timeToKillInSeconds=15

In case of "remember me" CAS create a cookie with a lifetime of half a year

<https://lh3.googleusercontent.com/-wgPm4C7sFNU/Wcs3uXZTKsI/AAAAAAAAAoA/NL6FWEy5c3YxTvr1h6C1tSGfh_xZDxNzwCLcBGAs/s1600/27-09-_2017_07-30-06.jpg>


In the "ticketRegistry.xml" we configured exactly two caches 
"serviceTicketsCache" and "ticketsGrantingTicketsCache":


  
<bean id="serviceTicketsCache"
     class="org.springframework.cache.ehcache.EhCacheFactoryBean"
     parent="abstractTicketCache"
     p:cacheName="cas_st"
     p:timeToIdle="0"
     p:timeToLive="15"
     p:cacheEventListeners-ref="ticketRMISynchronousCacheReplicator" />
<bean id="ticketGrantingTicketsCache"
     class="org.springframework.cache.ehcache.EhCacheFactoryBean"
     parent="abstractTicketCache"
     p:cacheName="cas_tgt"
     p:timeToIdle="3600" 
     p:timeToLive="14400" 
     p:cacheEventListeners-ref="ticketRMIAsynchronousCacheReplicator" />


It works as designed, the Ehcache invalidate all TGC after four hours (= 
14400 seconds), but the client has a cookie stored with expiration date 
half a year later. 


If we configure the lifetime for half a year in the ticketRegistry ALL TGCs 
will be in cache for this lifetime, regardless if long term (remember me) 
or not. Isn't it???


So my question is how to solve this problem? Have anybody ideas or some 
workarounds/solutions?


Thank you in advance


Martin

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/07012bb2-3e77-41b4-85fe-8edbb9142f3a%40apereo.org.

Reply via email to