Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [che-dev] Passing credentials to GitProjectImporter

Hello Sergey

> is https authentication not supported currently in this api 
Basically we never used it before. Because we would like to avoid (as much as possible) any connection with user sensitive data  
especially  user-password for foreign services.

The way how we do that is following
1. We try to clone project for the first time and if we have no OAuth2 token or ssh key in profile we get an error for UI client
2. We ask user to authorize on OAuth2 provider or generate new ssh key.
3. We try to clone for the second time and when we take CredentialsLoader by url and user from request context and find out
    his Oauth2 token or ssh key for clone.

For your usecase we can send request to  CredentialsProvider with help of CloneRequest attributes.

Sergii Kabasniuk




On Tue, Oct 27, 2015 at 11:38 AM, Kuperman, Sergey <sergey.kuperman@xxxxxxx> wrote:

Hello, I have a question regarding the

/project/{ws-id}/import/{path:.*} api when used in conjunction with GitProjectImporter.

When attempting to import a project through git url, I noticed there are no credentials for connecting to git repository being passed within the parameters of the import request.

As I understand it, when gitProjectImporter attempts to clone repository, appropriate CredentialsProvider is fetched from CredentialsLoader.
And the CredentialsProvider is supposed to fetch the credentials from the clone command request (I am talking about https authentication flow).

 

As it is now , credentials are impossible to fetch from the clone command, because they are not put there in GitProjectImporter. So my question is : is https authentication not supported currently in this api ? if they are how are the credentials passed to the git command request ?

 


_______________________________________________
che-dev mailing list
che-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/che-dev



Back to the top