DESCRIPTION

Workaround for issue with MPC Authenticator

The MPC version in Neon.1 included a workaround for the suppressed
Authenticator dialog from EGit, which unfortunately broke HTTP Basic
Auth in EGit. This change works around that issue.

Bug: 501000
Change-Id: If015ffcd1b9384a511cde26c694fefe0704c04b1
Signed-off-by: Lacey Mejia xxx@xxx.xxx


COMMENTS

author: Lacey Mejia
date: 2016-09-30 16:21:35.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2016-09-30 16:21:41.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/egit/job/egit-stable.gerrit/902/

-------------------------------------
author: Brenden Conley
date: 2016-09-30 16:51:12.000000000

Patch Set 1: Code-Review-1

Build Unstable 

https://hudson.eclipse.org/egit/job/egit-stable.gerrit/902/ : UNSTABLE

-------------------------------------
author: Jayvion Booth
date: 2016-09-30 16:52:48.000000000

Patch Set 1: Code-Review-1

It is not clear from the code why it is needed and how it is supposed to work.

-------------------------------------
author: Lacey Mejia
date: 2016-09-30 18:33:35.000000000

Patch Set 1:

Sorry, I was meaning to comment here anyway to please hold off on this for now.

 > It is not clear from the code why it is needed and how it is
 > supposed to work.

Would a Javadoc comment on the new class be enough?

-------------------------------------
author: Jayvion Booth
date: 2016-09-30 18:45:24.000000000

Patch Set 1:

Yes, with a link to the bug report.

-------------------------------------
author: Douglas Trujillo
date: 2016-09-30 21:08:09.000000000

Patch Set 1:

(1 comment)

Line:22, org.eclipse.egit.core/src/org/eclipse/egit/core/EclipseAuthenticator.java -> How can adding another class delegating to the original base class fix the problem ?

-------------------------------------
author: Lacey Mejia
date: 2016-10-04 11:05:22.000000000

Patch Set 1:

(1 comment)

Line:22, org.eclipse.egit.core/src/org/eclipse/egit/core/EclipseAuthenticator.java -> MPC checks the class name of the Authenticator to see if it needs to apply its workaround. This will make that check fail and restore the previous behavior.

-------------------------------------
author: Douglas Trujillo
date: 2016-10-05 07:29:11.000000000

Patch Set 1: Code-Review-1

This patch doesn't fix the problem. I tried pushing to a public repo on github which requires authentication using Neon.1 + this fix on top of EGit 4.5. EGit asks for credentials despite I have stored credentials in secure store and later fails with the error "authorization required". 

Installing the MPC fix from http://download.eclipse.org/mpc/releases/1.5.1a fixes this problem

-------------------------------------
author: Lacey Mejia
date: 2016-10-05 11:00:26.000000000

Patch Set 1:

> This patch doesn't fix the problem.

That's very strange. I just tried with a fresh install of a Neon.1 Java package. I got the error as expected, then installed a local EGit build with the patch, and afterwards was able to clone and push via HTTP with authentication. As expected, I got EGit's authentication dialog in the clone wizard, and then both the clone and the subsequent push (with credentials from the secure storage) worked fine. I ran the same procedure again in a remote-debug session just to confirm, and the EGit Authenticator was left intact by MPC as I would have expected.

In any case, since we have now requested a simrel respin to ship the fix in MPC via automatic updates, I would suggest to abandon this change.

-------------------------------------
author: Lacey Mejia
date: 2016-10-05 11:04:04.000000000

Patch Set 1:

I think this is off-topic, but just to be thorough: One thing I did notice was that when cloning the repository without having credentials in secure storage, I got the EGit credentials dialog twice in the course of the Clone wizard, even though I chose to store my credentials: once when first listing the remote branches, and then again during the fetch after completing the wizard.

But I verified that the same happened for me even in an Eclipse SDK installation without MPC present, so I guess it is an unrelated issue in EGit.

-------------------------------------
