Learning Objectives
By the end of this chapter, you will be able to:
- Design, implement, and troubleshoot federated identity solutions across IAM Identity Center, SAML 2.0, OIDC, Amazon Cognito, and AWS Directory Service, including application-level authorization with Amazon Verified Permissions and IAM Roles Anywhere
- Implement MFA, password policies, and secure credential storage, and audit access with IAM Access Analyzer, the IAM policy simulator, CloudTrail, and last-accessed information
- Issue and manage temporary credentials through AWS STS and S3 presigned URLs, with correct session duration, condition-key, and revocation controls
- Troubleshoot authentication failures using CloudTrail, Cognito error codes, Identity Center permission-set drift, and Directory Service trust diagnostics
- Design authorization controls for human, application, and system access using identity-based policies, resource-based policies, permission boundaries, SCPs, RCPs, and session policies
- Apply the full IAM policy evaluation algorithm including the explicit-deny precedence rule across organization, identity, and resource layers
- Implement least-privilege access through identity-based, resource-based, and attribute-based access control mechanisms
- Implement cross-account access through role trust policies, AssumeRole, external IDs, and resource-based policies that close the confused-deputy gap
Executive Summary
- The IAM evaluation engine processes every API call through five gates: SCP, RCP, permission boundary, session policy, and identity-and-resource policy. An explicit Deny at any gate ends the evaluation with an implicit Deny, regardless of grants elsewhere.
- Federation pushes identity to the customer's IdP. Workforce identity lands in IAM Identity Center; customer identity lands in Amazon Cognito; workloads outside AWS land in IAM Roles Anywhere or Cognito identity pools. AWS IAM users are reserved for the few cases where federation cannot reach.
- Temporary credentials from STS, presigned URLs from S3, and signed cookies from CloudFront all carry the issuing principal's permissions. Revoking the underlying session through
aws:TokenIssueTimeis the only way to invalidate active credentials early. - Resource control policies, introduced as the resource-side counterpart of service control policies, let the organization deny access to resources from outside the organization or from outside a permitted IP range without depending on every team to write a resource policy.
- ABAC scales permissions through tags rather than policies; a single role with
aws:ResourceTagandaws:PrincipalTagcondition keys can replace dozens of project-specific roles, but only if the tag enforcement chain is closed at provisioning.
Assumptions
- The reader has the depth of Chapters 1 through 3: org CloudTrail in a log archive account, GuardDuty and Security Hub delegated administration, the centralized inspection VPC, EC2 hardening through Image Builder, and Session Manager as the default shell path.
- Examples assume a multi-account organization with at least one delegated administrator for IAM Access Analyzer and a separate security tooling account.
- Region naming uses
us-east-1for global services that anchor there (IAM, STS global endpoint, CloudFront), with regional endpoints called out where they matter. - Policy JSON snippets use straight ASCII quotes and the latest documented condition keys.
