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

Support OAuth flow for private repo factories on Dashboard #18976

Closed
mshaposhnik opened this issue Feb 4, 2021 · 1 comment · Fixed by eclipse-che/che-dashboard#183
Closed
Assignees
Labels
area/dashboard kind/task Internal things, technical debt, and to-do tasks to be performed. new&noteworthy For new and/or noteworthy issues that deserve a blog post, new docs, or emphasis in release notes severity/P1 Has a major impact to usage or development of the system. sprint/current
Milestone

Comments

@mshaposhnik
Copy link
Contributor

mshaposhnik commented Feb 4, 2021

Is your task related to a problem? Please describe.

We are about to merge support of OAuth flow for private repository factories on Che server. In next step that this fucntionality must be supported by dashboard as well.

Describe the solution you'd like

Expected flow is the following:

  • User accepts factory from private repository;

  • Dashboard making request to resolve factory details using the reposiroty URL which is provided by user;
    (POST /api/factory/resolver)

  • Che server recognizes that URL points to private repository and looks for the credentials secret; If no secret present,
    initiates the OAuth login procedure by returning the following response:

    POST https://<che-host>/api/factory/resolver
    
    Response Status: 401
    
    Response body:
     {
     "attributes": {
     "oauth_provider": "<provider>",
     "oauth_version": "<1.0|2.0>"
     "oauth_authentication_url": "https://<che-host>/api/oauth/<1.0>/authenticate?oauth_provider=<provider>&request_method=<GET|POST>&signature_method=<rsa|ssha>"
     },
     "errorCode": 401,
     "message": "SCM Authentication required"
    }
    
    
    

Please note that parameters token and redirect_after_login are not returned and must be set by Dashboard by its discretion.

  • Dashboard initates OAuth routine using the resulting URL;

  • In case of Successful completion of OAuth procedure, initial POST /api/factory/resolve must be repeated.

  • In case of Unsuccessful completion, error message must be shown.

Describe alternatives you've considered

Additional context

@mshaposhnik mshaposhnik added the kind/task Internal things, technical debt, and to-do tasks to be performed. label Feb 4, 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 Feb 4, 2021
@skabashnyuk skabashnyuk added area/dashboard severity/P1 Has a major impact to usage or development of the system. labels Feb 4, 2021
@sleshchenko sleshchenko added this to the 7.27 milestone Feb 4, 2021
@l0rd l0rd removed the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Feb 5, 2021
@mshaposhnik
Copy link
Contributor Author

FYI guys, we're merged responses PR, so the Che server now behaves like it written is description (with configured OAuth).

@akurinnoy akurinnoy self-assigned this Feb 22, 2021
@sleshchenko sleshchenko modified the milestones: 7.27, 7.28 Mar 2, 2021
@l0rd l0rd added the new&noteworthy For new and/or noteworthy issues that deserve a blog post, new docs, or emphasis in release notes label Mar 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dashboard kind/task Internal things, technical debt, and to-do tasks to be performed. new&noteworthy For new and/or noteworthy issues that deserve a blog post, new docs, or emphasis in release notes severity/P1 Has a major impact to usage or development of the system. sprint/current
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants