[cas-user] Re: I find a bug,Error when I enable rememberMe

2018-12-08 Thread Seven4X
thanks a lot :)

在 2018年11月28日星期三 UTC+8下午3:43:41,Andy Ng写道:
>
> Hello
>
> I saw this PR is similar to what you experience above, 
> https://github.com/apereo/cas/pull/3636, which is applied to CAS 5.3.6
>
> Try updating to 5.3.6 and see if this PR fixed your problem.
>
> Cheers!
> - Andy
>
> On Tuesday, 27 November 2018 16:16:51 UTC+8, Seven4X wrote:
>>
>>  enable rememberMe : 
>>
>>  cas.ticket.tgt.rememberMe.enabled=true
>>
>>  cas.ticket.tgt.rememberMe.timeToKillInSeconds=28800 
>>
>>
>> my version is 5.3
>>
>>
>> The error  is : 
>>
>>
>> ERROR [org.apereo.cas.ticket.registry.DefaultTicketRegistryCleaner] - 
>> 
>> java.lang.ClassCastException: java.util.LinkedList cannot be cast to 
>> java.lang.Boolean
>>  at 
>> org.apereo.cas.ticket.support.RememberMeDelegatingExpirationPolicy.getExpirationPolicyNameFor(RememberMeDelegatingExpirationPolicy.java:54)
>>  ~[cas-server-core-tickets-api-5.3.4.jar!/:5.3.4]
>>  at 
>> org.apereo.cas.ticket.support.BaseDelegatingExpirationPolicy.getExpirationPolicyFor(BaseDelegatingExpirationPolicy.java:135)
>>  ~[cas-server-core-tickets-api-5.3.4.jar!/:5.3.4]
>>  at 
>> org.apereo.cas.ticket.support.BaseDelegatingExpirationPolicy.isExpired(BaseDelegatingExpirationPolicy.java:80)
>>  ~[cas-server-core-tickets-api-5.3.4.jar!/:5.3.4]
>>  at 
>> org.apereo.cas.ticket.AbstractTicket.isExpired(AbstractTicket.java:120) 
>> ~[cas-server-core-tickets-api-5.3.4.jar!/:5.3.4]
>>  at 
>> java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174) 
>> ~[?:1.8.0_191]
>>  at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1553) 
>> ~[?:1.8.0_191]
>>  at 
>> java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) 
>> ~[?:1.8.0_191]
>>  at 
>> java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) 
>> ~[?:1.8.0_191]
>>  at 
>> java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) 
>> ~[?:1.8.0_191]
>>  at 
>> java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) 
>> ~[?:1.8.0_191]
>>  at java.util.stream.IntPipeline.reduce(IntPipeline.java:456) 
>> ~[?:1.8.0_191]
>>  at java.util.stream.IntPipeline.sum(IntPipeline.java:414) ~[?:1.8.0_191]
>>  at 
>> org.apereo.cas.ticket.registry.DefaultTicketRegistryCleaner.cleanInternal(DefaultTicketRegistryCleaner.java:60)
>>  ~[cas-server-core-tickets-api-5.3.4.jar!/:5.3.4]
>>  at 
>> org.apereo.cas.ticket.registry.DefaultTicketRegistryCleaner.clean(DefaultTicketRegistryCleaner.java:43)
>>  ~[cas-server-core-tickets-api-5.3.4.jar!/:5.3.4]
>>  at 
>> org.apereo.cas.ticket.registry.DefaultTicketRegistryCleaner$$FastClassBySpringCGLIB$$29f046b2.invoke()
>>  ~[cas-server-core-tickets-api-5.3.4.jar!/:5.3.4]
>>  at 
>> org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) 
>> ~[spring-core-4.3.19.RELEASE.jar!/:4.3.19.RELEASE]
>>  at 
>> org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:736)
>>  ~[spring-aop-4.3.19.RELEASE.jar!/:4.3.19.RELEASE]
>>  at 
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
>>  ~[spring-aop-4.3.19.RELEASE.jar!/:4.3.19.RELEASE]
>>  at 
>> org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
>>  ~[spring-tx-4.3.19.RELEASE.jar!/:4.3.19.RELEASE]
>>  at 
>> org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282)
>>  ~[spring-tx-4.3.19.RELEASE.jar!/:4.3.19.RELEASE]
>>  at 
>> org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
>>  ~[spring-tx-4.3.19.RELEASE.jar!/:4.3.19.RELEASE]
>>  at 
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
>>  ~[spring-aop-4.3.19.RELEASE.jar!/:4.3.19.RELEASE]
>>  at 
>> org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:671)
>>  ~[spring-aop-4.3.19.RELEASE.jar!/:4.3.19.RELEASE]
>>  at 
>> org.apereo.cas.ticket.registry.DefaultTicketRegistryCleaner$$EnhancerBySpringCGLIB$$303e4d6d.clean()
>>  ~[cas-server-core-tickets-api-5.3.4.jar!/:5.3.4]
>>  at 
>> org.apereo.cas.config.CasCoreTicketsSchedulingConfiguration$TicketRegistryCleanerScheduler.run(CasCoreTicketsSchedulingConfiguration.java:91)
>>  ~[cas-server-core-tickets-5.3.4.jar!/:5.3.4]
>>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
>> ~[?:1.8.0_191]
>>  at 
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>>  ~[?:1.8.0_191]
>>  at 
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>  ~[?:1.8.0_191]
>>  at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_191]
>>  at 
>> 

Re: [cas-user] CAS - Remember me/Long term authentication when IP changes does not work

2018-12-08 Thread darKu
Hi Josef,

Thank for your input as well.
Yes we are on https only.
Also I had to disable the tgc encryption for a customer when I had to
implement some automatic login, so I don't think disabling tgc would be a
problem.
Haven't had time yet to test this solution.

On Sat, Dec 8, 2018, 19:58 Jozef Kotlar - EEA.sk  We have developed alternate implementation of CookieValueManager - only
> UserAgent is encoded into TGC.
> See github - https://github.com/dodok1/cas-support-cookie-roaming
>
> Anyway, Pascal answer should work as you are OK with the TGC flowing in
> the network unecrypted (but that not apply if your all services are HTTPS)..
>
> Dodo
>
> --
> - 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 cas-user+unsubscr...@apereo.org.
> To view this discussion on the web visit
> https://groups.google.com/a/apereo.org/d/msgid/cas-user/edbb7b42-6583-4fd0-a97d-7230cf0eb79d%40apereo.org
> 
> .
>

-- 
- 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 cas-user+unsubscr...@apereo.org.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/CAG6_%3DYBnG7MhzB%3DZW0dX5Dgg4-NGS7UvW0tvi5KGHZq8q%2BzErQ%40mail.gmail.com.


Re: [cas-user] CAS - Remember me/Long term authentication when IP changes does not work

2018-12-08 Thread Jozef Kotlar - EEA.sk
We have developed alternate implementation of CookieValueManager - only 
UserAgent is encoded into TGC.
See github - https://github.com/dodok1/cas-support-cookie-roaming

Anyway, Pascal answer should work as you are OK with the TGC flowing in the 
network unecrypted (but that not apply if your all services are HTTPS)..

Dodo

-- 
- 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 cas-user+unsubscr...@apereo.org.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/edbb7b42-6583-4fd0-a97d-7230cf0eb79d%40apereo.org.


[cas-user] Re: Cookie NPE in logs

2018-12-08 Thread Teddy Francois
A year later and I'm seeing these NPEs on CAS 5.3.6 as well.  If anyone has 
done anything elegant to make these go away please share. ;)

On Thursday, December 21, 2017 at 3:34:13 PM UTC-5, William E. wrote:
>
> It seems in cas 5.2, and 5.1.6, I'm seeing several instances of Cookie 
> related NPE's in the logs.  Presumably from tomcat/cas restarts and browser 
> refreshes where users were logged in before the cas/tomcat restart.  Not 
> sure where to report issues like this so the CAS developers become aware so 
> they can potentially do something more elegant with the scenario.
>
> 2017-12-21 14:28:57,494 DEBUG 
> [org.apereo.cas.web.support.CookieRetrievingCookieGenerator] - 
> java.lang.NullPointerException: null
> at 
> org.apereo.cas.web.support.DefaultCasCookieValueManager.obtainCookieValue(DefaultCasCookieValueManager.java:62)
>  
> ~[cas-server-support-cookie-5.2.0.jar:5.2.0]
> at 
> org.apereo.cas.web.support.CookieRetrievingCookieGenerator.retrieveCookieValue(CookieRetrievingCookieGenerator.java:126)
>  
> ~[cas-server-support-cookie-5.2.0.jar:5.2.0]
> at 
> org.apereo.cas.web.support.CookieRetrievingCookieGenerator$$FastClassBySpringCGLIB$$25dba342.invoke()
>  
> ~[cas-server-support-cookie-5.2.0.jar:5.2.0]
> at 
> org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) 
> ~[spring-core-4.3.12.RELEASE.jar:4.3.12.RELEASE]
> at 
> org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738)
>  
> ~[spring-aop-4.3.12.RELEASE.jar:4.3.12.RELEASE]
> at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
>  
> ~[spring-aop-4.3.12.RELEASE.jar:4.3.12.RELEASE]
> at 
> org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
>  
> ~[spring-aop-4.3.12.RELEASE.jar:4.3.12.RELEASE]
> at 
> org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
>  
> ~[spring-aop-4.3.12.RELEASE.jar:4.3.12.RELEASE]
> at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
>  
> ~[spring-aop-4.3.12.RELEASE.jar:4.3.12.RELEASE]
> at 
> org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:673)
>  
> ~[spring-aop-4.3.12.RELEASE.jar:4.3.12.RELEASE]
> at 
> org.apereo.cas.web.support.CookieRetrievingCookieGenerator$$EnhancerBySpringCGLIB$$8187cb8.retrieveCookieValue()
>  
> ~[cas-server-support-cookie-5.2.0.jar:5.2.0]
> at 
> org.apereo.cas.logging.web.ThreadContextMDCServletFilter.doFilter(ThreadContextMDCServletFilter.java:86)
>  
> ~[cas-server-core-logging-5.2.0.jar:5.2.0]
> at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
>  
> ~[catalina.jar:8.5.24]
> at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>  
> ~[catalina.jar:8.5.24]
> at 
> org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:106)
>  
> ~[spring-boot-actuator-1.5.8.RELEASE.jar:1.5.8.RELEASE]
> at 
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
>  
> ~[spring-web-4.3.12.RELEASE.jar:4.3.12.RELEASE]
> at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
>  
> ~[catalina.jar:8.5.24]
> at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>  
> ~[catalina.jar:8.5.24]
> at 
> org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
>  
> ~[spring-web-4.3.12.RELEASE.jar:4.3.12.RELEASE]
> at 
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
>  
> ~[spring-web-4.3.12.RELEASE.jar:4.3.12.RELEASE]
> .
>
>
> Thanks,
> William
>
>

-- 
- 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 cas-user+unsubscr...@apereo.org.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/cea55199-44b6-4863-8b35-d54b9985e049%40apereo.org.