Security

last person joined: yesterday 

Forum to discuss Enterprise security using HPE Aruba Networking NAC solutions (ClearPass), Introspect, VIA, 360 Security Exchange, Extensions, and Policy Enforcement Firewall (PEF).
Expand all | Collapse all

Kick off guest users at midnight

This thread has been viewed 1 times
  • 1.  Kick off guest users at midnight

    EMPLOYEE
    Posted Sep 10, 2015 08:38 AM

    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.



  • 2.  RE: Kick off guest users at midnight

    EMPLOYEE
    Posted Sep 10, 2015 09:19 AM
    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


  • 3.  RE: Kick off guest users at midnight

    EMPLOYEE
    Posted Sep 11, 2015 06:01 AM

    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;