https://bz.apache.org/bugzilla/show_bug.cgi?id=64267

Peter Lynch <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

--- Comment #6 from Peter Lynch <[email protected]> ---
(In reply to Philippe Mouawad from comment #5)
> (In reply to Peter Lynch from comment #4)
> > (In reply to Philippe Mouawad from comment #3)
> > > It would be an enhancement not a regression.
> > > JMeter has never in the past handled Basic Auth the way you suggest it.
> > 
> > I don't understand your claim.
> > 
> > How do you explain what jmeter 3.3 did?
> > https://bz.apache.org/bugzilla/attachment.cgi?id=37123
> 
> Can you clarify ?

The following logging extracted from the attachments on this bug.

======= JMeter 3.3

jmeter 3.3 request made:
2020-03-25 22:47:33,036 DEBUG
o.a.j.p.h.s.JMeterClientConnectionOperator$JMeterDefaultClientConnection:
Sending request: GET /basic-auth/user/passwd HTTP/1.1

jmeter 3.3 response challenged:
2020-03-25 22:47:33,072 DEBUG o.a.h.headers: << HTTP/1.1 401 UNAUTHORIZED
2020-03-25 22:47:33,072 DEBUG o.a.h.headers: << WWW-Authenticate: Basic
realm="Fake Realm"

jmeter 3.3 httpclient replies to challenge:
2020-03-25 22:47:33,073 DEBUG o.a.j.p.h.s.HTTPHC4Impl$6: Selected
authentication options: [BASIC [complete=true]]
2020-03-25 22:47:33,074 DEBUG o.a.h.c.p.RequestTargetAuthentication: Generating
response to an authentication challenge using basic scheme
2020-03-25 22:47:33,075 DEBUG o.a.h.headers: >> User-Agent:
Apache-HttpClient/4.5.3 (Java/1.8.0_231)
2020-03-25 22:47:33,075 DEBUG o.a.h.headers: >> Authorization: Basic
dXNlcjpwYXNzd2Q=

jmeter 3.3 remote confirms with success
2020-03-25 22:47:33,112 DEBUG o.a.h.headers: << HTTP/1.1 200 OK

jmeter asserts a successful response:
2020-03-25 22:47:33,114 DEBUG o.a.j.a.ResponseAssertion: Passed: 200

============= JMeter 5


jmeter 5 request made:
2020-03-25 21:51:10,934 DEBUG o.a.h.i.e.MainClientExec: Executing request GET
/basic-auth/user/passwd HTTP/1.1

jmeter 5 response challenge:
2020-03-25 21:51:10,975 DEBUG o.a.h.headers: http-outgoing-0 << HTTP/1.1 401
UNAUTHORIZED
2020-03-25 21:51:10,975 DEBUG o.a.h.headers: http-outgoing-0 <<
WWW-Authenticate: Basic realm="Fake Realm"

jmeter 5 HttpClient, knows it was challenged
2020-03-25 21:51:10,978 DEBUG o.a.h.i.a.HttpAuthenticator: httpbin.org:443
requested authentication
2020-03-25 21:51:10,979 DEBUG o.a.h.i.c.TargetAuthenticationStrategy:
Authentication schemes in the order of preference: [Negotiate, Kerberos, NTLM,
CredSSP, Digest, Basic]

jmeter 5 rather than responding to challenge, httpclient releases the
connection back to pool:
2020-03-25 21:51:10,985 DEBUG o.a.h.i.c.PoolingHttpClientConnectionManager:
Connection [id: 0][route: {s}->https://httpbin.org:443][state: Thread Group
1-1] can be kept alive indefinitely
2020-03-25 21:51:10,985 DEBUG o.a.h.i.c.DefaultManagedHttpClientConnection:
http-outgoing-0: set socket timeout to 0
2020-03-25 21:51:10,985 DEBUG o.a.h.i.c.PoolingHttpClientConnectionManager:
Connection released: [id: 0][route: {s}->https://httpbin.org:443][state: Thread
Group 1-1][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of
20]

jmeter response assertion fails immediately on 401 status code, instead of
sending the expected challenge answer:
2020-03-25 21:51:10,989 DEBUG o.a.j.a.ResponseAssertion: Failed: 200


> > 
> > And how do you explain the documentation contradicting the behaviour?
> 
> Which documentation ? Can you point me to it please ?

Are you not seeing the opening comments of this report? Are you not looking at
the attachments?

This page:
https://jmeter.apache.org/usermanual/component_reference.html#HTTP_Authorization_Manager

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to