Return-Path: X-Original-To: apmail-hc-dev-archive@www.apache.org Delivered-To: apmail-hc-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BB6909185 for ; Tue, 24 Apr 2012 13:35:58 +0000 (UTC) Received: (qmail 34606 invoked by uid 500); 24 Apr 2012 13:35:58 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 34484 invoked by uid 500); 24 Apr 2012 13:35:58 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 34335 invoked by uid 99); 24 Apr 2012 13:35:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Apr 2012 13:35:56 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Apr 2012 13:35:55 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 6B62E40C446 for ; Tue, 24 Apr 2012 13:35:35 +0000 (UTC) Date: Tue, 24 Apr 2012 13:35:35 +0000 (UTC) From: "Oleg Kalnichevski (JIRA)" To: dev@hc.apache.org Message-ID: <1618764505.9529.1335274535460.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1914831546.6393.1335211833883.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HTTPCLIENT-1186) NTLM authenticated connections are mixed MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HTTPCLIENT-1186?page=3Dcom.atla= ssian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId= =3D13260544#comment-13260544 ]=20 Oleg Kalnichevski commented on HTTPCLIENT-1186: ----------------------------------------------- I am sorry but I still fail to see a security issue here. Before a connecti= on gets released back to the manager (and therefore before it can be potent= ially leased to another user) its state will be updated. It really does not= matter if a connection starts its life as stateless. What matters is wheth= er or not it is stateful by the time it gets released back to the pool. Could you please provide a test case that demonstrates how an authenticatio= n connection can be leased to a user with a different security context?=20 Oleg =20 > NTLM authenticated connections are mixed > ---------------------------------------- > > Key: HTTPCLIENT-1186 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-118= 6 > Project: HttpComponents HttpClient > Issue Type: Bug > Components: HttpClient > Affects Versions: 4.1.3 > Reporter: Ralf P=C3=B6hlmann > Priority: Critical > Labels: DefaultRequestDirector > > Executing multiple request using the same http context as recommended mix= es authenticated connections among different users.=20 > If we execute two request usign the same context, the first request adds = the user token to the http context as well as to the connection properties.= The second request fins already a user token in the http context but if a = new connection will be created (no free connection in the pool) this new co= nnection is never assigned to an user token and is used independent of any = user context! > see DefaultRequestDirector: > // See if we have a user token bound to the execution context > Object userToken =3D context.getAttribute(ClientContext.USER_TOKEN); > ... > if (managedConn !=3D null && userToken =3D=3D null) { > userToken =3D userTokenHandler.getUserToken(context); > context.setAttribute(ClientContext.USER_TOKEN, userToken); > if (userToken !=3D null) { > managedConn.setState(userToken); > } > } > and RouteSpecificPool: > public BasicPoolEntry allocEntry(final Object state) { > if (!freeEntries.isEmpty()) { > ListIterator it =3D freeEntries.listIterator(= freeEntries.size()); > while (it.hasPrevious()) { > BasicPoolEntry entry =3D it.previous(); > if (entry.getState() =3D=3D null || LangUtils.equals(stat= e, entry.getState())) { > it.remove(); > return entry; > } -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs: https://issues.apache.org/jira/secure/ContactAdministrators!default.jsp= a For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org