[JIRA] (JENKINS-61831) "Validate Proxy" ignores 407 AuthenticationRequired

4 views
Skip to first unread message

stefan.voelkel.external@knorr-bremse.com (JIRA)

unread,
Apr 7, 2020, 8:32:05 AM4/7/20
to jenkinsc...@googlegroups.com
Stefan created an issue
 
Jenkins / Bug JENKINS-61831
"Validate Proxy" ignores 407 AuthenticationRequired
Issue Type: Bug Bug
Assignee: Unassigned
Components: core
Created: 2020-04-07 12:31
Environment: OS=Centos7
Java=1.8.0_51 Oracle
Jenkins=2.204.2
Priority: Minor Minor
Reporter: Stefan

Clicking on "Validate Proxy" results in " Failed to connect to ... 407" being displayed, but update information can be downloaded.

Looking at a network trace between Jenkins and our Proxy when clicking on "Validate Proxy"

GET http://updates.jenkins-ci.org/update-center.json HTTP/1.1\r\n
User-Agent: Jakarta Commons-HttpClient/3.1\r\n

HTTP/1.1 407 authenticationrequired\r\n
Proxy-Connection: Keep-Alive\r\n
Proxy-Authenticate: Negotiate\r\n
Proxy-Authenticate: NTLM\r\n
Proxy-Authenticate: Basic realm="***"\r\n

GET http://updates.jenkins-ci.org/update-center.json HTTP/1.1\r\n
User-Agent: Jakarta Commons-HttpClient/3.1\r\n
Proxy-Connection: Keep-Alive\r\n
Host: updates.jenkins-ci.org\r\n
\r\n

HTTP/1.1 407 authenticationrequired\r\n

The Proxy answers with a 407, but Jenkins does not include any authentication header in it's second try.

Looking at the "Check now" trace, Jenkins replies to the 407 with a proper Negotiate header:

GET http://updates.jenkins-ci.org/update-center.json?id=default&version=2.204.2 HTTP/1.1\r\n
User-Agent: Java/1.8.0_51\r\n

HTTP/1.1 407 authenticationrequired\r\n
Proxy-Authenticate: Negotiate\r\n
Proxy-Authenticate: NTLM\r\n
Proxy-Authenticate: Basic realm="***"\r\n

GET http://updates.jenkins-ci.org/update-center.json?id=default&version=2.204.2 HTTP/1.1\r\n
User-Agent: Java/1.8.0_51\r\n
[truncated] Proxy-authorization: Negotiate ***

The fact that the User-Agent is different in these two traces leads me to believe, that different code paths (with regard to http handling) are taken. One with proper authentication handling, one without.

I also found JENKINS-25870 but am unsure if it is related or not.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

dbeck@cloudbees.com (JIRA)

unread,
Apr 11, 2020, 11:53:03 AM4/11/20
to jenkinsc...@googlegroups.com
Daniel Beck closed an issue as Duplicate
 

Don't report bugs against outdated releases.

Change By: Daniel Beck
Status: Open Closed
Resolution: Duplicate
Reply all
Reply to author
Forward
0 new messages