Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aether-users] Issues with Aether and Native Proxy Settings

Marcel Bruch wrote:

How could I configure Aether (assuming you mean Eclipse Aether v0.9 when speaking about „a recent version“) and its httpclient to use NTLM authentication?

[0] might be interesting reading to understand the impl better.

In a nutshell, the application is required to provide Aether with at least the username and password just like it would with any other form of auth. When the remote host sends an auth challenge with NTLM as scheme, it should get automatically handled.

As you can see in the mentioned code, NTLM additionally expects workstation and domain information from the client. It's not uncommon to encode the domain in the username, using the syntax "domain\username" which will be recognized. The workstation name is gleaned from sys props and env vars, with the sys prop being one easy means to override the default.

I may misunderstand the way how NTLM works, but I guess(!) one of the fundamental things of NTLM is that applications don’t get access to the username and password. Instead they use some kind of tokens provided by NTLM to authenticate the user. Thus specifying a username+password sounds impossible when an NTLM proxy is used.

That sounds more like a misunderstanding. NTLM [1] requires username+password (among others). It's simply a convenience in the JRE on Windows that code using HttpUrlConnection doesn't need to bother with the credentials thanks the native code integrating with Windows and getting those from the current login.


Benjamin


[0] http://git.eclipse.org/c/aether/aether-core.git/tree/aether-transport-http/src/main/java/org/eclipse/aether/transport/http/DeferredCredentialsProvider.java?id=aether-0.9.0.v20140226#n120
[1] http://en.wikipedia.org/wiki/NT_LAN_Manager


Back to the top