-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Instructions for OpenShift OAuth provider (#1076)
* Instructions for OpenShift OAuth provider Signed-off-by: Igor Vinokur <ivinokur@redhat.com> * fixup! Instructions for OpenShift OAuth provider * fixup! Instructions for OpenShift OAuth provider * Update src/main/pages/che-7/end-user-guide/assembly_configuring-openshift-oauth.adoc * Update src/main/pages/che-7/end-user-guide/proc_managing-pull-requests-using-the-github-pr-plug-in.adoc * Update src/main/pages/che-7/end-user-guide/assembly_configuring-openshift-oauth.adoc Co-authored-by: Fabrice Flore-Thébault <ffloreth@redhat.com>
- Loading branch information
Showing
6 changed files
with
107 additions
and
4 deletions.
There are no files selected for viewing
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
10 changes: 9 additions & 1 deletion
10
...-guide/proc_configuring-github-oauth.adoc → ...de/assembly_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
24 changes: 24 additions & 0 deletions
24
src/main/pages/che-7/end-user-guide/assembly_configuring-oauth-authorization.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,24 @@ | ||
--- | ||
title: Configuring OAuth authorization | ||
keywords: | ||
tags: [] | ||
sidebar: che_7_docs | ||
permalink: che-7/configuring-oauth-authorization/ | ||
folder: che-7/end-user-guide | ||
summary: | ||
--- | ||
|
||
:parent-context-of-configuring-oauth-authorization: {context} | ||
|
||
[id='configuring-oauth-authorization'] | ||
= Configuring OAuth authorization | ||
|
||
:context: configuring-oauth-authorization | ||
|
||
This section describes how to connect {prod} as an OAuth application to supported OAuth providers. | ||
|
||
* link:{site-baseurl}che-7/configuring-github-oauth[Configuring GitHub OAuth] | ||
|
||
* link:{site-baseurl}che-7/configuring-openshift-oauth[Configuring OpenShift OAuth] | ||
|
||
:context: {parent-context-of-configuring-oauth-authorization} |
61 changes: 61 additions & 0 deletions
61
src/main/pages/che-7/end-user-guide/assembly_configuring-openshift-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,61 @@ | ||
--- | ||
title: Configuring OpenShift OAuth | ||
keywords: | ||
tags: [] | ||
sidebar: che_7_docs | ||
permalink: che-7/configuring-openshift-oauth/ | ||
folder: che-7/end-user-guide | ||
summary: | ||
--- | ||
|
||
[id="configuring-openshift-oauth_{context}"] | ||
= Configuring OpenShift OAuth | ||
|
||
OAuth for OpenShift allows to obtain OpenShift token. | ||
|
||
.Procedure | ||
|
||
. Register Che 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"] | ||
---- | ||
$ oc create -f <(echo ' | ||
kind: OAuthClient | ||
apiVersion: oauth.openshift.io/v1 | ||
metadata: | ||
name: che | ||
secret: "<random set of symbols>" | ||
redirectURIs: | ||
- "<Che api url>/oauth/callback" | ||
grantMethod: prompt | ||
') | ||
---- | ||
. Add the OpenShift SSL certificate to the Che Java trust store. | ||
.. Export the OpenShift SSL certificate to `ca.crt` file. | ||
.. Create a *configMap* with the certificate. | ||
+ | ||
==== | ||
[subs="+quotes"] | ||
---- | ||
oc create configmap custom-public-cert --from-file=ca.crt -n che | ||
---- | ||
==== | ||
. Update the OpenShift deployment configuration | ||
(see link:{site-baseurl}che-7/advanced-configuration-options/#che-configmaps-and-their-behavior_advanced-configuration-options[Che configMaps and their behavior], | ||
link:{site-baseurl}che-7/advanced-configuration-options/#che-installed-using-a-helm-chart[Che installed using a Helm Chart]). | ||
+ | ||
==== | ||
[subs="+quotes"] | ||
---- | ||
CHE_OAUTH_OPENSHIFT_CLIENTID: <client-id> | ||
CHE_OAUTH_OPENSHIFT_CLIENTSECRET: <openshift-secret> | ||
CHE_OAUTH_OPENSHIFT_OAUTH__ENDPOINT: <oauth-endpoint> | ||
CHE_OAUTH_OPENSHIFT_VERIFY__TOKEN__URL: <verify-token-url> | ||
---- | ||
==== | ||
* <client-id> a name specified in the OpenShift OAuthClient. | ||
* <openshift-secret> a secret specified in the OpenShift OAuthClient. | ||
* <oauth-endpoint> the url of the OpenShift oauth service: | ||
** For OpenShift 3 specify the OpenShift master url. | ||
** For OpenShift 4 specify the `oauth-openshift` route. | ||
* <verify-token-url> request url that is used to verify the token. `<OpenShift master url>/api` can be used for OpenShift 3 and 4. |
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