Wireless Access

Reply
Occasional Contributor I

User authentication via https post.

I am new to Aruba Airwave technology.  I am developing an android app that can leverage the VisualRF location services.  However, first I need to authenticate the user to gain access to the location services.  How should I log into the AMP system via my app? 

Moderator

Re: User authentication via https post.

For security reasons, there's no ability to login to AMP using https post.  You'll want to use a script to perform the login action before calling the APIs.  Sounds like you may be trying to recreate what 'Aruba Utilities' android app is already doing.

 

Also, on the AMP's Home -> Documentation page is an example.  Look for 'Sample HTML Application utilizing the Location XML API'.


Rob Gin
Senior QA Engineer - Network Services
Aruba Networks, a Hewlett Packard Enterprise Company
Occasional Contributor I

Re: User authentication via https post.

I expected that I was going to have to do some scripting.  I am trying to recreate a portion of what the Aruba Utilities does.  However, there is far more that I am planning to do.  But in order for me to do what I plan, I need to leverage the VisualRF location services.  Yes I have taken a look at the 'Sample HTML Application utilizing the Location XML API' already.  It shows me how to reference the VisualRF API.  

Moderator

Re: User authentication via https post.

Let me look into it and see what I can find.  I'm an iphone user, but I'll see if anyone around can lend me their android phone to dig into it.


Rob Gin
Senior QA Engineer - Network Services
Aruba Networks, a Hewlett Packard Enterprise Company
Moderator

Re: User authentication via https post.

Seems the easiest way would be to use curl:

 

# curl --insecure -c /tmp/cookie.txt --data 'destination=%2F&credential_0=usernamei&credential_1=password' 'https://your.amp.ip/LOGIN'


Rob Gin
Senior QA Engineer - Network Services
Aruba Networks, a Hewlett Packard Enterprise Company
Occasional Contributor I

Re: User authentication via https post.

I don't know anything about curl and dislike command prompt commands.  Is there a way to put that in a program?

Moderator

Re: User authentication via https post.

Unfortunately apps aren't my specialty.  The suggestion of curl came from the developers, they also suggested wrat as an alternative option.  I suggest opening a support case to see if they can get you in contact with someone internally who knows more about accessing the APIs.


Rob Gin
Senior QA Engineer - Network Services
Aruba Networks, a Hewlett Packard Enterprise Company

Re: User authentication via https post.

Authentication to the AirWave UI is done by submitting username and password via POST to /LOGIN.  If the creds are accepted, a session cookie is returned.  You send that cookie with all subsequent requests.  This is documented here:

 

https://arubanetworkskb.secure.force.com/pkb/articles/FAQ/AirWave-Authentication-in-7-3-and-its-impacts-on-APIs

 

 

Occasional Contributor I

Re: User authentication via https post.

Yes.  This is exactly what I have been searching for.  I have fortunately uncovered it already and am now trying to deal with the cookie. I need to pass it to my other activity which queries VisualRF for the location of a device on the network.  I have been working today on cookie handling and keep running into dead ends.  Anyhow, thanks! 

Occasional Contributor I

Re: User authentication via https post.

I have noticed that there are numberous ways to execute an httpPost (using different client types and such).  Is there a particular way that is more useful when accessing the Aruba network?

Search Airheads
cancel
Showing results for 
Search instead for 
Did you mean: