Forum Discussion

Sharon_Lucas_55's avatar
Sharon_Lucas_55
Icon for Nimbostratus rankNimbostratus
Apr 28, 2010

Problem authenticating if password contains a @

I'm using the iControl SDK to create a Java application that automates configuring BIG-IP.

 

 

If my admin password for BIG-IP does not contain a @, authentication to the BIG-IP host via my Java application works fine. However, if my admin password for BIG-IP contains a @ in it, I get an authentication error because it thinks everything after the @ in the password is part of the hostname since it uses the following url to connect to BIG-IP.

 

 

https://user:password@hostname:443/iControl/iControlPortal.cgi

 

 

So, if my user is admin and my password is pass@word and my hostname is bigip.company.com, the url used is:

 

 

https://admin:pass@word@bigip.company.com:443/iControl/iControlPortal.cgi

 

 

So, it incorrectly thinks the password is pass and the hostname is word@bigip.company.com (everythin after the first @ within the password)

 

 

So, I encoded the @ in the password as %40 (e.g. pass%40word) to make it url safe since a @ is a reserved character and must be encoded according to url rules. However, authentication is still failing.

 

 

This problem appears to be like the one reported at http://devcentral.f5.com/Community/GroupDetails/tabid/1082223/asg/51/afv/topic/aft/30461/aff/1/showtab/groupforums/Default.aspx34413 that was never answered.

 

 

When the admin password is pass@word and I specify the encoded version of the password (e.g. pass%40word), I get the following error:

 

 

C:\F5\iControl-10.1.0\sdk\samples\soap\java\apache\axis\LocalLB>java -cp .;%JAVA_CLASSPATH% F5ProxySetup 9.99.999.999 443 admin pass%40word

 

 

AxisFault

 

faultCode: {http://xml.apache.org/axis/}HTTP

 

faultSubcode:

 

faultString: (401)F5 Authorization Required

 

faultActor:

 

faultNode:

 

faultDetail:

 

{}:return code: 401

 

 

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

 

lang="en">

 

 

Authentication required!

 

 

 

 

 

 

 

 

Authentication required!

 

 

 

 

This server could not verify that you are authorized to access

 

the URL "/iControl/iControlPortal.cgi".

 

You either supplied the wrong credentials (e.g., bad password), or your

 

browser doesn't understand how to supply the credentials required.

 

 

 

 

 

 

 

In case you are allowed to request the document, please

 

check your user-id and password and try again.

 

 

 

 

 

Error 401

 

 

 

 

 

Wed Apr 28 14:09:13 2010

 

 

 

 

 

 

 

 

{http://xml.apache.org/axis/}HttpErrorCode:401

 

 

(401)F5 Authorization Required

 

at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744)

 

at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)

 

at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)

 

at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)

 

at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)

 

at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)

 

at org.apache.axis.client.Call.invokeEngine(Call.java:2784)

 

at org.apache.axis.client.Call.invoke(Call.java:2767)

 

at org.apache.axis.client.Call.invoke(Call.java:2443)

 

at org.apache.axis.client.Call.invoke(Call.java:2366)

 

at org.apache.axis.client.Call.invoke(Call.java:1812)

 

at iControl.LocalLBSNATBindingStub.get_list(LocalLBSNATBindingStub.java:717)

 

at F5ProxySetup.createSnat(F5ProxySetup.java:70)

 

at F5ProxySetup.main(F5ProxySetup.java:907)

 

 

30 Replies