Amazon QuickSight is cloud-native, scalable enterprise intelligence (BI) service that helps identification federation. AWS Identification and Entry Administration (IAM) permits organizations to make use of the identities managed of their enterprise identification supplier (IdP) and federate single sign-on (SSO) to QuickSight. As extra organizations are constructing centralized consumer identification shops with all their functions, together with on-premises apps, third-party apps, and functions on AWS, they want an answer to automate consumer provisioning into these functions and maintain their attributes in sync with their centralized consumer identification retailer.
When architecting a consumer repository, some organizations resolve to arrange their customers in teams or use attributes (resembling division identify), or a mixture of each. In case your group makes use of Microsoft Azure Lively Listing (Azure AD) for centralized authentication and makes use of its consumer attributes to arrange the customers, you may allow federation throughout all QuickSight accounts in addition to handle customers and their group membership in QuickSight utilizing occasions generated within the AWS platform. This enables system directors to centrally handle consumer permissions from Azure AD. Provisioning, updating, and de-provisioning customers and teams in QuickSight now not requires administration in two locations with this resolution. This makes positive that customers and teams in QuickSight keep in line with info in Azure AD via computerized synchronization.
On this submit, we stroll you thru the steps required to configure federated SSO between QuickSight and Azure AD through AWS IAM Identification Heart (Successor to AWS Single Signal-On) the place computerized provisioning is enabled for Azure AD. We additionally display computerized consumer and group membership replace utilizing a System for Cross-domain Identification Administration (SCIM) occasion.
Resolution overview
The next diagram illustrates the answer structure and consumer movement.
On this submit, IAM Identification Heart gives a central place to deliver collectively administration of customers and their entry to AWS accounts and cloud functions. Azure AD is the consumer repository and configured because the exterior IdP in IAM Identification Heart. On this resolution, we display the usage of two consumer attributes (division
, jobTitle
) particularly in Azure AD. IAM Identification Heart helps computerized provisioning (synchronization) of consumer and group info from Azure AD into IAM Identification Heart utilizing the SCIM v2.0 protocol. With this protocol, the attributes from Azure AD are handed alongside to IAM Identification Heart, which inherits the outlined attribute for the consumer’s profile in IAM Identification Heart. IAM Identification Heart additionally helps identification federation with SAML (Safety Assertion Markup Language) 2.0. This enables IAM Identification Heart to authenticate identities utilizing Azure AD. Customers can then SSO into functions that assist SAML, together with QuickSight. The primary half of this submit focuses on how one can configure this finish to finish (see Signal-In Circulation within the diagram).
Subsequent, consumer info begins to get synchronized between Azure AD and IAM Identification Heart through SCIM protocol. You may automate making a consumer in QuickSight utilizing an AWS Lambda operate triggered by the CreateUser
SCIM occasion originated from IAM Identification Heart, which was captured in Amazon EventBridge. In the identical Lambda operate, you may subsequently replace the consumer’s membership by including into the required group (whose identify is comprised of two consumer attributes: department-jobTitle
, in any other case create the group if it doesn’t exist but, previous to including the membership.
On this submit, this automation half is omitted as a result of it might be redundant with the content material mentioned within the following sections.
This submit explores and demonstrates an UpdateUser
SCIM occasion triggered by the consumer profile replace on Azure AD. The occasion is captured in EventBridge, which invokes a Lambda operate to replace the group membership in QuickSight (see Replace Circulation within the diagram). As a result of a given consumer is meant to belong to just one group at a time on this instance, the operate will substitute the consumer’s present group membership with the brand new one.
In Half I, you arrange SSO to QuickSight from Azure AD through IAM Identification Heart (the sign-in movement):
- Configure Azure AD because the exterior IdP in IAM Identification Heart.
- Add and configure an IAM Identification Heart utility in Azure AD.
- Full configuration of IAM Identification Heart.
- Arrange SCIM computerized provisioning on each Azure AD and IAM Identification Heart, and make sure in IAM Identification Heart.
- Add and configure a QuickSight utility in IAM Identification Heart.
- Configure a SAML IdP and SAML 2.0 federation IAM function.
- Configure attributes within the QuickSight utility.
- Create a consumer, group, and group membership manually through the AWS Command Line Interface (AWS CLI) or API.
- Confirm the configuration by logging in to QuickSight from the IAM Identification Heart portal.
In Half II, you arrange automation to alter group membership upon an SCIM occasion (the replace movement):
- Perceive SCIM occasions and occasion patterns for EventBridge.
- Create attribute mapping for the group identify.
- Create a Lambda operate.
- Add an EventBridge rule to set off the occasion.
- Confirm the configuration by altering the consumer attribute worth at Azure AD.
Conditions
For this walkthrough, you must have the next stipulations:
- IAM Identification Heart. For directions, discuss with Steps 1–2 within the AWS IAM Identification Heart Getting Began information.
- A QuickSight account subscription.
- Primary understanding of IAM and privileges required to create an IAM IdP, roles, and insurance policies.
- An Azure AD subscription. You want not less than one consumer with the next attributes to be registered in Azure AD:
- userPrincipalName – Obligatory area for Azure AD consumer.
- displayName – Obligatory area for Azure AD consumer.
- Mail – Obligatory area for IAM Identification Heart to work with QuickSight.
- jobTitle – Used to allocate consumer to group
- division – Used to allocate consumer to group.
- givenName – Optionally available area.
- surname – Optionally available area.
Half I: Arrange SSO to QuickSight from Azure AD through IAM Identification Heart
This part presents the steps to arrange the sign-in movement.
Configure an exterior IdP as Azure AD in IAM Identification Heart
To configure your exterior IdP, full the next steps:
- On the IAM Identification Heart console, select Settings.
- Select Actions on the Identification supply tab, then select Change identification supply.
- Select Exterior identification supplier, then select Subsequent.
The IdP metadata is displayed. Maintain this browser tab open.
Add and configure an IAM Identification Heart utility in Azure AD
To arrange your IAM Identification Heart utility, full the next steps:
- Open a brand new browser tab.
- Log in to the Azure AD portal utilizing your Azure administrator credentials.
- Beneath Azure companies, select Azure Lively Listing.
- Within the navigation pane, underneath Handle, select Enterprise functions, then select New utility.
- Within the Browse Azure AD Galley part, seek for IAM Identification Heart, then select AWS IAM Identification Heart (successor to AWS Single Signal-On).
- Enter a reputation for the applying (on this submit, we use
IIC-QuickSight
) and select Create. - Within the Handle part, select Single sign-on, then select SAML.
- Within the Assign customers and teams part, select Assign customers and teams.
- Select Add consumer/group and add not less than one consumer.
- Choose Consumer as its function.
- Within the Arrange single signal on part, select Get began.
- Within the Primary SAML Configuration part, select Edit, and fill out following parameters and values:
- Identifier – The worth within the IAM Identification Heart issuer URL area.
- Reply URL – The worth within the IAM Identification Heart Assertion Client Service (ACS) URL area.
- Signal on URL – Go away clean.
- Relay State – Go away clean.
- Logout URL – Go away clean.
- Select Save.
The configuration ought to appear to be the next screenshot.
- Within the SAML Certificates part, obtain the Federation Metadata XML file and the Certificates (Uncooked) file.
You’re all set with Azure AD SSO configuration at this second. In a while, you’ll return to this web page to configure automated provisioning, so maintain this browser tab open.
Full configuration of IAM Identification Heart
Full your IAM Identification Heart configuration with the next steps:
- Return to the browser tab for IAM Identification Heart console which you have got stored open in earlier step.
- For IdP SAML metadata underneath the Identification supplier metadata part, select Select file.
- Select the beforehand downloaded metadata file (
IIC-QuickSight.xml
). - For IdP certificates underneath the Identification supplier metadata part, select Select file.
- Select the beforehand downloaded certificates file (
IIC-QuickSight.cer
). - Select Subsequent.
- Enter ACCEPT, then select Change Identification supplier supply.
Arrange SCIM computerized provisioning on each Azure AD and IAM Identification Heart
Your provisioning technique remains to be set as Handbook (non-SCIM). On this step, we allow computerized provisioning in order that IAM Identification Heart turns into conscious of the customers, which permits identification federation to QuickSight.
- Within the Computerized provisioning part, select Allow.
- Select Entry token to indicate your token.
- Return to the browser tab (Azure AD), which you stored open in Step 1.
- Within the Handle part, select Enterprise functions.
- Select
IIC-QuickSight
, then select Provisioning. - Select Computerized in Provisioning Mode and enter the next values:
- Tenant URL – The worth within the SCIM endpoint area.
- Secret Token – The worth within the Entry token area.
- Select Take a look at Connection.
- After the check connection is efficiently full, set Provisioning Standing to On.
- Select Save.
- Select Begin provisioning to start out computerized provisioning utilizing the SCIM protocol.
When provisioning is full, it would lead to propagating a number of customers from Azure AD to IAM Identification Heart. The next screenshot exhibits the customers that have been provisioned in IAM Identification Heart.
Word that upon this SCIM provisioning, the customers in QuickSight ought to be created utilizing the Lambda operate triggered by the occasion originated from IAM Identification Heart. On this submit, we create a consumer and group membership through the AWS CLI (Step 8).
Add and configure a QuickSight utility in IAM Identification Heart
On this step, we create a QuickSight utility in IAM Identification Heart. You additionally configure an IAM SAML supplier, function, and coverage for the applying to work. Full the next steps:
- On the IAM Identification Heart console, on the Functions web page, select Add Software.
- For Pre-integrated utility underneath Choose an utility, enter
quicksight
. - Choose Amazon QuickSight, then select Subsequent.
- Enter a reputation for Show identify, resembling
Amazon QuickSight
. - Select Obtain underneath IAM Identification Heart SAML metadata file and put it aside in your laptop.
- Go away all different fields as they’re, and save the configuration.
- Open the applying you’ve simply created, then select Assign Customers.
The customers provisioned through SCIM earlier will likely be listed.
- Select the entire customers to assign to the applying.
Configure a SAML IdP and a SAML 2.0 federation IAM function
To arrange your IAM SAML IdP for IAM Identification Heart and IAM function, full the next steps:
- On the IAM console, within the navigation pane, select Identification suppliers, then select Add supplier.
- Select SAML as Supplier sort, and enter
Azure-IIC-QS
as Supplier identify. - Beneath Metadata doc, select Select file and add the metadata file you downloaded earlier.
- Select Add supplier to save lots of the configuration.
- Within the navigation pane, select Roles, then select Create function.
- For Trusted entity sort, choose SAML 2.0 federation.
- For Select a SAML 2.0 supplier, choose the SAML supplier that you simply created, then select Permit programmatic and AWS Administration Console entry.
- Select Subsequent.
- On the Add Permission web page, select Subsequent.
On this submit, we create QuickSight customers through an AWS CLI command, subsequently we’re not creating any permission coverage. Nonetheless, if the self-provisioning function in QuickSight is required, the permission coverage for the CreateReader
, CreateUser
, and CreateAdmin
actions (relying on the function of the QuickSight customers) is required.
- On the Title, evaluate, and create web page, underneath Function particulars, enter
qs-reader-azure
for the function. - Select Create function.
- Word the ARN of the function.
You employ the ARN to configure attributes in your IAM Identification Heart utility.
Configure attributes within the QuickSight utility
To affiliate the IAM SAML IdP and IAM function to the QuickSight utility in IAM Identification Heart, full the next steps:
- On the IAM Identification Heart console, within the navigation pane, select Functions.
- Choose the
Amazon QuickSight
utility, and on the Actions menu, select Edit attribute mappings. - Select Add new attribute mapping.
- Configure the mappings within the following desk.
Consumer attribute within the utility | Maps to this string worth or consumer attribute in IAM Identification Heart |
Topic | ${consumer:e-mail} |
https://aws.amazon.com/SAML/Attributes/RoleSessionName | ${consumer:e-mail} |
https://aws.amazon.com/SAML/Attributes/Function | arn:aws:iam::<ACCOUNTID>:function/qs-reader-azure,arn:aws:iam::<ACCOUNTID>:saml-provider/Azure-IIC-QS |
https://aws.amazon.com/SAML/Attributes/PrincipalTag:E mail | ${consumer:e-mail} |
Word the next values:
- Substitute <ACCOUNTID> together with your AWS account ID.
PrincipalTag:E mail
is for the e-mail syncing function for self-provisioning customers that should be enabled on the QuickSight admin web page. On this submit, don’t allow this function as a result of we register the consumer with an AWS CLI command.
- Select Save adjustments.
Create a consumer, group, and group membership with the AWS CLI
As described earlier, customers and teams in QuickSight are being created manually on this resolution. We create them through the next AWS CLI instructions.
Step one is to create a consumer in QuickSight specifying the IAM function created earlier and e-mail handle registered in Azure AD. The second step is to create a gaggle with the group identify as mixed attribute values from Azure AD for the consumer created in step one. The third step is so as to add the consumer into the group created earlier; member-name
signifies the consumer identify created in QuickSight that’s comprised of <IAM Function identify>/<session identify>
. See the next code:
At this level, the end-to-end configuration of Azure AD, IAM Identification Heart, IAM, and QuickSight is full.
Confirm the configuration by logging in to QuickSight from the IAM Identification Heart portal
Now you’re able to log in to QuickSight utilizing the IdP-initiated SSO movement:
- Open a brand new non-public window in your browser.
- Log in to the IAM Identification Heart portal (
https://d-xxxxxxxxxx.awsapps.com/begin
).
You’re redirected to the Azure AD login immediate.
- Enter your Azure AD credentials.
You’re redirected again to the IAM Identification Heart portal.
- Within the IAM Identification Heart portal, select Amazon QuickSight.
You’re routinely redirected to your QuickSight dwelling.
Half II: Automate group membership change upon SCIM occasions
On this part, we configure the replace movement.
Perceive the SCIM occasion and occasion sample for EventBridge
When an Azure AD administrator makes any adjustments to the attributes on the actual consumer profile, the change will likely be synced with the consumer profile in IAM Identification Heart through SCIM protocol, and the exercise is recorded in an AWS CloudTrail occasion referred to as UpdateUser
by sso-directory.amazonaws.com
(IAM Identification Heart) because the occasion supply. Equally, the CreateUser
occasion is recorded when a consumer is created on Azure AD, and the DisableUser
occasion is for when a consumer is disabled.
The next screenshot on the Occasion historical past web page exhibits two CreateUser
occasions: one is recorded by IAM Identification Heart, and the opposite one is by QuickSight. On this submit, we use the one from IAM Identification Heart.
To ensure that EventBridge to have the ability to deal with the movement correctly, every occasion should specify the fields of an occasion that you really want the occasion sample to match. The next occasion sample is an instance of the UpdateUser
occasion generated in IAM Identification Heart upon SCIM synchronization:
On this submit, we display an computerized replace of group membership in QuickSight that’s triggered by the UpdateUser
SCIM occasion.
Create attribute mapping for the group identify
To ensure that the Lambda operate to handle group membership in QuickSight, it should acquire the 2 consumer attributes (division
and jobTitle
). To make the method easier, we’re combining two attributes in Azure AD (division
, jobTitle
) into one attribute in IAM Identification Heart (title
), utilizing the attribute mappings function in Azure AD. IAM Identification Heart then makes use of the title
attribute as a chosen group identify for this consumer.
- Log in to the Azure AD console, navigate to Enterprise Functions,
IIC-QuickSight
, and Provisioning. - Select Edit attribute mappings.
- Beneath Mappings, select Provision Azure Lively Listing Customers.
- Select
jobTitle
from the checklist of Azure Lively Listing Attributes. - Change the next settings:
- Mapping Sort –
Expression
- Expression –
Be part of("-", [department], [jobTitle])
- Goal attribute –
title
- Mapping Sort –
- Select Save.
- You may go away the provisioning web page.
The attribute is routinely up to date in IAM Identification Heart. The up to date consumer profile appears to be like like the next screenshots (Azure AD on the left, IAM Identification Heart on the correct).
Create a Lambda operate
Now we create a Lambda operate to replace QuickSight group membership upon the SCIM occasion. The core a part of the operate is to acquire the consumer’s title
attribute worth in IAM Identification Heart based mostly on the triggered occasion info, after which to make sure that the consumer exists in QuickSight. If the group identify doesn’t exist but, it creates the group in QuickSight after which provides the consumer into the group. Full the next steps:
- On the Lambda console, select Create operate.
- For Title, enter
UpdateQuickSightUserUponSCIMEvent
. - For Runtime, select Python 3.9.
- For Time Out, set to fifteen seconds.
- For Permissions, create and fasten an IAM function that features the next permissions (the trusted entity (principal) ought to be
lambda.amazonaws.com
): - Write Python code utilizing the Boto3 SDK for IdentityStore and QuickSight. The next is the complete pattern Python code:
Word that this Lambda operate requires Boto3 1.24.64 or later. If the Boto3 included within the Lambda runtime is older than this, use a Lambda layer to make use of the most recent model of Boto3. For extra particulars, discuss with How do I resolve “unknown service”, “parameter validation failed”, and “object has no attribute” errors from a Python (Boto 3) Lambda operate.
Add an EventBridge rule to set off the occasion
To create an EventBridge rule to invoke the beforehand created Lambda operate, full the next steps:
- On the EventBridge console, create a brand new rule.
- For Title, enter
updateQuickSightUponSCIMEvent
. - For Occasion sample, enter the next code:
- For Targets, select the Lambda operate you created (
UpdateQuickSightUserUponSCIMEvent
). - Allow the rule.
Confirm the configuration by altering a consumer attribute worth at Azure AD
Let’s modify a consumer’s attribute at Azure AD, after which examine if the brand new group is created and that the consumer is added into the brand new one.
- Return to the Azure AD console.
- From Handle, click on Customers.
- Select one of many customers you beforehand used to log in to QuickSight from the IAM Identification Heart portal.
- Select Edit properties, then edit the values for Job title and Division.
- Save the configuration.
- From Handle, select Enterprise utility, your utility identify, and Provisioning.
- Select Cease provisioning after which Begin provisioning in sequence.
In Azure AD, the SCIM provisioning interval is mounted to 40 minutes. To get rapid outcomes, we manually cease and begin the provisioning.
- Navigate to the QuickSight console.
- On the drop-down consumer identify menu, select Handle QuickSight.
- Select Handle teams.
Now you must discover that the brand new group is created and the consumer is assigned to this group.
Clear up
Once you’re completed with the answer, clear up your atmosphere to reduce value impression. Chances are you’ll need to delete the next sources:
- Lambda operate
- Lambda layer
- IAM function for the Lambda operate
- CloudWatch log group for the Lambda operate
- EventBridge rule
- QuickSight account
- Word : There can solely be one QuickSight account per AWS account. So your QuickSight account would possibly already be utilized by different customers in your group. Delete the QuickSight account provided that you explicitly set it as much as comply with this weblog and are completely positive that it’s not being utilized by some other customers.
- IAM Identification Heart occasion
- IAM ID Supplier configuration for Azure AD
- Azure AD occasion
Abstract
This submit offered step-by-step directions to configure IAM Identification Heart SCIM provisioning and SAML 2.0 federation from Azure AD for centralized administration of QuickSight customers. We additionally demonstrated automated group membership updates in QuickSight based mostly on consumer attributes in Azure AD, through the use of SCIM occasions generated in IAM Identification Heart and establishing automation with EventBridge and Lambda.
With this event-driven strategy to provision customers and teams in QuickSight, system directors can have full flexibility in the place the varied other ways of consumer administration may very well be anticipated relying on the group. It additionally ensures the consistency of customers and teams between QuickSight and Azure AD each time a consumer accesses QuickSight.
We’re trying ahead to listening to any questions or suggestions.
In regards to the authors
Takeshi Nakatani is a Principal Bigdata Marketing consultant on Skilled Providers group in Tokyo. He has 25 years of expertise in IT business, expertised in architecting information infrastructure. On his days off, he could be a rock drummer or a motorcyclyst.
Wakana Vilquin-Sakashita is Specialist Resolution Architect for Amazon QuickSight. She works carefully with prospects to assist making sense of the info via visualization. Beforehand Wakana labored for S&P International helping prospects to entry information, insights and researches related for his or her enterprise.