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

Align oauth documentation for to the delegated auth mode #1199

Merged
merged 16 commits into from
Apr 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
263f60c
Align oauth documentation for to the delegated auth mode
vinokurig Apr 6, 2020
93acb8f
merge wit master
vinokurig Apr 6, 2020
19b0021
Update src/main/pages/che-7/end-user-guide/assembly_configuring-githu…
vinokurig Apr 6, 2020
1aac634
Update src/main/pages/che-7/end-user-guide/assembly_configuring-githu…
vinokurig Apr 6, 2020
812f90a
Update src/main/pages/che-7/end-user-guide/assembly_configuring-githu…
vinokurig Apr 6, 2020
60ac0bc
Update src/main/pages/che-7/end-user-guide/assembly_configuring-githu…
vinokurig Apr 6, 2020
cb4ebc1
Update src/main/pages/che-7/end-user-guide/assembly_configuring-githu…
vinokurig Apr 6, 2020
5ba38fc
Update src/main/pages/che-7/end-user-guide/assembly_configuring-opens…
vinokurig Apr 6, 2020
2b8fce7
Update src/main/pages/che-7/end-user-guide/assembly_configuring-opens…
vinokurig Apr 6, 2020
9cae775
Update src/main/pages/che-7/end-user-guide/assembly_configuring-opens…
vinokurig Apr 6, 2020
efdb463
Update src/main/pages/che-7/extensions/proc_authenticating-with-opens…
vinokurig Apr 6, 2020
f01133b
Update src/main/pages/che-7/extensions/proc_authenticating-with-opens…
vinokurig Apr 6, 2020
a780f05
Update src/main/pages/che-7/end-user-guide/assembly_configuring-githu…
vinokurig Apr 6, 2020
f730ce6
Update src/main/pages/che-7/end-user-guide/assembly_configuring-githu…
vinokurig Apr 6, 2020
fb3dd54
Update src/main/pages/che-7/end-user-guide/assembly_configuring-githu…
vinokurig Apr 6, 2020
1e5c22b
fixup! Align oauth documentation for to the delegated auth mode
vinokurig Apr 6, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added src/main/images/git/github-keycloak-setup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/main/images/git/github-provider-added.png
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,38 @@ summary:
[id="configuring-github-oauth_{context}"]
= Configuring GitHub OAuth

OAuth for GitHub allows users to clone projects using SSH addresses (git@) and push to repositories.
OAuth for GitHub allows for automatic SSH key upload to GitHub.

.Procedure

To enable automatic SSH key upload to GitHub for users:
* 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.

. On *github.com*, click your user icon (top right).
. Go to *Settings* > *Developer settings* > *OAuth Apps*.
. Click the btn:[Register a new application] button.
. In the *Application name* field, enter, for example, `{prod}`.
. In the *Homepage URL* field, enter `{prod-url}`.
. In the *Authorization callback URL* field, enter `{prod-url}/api/oauth/callback`.
* For {prod-short} deployed in link:{site-baseurl}/che-7/running-che-locally/#deploying-multi-user-che-in-multi-user-mode[multi-user mode]:
. Go to the Keycloak administration console and select the *Identity Providers* tab.
. Select the *GitHub* identity provider in the drop-down list.
. Paste the *Redirect URI* to the *Authorization callback URL* of the GitHub OAuth application.
. Fill the *Client ID* and *Client Secret* from the GitHub oauth app.
. Enable *Store Tokens*.
. Save the changes of the Github Identity provider and click *Register application* in the GitHub oauth app page.
+
image::git/github_oauth.png[]
image::git/github-keycloak-setup.png[]

* If {prod-short} is deployed in single-user mode
ifeval::["{project-context}" == "che"]
. On OpenShift or Kubernetes, update the deployment configuration (see link:{site-baseurl}che-7/openshift-config.html[OpenShift configuration]).
. On OpenShift or Kubernetes, update the deployment configuration (see link:{site-baseurl}che-7/advanced-configuration-options/#che-configmaps-and-their-behavior_advanced-configuration-options[{prod-short} configMaps and their behavior],
link:{site-baseurl}che-7/advanced-configuration-options/#che-installed-using-a-helm-chart[{prod-short} installed using a Helm Chart]).
+
[subs=+quotes]
----
CHE_OAUTH_GITHUB_CLIENTID=__<your-github-client-id>__
CHE_OAUTH_GITHUB_CLIENTSECRET=__<your-github-secret>__
----
endif::[]
Copy link

Choose a reason for hiding this comment

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

Return the end of the condition, please.


. 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 your {prod-short} installation.
* 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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@ summary:
[id="configuring-openshift-oauth_{context}"]
= Configuring OpenShift OAuth

OAuth for OpenShift allows to obtain OpenShift token.
OAuth for OpenShift allows to authenticate the link:{site-baseurl}/che-7/openshift-connector-overview/[OpenShift connector plugin] in {prod-short}.

.Procedure

* For {prod-short} deployed in link:{site-baseurl}/che-7/running-che-locally/#deploying-multi-user-che-in-multi-user-mode[multi-user mode]:
+
To enable OpenShift OAuth automatically, {prod-short} should be deployed with the `--os-oauth` option (see link:https://github.com/che-incubator/chectl#chectl-serverstart[chectl server:start specification]).
* For {prod-short} deployed in single-user mode:
. Register {prod-short} OAuth client in OpenShift (see link:https://docs.openshift.com/container-platform/4.3/authentication/configuring-internal-oauth.html#oauth-register-additional-client_configuring-internal-oauth[Register an OAuth client in OpenShift]).
+
[subs="+quotes,+attributes"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Before the user can develop and push Components from {prod-short}, they need to

OpenShift Connector offers the following methods for logging in to the OpenShift Cluster from the {prod-short} instance:

* Using the notification that asks to log in to the OpenShift cluster where {prod-short} is deployed to.
* Using the btn:[Log in to the cluster] button.
* Using the Command Palette.

Expand All @@ -28,6 +29,7 @@ When using a local instance of OpenShift (such as CodeReady Containers or Minish
* A running instance of {prod-short}. To install an instance of {prod-short}, see link:{site-baseurl}che-7/che-quick-starts/[{prod-short} quick-starts].
* A {prod-short} workspace has been created.
* The OpenShift Connector plug-in is installed.
* The OpenShift OAuth provider is configured (only for the auto-login to the OpenShift cluster where {prod-short} is deployed. See link:{site-baseurl}/che-7/configuring-openshift-oauth/[Configuring OpenShift OAuth]).

.Procedure

Expand Down