Security

last person joined: 11 hours ago 

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

Guest "timed" sponsored access

This thread has been viewed 0 times
  • 1.  Guest "timed" sponsored access

    Posted May 13, 2013 09:15 AM

    Customer would like to have 1 SSID for guests, during the hours 7:30am-3pm have it be sponsored access, then after 3pm be self registration. Is this logic possible to set up with 1 SSID?



  • 2.  RE: Guest "timed" sponsored access
    Best Answer

    Posted May 13, 2013 02:37 PM

    This is possible with a bit of configuration.

     

    You will first need to set up two provisioning workflows:  one for sponsored access, and a second for the self registration.  (These use different settings for each, and so they should be separate instances.)

     

    Once you have these working, you can create a landing page which will redirect to the appropriate page based on the time of day.

     

    This landing page should be configured as the captive portal in your SSID settings.

     

    To create the landing page, start by creating a new Web Login page and apply the following settings:

     

    • [x] Provide a custom login form
    • In the Header HTML, put something like the following:

    {* Work out where to go based on time of day: *}

    {assign var=_now value="Hi"|date}
    {if $_now >= 730 && $_now < 1500}
     {assign var=_redirect value=SPONSORED_ACCESS_PAGE_NAME}
    {else}
     {assign var=_redirect value=SELF_REGISTRATION_PAGE_NAME}
    {/if}

     

    {* Generate the redirection here *}

    <meta http-equiv="Refresh" content="0;URL={$_redirect|rawurlencode}.php{if $smarty.server.QUERY_STRING}?{$smarty.server.QUERY_STRING|rawurlencode}{/if}"/>

     

     

    Update the page names accordingly, and you should be set.

     

    You can adjust the (24-hour) times by changing the if statement.

     

    Note also that the query string is passed through to the target and is encoded to prevent XSS problems.

     

     



  • 3.  RE: Guest "timed" sponsored access

    Posted May 14, 2013 03:41 AM

    Very good stuff Amigodave! This flexibility of entering your own code like this is part of what makes Amigopod/CP Guest such a great product!

     

    To add some "security" to this you can also make sure that people doesn't use the direct URL for non-sponsored selfregistration during opening hours. Edit the non-sponsored self-registration page, click "Advanced editor". Under Access Control -> Timed Access input: 

     

    ** edit - I got it backwards :) This should work

    weekdays 15:00 to 07:29

     

     



  • 4.  RE: Guest "timed" sponsored access

    Posted May 14, 2013 10:20 AM

    Thanks amigodave! This is exactly what I'm looking for.



  • 5.  RE: Guest "timed" sponsored access

    Posted May 08, 2014 08:15 PM

    Is there any way to set this to "If weekday" or "If weekend"?  I've found out that this works great (as advertised!) but it does the same thing on Saturday and Sunday.  Ideally we'd allow the "open" option after 3pm, before 7am, and on weekends.  

     

    Brian



  • 6.  RE: Guest "timed" sponsored access

    Posted May 09, 2014 03:16 PM

    I found the answer once I found out to search for this "smarty" language...  It seems a bit clunky, but works.  

     


    {assign var=_now value="Hi"|date}
    {assign var=weekday value=$smarty.now|date_format:"%u"}
    {if $weekday == 6}
    {assign var=_redirect value=GUEST_REGISTRATION_PAGE}
    {elseif $weekday == 7}
    {assign var=_redirect value=GUEST_REGISTRATION_PAGE}
    {elseif $_now >= 700 && $_now < 1530}
    {assign var=_redirect value=SPONSORED_ACCESS_PAGE}
    {else}
    {assign var=_redirect value=GUEST_REGISTRATION_PAGE}
    {/if}

    {* Generate the redirection here *}
    <meta http-equiv="Refresh" content="0;URL={$_redirect|rawurlencode}.php{if $smarty.server.QUERY_STRING}?{$smarty.server.QUERY_STRING|rawurlencode}{/if}"/>



  • 7.  RE: Guest "timed" sponsored access

    Posted Jun 07, 2014 12:07 PM

    OK programming-heads what is the AND statement I can add to that so the sponsored page only applies for Mon-Fri????

     

    Thanks in advance!