Lesson 3: Enterprise Identity (IAM Identity Center) & The Azure Multi-Cloud Counterpart
๐ง The Concept (Explain Like Iโm 5)
Imagine working at a corporation with 1,000 employees and 200 AWS accounts:
-
The Legacy Nightmare (Local IAM Users): To give Alice the software engineer access to 200 AWS accounts, the IT team manually creates an IAM user named
alicein every single one of the 200 accounts. Alice now has 200 separate passwords, 200 separate MFA authenticator codes, and 200 separate AWS access keys.When Alice leaves the company, someone forgets to delete her account in Account #142. A year later, an attacker compromises that dormant account and breaches the entire enterprise.
-
The Enterprise Standard (SSO / IAM Identity Center): Alice logs in once using her single corporate login (Google Workspace, Okta, or Microsoft Entra ID). She sees a unified AWS web portal with simple buttons: โAccess Dev Accountโ, โAccess Production Accountโ. When HR disables Aliceโs corporate Google/Okta account, she instantly and atomically loses access to all 200 AWS accounts at the exact same millisecond (Single Sign-On - SSO)!
-
Multi-Cloud Parity (Speaking AWS and Azure): As an Enterprise Platform Architect, you will almost never work in a single cloud. You must speak both AWS and Microsoft Azure fluently. Everything you learn in AWS Organizations and IAM maps directly 1:1 to Microsoft Azure!
๐ข The Enterprise Context: Identity Federation Mechanics
Modern enterprise security strictly forbids storing long-lived passwords or permanent IAM users inside cloud accounts. Enterprise platform architects use Identity Federation:
sequenceDiagram
autonumber
actor Engineer as ๐ฉโ๐ป Alice (Platform Engineer)
participant IdP as ๐ข Corporate IdP (Okta / Entra ID)
participant SSO as โ๏ธ AWS IAM Identity Center
participant MemberAcc as ๐ฆ Member Account (Prod EKS)
Engineer->>SSO: 1. Navigates to https://my-corp.awsapps.com/start
SSO->>IdP: 2. Redirects for SAML 2.0 / OIDC Authentication
Engineer->>IdP: 3. Submits Corporate Password + FIDO2 Hardware Key (MFA)
IdP-->>SSO: 4. Returns signed SAML 2.0 Assertion (Alice belongs to 'Platform-Engineers' group)
SSO-->>Engineer: 5. Displays Portal: [Prod Account (PowerUser)], [Dev Account (Admin)]
Engineer->>SSO: 6. Clicks "Prod Account - PowerUser"
SSO->>MemberAcc: 7. Assumes ephemeral role: AWSReservedSSO_PowerUser_...
MemberAcc-->>Engineer: 8. Generates 8-hour temporary STS credentials (Session Token) โ
The 2 Protocols Powering Enterprise SSO:
- SAML 2.0 (Authentication): The cryptographic protocol used when Alice logs in. Okta signs an XML token asserting Aliceโs identity and group memberships to AWS.
- SCIM (System for Cross-domain Identity Management - Automated Provisioning): An automated background synchronization API. When HR adds an employee to the
Data-Platform-Engineersgroup in Okta, SCIM automatically pushes that user and group into AWS IAM Identity Center within seconds. When an employee is terminated in HR systems, SCIM automatically deletes them across all cloud accounts.
๐บ๏ธ Visual Architecture: Multi-Cloud Governance Mapping (AWS vs. Azure)
Enterprise governance maps cleanly between AWS and Microsoft Azure:
flowchart TD
subgraph AWSModel ["AWS Multi-Account Enterprise Model"]
direction TB
AWS_Root["<b>AWS Organizations Root</b><br/>Master Billing & Governance"]
AWS_OU["<b>Organizational Unit (OU)</b><br/>Hierarchical grouping"]
AWS_Account["<b>AWS Member Account</b><br/>Hard Billing & Security Boundary"]
AWS_SCP["<b>Service Control Policy (SCP)</b><br/>Coarse mandatory guardrails"]
AWS_SSO["<b>IAM Identity Center (SSO)</b><br/>Centralized identity directory"]
AWS_PermSet["<b>Permission Sets</b><br/>Reusable role templates"]
AWS_Root --> AWS_OU --> AWS_Account
AWS_SCP -.->|"Guardrail over"| AWS_OU
AWS_SSO --> AWS_PermSet --> AWS_Account
end
subgraph AzureModel ["Azure Enterprise Model (Cloud Parity)"]
direction TB
Az_Root["<b>Root Management Group</b><br/>Tenant root level"]
Az_MG["<b>Management Group (MG)</b><br/>Hierarchical grouping (up to 6 levels)"]
Az_Sub["<b>Azure Subscription</b><br/>Hard Billing & Resource Boundary"]
Az_Policy["<b>Azure Policy</b><br/>Guardrails with 'deny' & 'audit' effects"]
Az_Entra["<b>Microsoft Entra ID (Azure AD)</b><br/>Centralized cloud identity provider"]
Az_RBAC["<b>Role-Based Access Control (RBAC)</b><br/>Role Definitions & Scope Assignments"]
Az_Root --> Az_MG --> Az_Sub
Az_Policy -.->|"Guardrail over"| Az_MG
Az_Entra --> Az_RBAC --> Az_Sub
end
AWS_Root ---|"1:1 Equivalent"| Az_Root
AWS_OU ---|"1:1 Equivalent"| Az_MG
AWS_Account ---|"1:1 Equivalent"| Az_Sub
AWS_SCP ---|"1:1 Equivalent"| Az_Policy
AWS_SSO ---|"1:1 Equivalent"| Az_Entra
AWS_PermSet ---|"1:1 Equivalent"| Az_RBAC
๐ Comprehensive Enterprise Equivalence Matrix
| Architecture Dimension | Amazon Web Services (AWS) | Microsoft Azure | Detailed Architectural Function |
|---|---|---|---|
| Top-Level Root | AWS Organizations Root | Root Management Group | The single root anchor for master billing and organization-wide governance. |
| Hierarchical Grouping | Organizational Units (OUs) | Management Groups | Hierarchical tree nodes used to inherit policies and access rules down to child containers. |
| Isolation & Billing Boundary | AWS Member Account | Azure Subscription | The definitive blast-radius container. Resources inside share a single invoice and default quotas. |
| Organization Guardrails | Service Control Policies (SCPs) | Azure Policy (deny effects) |
Coarse, non-overrideable restrictions enforced across the entire hierarchy. |
| Identity Provider | IAM Identity Center (AWS SSO) | Microsoft Entra ID (formerly Azure AD) | Centralized enterprise user, group, and authentication directory. |
| Reusable Permissions | Permission Sets | Custom Role Definitions (RBAC) | Templates defining specific resource actions (e.g. read compute, write storage). |
| Resource Grouping | Tags / Resource Groups | Resource Groups (Mandatory in Azure) | In AWS, resource groups are optional tag filters. In Azure, every single resource must belong to exactly one Resource Group. |
| Central Transit Hub | AWS Transit Gateway (TGW) | Azure Virtual WAN (vWAN) | The managed regional transit router connecting multiple VPCs / VNets in a hub-and-spoke. |
๐ป Production Manifest: AWS IAM Identity Center with Terraform
In AWS IAM Identity Center, you never attach policies directly to users. You define reusable Permission Sets and bind them to Active Directory groups across target accounts:
# 1. Look up existing AWS IAM Identity Center instance
data "aws_ssoadmin_instances" "main" {}
# 2. Define reusable "Senior Platform Engineer" Permission Set
resource "aws_ssoadmin_permission_set" "platform_engineer" {
name = "PlatformEngineerPowerUser"
description = "Power user access to compute, networking, and storage; zero billing"
instance_arn = tolist(data.aws_ssoadmin_instances.main.arns)[0]
session_duration = "PT8H" # 8-hour maximum session duration before requiring re-auth
}
# 3. Attach AWS Managed Policy (PowerUserAccess) to the Permission Set
resource "aws_ssoadmin_managed_policy_attachment" "power_user" {
instance_arn = tolist(data.aws_ssoadmin_instances.main.arns)[0]
managed_policy_arn = "arn:aws:iam::aws:policy/PowerUserAccess"
permission_set_arn = aws_ssoadmin_permission_set.platform_engineer.arn
}
# 4. Attach an Inline Policy restricting access to sensitive security logs
resource "aws_ssoadmin_permission_set_inline_policy" "restrict_audit" {
instance_arn = tolist(data.aws_ssoadmin_instances.main.arns)[0]
permission_set_arn = aws_ssoadmin_permission_set.platform_engineer.arn
inline_policy = jsonencode({
Version = "2012-10-17"
Statement = [
{
Sid = "DenyModifyingSecurityLogs"
Effect = "Deny"
Action = [
"cloudtrail:DeleteTrail",
"cloudtrail:StopLogging",
"s3:DeleteBucket"
]
Resource = "*"
}
]
})
}
# 5. Bind Permission Set to Active Directory group across Production Accounts
resource "aws_ssoadmin_account_assignment" "platform_team_prod" {
instance_arn = tolist(data.aws_ssoadmin_instances.main.arns)[0]
permission_set_arn = aws_ssoadmin_permission_set.platform_engineer.arn
# Group ID synchronized from Okta / Entra ID via SCIM
principal_id = "group-id-okta-active-directory-xyz"
principal_type = "GROUP"
target_id = "123456789012" # Production Member Account ID
target_type = "AWS_ACCOUNT"
}
๐ก๏ธ The Azure Counterpart: Azure Policy Equivalent to an AWS SCP
Just as an AWS SCP uses Effect: Deny to block unapproved regions, an Azure Policy enforced at a Management Group level restricts where resources can be deployed across all child Azure Subscriptions:
{
"properties": {
"displayName": "Enforce Approved Geographic Azure Regions",
"policyType": "Custom",
"mode": "Indexed",
"description": "Denies resource creation outside approved enterprise Azure regions (East US and West US 2)",
"parameters": {
"allowedLocations": {
"type": "Array",
"metadata": {
"description": "The approved Azure regions"
},
"defaultValue": ["eastus", "eastus2", "westus2"]
}
},
"policyRule": {
"if": {
"not": {
"field": "location",
"in": "[parameters('allowedLocations')]"
}
},
"then": {
"effect": "deny"
}
}
}
}
Azure Policy Effects Explained:
deny: Equivalent to an AWS SCP Deny. The Azure Resource Manager (ARM) API immediately rejects the request before provisioning begins.audit: Allows the resource to be created, but flags it in the Azure Security Compliance dashboard as non-compliant.deployIfNotExists/modify: Automatically remediates missing settings (e.g. if a Virtual Network is created without Network Watcher enabled, Azure Policy automatically deploys it!).
๐งญ Step-by-Step Operational Playbook: Configuring Zero-Standing-Privilege Multi-Cloud SSO
Follow this step-by-step procedure to eliminate static IAM users (AKIA...) and federate corporate identities into AWS IAM Identity Center and Azure Entra ID:
Step 1: Enable AWS IAM Identity Center & Connect SCIM Provisioning
- Plain-English Goal: Connect your corporate Identity Provider (Okta / Microsoft Entra ID) via SAML 2.0 + SCIM 2.0 so when an employee joins or leaves a team in HR, their cloud groups update automatically within 60 seconds.
- Action:
aws sso-admin list-instances # Copy InstanceArn and IdentityStoreId for Terraform / CLI automation
Step 2: Create Time-Bound Permission Sets (1-Hour Production Sessions)
- Plain-English Goal: Ensure production access expires automatically after 1 hour (
PT1H), forcing re-authentication and MFA verification. - Action:
aws sso-admin create-permission-set \ --instance-arn "$INSTANCE_ARN" \ --name "PlatformBreakGlassAdmin" \ --session-duration "PT1H"
Step 3: Bind Permission Sets to Target AWS Accounts & AD Groups
- Plain-English Goal: Map the
Platform-SRE-Groupfrom Entra ID/Okta to thePlatformBreakGlassAdminPermission Set on theWorkloads-Prodaccount. - Action:
aws sso-admin create-account-assignment \ --instance-arn "$INSTANCE_ARN" \ --target-id "222233334444" \ --target-type AWS_ACCOUNT \ --permission-set-arn "$PERM_SET_ARN" \ --principal-type GROUP \ --principal-id "$SCIM_GROUP_ID"
Step 4: Developer CLI Login & Temporary Token Verification
- Plain-English Goal: Developers log in from their terminal using browser-based OIDC device authorizationโzero long-lived keys are ever saved in
~/.aws/credentials. - Action:
aws configure sso --profile payments-prod aws sso login --profile payments-prod aws sts get-caller-identity --profile payments-prod
๐ ๏ธ Real-World Troubleshooting & Failure Modes
1. SCIM Group De-Synchronization
- Symptom: A new engineer is added to the
Platform-Engineersgroup in Okta, but cannot see their AWS accounts in the SSO portal. - Root Cause: SCIM synchronization failed due to an expired OAuth bearer token in the Identity Provider configuration.
- Fix: Check SCIM provisioning logs in Okta/Entra ID, verify user attribute mappings (
email,givenName,familyName), and trigger an on-demand manual sync.
2. Session Duration Exhaustion on Production Pipelines
- Symptom: An automated Terraform deployment running via an SSO-assumed role fails midway through a 45-minute apply with
ExpiredTokenException. - Root Cause: The Permission Set had
session_duration = "PT1H"(1 hour). Long-running pipelines must use dedicated IAM Roles with OpenID Connect (OIDC) federation, rather than human SSO sessions!
3. The โOffboarded Employee Still Activeโ STS Session Window
- Symptom: An employee is terminated and immediately offboarded in Okta/Entra ID. However, security logs show their active CLI session continues running production commands for the next 8 hours!
- Under-the-Hood Root Cause: Identity Provider SCIM de-provisioning and SSO revocation only prevent new authentication handshakes. AWS STS tokens (
ASIA...) are cryptographic, self-contained, and valid until their configured expiration timestamp. AWS IAM does not poll the IdP on every API call. - Triage & Emergency Revocation:
# Instantly revoke all active STS tokens issued before the revocation timestamp aws iam put-role-policy \ --role-name AWSReservedSSO_AdministratorAccess_1234567890ab \ --policy-name EmergencySessionRevocation \ --policy-document '{ "Version": "2012-10-17", "Statement": [ { "Effect": "Deny", "Action": "*", "Resource": "*", "Condition": { "DateLessThan": { "aws:TokenIssueTime": "2026-10-12T19:30:00Z" } } } ] }'
๐ Knowledge Check & Real-World Interview Scenarios
An enterprise uses AWS IAM Identity Center for all 500 employees. During a penetration test, the red team breaches a developerโs laptop, discovers an AWS Access Key ID (AKIA...) and Secret Key in ~/.aws/credentials, and successfully logs into Account #42 directly via the AWS CLI.
How did this long-lived key exist if the enterprise mandates SSO? How do Platform Architects eliminate local IAM user keys forever across all accounts?
โ Answer & Explanation
Why the Key Existed:
- IAM Identity Center provides temporary, short-lived session tokens (
ASIA...keys lasting 1 to 8 hours). - However, an engineer manually created a local IAM User inside Member Account #42 using the legacy
aws_iam_access_keyresource to make local CLI testing easier. Local IAM users create static, long-lived credentials (AKIA...) that never expire unless manually deleted!
How Platform Architects Eliminate This Forever:
- Service Control Policy (SCP) Ban: Deploy an organization-wide SCP that explicitly denies
iam:CreateUserandiam:CreateAccessKeyacross all member accounts:{ "Effect": "Deny", "Action": ["iam:CreateUser", "iam:CreateAccessKey"], "Resource": "*" } - AWS Config Rule Remediation: Enable the AWS Config managed rule
iam-user-unused-credentials-checkand automatically trigger an AWS Systems Manager (SSM) Automation document to deactivate and delete any rogue IAM user keys detected in the fleet.
A cloud security architect is comparing AWS vs. Azure governance for a new FinTech banking platform.
Explain the critical difference between how Azure enforces Resource Groups compared to AWS, and how this impacts blast radius and access control.
โ Answer & Explanation
- Azure Resource Groups are Mandatory Structural Boundaries: In Azure, every single resource (VM, storage account, VNet, SQL database) must reside within exactly one Resource Group. You cannot create a resource without assigning it to a Resource Group.
- Impact on RBAC: In Azure, you can assign RBAC permissions directly at the Resource Group scope (
/subscriptions/{sub-id}/resourceGroups/payments-rg). This allows you to give a development team full Contributor access to their Resource Group without giving them access to other services inside the same Subscription!
- Impact on RBAC: In Azure, you can assign RBAC permissions directly at the Resource Group scope (
- AWS Resource Groups are Merely Optional Tag Queries: In AWS, resources exist directly at the account/VPC level. AWS Resource Groups are simply visual collections based on tag filters; they do not act as default security boundaries.
- Impact on Blast Radius: To achieve the same level of fine-grained blast-radius isolation in AWS that Azure achieves with Resource Groups, AWS architects typically provision separate AWS Member Accounts!