CAS 6.3.2 CAS Cookie timeout value & redirect issue

213 views
Skip to first unread message

Morning Star

unread,
May 23, 2021, 11:01:47 AM5/23/21
to CAS Community
Hi Team,

We are using CAS 6.3.2 server and JDK 11. I would be grateful if someone clears my doubt.
We are facing the below issue in production:

1. What is the default timeout value of CAS cookie after login & its related property?
2. We are getting the below default login successful page if there is no service param in url.
We make sure to provide service parameter in all use cases. But if end user gives "/cas/login", he is able to see this page.

Is there any way to override the default login success page and show different page with back button? 
cas.png

We are authenticating 2 domains using CAS.

Saw this property in CAS documentation.
cas.view.default-redirect-url=https://mydomain.com/home - This will be executed only when there is no service provided right? Can someone confirm on the same?

Thanks in advance!

Regards,
Anusuya.

Andy Ng

unread,
May 23, 2021, 11:21:03 PM5/23/21
to CAS Community, anusu...@gmail.com
Hi Anusuya,

> Q1. What is the default timeout value of CAS cookie after login & its related property?
CAS is relatively complicated in this part, so basically:
- There are TGC cookie which is a cookie stored in user browser indicating they have login, that one expired when user close the browser
https://apereo.github.io/cas/6.3.x/configuration/Configuration-Properties.html#ticket-granting-cookie
- There is a thing called sliding windows, if user do not login within sliding windows, they will be considered not active. Default sliding windows is 2 hours
https://apereo.github.io/cas/6.3.x/configuration/Configuration-Properties.html#default

> Q2. We are getting the below default login successful page if there is no service param in url.
You can override the https://github.com/apereo/cas/blob/master/support/cas-server-support-thymeleaf/src/main/resources/templates/login/casGenericSuccessView.html

For how to override a file, this might help. https://groups.google.com/a/apereo.org/g/cas-user/c/k-yfoou7Zy0 
I don't have time to write a full on guide, you can google a bit see how it works.

After you override the casGenericSuccessView.html, add whatever you like and your edit will completely override the one from CAS default :)

> Q3: cas.view.default-redirect-url=https://mydomain.com/home - This will be executed only when there is no service provided right? Can someone confirm on the same?
Yes, it only execute only when no service provider

Hope this helps,

Cheers!
- Andy

Reply all
Reply to author
Forward
0 new messages