Bug 498993 - Support for HTTP authentication
Summary: Support for HTTP authentication
Status: NEW
Alias: None
Product: Egerrit
Classification: Technology
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-01 09:54 EDT by Mattias Andersson CLA
Modified: 2020-04-23 21:02 EDT (History)
3 users (show)

See Also:


Attachments
Gerrit server dialog (29.84 KB, image/png)
2016-08-01 13:46 EDT, Jacques Bouthillier CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mattias Andersson CLA 2016-08-01 09:54:51 EDT
Support for HTTP authentication seems to exist in org.eclipse.egerrit.core. But there is no way to provide the Http Credentials from the UI.
Comment 1 Jacques Bouthillier CLA 2016-08-01 13:46:05 EDT
Created attachment 263413 [details]
Gerrit server dialog
Comment 2 Jacques Bouthillier CLA 2016-08-01 13:47:01 EDT
(In reply to Mattias Andersson from comment #0)
> Support for HTTP authentication seems to exist in org.eclipse.egerrit.core.
> But there is no way to provide the Http Credentials from the UI.

There is a few ways to open the preferences to add your credentials for an HTTP gerrit server. The easiest way is when you have the EGerrit dashboard view available, on the menu bar, there is a button (First one)with a pull down menu -> "Add/modify Gerrit repository.."
This open the preference dialog, you can add/modify a Gerritr server and add you http credentials in the dialog
Comment 3 Mattias Andersson CLA 2016-08-02 02:05:51 EDT
We use CAS to authenticate users on our Gerrit server. To be able to login from EGerrit I would have the users generate a HTTP Password in Gerrit and login with that, much like:

curl --digest --user 'myuser:Y3C1lOGLZ2zoAyv4zw+lCb+9PoX2b9IexsSuZwQYVQ' https://my.server.org:8080/a/changes/?q=owner:self

The curl-command works, but I can’t get this user and passwd to work with eGerrit.

I think that I need to be able to set org.eclipse.egerrit.core/org.eclipse.egerrit.internal.core.GerritCredentials#fHttpCredentials instead or in addition to org.eclipse.egerrit.core/org.eclipse.egerrit.internal.core.GerritCredentials#fCredentials

But I can’t see any way to do that in the UI.
Comment 4 Jacques Bouthillier CLA 2016-08-02 09:28:38 EDT
Central Authentication Service (CAS) is not implemented in current EGerrit, we are using a user/password authentication. We deal with LDAP identification, but not following with the CAS server. We will look into it to see how we can implement this authentication.
Comment 5 Pascal Rapicault CLA 2016-08-02 10:50:32 EDT
(In reply to Jacques Bouthillier from comment #4)
> We will look into it to see how we can implement this authentication.

As much as I understand Jacques's enthusiasm to implement this, know this won't be implemented in the near future.
Mattias, since you seem to already know where to look in the code, I would recommend you to see if you can contribute. This would guarantee faster progress.
Comment 6 Laurent Goujon CLA 2020-04-23 21:02:36 EDT
I decided to give it a try and posted a patch on gerrit: https://git.eclipse.org/r/#/c/161460/