Post

Google Workspace as an external IdP for AWS IAM Identity Center

Introduction

Google Workspace (formerly known as GSuite) is a typical first service for companies embracing the cloud, especially startups. Google Workspace provides out-of-the-box services like email, calendar, file storage, and user identity. Google also provides a service called Google Cloud Service (GCP) for business logic or computing workloads; however, companies prefer to use other vendor offerings.

Then here comes Amazon Web Services (AWS), one of the prominent cloud computing vendors with various service offerings. The challenge is using the user identity from Google Workspace to use Amazon Web Services (AWS).

In this post, we walk you through setting up the Google Workspace IdP for the AWS IAM Identity Center.

Authentication Flow Diagram

Authentication Flow Diagram Authentication Flow Diagram

Created with mermaid.js

How the Authentication Works

  1. A user with a Google Workspace account opens the link AWS access portal URL for an AWS Organization with AWS IAM Identity Center enabled.
  2. The user will be redirected to Google Workspace if not yet authenticated; the user will log in using the Google Workspace account.
  3. A response created if successfully logged in and sent to AWS IAM Identity Center contains SAML assertion, the Authentication, Authorization, and User Profiles.
  4. The response from AWS IAM Identity Center determines the user to use the portal, and successful login shows.
  5. The user can select the AWS Organization Account and Permission Set on the AWS user portal page.

Prepare the AWS IAM Identity Center

AWS Organization

For initially setting AWS Account, enable or create first the AWS Organization.

From the Account Menu (upper right corner of AWS Console, which appears to be your Account Name), open the Organization.

Create an Organization Create an Organization

If the organization successfully enabled or created, you will list your AWS Accounts; for now, we have the main account.

Organization Created Organization Created

AWS IAM Identity Center

Enable the AWS IAM Identity Center.

From the Services Menu (upper left corner of AWS Console, next to the AWS Logo), select Security, Identity, & Compliance and open the IAM Identity Center (successor to AWS Single Sign-On)

Enable the IAM Identity Center Enable the IAM Identity Center

Configure the AWS IAM Identity Center

Once enabled, select the Choose your identity source.

Enabled the IAM Identity Center Enabled the IAM Identity Center

Change the Identity Source

By default, AWS uses the Internal Identity as the source.

Change the IAM Identity Center Identity Source Change the IAM Identity Center Identity Source

Choose identity source

Choose the External identity provider as our new source.

Choose Identity Source Choose Identity Source

Configure external identity provider

Download the metadata file or take note of the IdP metadata, as we will use it later on Google Workspace Custom SAML App.

Configure external identity provider Configure external identity provider

Let’s partially move to Google Workspace for Custom SAML App.

Google Workspace Custom SAML App

Add Custom SAML App

From the Google Workspace Admin Console, select the Apps, then open the Web and mobile apps.

Select the Add custom SAML app from the Add app menu.

Add Custom SAML App Add Custom SAML App

Google App Details

Provide meaningful details for the app.

Custom SAML App Details Custom SAML App Details

Google Identity Provider Details

Download the Google Workspace IdP metadata or take note of the IdP details as we will use it to complete the configuration for AWS external identity provider.

Download IdP Metadata Download IdP Metadata

Google Service Provider Details

From the AWS external identity provider, downloaded IdP metadata provides the following details as our service provider.

Service Provider Details Service Provider Details

Finish the Custom SAML App Creation

Skip the attribute mapping and finish the custom SAML App creation.

Finish the Custom SAML App Creation Finish the Custom SAML App Creation

Custom SAML App Configuration

Configure the application User access.

Custom SAML App Configuration Custom SAML App Configuration

User Access Settings

Change the service status ON for everyone.

User Access Settings User Access Settings

Let’s move back to AWS’s external identity provider configuration.

Finalized the configuration for the external identity provider

Provide the Google Workspace Custom SAML app downloaded IdP Metadata as our AWS IdP provider to establish trust.

IdP Metadata IdP Metadata

Confirm the configuration for the external identity provider.

Review the changes, and confirm with ACCEPT to complete the change IdP source.

Configure IdP Configure IdP

Manage IAM Identity Center Accounts

Groups and Users

To test if the External IdP setup works, create groups and users based on the Google Workspace directory.

Create a Group

Create a Group Create a Group

Group Name Group Name

Group Created Group Created

Create a User

Create a User Create a User

Specify User Details Specify User Details

Add User to Group Add User to Group

Review and add user Review and add user

User created User created

Permission Sets

Create a set of permissions to serve as a role for the group of users and the policy attached to it.

Create Permission Set Create Permission Set

Permission Set Type Permission Set Type

Permission Set Details Permission Set Details

Permission Set Review Permission Set Review

Permission Set Created Permission Set Created

AWS Organizations Accounts

Select Organization Select Organization

Assign users or groups Assign users or groups

Select Group Select Group

Select Permission Set Select Permission Set

Submit assignments Submit assignments

Organization Assignments Organization Assignments

Login to AWS Console with Google Workspace Credential

AWS access portal URL https://d-xxxxxxxxxx.awsapps.com/start

Google Login

Google Login Google Login

AWS IAM Identity

AWS IAM Identity AWS IAM Identity

AWS Management Console

AWS Management Console AWS Management Console

We now have a fully working External IdP provided by Google Workspace Directory for our AWS Users.

This post is licensed under CC BY 4.0 by the author.