[CAS] Automatically updated Time-based access strategy extension to current date

24 views
Skip to first unread message

Davide Malacrida

unread,
Jan 21, 2021, 10:54:14 AM1/21/21
to CAS Community

Hello everyone,

Lately we have been working on a locally deployed instance of Apereo CAS, in order to study the product a bit. We have the following doubt regarding how time-based service access strategy should be configured.

 

In order to implement this functionality, we have used the time-based access strategy extension, as described in the documentation (https://apereo.github.io/cas/5.2.x/installation/Configuring-Service-Access-Strategy.html#time-based). However, the documentation only described how one can set a static date and time for this policy. Instead, we wanted the attributes startingDateTime and  endingDateTime to be automatically updated with the current date. In order to do this, we have created a custom script. This script is scheduled to run every day at the same hour and basically writes the values of these attributes, so that they are always updated with the current date.

 

We were wondering, is this the way time-based access strategy is supposed to be implemented? Is there another less custom way that should be used in order to achieve this result?

 

Thanks for your help,

Davide Malacrida

IAM Functional Analyst

Misagh

unread,
Jan 21, 2021, 11:05:41 AM1/21/21
to CAS Community
Probably not "less custom", but I would either write my own access
strategy or use the one based on aan external groovy script to embed
logic in there.
> --
> - 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+u...@apereo.org.
> To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/1920ce52-3ea4-4bc5-8b59-973186abf819n%40apereo.org.

Davide Malacrida

unread,
Jan 25, 2021, 3:06:31 AM1/25/21
to CAS Community, Misagh Moayyed
Interesting, I will look into that. Thanks for your reply.
Reply all
Reply to author
Forward
0 new messages