Amazon QuickSight is a scalable, serverless, embeddable, machine learning (ML)-powered business intelligence (BI) service built for the cloud that supports identity federation in both Standard and Enterprise editions. Organizations are working towards centralizing their identity and access strategy across all of their applications, including on-premises, third-party, and applications on AWS. Many organizations use Google Workspace to control and manage user authentication and authorization centrally. You can enable federation to QuickSight accounts without needing to create and manage users. This authorizes users to access QuickSight assets—analyses, dashboards, folders, and datasets—through centrally managed Google Workspace Identities.
In this post, we go through the steps to configure federated single sign-on (SSO) between a Google Workspace instance and QuickSight account. We demonstrate registering an SSO application in Google Workspace, and map QuickSight roles (admin, author, and reader) to Google Workspace Identities. These QuickSight roles represent three different personas supported in QuickSight. Administrators can publish the QuickSight app in a Google Workspace Dashboard to enable users to SSO to QuickSight using their Google Workspace credentials.
In your organization, the portal is typically a function of your identity provider (IdP), which handles the exchange of trust between your organization and QuickSight.
On the Google Workspace Dashboard, you can review a list of apps. This post shows you how to configure the custom app for AWS.
The user flow consists of the following steps:
- The user logs in to your organization’s portal and chooses the option to go to the QuickSight console.
- The portal verifies the user’s identity in your organization.
- The portal generates a SAML authentication response that includes assertions that identify the user and include attributes about the user. The portal sends this response to the client browser. Although not discussed here, you can also configure your IdP to include a SAML assertion attribute called SessionDuration that specifies how long the console session is valid.
- The client browser is redirected to the AWS single sign-on endpoint and posts the SAML assertion.
- The endpoint requests temporary security credentials on behalf of the user, and creates a QuickSight sign-in URL that uses those credentials.
- AWS sends the sign-in URL back to the client as a redirect.
- The client browser is redirected to the QuickSight console. If the SAML authentication response includes attributes that map to multiple AWS Identity and Access Management (IAM) roles, the user is first prompted to select the role for accessing the console.
The following diagram illustrates the solution architecture.
The following are the high-level steps to set up federated single sign-on access via Google Workspace:
- Download the Google IdP information.
- Create an IAM IdP with Google as SAML IdP.
- Configure IAM policies for QuickSight roles.
- Configure IAM QuickSight roles for federated users.
- Create a custom user attribute in Google Workspace.
- Add the AWS SAML attributes to your Google Workspace user profile.
- Set up the AWS SAML app in Google Workspace.
- Grant access to users in Google Workspace.
- Verify federated access to your QuickSight instance.
Detailed procedures for each of these steps comprise the remainder of this post.
For this walkthrough, you should have the following prerequisites:
- A Google Workspace subscription
- An AWS account with QuickSight subscription
- Basic understanding of QuickSight roles—admin, author, and reader
- Basic understanding of IAM and privileges required to create an IAM identity provider, roles, policies, and users
Download the Google IdP information
First, let’s get the SAML metadata that contains essential information to enable your AWS account to authenticate the IdP and locate the necessary communication endpoint locations. Complete the following steps:
- Log in to the Google Workspace Admin console.
- On the Admin console home page, under Security in the navigation pane, choose Authentication and SSO with SAML applications.
- Under IdP metadata, choose Download Metadata.
Create an IAM IdP with Google as SAML IdP
You now configure Azure AD as your SAML IdP via the IAM console. Complete the following steps:
- On the IAM console, choose Identity providers in the navigation pane.
- Choose Add provider.
- For Configure provider, select SAML.
- For Provider name, enter a name for the IdP (such as
- For Metadata document, choose Choose file and specify the SAML metadata document that you downloaded.
- Choose Add provider.
- Document the Amazon Resource Name (ARN) by viewing the IdP you just created.
The ARN should looks similar to
arn:aws:iam::<YOURACCOUNTNUMBER>:saml-provider/Google. We need this ARN to configure claim rules later in this post.
Configure IAM policies for QuickSight roles
In this step, we create three IAM policies for different role permissions in QuickSight:
Use the following steps to set up the
QuickSight-Federated-Admin policy. This policy grants admin privileges in QuickSight to the federated user:
- On the IAM console, choose Policies.
- Choose Create policy.
- Choose JSON and replace the existing text with the following code:
- Choose Review policy.
- For Name, enter
- Choose Create policy.
- Repeat these steps to create
QuickSight-Federated-Author, and use the following policy to grant author privileges in QuickSight to the federated user:
- Repeat the steps to create
QuickSight-Federated-Reader, and use the following policy to grant reader privileges in QuickSight to the federated user:
Configure IAM QuickSight roles for federated users
Next, create the roles that Google IdP users assume when federating into QuickSight. The following steps set up the admin role:
- On the IAM console, choose Roles in the navigation pane.
- Choose Create role.
- For Trusted entity type, choose SAML 2.0 federation.
- For SAML provider, choose the provider you created earlier (
- For Attribute, choose SAML:aud.
- For Value, enter
- Choose Next.
- On the Add permissions page, select the
QuickSight-Federated-AdminIAM policy you created earlier.
- Choose Next.
- For Role name, enter
- For Role description, enter a description.
- Choose Create role.
- On the IAM console, in the navigation pane, choose Roles.
- Choose the
QuickSight-Admin-Rolerole you created to open the role’s properties.
- On the Trust relationships tab, choose Edit trust relationship.
- Under Trusted entities, verify that the IdP you created is listed.
Condition, verify that
SAML:audwith a value of
- Repeat these steps to create author and reader roles and attach the appropriate policies:
- Navigate to the newly created roles and note the ARNs for them.
We use these ARNs to configure claims rules later in this post. They are in the following format:
Create a custom user attribute in Google Workspace
Now let’s create a custom user attribute in your Google Workspace. This allows us to add the SAML attributes that the AWS Management Console expects in order to allow a SAML-based authentication.
- Log in to Google Admin console with admin credentials.
- Under Directory, choose Users.
- On the More options menu, choose Manage custom attributes.
- Choose Add Custom Attribute.
- For Select type of trusted entity, choose SAML 2.0 federation.
- Configure the custom attribute as follows:
- Category: Amazon
- Description: Amazon Custom Attributes
- For Custom fields, enter the following:
- Info type: Text
- Visibility: Visible to user and admin
- No. of values: Multi-value
- Choose Add.
The new category appears on the Manage user attributes page.
Add the AWS SAML attributes to the Google Workspace user profile
Now that we have configured a custom user attribute, let’s add the SAML attributes that we noted earlier to the Google Workspace user profile.
- While logged in to the Google Admin console with admin credentials, navigate to the Users page.
- In the Users list, find the user. If you need help, see Find a user account.
- Choose the user’s name to open their account page.
- Choose User information.
- Choose custom attribute you recently created, named Amazon.
- Add a value to this custom attribute noted earlier in the following format:
<AWS Role ARN>,
<AWS provider/IdP ARN>.
- Choose Save.
Set up the AWS SAML app in Google Workspace
Now that we have everything in place, we’re ready to create a SAML app within our Google Workspace account and provide the QuickSight instance starting URL. This provides the entry point for Google Workspace users to SSO into the QuickSight instance.
- While logged in to Google Admin console with admin credentials, under Apps, choose Web and mobile apps.
- Choose Add App, and Search for apps.
Amazon Web Servicesin the search field.
- In the search results, hover over the Amazon Web Services SAML app and choose Select.
- On the Google Identity Provider details page, choose Continue.
- On the Service provider details page, the ACS URL and Entity ID values for Amazon Web Services are configured by default.
- For Start URL, enter
- On the Attribute Mapping page, choose the Select field menu and map the following Google directory attributes to their corresponding Amazon Web Services attributes:
Google Directory Attribute Amazon Web Services Attribute Basic Information > Primary Email https://aws.amazon.com/SAML/Attributes/RoleSessionName Amazon > Role https://aws.amazon.com/SAML/Attributes/Role
- Choose Finish.
Grant access to users in Google Workspace
When the SAML app is created in Google workspace, it’s turned off by default. This means for users logged in to their Google Workspace account, the SAML app isn’t visible to them. We now enable the AWS SAML app to your Google Workspace users.
- While logged in to the Google Admin console with admin credentials, navigate to the Web and mobile apps page.
- Choose Amazon Web Services.
- Choose User access.
- To turn on a service for everyone in your organization, choose ON for everyone.
- Choose Save.
If you don’t want to activate this application for all users, you can alternatively grant access to a subset of users by using Google Workspace organizational units.
Verify federated access to the QuickSight instance
To test your SAML 2.0-based authentication with QuickSight for users in your existing IDP (Google Workspace), complete the following steps:
- Open a new browser session, for example, using Chrome, in a new incognito window.
- Log in to your Google Workspace account (for the purpose of this demo, we use the Google Workspace admin account).
- Choose Amazon Web Services from the list of Google apps.
This post provided a step-by-step guide for configuring Google Workspace as your IdP, and using IAM roles to enable SSO to QuickSight. Now your users have a seamless sign-in experience to QuickSight and have the appropriate level of access related to their role.
Although this post demonstrated the integration of IAM and Google Workspace, you can replicate this solution using your choice of SAML 2.0 IdPs. For other supported federation options, see Using identity federation and single sign-on (SSO) with Amazon QuickSight.
To get answers to your questions related to QuickSight, refer to the QuickSight Community.
If you have any questions or feedback, please leave a comment.
About the Authors
Sriharsh Adari is a Senior Solutions Architect at Amazon Web Services (AWS), where he helps customers work backwards from business outcomes to develop innovative solutions on AWS. Over the years, he has helped multiple customers on data platform transformations across industry verticals. His core area of expertise include Technology Strategy, Data Analytics, and Data Science. In his spare time, he enjoys playing sports, binge-watching TV shows, and playing Tabla.
Srikanth Baheti is a Specialized World Wide Sr. Solution Architect for Amazon QuickSight. He started his career as a consultant and worked for multiple private and government organizations. Later he worked for PerkinElmer Health and Sciences & eResearch Technology Inc, where he was responsible for designing and developing high traffic web applications, highly scalable and maintainable data pipelines for reporting platforms using AWS services and Serverless computing.