Google SSO Token¶
Integrating Google SSO with Blotout requires App registration on Google Console to get the Client ID and Secret Token.
OAuth Reference Link - https://developers.google.com/identity/protocols/oauth2
Generating Client ID and Secret Token¶
Follow the below steps to get the Client ID and Secret Token 1. Go to the URL https://console.developers.google.com/
-
First Create a new Project
-
Click on Oauth Consent Screen and select the type of users
-
Fill below details and provide the whitelist domain details under Authorized domains section and save
-
Add scope for email,profile and openid
-
Click on Create Credentials Menu and then choose OAuth Client ID (showing below)
-
Choose the Web Application as below
-
Add the Application URL - http://
/api/google/v1/callback in Authorized redirect URIs and click on Create to get the Client Id and Client Secret.
Attaching SSO to Terraform cloud¶
In this step we will attach the above generated credentials to terraform cloud API
- Head over to Terraform cloud.
- Go inside your organization and head over to the variable set.
-
Create a variable-set named
google-sso
. This will be the place where we will add our credentials.Note
The variable set
google-sso
might already exist. -
Following variable are to be added alongwith the values generated in the above step. Check here on how to add variables to variable set.
google_client_id
(sensitive)- Client IDgoogle_client_secret
(sensitive) - Client secret
-
Attach the above variable set to the workspace
<ENV>-app
(For e.g. IfENV
isprod
then workspace will beprod-app
). Check here on how to attach variable set to workspace. - Run the workspace.