Forum Discussion
Mike_Nepomny
Nimbostratus
Dec 21, 2011How to run external program without adding it to bigip.conf?
Hi,
How to run tmsh script without adding it to bigip.conf ? When use "edit scripts test.tcl" test.tcl gets inserted into bigip.conf. This insertion corrupted bigip.conf in our lab.
...
Jul 13, 2010
I'm still trying to figure out why you are passing passwords along in the URI when you can use the lower level classes to do it for you.
I'd recommend using the iControl library for Java that has all the compiled interface proxy code built in with a iControl.Interfaces class wrapper that handles all the self-signed cert and authentication management for you.
The generated binding stub classes are derived from the org.apache.axis.client.Stub class which has a "setPassword()" method in it that allows you to insert the authenticate headers in the request.
If you really don't want to use the iControl library, and if so, I'd like to hear why, and you aren't using Apache Axis for the transport library, then the next best approach would be to generate the authenticate header yourself. You'll want to add a header named "Authorization" with the value of "Basic user:pass" with user:pass being base64 encoded. I'm not sure about the java code to do this, but with Perl, it looks like this:
eval { $SystemInfo->transport->http_request->header
(
'Authorization' =>
'Basic ' . MIME::Base64::encode("$sUID:$sPWD", '')
); };
I know there are ways to add HTTP headers with the java libraries so I'm sure the logic would be the same.
This method will work on all versions of LTM back to 4.5.
-Joe
-Joe