Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Git Committer details to be mapped from Keycloak user details #10909

Closed
david-martin opened this issue Aug 24, 2018 · 13 comments
Closed

Allow Git Committer details to be mapped from Keycloak user details #10909

david-martin opened this issue Aug 24, 2018 · 13 comments
Assignees
Labels
kind/task Internal things, technical debt, and to-do tasks to be performed.

Comments

@david-martin
Copy link
Contributor

Description

Allow Git Committer details to be mapped from Keycloak user details.
This will avoid the user having to set them manually in Che (Profile > Preferences > Git > Committer) before they can commit and push code to their imported repo.

Reproduction Steps

  • When setup with Keycloak (& a github identity provider), login to Che.
  • Authorize Che to your Github account (Profile > Preferences > SSH > VCS > Github icon)
  • Import a project from Github
  • Modify a file and commit/push it back (Git > Commit)
  • The below error is shown

image

OS and version:

Diagnostics:

Would it be possible to set the Git user name & email based on the user details from Keycloak (JWT?)

@skabashnyuk
Copy link
Contributor

@david-martin can you elaborate a bit more about which exactly Keycloak user details you are talking about.

@skabashnyuk skabashnyuk added status/analyzing An issue has been proposed and it is currently being analyzed for effort and implementation approach kind/task Internal things, technical debt, and to-do tasks to be performed. team/platform labels Aug 27, 2018
@david-martin
Copy link
Contributor Author

@skabashnyuk If I have my email address & first name set in my Keycloak account, they will get mapped to the Git user name and email config in Che.

@skabashnyuk
Copy link
Contributor

@david-martin What I should do to set up email address & first name in my Keycloak account?
Do I need to setup it manually? Or create Github IDP mapper
2018-08-27 12 44 12

@david-martin
Copy link
Contributor Author

@skabashnyuk I would say it could be set manually, maybe when the user was created in that Keycloak (Or automatically if users are federated to ldap or some other user system).
i.e. they show up in below screen before the user even tries to login to Che for the first time

image

After they login to Che, Che is able to read user details from Keycloak (from a JWT maybe?)

@skabashnyuk
Copy link
Contributor

@david-martin So this has no relation to Github. You want to map Keycalok email to gitcommiter email and KK first and last name to gitcommiter name?

@david-martin
Copy link
Contributor Author

@skabashnyuk Yes, exactly.
Apologies for any confusion about github

@skabashnyuk
Copy link
Contributor

OK. I may rephrase this issue as follows.
In LocalGitUserResolver implementation of GitUserResolver add fallback logic.
git.committer.name - to username
git.committer.email - to user mail

@david-martin
Copy link
Contributor Author

@skabashnyuk Sure, that sounds reasonable.

@gorkem
Copy link
Contributor

gorkem commented Sep 12, 2018

@vparfonov @skabashnyuk can you please see if you can take this on to the next sprint?

@skabashnyuk
Copy link
Contributor

@gorkem yes sure.

@vinokurig vinokurig added status/in-progress This issue has been taken by an engineer and is under active development. and removed team/platform status/analyzing An issue has been proposed and it is currently being analyzed for effort and implementation approach labels Sep 13, 2018
@vinokurig vinokurig added status/blocked Issue that can’t be moved forward. Must include a comment on the reason for the blockage. and removed status/in-progress This issue has been taken by an engineer and is under active development. labels Sep 13, 2018
@gazarenkov
Copy link
Contributor

@vinokurig to make sure - it will take default value (if empty) from user/email but it can be filled manually (as it is) as well, correct?

@vinokurig vinokurig removed the status/blocked Issue that can’t be moved forward. Must include a comment on the reason for the blockage. label Sep 14, 2018
@vinokurig
Copy link
Contributor

@gazarenkov sure, user will be able to change it in the preferences

@david-martin
Copy link
Contributor Author

Thanks @vinokurig

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/task Internal things, technical debt, and to-do tasks to be performed.
Projects
None yet
Development

No branches or pull requests

6 participants