Network Management

last person joined: yesterday 

Keep an informative eye on your network with HPE Aruba Networking network management solutions
Expand all | Collapse all

Automating airwave gui login

This thread has been viewed 7 times
  • 1.  Automating airwave gui login

    Posted Mar 15, 2017 06:50 PM

    Hi there

    I'm trying to get the Airwave top level status screen to appear on our wallboard display, but I can't get the right syntax for the login URL.  I have created a user with the right level of privilege to view but not change anything, and I can manually log into Airwave using that user, and it opens the top level display correctly.  However, I need to be able to open the web session automatically.  I've tried URLs like https://airwaveservername/root?username=nameofuser&password=passwordforuser   but all that happens is that airwave presents the login screen.

    Does anyone know what the correct URL is for this, or even if Airwave will accept credentials in the URL?

    Thanks in advance

    Ross



  • 2.  RE: Automating airwave gui login

    EMPLOYEE
    Posted Mar 16, 2017 01:30 AM

    I understand that you are lookig for a URL which automatically login to Airwave.

     

    Practically Airwave does not use the syntax which you are trying, below is the access log enteries when I tried login to Airwave as a admin user.

     

    10.20.14.97 - admin [15/Mar/2017:20:30:21 -0700] "POST /LOGIN HTTP/1.1" 302 258 80678"https://10.17.164.202/" "User-Agent:Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0"
    10.20.14.97 - - [15/Mar/2017:20:30:21 -0700] "GET /index.html HTTP/1.1" 200 1144 11621"https://10.17.164.202/" "User-Agent:Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0"

    As a workaround we could set idle timeout max value in Home>user info for that particular login user (default "admin") if you have created any different user try login with the user and change the settings.

     

    Capture.PNG

    when you login for first time it will prompt to enter password, once you login the session will be active for next 240 minutes until you manually logout.

    We can open mulitple sessions in same browser without re-entering the password for four hours.

     

    Note: If you want idel timeout more than fours hours we could increase value in database.

    # dbc "update user_pref set timeout = xxx where username = 'xxx'";

     Replace xxx with time and name in respective field.

    Regards,

    Pavan

    If my post address your query, give kudos:)

     



  • 3.  RE: Automating airwave gui login

    EMPLOYEE
    Posted Mar 16, 2017 05:59 AM

    Hi Ross,

    Currently we dont have an option on Airwave for the particular requirement. We would have to pass the login page when we try to login. However, if you have already logged into Airwave from a particular browser with this username and password, Due to the cache entry in the browser next time it will allow you directly in, using the URL you have mentioned. 

    You can also submitt a feature request on support site on this, so that it would be reviewed by the PLM and according to the feasability and popularity of the feature it can be considered.



  • 4.  RE: Automating airwave gui login
    Best Answer

    Posted Mar 16, 2017 04:45 PM

    I know its rude to reply to your own post, but I have found a solution so I thought I would share it with the group...

    When you put the ?parameter=value&anotherparamater=anothervalue after the URL, you are doing a HTTP GET with the above parameters.  Airwave expects you to have filled out the login form with your credentials, and those credentials then get passed to Airwave using a HTTP POST, which passes the form data in the body, not in the URL.

    By looking at what is happening with the API interface, and some serious googling around, I found that it is possible to create a "fake" html page that contains a minimum html FORM definition, and basically pre-filled with the correct data for the form fields.  When you click on this "fake" page file, it posts the credentials to the Airwave server which accepts the credentials and directs you to the airwave home page.  Simple really.  

    I have a batch file that executes:

    chrome /new-window "path to fake form html file.html"

    and I can use this batch file in our wallboard solution to automatically open the Airwave top view.  Here is what the html file looks like:

     

    <HTML>
    <HEAD>
    <TITLE>
    Login</TITLE>
    <script>
    <!--
    function login() {
    document.form1.action="https://airwaveservername/LOGIN";
    document.form1.submit();
    }
    //-->
    </script>
    </HEAD>
    <BODY onLoad="login()">
    <FORM NAME="form1" id=form1 METHOD="POST">
    <INPUT TYPE="hidden" NAME="credential_0" VALUE="username">
    <INPUT TYPE="hidden" NAME="credential_1" VALUE="userpassword">
    <input type="hidden" name="destination" value="/">
    <input type="hidden" name="login" value="Log In">
    </FORM>
    </BODY>
    </HTML>

    All you have to change is the "airwaveservername", "username" and "userpassword" values.

     

    Have fun.