-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
This reverts commit 478d1d1.
- Loading branch information
Showing
11 changed files
with
71 additions
and
78 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +0,0 @@ | ||
// Module included in the following assemblies: | ||
// | ||
// Configuring GitHub OAuth | ||
|
||
|
||
[id="configuring-github-oauth_{context}"] | ||
= Configuring GitHub OAuth | ||
|
||
OAuth for GitHub allows for automatic SSH key upload to GitHub. | ||
|
||
.Prerequisites | ||
|
||
* The `{orch-cli}` tool is available. | ||
|
||
.Procedure | ||
|
||
* Create a link:https://developer.github.com/apps/building-oauth-apps/creating-an-oauth-app[OAuth application in GitHub] using {prod-short} URL as the value for the application `Homepage URL` and {identity-provider} GitHub endpoint URL as the value for Authorization callback URL. The default values are `++https://++{prod-deployment}-{prod-namespace}.__<DOMAIN>__/` and `++https://++keycloak-{prod-namespace}.__<DOMAIN>__/auth/realms/{prod-deployment}/broker/github/endpoint` respectively, where `__<DOMAIN>__` is {orch-name} cluster domain. | ||
|
||
ifeval::["{project-context}" == "che"] | ||
* For {prod-short} deployed in multi-user mode: | ||
+ | ||
endif::[] | ||
|
||
. Create a new secret in the {orch-namespace} where {prod-short} is deployed. | ||
+ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
$ {orch-cli} apply -f - <<EOF | ||
kind: Secret | ||
apiVersion: v1 | ||
metadata: | ||
name: github-oauth-credentials | ||
namespace: <...> <1> | ||
labels: | ||
app.kubernetes.io/part-of: che.eclipse.org | ||
app.kubernetes.io/component: keycloak-secret | ||
annotations: | ||
che.eclipse.org/github-oauth-credentials: 'true' | ||
che.eclipse.org/mount-as: env | ||
che.eclipse.org/id_env-name: GITHUB_CLIENT_ID | ||
che.eclipse.org/secret_env-name: GITHUB_SECRET | ||
data: | ||
id: <...> <2> | ||
secret: <...> <3> | ||
type: Opaque | ||
EOF | ||
---- | ||
<1> {prod-short} namespace. The default is {prod-namespace} | ||
<2> base64 encoded GitHub OAuth Client ID | ||
<3> base64 encoded GitHub OAuth Client Secret | ||
|
||
. If {prod-short} was already installed wait until rollout of {identity-provider} component finishes. | ||
|
||
ifeval::["{project-context}" == "che"] | ||
+ | ||
|
||
* For {prod-short} deployed in single-user mode: | ||
. On {platforms-name}, update the deployment configuration (see xref:installation-guide:configuring-the-che-installation.adoc[] and xref:installation-guide:advanced-configuration-options-for-the-che-server-component.adoc#authentication-parameters[]). | ||
+ | ||
[subs=+quotes] | ||
---- | ||
CHE_OAUTH_GITHUB_CLIENTID=__<your-github-client-ID>__ | ||
CHE_OAUTH_GITHUB_CLIENTSECRET=__<your-github-secret>__ | ||
---- | ||
|
||
. In the *Authorization callback URL* field of the GitHub OAuth application, enter `__<prod-url__/api/oauth/callback`. | ||
+ | ||
[NOTE] | ||
==== | ||
* Substitute `_<prod-url>_` with the URL and port of the {prod-short} installation. | ||
* Substitute `_<your-github-client-ID>_` and `_<your-github-secret>_` with your GitHub client ID and secret. | ||
* This configuration only applies to single-user deployments of {prod-short}. | ||
==== | ||
endif::[] | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[id="configuring-github-oauth"] | ||
// = Configuring GitHub OAuth | ||
:navtitle: Configuring GitHub OAuth | ||
:keywords: end-user-guide, configuring-github-oauth | ||
:page-aliases: .:configuring-github-oauth | ||
|
||
include::partial$proc_configuring-github-oauth.adoc[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
modules/end-user-guide/partials/proc_configuring-github-oauth.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Module included in the following assemblies: | ||
// | ||
// Configuring GitHub OAuth | ||
|
||
|
||
[id="configuring-github-oauth_{context}"] | ||
= Configuring GitHub OAuth | ||
|
||
OAuth for GitHub allows for automatic SSH key upload to GitHub. | ||
|
||
.Procedure | ||
|
||
* Set up the link:https://developer.github.com/apps/building-oauth-apps/creating-an-oauth-app[GitHub OAuth client]. The *Authorization callback URL* is filled in the next steps. | ||
|
||
|
||
. Go to the {identity-provider} administration console and select the *Identity Providers* tab. | ||
. Select the *GitHub* identity provider in the drop-down list. | ||
. Paste the *Redirect URL* to the *Authorization callback URL* of the GitHub OAuth application. | ||
. Fill the *Client ID* and *Client Secret* from the GitHub oauth app. | ||
. Paste `repo,user,write:public_key` to the Default Scopes field. | ||
. Enable *Store Tokens*. | ||
. Save the changes of the Github Identity provider and click *Register application* in the GitHub oauth app page. | ||
ifeval::["{project-context}" == "che"] | ||
+ | ||
image::git/github-keycloak-setup.png[] | ||
|
||
* For {prod-short} deployed in single-user mode: | ||
. On {platforms-name}, update the deployment configuration (see xref:installation-guide:configuring-the-che-installation.adoc[] and xref:installation-guide:advanced-configuration-options-for-the-che-server-component.adoc#authentication-parameters[]). | ||
+ | ||
[subs=+quotes] | ||
---- | ||
CHE_OAUTH_GITHUB_CLIENTID=__<your-github-client-ID>__ | ||
CHE_OAUTH_GITHUB_CLIENTSECRET=__<your-github-secret>__ | ||
---- | ||
|
||
. In the *Authorization callback URL* field of the GitHub OAuth application, enter `__<prod-url__/api/oauth/callback`. | ||
+ | ||
[NOTE] | ||
==== | ||
* Substitute `_<prod-url>_` with the URL and port of the {prod-short} installation. | ||
* Substitute `_<your-github-client-ID>_` and `_<your-github-secret>_` with your GitHub client ID and secret. | ||
* This configuration only applies to single-user deployments of {prod-short}. | ||
==== | ||
endif::[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters