Chapter 5. Configuring OAuth authorization
This section describes how to connect Red Hat CodeReady Workspaces as an OAuth application to supported OAuth providers.
5.1. Configuring GitHub OAuth
OAuth for GitHub allows for automatic SSH key upload to GitHub.
Procedure
Set up the GitHub OAuth client. The Authorization callback URL is filled in the next steps.
- Go to the RH-SSO 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.
5.2. Configuring OpenShift OAuth
For users to interact with OpenShift, they must first authenticate to the OpenShift cluster. OpenShift OAuth is a process in which users prove themselves to a cluster through an API with obtained OAuth access tokens.
Authentication with the Chapter 8, OpenShift Connector overview is a possible way for CodeReady Workspaces users to authenticate with an OpenShift cluster.
The following section describes the OpenShift OAuth configuration options and its use with a CodeReady Workspaces.
Prerequisites
-
The
oc
tool is available. -
crwctl
management tool is available. See https://access.redhat.com/documentation/en-us/red_hat_codeready_workspaces/2.5/html-single/installation_guide/index#installing-the-crwctl-management-tool. - Openshift identity providers are configured on the cluster. See the Understanding identity provider configuration
Procedure
-
OpenShift OAuth will be enabled by default, deploy CodeReady Workspaces using OperatorHub or the crwctl, see the
crwctl server:deploy
specification chapter.