Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 368137

Summary: Need to authenticate to apply patches from Orion URL
Product: [ECD] Orion Reporter: Tomasz Zarna <tomasz.zarna>
Component: GitAssignee: Project Inbox <orion.git-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: malgorzata.tomczyk, Szymon.Brandys
Version: 0.3   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Tomasz Zarna CLA 2012-01-09 05:50:19 EST
When trying to apply a patch using a URL from Orion eg http://localhost:8080/gitapi/diff/Default/file/r6/?parts=diff&Path=file.txt you will get an error similar to this:

ERROR o.a.c.httpclient.HttpMethodDirector - Invalid challenge: BASIC
org.apache.commons.httpclient.auth.MalformedChallengeException: Invalid challenge: BASIC
	at org.apache.commons.httpclient.auth.AuthChallengeParser.extractParams(AuthChallengeParser.java:98) ~[org.apache.commons.httpclient_3.1.0.v201012070820.jar:na]
	at org.apache.commons.httpclient.auth.RFC2617Scheme.processChallenge(RFC2617Scheme.java:94) ~[org.apache.commons.httpclient_3.1.0.v201012070820.jar:na]
	at org.apache.commons.httpclient.auth.BasicScheme.processChallenge(BasicScheme.java:112) ~[org.apache.commons.httpclient_3.1.0.v201012070820.jar:na]
	at org.apache.commons.httpclient.auth.AuthChallengeProcessor.processChallenge(AuthChallengeProcessor.java:162) ~[org.apache.commons.httpclient_3.1.0.v201012070820.jar:na]
	at org.apache.commons.httpclient.HttpMethodDirector.processWWWAuthChallenge(HttpMethodDirector.java:694) [org.apache.commons.httpclient_3.1.0.v201012070820.jar:na]
	at org.apache.commons.httpclient.HttpMethodDirector.processAuthenticationResponse(HttpMethodDirector.java:668) [org.apache.commons.httpclient_3.1.0.v201012070820.jar:na]
	at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:193) [org.apache.commons.httpclient_3.1.0.v201012070820.jar:na]
	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) [org.apache.commons.httpclient_3.1.0.v201012070820.jar:na]
	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323) [org.apache.commons.httpclient_3.1.0.v201012070820.jar:na]
	at org.eclipse.orion.server.git.servlets.GitDiffHandlerV1.fetchPatchContentFromUrl(GitDiffHandlerV1.java:261) [org.eclipse.orion.server.git/:na]
	at org.eclipse.orion.server.git.servlets.GitDiffHandlerV1.readPatch(GitDiffHandlerV1.java:255) [org.eclipse.orion.server.git/:na]
	at org.eclipse.orion.server.git.servlets.GitDiffHandlerV1.handlePost(GitDiffHandlerV1.java:203) [org.eclipse.orion.server.git/:na]
	at org.eclipse.orion.server.git.servlets.GitDiffHandlerV1.handleRequest(GitDiffHandlerV1.java:92) [org.eclipse.orion.server.git/:na]
	at org.eclipse.orion.server.git.servlets.GitDiffHandlerV1.handleRequest(GitDiffHandlerV1.java:1) [org.eclipse.orion.server.git/:na]
	at org.eclipse.orion.server.git.servlets.GitHandlerV1.handleRequest(GitHandlerV1.java:71) [org.eclipse.orion.server.git/:na]
	at org.eclipse.orion.server.git.servlets.GitHandlerV1.handleRequest(GitHandlerV1.java:1) [org.eclipse.orion.server.git/:na]
	at org.eclipse.orion.server.git.servlets.ServletGitHandler.handleRequest(ServletGitHandler.java:49) [org.eclipse.orion.server.git/:na]
	at org.eclipse.orion.server.git.servlets.ServletGitHandler.handleRequest(ServletGitHandler.java:1) [org.eclipse.orion.server.git/:na]
	at org.eclipse.orion.server.git.servlets.GitServlet.doGet(GitServlet.java:39) [org.eclipse.orion.server.git/:na]
	at org.eclipse.orion.server.git.servlets.GitServlet.doPost(GitServlet.java:57) [org.eclipse.orion.server.git/:na]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:755) [javax.servlet_3.0.0.v201112011016.jar:na]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) [javax.servlet_3.0.0.v201112011016.jar:na]
	at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:180) [org.eclipse.equinox.http.registry_1.1.100.v20111010-1614.jar:na]
	at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61) [org.eclipse.equinox.http.servlet_1.1.300.v20111202-1521.jar:na]
	at org.eclipse.equinox.http.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:38) [org.eclipse.equinox.http.servlet_1.1.300.v20111202-1521.jar:na]
	at org.eclipse.orion.server.configurator.servlet.LoggedInUserFilter.doFilter(LoggedInUserFilter.java:56) [org.eclipse.orion.server.configurator/:na]
	at org.eclipse.equinox.http.registry.internal.FilterManager$FilterWrapper.doFilter(FilterManager.java:173) [org.eclipse.equinox.http.registry_1.1.100.v20111010-1614.jar:na]
	at org.eclipse.equinox.http.servlet.internal.FilterRegistration.doFilter(FilterRegistration.java:81) [org.eclipse.equinox.http.servlet_1.1.300.v20111202-1521.jar:na]
	at org.eclipse.equinox.http.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:35) [org.eclipse.equinox.http.servlet_1.1.300.v20111202-1521.jar:na]
	at org.eclipse.orion.internal.server.hosting.HostedSiteRequestFilter.doFilter(HostedSiteRequestFilter.java:50) [org.eclipse.orion.server.hosting/:na]
	at org.eclipse.equinox.http.registry.internal.FilterManager$FilterWrapper.doFilter(FilterManager.java:173) [org.eclipse.equinox.http.registry_1.1.100.v20111010-1614.jar:na]
	at org.eclipse.equinox.http.servlet.internal.FilterRegistration.doFilter(FilterRegistration.java:81) [org.eclipse.equinox.http.servlet_1.1.300.v20111202-1521.jar:na]
	at org.eclipse.equinox.http.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:35) [org.eclipse.equinox.http.servlet_1.1.300.v20111202-1521.jar:na]
	at org.eclipse.orion.internal.server.servlets.file.EditSupportFilter.doFilter(EditSupportFilter.java:46) [org.eclipse.orion.server.servlets/:na]
	at org.eclipse.equinox.http.registry.internal.FilterManager$FilterWrapper.doFilter(FilterManager.java:173) [org.eclipse.equinox.http.registry_1.1.100.v20111010-1614.jar:na]
	at org.eclipse.equinox.http.servlet.internal.FilterRegistration.doFilter(FilterRegistration.java:81) [org.eclipse.equinox.http.servlet_1.1.300.v20111202-1521.jar:na]
	at org.eclipse.equinox.http.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:35) [org.eclipse.equinox.http.servlet_1.1.300.v20111202-1521.jar:na]
	at org.eclipse.orion.server.configurator.servlet.WelcomeFileFilter.doFilter(WelcomeFileFilter.java:39) [org.eclipse.orion.server.configurator/:na]
	at org.eclipse.equinox.http.registry.internal.FilterManager$FilterWrapper.doFilter(FilterManager.java:173) [org.eclipse.equinox.http.registry_1.1.100.v20111010-1614.jar:na]
	at org.eclipse.equinox.http.servlet.internal.FilterRegistration.doFilter(FilterRegistration.java:81) [org.eclipse.equinox.http.servlet_1.1.300.v20111202-1521.jar:na]
	at org.eclipse.equinox.http.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:35) [org.eclipse.equinox.http.servlet_1.1.300.v20111202-1521.jar:na]
	at org.eclipse.orion.server.configurator.servlet.CacheFilter.doFilter(CacheFilter.java:73) [org.eclipse.orion.server.configurator/:na]
	at org.eclipse.equinox.http.registry.internal.FilterManager$FilterWrapper.doFilter(FilterManager.java:173) [org.eclipse.equinox.http.registry_1.1.100.v20111010-1614.jar:na]
	at org.eclipse.equinox.http.servlet.internal.FilterRegistration.doFilter(FilterRegistration.java:81) [org.eclipse.equinox.http.servlet_1.1.300.v20111202-1521.jar:na]
	at org.eclipse.equinox.http.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:35) [org.eclipse.equinox.http.servlet_1.1.300.v20111202-1521.jar:na]
	at org.eclipse.orion.server.configurator.servlet.CacheFilter.doFilter(CacheFilter.java:73) [org.eclipse.orion.server.configurator/:na]
	at org.eclipse.equinox.http.registry.internal.FilterManager$FilterWrapper.doFilter(FilterManager.java:173) [org.eclipse.equinox.http.registry_1.1.100.v20111010-1614.jar:na]
	at org.eclipse.equinox.http.servlet.internal.FilterRegistration.doFilter(FilterRegistration.java:81) [org.eclipse.equinox.http.servlet_1.1.300.v20111202-1521.jar:na]
	at org.eclipse.equinox.http.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:35) [org.eclipse.equinox.http.servlet_1.1.300.v20111202-1521.jar:na]
	at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:77) [org.eclipse.jetty.servlets_8.1.0.RC1.jar:8.1.0.RC1]
	at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:144) [org.eclipse.jetty.servlets_8.1.0.RC1.jar:8.1.0.RC1]
	at org.eclipse.orion.server.configurator.servlet.ExcludedExtensionGzipFilter.doFilter(ExcludedExtensionGzipFilter.java:42) [org.eclipse.orion.server.configurator/:na]
	at org.eclipse.equinox.http.registry.internal.FilterManager$FilterWrapper.doFilter(FilterManager.java:173) [org.eclipse.equinox.http.registry_1.1.100.v20111010-1614.jar:na]
	at org.eclipse.equinox.http.servlet.internal.FilterRegistration.doFilter(FilterRegistration.java:81) [org.eclipse.equinox.http.servlet_1.1.300.v20111202-1521.jar:na]
	at org.eclipse.equinox.http.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:35) [org.eclipse.equinox.http.servlet_1.1.300.v20111202-1521.jar:na]
	at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:132) [org.eclipse.equinox.http.servlet_1.1.300.v20111202-1521.jar:na]
	at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68) [org.eclipse.equinox.http.servlet_1.1.300.v20111202-1521.jar:na]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) [javax.servlet_3.0.0.v201112011016.jar:na]
	at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:323) [org.eclipse.equinox.http.jetty_3.0.0.v20111202-1436.jar:na]
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:575) [org.eclipse.jetty.servlet_8.1.0.RC1.jar:8.1.0.RC1]
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:485) [org.eclipse.jetty.servlet_8.1.0.RC1.jar:8.1.0.RC1]
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) [org.eclipse.jetty.server_8.1.0.RC1.jar:8.1.0.RC1]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1041) [org.eclipse.jetty.server_8.1.0.RC1.jar:8.1.0.RC1]
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:412) [org.eclipse.jetty.servlet_8.1.0.RC1.jar:8.1.0.RC1]
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192) [org.eclipse.jetty.server_8.1.0.RC1.jar:8.1.0.RC1]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:995) [org.eclipse.jetty.server_8.1.0.RC1.jar:8.1.0.RC1]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) [org.eclipse.jetty.server_8.1.0.RC1.jar:8.1.0.RC1]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111) [org.eclipse.jetty.server_8.1.0.RC1.jar:8.1.0.RC1]
	at org.eclipse.jetty.server.Server.handle(Server.java:350) [org.eclipse.jetty.server_8.1.0.RC1.jar:8.1.0.RC1]
	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:431) [org.eclipse.jetty.server_8.1.0.RC1.jar:8.1.0.RC1]
	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:911) [org.eclipse.jetty.server_8.1.0.RC1.jar:8.1.0.RC1]
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:870) [org.eclipse.jetty.http_8.1.0.RC1.jar:8.1.0.RC1]
	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:238) [org.eclipse.jetty.http_8.1.0.RC1.jar:8.1.0.RC1]
	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:68) [org.eclipse.jetty.server_8.1.0.RC1.jar:8.1.0.RC1]
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:609) [org.eclipse.jetty.io_8.1.0.RC1.jar:8.1.0.RC1]
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:45) [org.eclipse.jetty.io_8.1.0.RC1.jar:8.1.0.RC1]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598) [org.eclipse.jetty.util_8.1.0.RC1.jar:8.1.0.RC1]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533) [org.eclipse.jetty.util_8.1.0.RC1.jar:8.1.0.RC1]
	at java.lang.Thread.run(Thread.java:736) [na:1.6.0]
Comment 1 Malgorzata Janczarska CLA 2012-01-09 06:13:00 EST
And you didn't get basic auth popup? I tried to use is with form auth and it redirected me to the login page.
Comment 2 Tomasz Zarna CLA 2012-01-09 06:28:24 EST
(In reply to comment #1)
> And you didn't get basic auth popup? 

Nope, just the exception. 

Please note, the fact that the dialog is deaf for server errors is also covered in bug 366008 blocked by bug 335890.
Comment 3 Malgorzata Janczarska CLA 2012-01-09 10:19:15 EST
This scenario is different that I thought before. It's the server that does the call to the remote URL not client. This is why Basic authentication doesn't work. Form auth doesn't give this exception but it doesn't apply the patch. In both situations we don't get any error on UI.

Tomek, is this right that URL call is done by server? If yes than this explains why do you get authentication error even if you are authenticated to Orion. In this case I don't think we will ever be able to fully handle authentication to this URL.
Comment 4 Tomasz Zarna CLA 2012-01-09 15:12:47 EST
(In reply to comment #3)
 
> Tomek, is this right that URL call is done by server?

Yes, that was the idea.

> In this case I don't think we will ever be able to fully handle authentication to
> this URL.

Well, we should at least inform the user what's going on. But that would require bug 366008 to be fixed first.
Comment 5 Tomasz Zarna CLA 2012-05-02 11:11:48 EDT
I could try fetching the patch content on the client side and then upload it to the server. This should be easy to do for patches from Orion, not sure about patches from other domains.
Comment 6 John Arthorne CLA 2015-05-05 15:49:44 EDT
Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see:


https://dev.eclipse.org/mhonarc/lists/orion-dev/msg03444.html
Comment 7 John Arthorne CLA 2015-05-05 16:02:34 EDT
Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see:


https://dev.eclipse.org/mhonarc/lists/orion-dev/msg03444.html