Amazon Quick Sight 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 Quick Sight accounts without needing to create and manage users. This authorizes users to access Quick Sight 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 Quick Sight account. We demonstrate registering an SSO application in Google Workspace, and map Quick Sight roles (admin, author, and reader) to Google Workspace Identities. These Quick Sight roles represent three different personas supported in Quick Sight. Administrators can publish the Quick Sight app in a Google Workspace Dashboard to enable users to SSO to Quick Sight using their Google Workspace credentials.
Solution overview
In your organization, the portal is typically a function of your identity provider (IdP), which handles the exchange of trust between your organization and Quick Sight.
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 Quick Sight 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 Quick Sight 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 Quick Sight 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 Quick Sight roles.
- Configure IAM Quick Sight 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 Quick Sight instance.
Detailed procedures for each of these steps comprise the remainder of this post.
Prerequisites
For this walkthrough, you should have the following prerequisites:
- A Google Workspace subscription
- An AWS account with Quick Sight subscription
- Basic understanding of Quick Sight 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 Google).
- 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::. We need this ARN to configure claim rules later in this post.
Configure IAM policies for Quick Sight roles
In this step, we create three IAM policies for different role permissions in Quick Sight:
- Quick Sight-Federated-Admin
- Quick Sight-Federated-Author
- Quick Sight-Federated-Reader
Use the following steps to set up the Quick Sight-Federated-Admin policy. This policy grants admin privileges in Quick Sight 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 Quick Sight-Federated-Admin.
- Choose Create policy.
- Repeat these steps to create Quick Sight-Federated-Author, and use the following policy to grant author privileges in Quick Sight to the federated user:
- Repeat the steps to create Quick Sight-Federated-Reader, and use the following policy to grant reader privileges in Quick Sight to the federated user:
Configure IAM Quick Sight roles for federated users
Next, create the roles that Google IdP users assume when federating into Quick Sight. 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 (Google).
- For Attribute, choose SAML:aud.
- For Value, enter https://signin.aws.amazon.com/saml.
- Choose Next.
  
- On the Add permissions page, select the Quick Sight-Federated-AdminIAM policy you created earlier.
- Choose Next.
  
- For Role name, enter Quick Sight-Admin-Role.
- For Role description, enter a description.
- Choose Create role.
  
- On the IAM console, in the navigation pane, choose Roles.
- Choose the Quick Sight-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.
- Under Condition, verify thatSAML:audwith a value ofhttps://signin.aws.amazon.com/samlis present.
- 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:
- arn:aws:iam::- :role/Quick Sight-Admin-Role 
- arn:aws:iam::- :role/Quick Sight-Author-Role 
- arn:aws:iam::- :role/Quick Sight-Reader-Role 
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: 
  - Name: Role
- Info type: Text
- Visibility: Visible to user and admin
- No. of values: Multi-value
 
- Name: 
- 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: - 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 Quick Sight instance starting URL. This provides the entry point for Google Workspace users to SSO into the Quick Sight 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.
- Enter 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 https://quicksight.aws.amazon.com.
  
- 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 Quick Sight instance
To test your SAML 2.0-based authentication with Quick Sight 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.
  
Conclusion
This post provided a step-by-step guide for configuring Google Workspace as your IdP, and using IAM roles to enable SSO to Quick Sight. Now your users have a seamless sign-in experience to Quick Sight 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 Quick Sight.
To get answers to your questions related to Quick Sight, refer to the Quick Sight 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.
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 Quick Sight. 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.
Srikanth Baheti is a Specialized World Wide Sr. Solution Architect for Amazon Quick Sight. 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.
This is a companion discussion topic for the original entry at https://aws.amazon.com/blogs/big-data/enable-amazon-quicksight-federation-with-google-workspace/




