Google OAuth Provider

Portainer Business can be connected to Google OAuth provider in an easy way without need to understand complex configuration.

Requirements

You will need to have the following info handy before configuring OAuth using Google Provider.

  • Client ID: Public identifier of the OAuth Application.
  • Client Secret: The secret of this client.

You can obtain these details by following the steps below:

  1. Login to your Google Cloud Portal (console.cloud.google.com) as an Admin Google Cloud Portal

  2. Click on “Select Project”, then select your Org, and then select “NEW PROJECT” Google Cloud Portal

  3. Give the project a name, such as portainer-login, and then click “Create” Google Cloud Portal

  4. Wait for the project to be created (30 seconds), and then click on the navigation bar, and select “APIs & Services”, Credentials. Google Cloud Portal Select the drop down list in the header bar, and change the focus to the “portainer-login” project Google Cloud Portal Google Cloud Portal

  5. Click on “OAuth consent screen” Change the application type to “Internal” In the “Application name” input box, enter the project name “portainer-login” Scroll down to authorised domains, and enter in the FQDN of the server that hosts your Portainer instance (in our case, test.portainer.io) Google Cloud Portal Google Cloud Portal Click Save.

  6. Click on “Credentials”, and then “OAuth Client ID” Google Cloud Portal Select “Web Application” as the Application Type, In the “Name” input box, enter the project name “portainer-login” In the “Javascript Origins” and “Redirect URI” text boxes, enter in the FDQN and Port of your Portainer instance Google Cloud Portal Click “Create” You will now be presented with your API tokens, copy Client ID and Client Secret for later use (note be careful with trailing spaces as the auto-copy adds a trailing space, which breaks things) Google Cloud Portal

Configuration

To start to configure Google OAuth Provider, once you logged to Portainer, click Settings and then authentication. After that, select OAuth option and then, select Google.

Define the following information and click Save settings.

  • Client ID
  • Client Secret

oauth

Manage access to OAuth Team and Users

To understand how to enable access to OAuth Teams and Users, please, refer to this article.

Notes

Contribute to these docs