Federated Access With AD
Hands-On Lab: Federating AWS with Azure AD using IAM Identity Center (AWS SSO)
πΉ Objective: Enable federated access to AWS using Azure AD as the identity provider, allowing users to log in without IAM Users. πΉ Outcome: Azure AD users will be able to log into AWS via IAM Identity Center (AWS SSO) and assume IAM Roles dynamically.
π Prerequisites
β AWS IAM Identity Center (AWS SSO) is enabled in your AWS account. β Azure AD Admin Access (to configure enterprise apps). β AWS Organizations is configured (for multi-account setup).
π οΈ Step 1: Enable IAM Identity Center in AWS
π Go to IAM Identity Center Console 1οΈβ£ Navigate to AWS Console β IAM Identity Center 2οΈβ£ Click Enable IAM Identity Center (if not already enabled). 3οΈβ£ Select "Use an external identity provider (IdP)". 4οΈβ£ Copy the IAM Identity Center SAML Metadata URL β needed for Azure AD configuration.
β Now, IAM Identity Center is enabled and ready for federation.
π οΈ Step 2: Configure AWS IAM Identity Center in Azure AD
π Create an Enterprise App in Azure AD
1οΈβ£ Sign in to Azure AD Portal (https://portal.azure.com).
2οΈβ£ Navigate to Azure Active Directory β Enterprise Applications.
3οΈβ£ Click + New Application β Create Your Own Application.
4οΈβ£ Enter "AWS IAM Identity Center" as the name and select "Integrate any application you donβt find in the gallery (Non-gallery)".
5οΈβ£ Click Create.
β Now, Azure AD has an enterprise app for AWS login.
π οΈ Step 3: Configure SAML Integration
π Set Up SAML Authentication 1οΈβ£ In the newly created AWS IAM Identity Center app in Azure AD, go to Single Sign-On. 2οΈβ£ Select SAML as the authentication method. 3οΈβ£ Click Edit SAML Configuration and enter:
Identifier (Entity ID):
urn:amazon:webservicesReply URL (ACS URL): Paste the AWS IAM Identity Center SAML Metadata URL copied earlier.
Sign-on URL:
https://<AWS-ACCOUNT-ID>.awsapps.com/start
4οΈβ£ Download the Azure AD Federation Metadata XML (needed for AWS). 5οΈβ£ Click Save.
β Azure AD is now configured to send authentication requests to AWS IAM Identity Center.
π οΈ Step 4: Configure IAM Identity Center with Azure AD
π Import Azure AD Metadata into AWS 1οΈβ£ Go back to AWS Console β IAM Identity Center. 2οΈβ£ Navigate to Settings β Identity Source. 3οΈβ£ Click Change Identity Source β Select SAML 2.0-based authentication. 4οΈβ£ Upload the Azure AD Metadata XML downloaded earlier. 5οΈβ£ Click Next, review settings, and Accept Change.
β AWS IAM Identity Center is now linked to Azure AD!
π οΈ Step 5: Map Azure AD Groups to AWS IAM Roles
π Create Groups in Azure AD 1οΈβ£ Go to Azure AD β Groups β + New Group. 2οΈβ£ Create a group SecureCart-Developers. 3οΈβ£ Add developers to this group who need AWS access.
π Assign Groups in AWS IAM Identity Center 1οΈβ£ Go to AWS Console β IAM Identity Center β AWS Accounts. 2οΈβ£ Select the AWS account where you want to grant access. 3οΈβ£ Click Assign Users & Groups β Select SecureCart-Developers. 4οΈβ£ Choose a Permission Set (e.g., Administrator, Developer, ReadOnly). 5οΈβ£ Click Save.
β Users in the Azure AD group can now assume the mapped IAM Role.
π οΈ Step 6: Test the Federation Setup
π Test User Login 1οΈβ£ Open the IAM Identity Center User Portal URL (from Step 1). 2οΈβ£ Click Sign in with SSO β Redirected to Azure AD login page. 3οΈβ£ Enter Azure AD credentials. 4οΈβ£ After authentication, users can see assigned AWS accounts. 5οΈβ£ Click an account β Assume the assigned IAM Role.
β Users now authenticate using Azure AD and access AWS resources securely!
π π― Bonus: AWS CLI Authentication with SSO
β Developers can authenticate with AWS CLI using SSO instead of access keys.
π Result: Users authenticate via Azure AD and assume an IAM Role without needing IAM credentials.
π Summary of Setup
Step
Action
Step 1
Enable IAM Identity Center in AWS
Step 2
Create an Azure AD Enterprise App for AWS
Step 3
Configure SAML Authentication
Step 4
Link IAM Identity Center with Azure AD Metadata
Step 5
Map Azure AD Groups to AWS IAM Roles
Step 6
Test Login via AWS IAM Identity Center
Bonus
Enable AWS CLI authentication via SSO
Step-by-Step Guide: Integrating AWS Directory Service with IAM Identity Center (AWS SSO)
π Objective: Configure AWS IAM Identity Center (AWS SSO) with AWS Directory Service to enable Active Directory (AD) users to access AWS resources without IAM Users. π Outcome: Active Directory (AD) users will be able to log in to AWS accounts via IAM Identity Center (AWS SSO) using their existing AD credentials.
π Prerequisites
β AWS IAM Identity Center (AWS SSO) is enabled in your AWS account. β AWS Directory Service is deployed (Managed Microsoft AD or AD Connector). β On-Premises or Cloud Active Directory (AD) is set up. β Admin access to AWS Directory Service & IAM Identity Center.
π οΈ Step 1: Deploy AWS Directory Service
β If you already have AWS Managed Microsoft AD or AD Connector set up, skip this step.
π To deploy AWS Directory Service (AWS Managed Microsoft AD): 1οΈβ£ Navigate to AWS Console β AWS Directory Service. 2οΈβ£ Click Set up Directory β Choose AWS Managed Microsoft AD. 3οΈβ£ Choose Standard Edition (for small setups) or Enterprise Edition (for larger workloads). 4οΈβ£ Enter Directory Name (e.g., securecart.local) and an Admin password. 5οΈβ£ Select VPC and subnets where the directory should be deployed. 6οΈβ£ Click Create Directory β Wait for it to be Active (takes ~30 minutes).
β AWS Managed AD is now running and ready for IAM Identity Center integration.
π οΈ Step 2: Integrate AWS IAM Identity Center with AWS Directory Service
π Go to AWS IAM Identity Center Console 1οΈβ£ Navigate to AWS Console β IAM Identity Center. 2οΈβ£ Click Settings β Scroll down to Identity Source. 3οΈβ£ Click Change Identity Source. 4οΈβ£ Select AWS Managed Microsoft AD. 5οΈβ£ Choose your AWS Managed AD Directory (securecart.local). 6οΈβ£ Click Next β Review settings β Click Accept Changes.
β IAM Identity Center is now linked to AWS Directory Service.
π οΈ Step 3: Sync Active Directory Groups with IAM Identity Center
π Enable User & Group Sync from AD 1οΈβ£ Go to AWS Console β IAM Identity Center. 2οΈβ£ Click Users & Groups β Enable Active Directory Sync. 3οΈβ£ Select the Organizational Units (OUs) in Active Directory that contain AWS users. 4οΈβ£ Click Save Changes. β Now, AD users & groups are available in AWS IAM Identity Center.
π οΈ Step 4: Assign AD Users/Groups to AWS Accounts
π Map Active Directory (AD) Groups to AWS IAM Roles
1οΈβ£ Navigate to IAM Identity Center β AWS Accounts.
2οΈβ£ Select the AWS Account you want to grant access to.
3οΈβ£ Click Assign Users & Groups.
4οΈβ£ Choose Active Directory Groups (e.g., AWS-Developers, AWS-Admins).
5οΈβ£ Select the Permission Set (e.g., AdministratorAccess, ReadOnlyAccess).
6οΈβ£ Click Save.
β Now, AD users in those groups will be assigned IAM Roles dynamically.
π οΈ Step 5: Test AWS Login Using Active Directory Credentials
π Test AD User Login 1οΈβ£ Open IAM Identity Center User Portal URL (https://securecart.awsapps.com/start).
2οΈβ£ Click Sign in with Active Directory.
3οΈβ£ Enter Active Directory username & password.
4οΈβ£ After authentication, users can see assigned AWS accounts.
5οΈβ£ Click an account β Assume the assigned IAM Role.
β Users now authenticate using Active Directory and access AWS resources securely!
π π― Bonus: AWS CLI Authentication with AD & SSO
β Developers can authenticate to AWS CLI using Active Directory credentials.
π Result: Users authenticate via Active Directory and assume an IAM Role without needing IAM credentials.
π Summary of Setup
Step
Action
Step 1
Deploy AWS Directory Service (Managed Microsoft AD)
Step 2
Integrate AWS IAM Identity Center with AWS Directory Service
Step 3
Sync Active Directory Groups with IAM Identity Center
Step 4
Assign AD Groups to AWS IAM Roles
Step 5
Test AWS Login with AD Credentials
Bonus
Enable AWS CLI authentication via SSO
Last updated