Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

J2SE Proxy Authentication

Tags:

java

proxy

We use 2 SIMILAR Microsoft ISA Proxy Server 2003 to connect to internet. Each Proxy has different Login style, as below :

Server-1 : nt-domain\alan Server-2 : [email protected]

Logon in IE, Firefox and my Phonecell via Wifi all are fine. But, a problem appears when we run a java application J2SE Ver 4, 5 and 6, where it needs internet authentication. Logon to Server-2 is OK, but FAIL for Server-2 (style : [email protected]).

Note : Both proxy seen using Windows authentication, type : negotiate NTLM

Appreceate if you can help or for any suggest.

Thank you,

Alan L


1 Answers

The java documentation describes how to enable NTLM authentication in java. If you have access to source, you can programmatically add system properties as described in "proxy" article, adding something as follows (see also discussion of axis2):

System.setProperty("http.auth.ntlm.domain", mydomain);

If you have no access to source, you can set properties on the command line that launches your java binary, adding something like:

java -DproxyHost=host  -DproxyPort=8080  -Dhttp.auth.ntlm.domain=mydomain  ...
like image 93
larham1 Avatar answered Sep 16 '26 15:09

larham1