Security

Reply
Aruba
Posts: 1,296
Registered: ‎08-29-2007

Kick off guest users at midnight

Currently I have a guest self-reg page that is not available between 00:00-06:00.  This is set in the 'Time-Access' field on the self-reg page.

CPG-time access.JPG

I assume this does not actually trigger a CoA and log out the user.

 

When the user logs in I want to be able to send back a session timeout of 3 hours or midnight, whichever is the sooner.

Is this possible and how to achieve it?  I suspect it will mean some custom attribute in the [Time Source] but not familiar with how to do that.


If my post is helpful please give kudos, or mark as solved if it answers your post.

ACCP, ACMP, ACMX #294
mclarke@arubanetworks.com
Guru Elite
Posts: 8,794
Registered: ‎09-08-2010

Re: Kick off guest users at midnight

Yes, you would have to add a new query to the Time Source that essentially subtracts midnight minus now. Then you can use that variable in the session timeout enforcement profile.


Thanks,
Tim

Tim Cappalli | Aruba Security TME
@timcappalli | timcappalli.me | ACMX #367 / ACCX #480
Aruba
Posts: 1,296
Registered: ‎08-29-2007

Re: Kick off guest users at midnight

Think we are just going to go for a straight session timout of 3 hours instead.

The quey for seconds until midnight is easy enough.  For other who stumble upon this, the time 00:00 is considered the same day so 'seconds until 00:00' gives erroneous results of tens of thousands of year.  The query needed is 'seconds until 23:59:59'.

 

SELECT (EXTRACT (EPOCH from (current_date + time '23:59:59'))::int)-(EXTRACT (EPOCH from now() )::int) as seconds_until_midnight;

If my post is helpful please give kudos, or mark as solved if it answers your post.

ACCP, ACMP, ACMX #294
mclarke@arubanetworks.com
Search Airheads
Showing results for 
Search instead for 
Did you mean: