Bug 287558

Summary: Adopt ECF support on NTLM2
Product: [Eclipse Project] Equinox Reporter: Pascal Rapicault <pascal>
Component: p2Assignee: Henrik Lindberg <henrik.lindberg>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: pawel.pogorzelski1, pierre.gaufillet, slewis, Stefan.Liebig, Szymon.Brandys, tjwatson
Version: 3.5   
Target Milestone: 3.6   
Hardware: PC   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 287746    
Attachments:
Description Flags
Project set pointing at the two project
none
Binary patch to apply on 3.5 or 3.5.1 candidate
none
New binary patch none

Description Pascal Rapicault CLA 2009-08-25 10:10:37 EDT
In bug #252002, ECF has added a support that allows to detect the presence of NTLM proxy. We need to adopt it.
Comment 1 Henrik Lindberg CLA 2009-08-26 17:07:42 EDT
We need this fixed in both 3.6 and 3.5.1 - creating a new issue for 3.5.1 as clone of this.
Comment 2 Henrik Lindberg CLA 2009-08-26 17:14:25 EDT
First part of fix released to HEAD. 
This fix implements support for the ECF status code 477 that indicates that a switch to the JRE Http client should be made. When this occurs, a method is called in the repository bundle's Activator (this method is currently marked as "TODO").
Comment 3 Henrik Lindberg CLA 2009-08-27 09:36:50 EDT
Second part released to HEAD. Now, a switch to the JRE provided http client will be made when ECF detects that NTLM is in use.

Testing is required by someone who is running behind an NTLM proxy (both NTLM1 and NTLM2).
Note - The changes require org.eclipse.ecf.provider.filetransfer;bundle-version="3.0.1"


Comment 4 Stefan Liebig CLA 2009-08-27 10:04:54 EDT
I can of course test it.
Could you please provide me with a short "how to"?
Comment 5 Pascal Rapicault CLA 2009-08-27 10:27:05 EDT
Created attachment 145795 [details]
Project set pointing at the two project
Comment 6 Pascal Rapicault CLA 2009-08-27 10:28:49 EDT
While I'm creating a patch for general consumability, you can do the following:
- In 3.5 or 3.5.1, load the project set file attached
- Pick the two plugins and export them into the running instance (install into host option)
- try to connect
Comment 7 Pascal Rapicault CLA 2009-08-27 11:03:49 EDT
Created attachment 145800 [details]
Binary patch to apply on 3.5 or 3.5.1 candidate

Here is a binary patch containing the code changes required to address this problem.
To install it, download the archive, Help > Install new software..., add.., add the archive and install (you may have to uncheck the "group items by category" option).
Comment 8 Pascal Rapicault CLA 2009-08-27 19:46:39 EDT
Given that I did not get an ECF build that contained the new APIs, I have reverted the changes that Henrik released earlier today and put in HEAD the content of v20090810-2000.
Before reverting I have tagged the ntml2 support with "Support-for-ntlmv2"
Comment 9 Pascal Rapicault CLA 2009-08-31 10:26:26 EDT
The NTLM 2 support is now back in HEAD.
Comment 10 Pawel Pogorzelski CLA 2009-08-31 15:26:17 EDT
I've run org.eclipse.equinox.p2.repository and ECF code from HEAD and it works fine.

I can get a connection to an update site from behind an NTLM proxy with native proxy provider selected in Eclipse. That means it works without providing any credentials explicitly in Eclipse, I just had to be authorized on the OS.
Comment 11 Pascal Rapicault CLA 2009-08-31 15:31:41 EDT
Created attachment 146099 [details]
New binary patch

This binary patch supercedes the previous one.
Comment 12 Stefan Liebig CLA 2009-09-01 02:31:47 EDT
I first run (Eclipse 3.5) without the new binary patch (id=146099) and when trying to connect to an update site it failed as expected with an authentication error.
Than applied the patch and everything worked fine. I also used the native proxy provider. No need to provide my credentials for eclipse.
Comment 13 Pascal Rapicault CLA 2009-09-01 07:17:46 EDT
Thanks for the testing Stefan.
Comment 14 Henrik Lindberg CLA 2009-09-01 11:31:57 EDT
As bug 287746 was marked fixed (the same as this issue but for 3.5.1) - I am marking this issue as fixed too.
Comment 15 Pierre Gaufillet CLA 2009-09-08 05:11:45 EDT
This patch also fixes the connection issues behind our firewalls (tested on Linux RHEL4, JRE 1.5.0_12).

I do not need anymore to mirror the eclipse repositories at home and bring them back on a USB key :-) :-) :-)

Thanks for this critical patch, guys !