Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

chore: Rework GitHub authentication flow #1293

Merged
merged 5 commits into from
Jan 20, 2022
Merged

chore: Rework GitHub authentication flow #1293

merged 5 commits into from
Jan 20, 2022

Conversation

vinokurig
Copy link
Contributor

@vinokurig vinokurig commented Jan 17, 2022

Signed-off-by: Igor Vinokur ivinokur@redhat.com

What does this PR do?

Exclude che-server requests from the GitHub authentication flow, instead read credentials file, mounted from the github-credentials-secret and extract the GitHub token.

Screenshot/screencast of this PR

What issues does this PR fix or reference?

fixes eclipse-che/che#20995
fixes eclipse-che/che#20788

How to test this PR?

  1. Make sure that the GitHub is configured: https://www.eclipse.org/che/docs/next/administration-guide/configuring-authorization/#enabling-authentication-with-social-accounts-and-brokering_che
  2. Create a factory with a private repo e.g. <che-url>/#https://github.com/vinokurig/test-extension/tree/devfile2 to authenticate GitHub for the user namespace.
  3. Run Git: Clone and input a git url to a private repo e.g. https://github.com/vinokurig/test-extension.git:
    screenshot-192 168 64 128 nip io-2022 01 17-13_37_02
  4. Choose a folder to clone and click `Allow' button in the notification:
    screenshot-192 168 64 128 nip io-2022 01 17-13_37_44

PR Checklist

As the author of this Pull Request I made sure that:

Reviewers

Reviewers, please comment how you tested the PR when approving it.

Happy Path Channel

HAPPY_PATH_CHANNEL=stable

Signed-off-by: Igor Vinokur <ivinokur@redhat.com>
@vinokurig
Copy link
Contributor Author

depends on eclipse-che/che#21025

@codecov
Copy link

codecov bot commented Jan 17, 2022

Codecov Report

Merging #1293 (e471754) into main (c299f59) will increase coverage by 3.50%.
The diff coverage is 42.43%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1293      +/-   ##
==========================================
+ Coverage   32.78%   36.29%   +3.50%     
==========================================
  Files         290      325      +35     
  Lines        9885    10600     +715     
  Branches     1457     1432      -25     
==========================================
+ Hits         3241     3847     +606     
- Misses       6641     6748     +107     
- Partials        3        5       +2     
Impacted Files Coverage Δ
...theia-about/src/browser/about-che-theia-dialog.tsx 0.00% <0.00%> (ø)
...credentials/src/browser/che-credentials-service.ts 0.00% <0.00%> (ø)
...entials/src/browser/credentials-frontend-module.ts 0.00% <0.00%> (ø)
...eia-credentials/src/common/credentials-protocol.ts 0.00% <0.00%> (ø)
...eia-credentials/src/node/che-credentials-server.ts 0.00% <0.00%> (ø)
...s/src/node/che-theia-credentials-backend-module.ts 0.00% <0.00%> (ø)
...ashboard/src/browser/che-theia-dashboard-module.ts 0.00% <0.00%> (ø)
...ia-dashboard/src/browser/theia-dashboard-client.ts 0.00% <0.00%> (ø)
...rowser/src/browser/che-mini-browser-environment.ts 0.00% <0.00%> (ø)
...in-ext/src/browser/che-sidecar-file-system-main.ts 100.00% <ø> (ø)
... and 293 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9c6d63b...e471754. Read the comment docs.

Copy link
Contributor

@svor svor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vinokurig vinokurig merged commit 1479089 into main Jan 20, 2022
@vinokurig vinokurig deleted the che-20995 branch January 20, 2022 09:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add GitHub authentication manual flow Adapt che-theia plugins to avoid requesting che-server API
3 participants