Security

last person joined: 14 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

Clearpass Guest - automating weekly password change

This thread has been viewed 4 times
  • 1.  Clearpass Guest - automating weekly password change

    EMPLOYEE
    Posted Sep 08, 2014 01:49 PM

    I have a customer who wants to have for the Guests a simple static username/password.  Every week the password is to be changed?  Easy enough to setup reception logins so that someone can manually change it, but was wondering if there is a way to automate that password change?



  • 2.  RE: Clearpass Guest - automating weekly password change

    EMPLOYEE
    Posted Sep 08, 2014 01:49 PM

    Nothing built-in, but the API could be used.



  • 3.  RE: Clearpass Guest - automating weekly password change
    Best Answer

    EMPLOYEE
    Posted Sep 09, 2014 10:23 AM

    Thanks Tim.  Indeed it can.

     

    Just craft the XML with the right user password and run the following command:

     

    curl -k -u "apiadmin:q1w2e3" -X POST https://192.168.1.212/tipsapi/config/write/GuestUser -H "Content-Type:application/xml" --data @test.xml

     

    Example "test.xml":

     

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

    <TipsApiRequest xmlns="http://www.avendasys.com/tipsapiDefs/1.0">

    <TipsHeader version="3.0" source="Guest"/>

    <GuestUsers>

    <GuestUser enabled="true" expiryTime="2014-09-30 12:24:37" startTime="2014-08-30 12:26:08" sponsorName="admin" guestType="USER" name="guest2" password="test">

    </GuestUser>

    </GuestUsers>

    </TipsApiRequest>

     

    So each week, I just need to change the line with the Guest details.  I can recreate that line with the following in linux.  Bit raw and clunky but works.

     

    echo "<GuestUser enabled=\"true\" expiryTime=\""`date -d "+1 week" +%Y-%m-%d" "%H:%M:%S`"\" startTime=\""`date +%Y-%m-%d" "%H:%M:%S`\" sponsorName=\"admin\" guestType=\"USER\" name=\"guest2\" password=\"`echo $RANDOM$RANDOM | cut -c 1-8`\"