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

Gitlab private repo support using OAuth 2 flow #19171

Closed
mshaposhnik opened this issue Mar 1, 2021 · 1 comment
Closed

Gitlab private repo support using OAuth 2 flow #19171

mshaposhnik opened this issue Mar 1, 2021 · 1 comment
Labels
area/che-server kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P1 Has a major impact to usage or development of the system.
Milestone

Comments

@mshaposhnik
Copy link
Contributor

mshaposhnik commented Mar 1, 2021

Is your task related to a problem? Please describe.

Support private GitLab repos for factories with authentication using OAuth 2 for creating and persisting personal access tokens.

Describe the solution you'd like

OAuth 2 flow should be used for first-time uset authentication and creating + persisting personal access tokens.

image

API query used for PAT creation:

[Makis@linux gitlab]curl --request POST --header "PRIVATE-TOKEN: DYF627ozzSHM-<yup>" --data "name=mytoken" --data "expires_at=2021-04-04" --data "scopes[]=api,read_user,write_repository" "https://gitlab.192.168.39.243.nip.io/api/v4/users/42/personal_access_tokens"

Describe alternatives you've considered

Additional context

Gitlab installation instructions:
https://gist.github.com/mshaposhnik/7c96ae19af9f87bd7f46080f1c54565d

@mshaposhnik mshaposhnik added the kind/task Internal things, technical debt, and to-do tasks to be performed. label Mar 1, 2021
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Mar 1, 2021
@Katka92 Katka92 added area/git severity/P1 Has a major impact to usage or development of the system. and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Mar 1, 2021
@skabashnyuk skabashnyuk added this to the 7.29 milestone Mar 24, 2021
@mshaposhnik
Copy link
Contributor Author

mshaposhnik commented Mar 30, 2021

Example of Keycloak settings:
image
image

Authorization URL example:

https://che-eclipse-che.apps.cluster-max-2da8.max-2da8.example.opentlc.com/api/oauth/authenticate?oauth_provider=gitlab&userId=d657f1fb-633f-4713-ad11-5f1f5f7a6586&scope=api&scope=profile&redirect_after_login=https%3A%2F%2Fche-eclipse-che.apps.cluster-max-2da8.max-2da8.example.opentlc.com%2Fdashboard&token=...

@skabashnyuk skabashnyuk modified the milestones: 7.29, 7.30 Apr 20, 2021
@l0rd l0rd added new&noteworthy For new and/or noteworthy issues that deserve a blog post, new docs, or emphasis in release notes and removed new&noteworthy For new and/or noteworthy issues that deserve a blog post, new docs, or emphasis in release notes labels May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/che-server kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

No branches or pull requests

5 participants