MongoDbTicketRegistry TTL Index

31 views
Skip to first unread message

Geoff

unread,
Jun 24, 2017, 4:18:56 PM6/24/17
to CAS Community
Has anyone else run into problems with tickets piling up with the MongoDBTicketRegistry?  For me tickets are not deleted unless the session ends gracefully, i.e. the user explicitly logs out and the logout webflow is triggered.  

Looking at the source of MongoDBTicketRegistry it seems like the TTL index isn't being handled properly.  The expireAt field that the index is created against seems to always be set to the ticket expiration seconds.  The way I understand Mongo TTL indexes is that they are created against datetime field.  Am I missing something or should the expireAt field hold the date time that the ticket should expire rather than the number of seconds to expire?

ben.howe...@northgateps.com

unread,
Jul 4, 2017, 7:44:03 AM7/4/17
to CAS Community
I've just finished setting up a Mongo backed ticket registry for 5.1.1 and agree with you.  It's setting the expireAt field to the TTL rather than expireAfterSeconds which might do what's intended.

Ben Howell-Thomas

unread,
Jul 4, 2017, 11:58:36 AM7/4/17
to cas-...@apereo.org
Raised issue https://github.com/apereo/cas/issues/2748.

It is using an expireAfterSeconds index but isn't setting a date.

This email is sent on behalf of Northgate Public Services (UK) Limited and its associated companies including Rave Technologies (India) Pvt Limited (together "Northgate Public Services") and is strictly confidential and intended solely for the addressee(s). 
If you are not the intended recipient of this email you must: (i) not disclose, copy or distribute its contents to any other person nor use its contents in any way or you may be acting unlawfully;  (ii) contact Northgate Public Services immediately on +44(0)1908 264500 quoting the name of the sender and the addressee then delete it from your system.
Northgate Public Services has taken reasonable precautions to ensure that no viruses are contained in this email, but does not accept any responsibility once this email has been transmitted.  You should scan attachments (if any) for viruses.

Northgate Public Services (UK) Limited, registered in England and Wales under number 00968498 with a registered address of Peoplebuilding 2, Peoplebuilding Estate, Maylands Avenue, Hemel Hempstead, Hertfordshire, HP2 4NN.  Rave Technologies (India) Pvt Limited, registered in India under number 117068 with a registered address of 2nd Floor, Ballard House, Adi Marzban Marg, Ballard Estate, Mumbai, Maharashtra, India, 400001.

--
- CAS gitter chatroom: https://gitter.im/apereo/cas
- CAS mailing list guidelines: https://apereo.github.io/cas/Mailing-Lists.html
- CAS documentation website: https://apereo.github.io/cas
- CAS project website: https://github.com/apereo/cas
---
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+unsubscribe@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/cb769b26-6db8-43bb-8a4f-d2228e0f0be6%40apereo.org.


This email is sent on behalf of Northgate Public Services (UK) Limited and its associated companies including Rave Technologies (India) Pvt Limited (together "Northgate Public Services") and is strictly confidential and intended solely for the addressee(s). 
If you are not the intended recipient of this email you must: (i) not disclose, copy or distribute its contents to any other person nor use its contents in any way or you may be acting unlawfully;  (ii) contact Northgate Public Services immediately on +44(0)1908 264500 quoting the name of the sender and the addressee then delete it from your system.
Northgate Public Services has taken reasonable precautions to ensure that no viruses are contained in this email, but does not accept any responsibility once this email has been transmitted.  You should scan attachments (if any) for viruses.

Northgate Public Services (UK) Limited, registered in England and Wales under number 00968498 with a registered address of Peoplebuilding 2, Peoplebuilding Estate, Maylands Avenue, Hemel Hempstead, Hertfordshire, HP2 4NN.  Rave Technologies (India) Pvt Limited, registered in India under number 117068 with a registered address of 2nd Floor, Ballard House, Adi Marzban Marg, Ballard Estate, Mumbai, Maharashtra, India, 400001.
Reply all
Reply to author
Forward
0 new messages