How to setup GitHub IdP for OpenShift Container Platform?

Step 1: Register a new OAuth application

Go to your GitHub Organisation -> Settings -> Developer Settings -> OAuth Apps -> Register a new OAuth application.

Provide the required details

  1. Homepage URL: you can get the homepage url by executing the command
    “oc get routes oauth-openshift -n openshift-authentication”
  2. Authorization Callback URL: <Homepage URL>/oauth2callback/<idp-providername>, in this case it can be derived as
    “<Homepage URL>/oauth2callback/githubidp”

4. Register the application.

Create a secret on your cluster to store the OAuth Client ID and Secret

Update the OpenShift OAuth resource by providing GitHub OAuthClient details

kind: OAuth
name: cluster
— name: githubidp
mappingMethod: claim
type: GitHub
clientID: <you can get this from github oauth app you created>
name: github-secret
— <your-org-name-in-github>

Refresh your browser or open a new one and login back to your OpenShift Console.



Just another geek who believes in sharing :)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store