hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ortwin Gl├╝ck <...@odi.ch>
Subject Re: FW: HttpClient authentication problem.
Date Fri, 18 May 2007 12:40:38 GMT
Pankaj,

NTLM is designed to authenticate a connection. AFAIK it does not support 
a "logout" in the middle of a connection, nor does it support preemptive 
authentication. So the only way to force a new authentication is to 
close the connection. (e.g. try and clear the authentication to a mapped 
network drive in Windows. Probably the same issue there.)

Thus it's not possible to share a connection between users when using 
NTLM auth. Yes, this may cause a performance hit if you were planning to 
share a connection between different users.

You could tweak your connection manager to remember the authenticated 
user for each connection and try to find an already authenticated one or 
hand out a new one if you can't.

I would actually consider this a security issue in the connection 
managers: It may hand out an already authenticated connection to an 
unsuspecting client. We should add fields to HttpConnection that keep 
track of the credentials for connection oriented AuthSchemes. So 
connection managers can take this into account. Also the connection 
managers lack a parameter in the getConnection methods that carries 
authentication information for connection based auth schemes.

Ortwin


Pankaj Arora wrote:
> Thanks, That worked for me. Only thing that worries me is that
> connections don't persist now. It might be a performance issue. Only
> thing which I would like to know from you( as I am bit novice here)-
> what is the right behavior, my client not authenticating second time
> as connection is already authenticated or closing the connections to
> force authentication repeatedly.
> 
> Thanks, Pankaj Arora.

-- 
[web]  http://www.odi.ch/
[blog] http://www.odi.ch/weblog/
[pgp]  key 0x81CF3416
        finger print F2B1 B21F F056 D53E 5D79 A5AF 02BE 70F5 81CF 3416

---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


Mime
View raw message