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 configuring the GitHub OAuth endpoint #350

Merged
merged 3 commits into from
Sep 8, 2022
Merged

Support configuring the GitHub OAuth endpoint #350

merged 3 commits into from
Sep 8, 2022

Conversation

vinokurig
Copy link
Contributor

@vinokurig vinokurig commented Sep 6, 2022

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

What does this PR do?

Currently the GitHub OAuth provider is hardcoded to https://github.com endpoint. In order to support Github Enterprise Server, the endpoint of the GitHub OAuth provider is configurable by the oauth secret.

Screenshot/screencast of this PR

What issues does this PR fix or reference?

fixes eclipse-che/che#21485

How to test this PR?

  1. Deploy Che from the custom che-server image built from the PR source: quay.io/ivinokur/che-server:next.
  2. Apply the GitHub OAuth secret:
kind: Secret
apiVersion: v1
metadata:
  name: github-oauth-config
  labels:
    app.kubernetes.io/component: oauth-scm-configuration
    app.kubernetes.io/part-of: che.eclipse.org
  annotations:
    che.eclipse.org/oauth-scm-server: github
    che.eclipse.org/scm-server-endpoint: 'http://37.139.177.199/'
data:
  id: YTFmOTcyYWM4ZGM4ZTRlNjJjN2I=
  secret: N2E3OGYwZjIxMmFkOGZlMGEyYjVlZGQzZDlhOTg0NmQxOGVhMDYwYg==
type: Opaque

The secret refers to the GitHub Enterprise Server instace, launched in my local virtualbox environment, and exposed to http://37.139.177.199, see for more details.
3. Ping me to start the GitHub instance :) or use your own application, but configure the endpoint in the secret.
4. Start a factory from http://37.139.177.199/test/test.git or your own repo.

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.

Signed-off-by: Igor Vinokur <ivinokur@redhat.com>
…/che/che.properties

Co-authored-by: Fabrice Flore-Thébault <ffloreth@redhat.com>
@vinokurig vinokurig merged commit c2a2d09 into main Sep 8, 2022
@vinokurig vinokurig deleted the che-21485 branch September 8, 2022 11:51
@che-bot che-bot added this to the 7.54 milestone Sep 8, 2022
@l0rd l0rd changed the title chore: Support configuring the GitHub OAuth endpoint Support configuring the GitHub OAuth endpoint Sep 8, 2022
@vinokurig
Copy link
Contributor Author

@l0rd @nickboldt Do we need to cherry-pick it to a release branch?

@l0rd
Copy link
Contributor

l0rd commented Sep 9, 2022

@vinokurig if that's not too complicated it would be ideal to cherry pick that to 7.52.x branch

@l0rd
Copy link
Contributor

l0rd commented Sep 9, 2022

@vinokurig I have added this in the epic for the release of OpenShift Dev Spaces 3.2. Please let me know if you think that it won't be possible to backport it to 7.52.x so that we revert that in time. cc @nickboldt @dmytro-ndp

vinokurig added a commit that referenced this pull request Sep 9, 2022
Currently the GitHub OAuth provider is hardcoded to https://github.com endpoint. In order to support Github Enterprise Server, the endpoint of the GitHub OAuth provider is configurable by the oauth secret.
@vinokurig
Copy link
Contributor Author

@l0rd Successfully cherry-picked to 7.52.x

@RickJWagner
Copy link
Contributor

@nickboldt Can you please suggest when we might see this commit in Dev Spaces 3.2 or 3.3?
(Reason: We have a customer that can help us validate / provide feedback. Sooner is better.)

@nickboldt
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support OAuth flow for GitHub Enterprise Server
7 participants