Skip to content

Instantly share code, notes, and snippets.

@mrajashree
Last active August 6, 2019 17:28
Show Gist options
  • Save mrajashree/9dc4cd8e11a9e813a96e713964c74ca9 to your computer and use it in GitHub Desktop.
Save mrajashree/9dc4cd8e11a9e813a96e713964c74ca9 to your computer and use it in GitHub Desktop.

UI has instructions for the steps up to register your rancher server domain and creating the OAuth credentials. These are the steps for generating the service account credential file:

  1. Be logged in to your gsuite domain as the admin
  2. Navigate to Service accounts page: https://console.developers.google.com/iam-admin/serviceaccounts
  3. Create a service account.
    Create Service account - page 1

Screen Shot 2019-08-06 at 10 03 03 AM

Create Service account - page 2- no need to specify roles
Screen Shot 2019-08-06 at 10 03 20 AM

Create Service account - page 3- create JSON key
Screen Shot 2019-08-06 at 10 03 30 AM

The key created gets downloaded as json file, this is what you will provide in the Service Account Credentials textbox in UI

Get service account key's unique ID
This is a numeric key, if it's not displayed in the list of keys right next to the one you created, you will have to enable it to be listed by doing the following
Screen Shot 2019-08-06 at 10 04 13 AM
Unique ID must be clicked, and then click on OK. This will add a column to the list of service account keys for Unique ID. Save the one listed for the service account you created.

  1. Go to Manage OAuth client access page: https://admin.google.com/AdminHome?chromeless=1#OGX:ManageOauthClients
    Add the Unique ID obtained in previous step as Client Name, and add these scopes for One or More API Scopes:
openid,profile,email,https://www.googleapis.com/auth/admin.directory.user.readonly,https://www.googleapis.com/auth/admin.directory.group.readonly

Click on Authorize.

Once all this is done, use the service account json file and oauth credentials json files downloaded earlier to set up auth

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment