이 콘텐츠는 선택한 언어로 제공되지 않습니다.

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.

    1. Go to the RH-SSO administration console and select the Identity Providers tab.
    2. Select the GitHub identity provider in the drop-down list.
    3. Paste the Redirect URI to the Authorization callback URL of the GitHub OAuth application.
    4. Fill the Client ID and Client Secret from the GitHub oauth app.
    5. Enable Store Tokens.
    6. 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 OpenShift connector plugin 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 OpenShift command-line tool, oc is installed.

Procedure

To enable OpenShift OAuth automatically, deployed CodeReady Workspaces using the crwctl with the --os-oauth option. See the crwctl server:start specification chapter.

  • For CodeReady Workspaces deployed in single-user mode:

    1. Register CodeReady Workspaces OAuth client in OpenShift. See the Register an OAuth client in OpenShift chapter.

      $ oc create -f <(echo '
      kind: OAuthClient
      apiVersion: oauth.openshift.io/v1
      metadata:
       name: che
      secret: "<random set of symbols>"
      redirectURIs:
       - "<CodeReady Workspaces api url>/oauth/callback"
      grantMethod: prompt
      ')
      Copy to Clipboard Toggle word wrap
    2. Add the OpenShift SSL certificate to the CodeReady Workspaces Java trust store.

    3. Update the OpenShift deployment configuration.

      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>
      Copy to Clipboard Toggle word wrap
      • <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.
      • See CodeReady Workspaces configMaps and their behavior.
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat