Network Management

last person joined: 22 hours ago 

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

Perl API & Airwave 8.2.0.1

This thread has been viewed 5 times
  • 1.  Perl API & Airwave 8.2.0.1

    Posted Apr 22, 2016 12:29 PM

    I'm trying to get a Perl script using LWP to talk to Airwave for API access. I found a link to curl commands (http://community.arubanetworks.com/t5/Monitoring-Management-Location/Accessing-the-Airwave-XML-API-using-curl/ta-p/187258) which works fine. However, when I try to use the Perl script, I'm consistently getting certificate verify failed error messages. I installed a third-party CA certificate on Airwave and verified the functionality via a browser. I have a similar certificate on our Clearpass box and the API is working fine there - no issues at all. I don't know if it has something to do with the certificates on Airwave or something in my Perl script, but the Perl is dead-simple, just making a GET call to the Airwave URL.

     

    I did notice when setting up the certificate on the Airwave box I did not have an ssl.conf file at /etc/httpd/conf.d and it is specifically referenced in the documentation for setting up certificates (https://arubanetworkskb.secure.force.com/pkb/articles/FAQ/How-to-install-your-own-certificate-on-AMP-versions-7-2-4-and-greater).

     

    Any assistance would be greatly appreciated.



  • 2.  RE: Perl API & Airwave 8.2.0.1

    EMPLOYEE
    Posted Apr 22, 2016 01:52 PM

    If no one else replies, you might try opening a support case.



  • 3.  RE: Perl API & Airwave 8.2.0.1

    Posted Apr 22, 2016 03:11 PM

    Update: I've opened a case with Aruba Support and received little traction on the issue. I've done some more testing on my end and I believe the issue has to do with no CA bundle being installed on the Airwave server.

     

    I run the following command:

     

    openssl s_client -host <airwave server> -p 443


    and I immediately receive an error num: 20 - unable to get local issuer certificate and the certificate chain that is returned by the server is the actual server certificate itself. I can run the same command directly on the Airwave server, pointing the host to localhost and I get the same results.

     

    The forementioned link that details installing a third-party certificate does not reference an intermediate certificate nor is an SSL.conf file referenced in the Apache config on the box itself. I tried to manually configure an SSL.conf file but an Apache restart failed.

     

    We're planning a firmware upgrade early next week - not sure if this will make a difference or not, but the code we're running is only weeks old.

     

     



  • 4.  RE: Perl API & Airwave 8.2.0.1

    Posted May 19, 2016 01:17 PM

    I finally got past the SSL certificate error (appears to be a bug on the Airware server) but now I'm stuck getting Perl and LWP to either A) pass the relevant cookie information to access the information or B) leverage LWP/WWW::Mechanize to login to Airwave and generate the cookie for me.

     

    I found the curl information and was able to generate the cookie jar file just fine, but attempting to load that file within the Perl script doesn't seem to be passing the cookie in the header at all and I'm getting a 403 - Forbidden from the Airwave server. Has anybody had any luck using Perl to access Airwave APIs?