Learn Domain 4: Identity and Access Management (AWS SCS-C02) with Interactive Flashcards

Master key concepts in Domain 4: Identity and Access Management through our interactive flashcard system. Click on each card to reveal detailed explanations and enhance your understanding.

IAM Policies and Evaluation Logic

IAM Policies and Evaluation Logic are fundamental concepts in AWS Identity and Access Management. IAM policies are JSON documents that define permissions by specifying which actions are allowed or denied on specific AWS resources for particular principals (users, groups, or roles).

There are several policy types: **Identity-based policies** (attached to IAM users, groups, or roles), **Resource-based policies** (attached to resources like S3 buckets), **Permission boundaries** (set maximum permissions for IAM entities), **Organizations SCPs** (define maximum permissions for member accounts), and **Session policies** (limit permissions for temporary sessions).

Each policy contains statements with key elements: **Effect** (Allow/Deny), **Action** (specific API operations), **Resource** (ARNs of targeted resources), **Principal** (who the policy applies to), and optional **Condition** blocks for fine-grained control.

**IAM Policy Evaluation Logic** follows a specific order:

1. **Default Deny**: All requests are implicitly denied by default.
2. **Evaluate SCPs**: Organization Service Control Policies are checked first, filtering maximum allowed permissions.
3. **Evaluate Resource-based policies**: If a resource-based policy grants access, it can allow access even without identity-based policy permission (within the same account).
4. **Evaluate Permission Boundaries**: These cap the maximum permissions an identity-based policy can grant.
5. **Evaluate Identity-based policies**: The actual permissions attached to the principal are evaluated.
6. **Explicit Deny Always Wins**: An explicit Deny in ANY policy overrides all Allow statements.

The critical rule is: **Explicit Deny > Explicit Allow > Implicit Deny**. If any policy at any level contains an explicit Deny, the request is denied regardless of any Allow statements elsewhere.

For cross-account access, both the source account's identity-based policy AND the target account's resource-based policy must explicitly allow the action. Understanding this evaluation logic is essential for designing least-privilege access models and troubleshooting permission issues in complex AWS environments.

IAM Roles and Cross-Account Access

IAM Roles and Cross-Account Access are fundamental concepts in AWS identity and access management that enable secure delegation of permissions without sharing long-term credentials.

**IAM Roles** are AWS identities with specific permission policies that determine what actions are allowed or denied. Unlike IAM users, roles do not have permanent credentials (passwords or access keys). Instead, they provide temporary security credentials through AWS Security Token Service (STS) when assumed. Roles can be assumed by IAM users, AWS services, applications, or federated users.

Key components of an IAM Role include:
- **Trust Policy**: Defines which principals (accounts, users, or services) are allowed to assume the role.
- **Permission Policy**: Specifies what actions and resources the role grants access to.
- **Session Duration**: Configurable timeout for temporary credentials (default 1 hour, max 12 hours).

**Cross-Account Access** allows users or services in one AWS account (trusted account) to access resources in another account (trusting account). This is achieved by:

1. **Creating a role** in the trusting account with a trust policy that references the trusted account's ID.
2. **Granting assume-role permissions** to users/roles in the trusted account.
3. **Assuming the role** using `sts:AssumeRole` API call, which returns temporary credentials.

This pattern is critical for organizations managing multiple AWS accounts, enabling centralized access management, resource sharing, and least-privilege enforcement.

**Security Best Practices:**
- Use **External ID** conditions in trust policies to mitigate the confused deputy problem.
- Implement **MFA requirements** (aws:MultiFactorAuthPresent condition) for sensitive cross-account roles.
- Apply **least-privilege permissions** to roles.
- Monitor role assumption using **AWS CloudTrail** logs.
- Use **IAM Access Analyzer** to identify unintended cross-account access.
- Leverage **AWS Organizations SCPs** to restrict which accounts can assume specific roles.

Cross-account access via IAM roles is preferred over sharing credentials, as it provides auditability, temporary access, and granular control over permissions across organizational boundaries.

AWS IAM Identity Center (SSO)

AWS IAM Identity Center (formerly AWS Single Sign-On) is a centralized identity management service that enables organizations to manage workforce access to multiple AWS accounts and business applications from a single location. It is a critical topic under Domain 4 (Identity and Access Management) of the AWS Certified Security – Specialty (SCS-C02) exam.

**Key Features:**

1. **Centralized Access Management:** IAM Identity Center provides a single point to create or connect workforce identities and manage access across your entire AWS Organization. Users get a personalized user portal to access all assigned accounts and applications.

2. **Identity Sources:** It supports multiple identity sources including its own built-in identity store, Microsoft Active Directory (via AWS Managed Microsoft AD or AD Connector), and external Identity Providers (IdPs) using SAML 2.0 or SCIM for automatic provisioning.

3. **Permission Sets:** These are collections of IAM policies that define the level of access users and groups have to AWS accounts. Permission sets are assigned to users/groups and mapped to specific AWS accounts, enabling fine-grained access control.

4. **Multi-Account Access:** Deeply integrated with AWS Organizations, IAM Identity Center simplifies managing access across multiple AWS accounts without needing to configure federation for each account individually.

5. **Application Integration:** It supports pre-integrated SAML 2.0 applications (e.g., Salesforce, Microsoft 365) and custom SAML applications, enabling true single sign-on across cloud services.

6. **Temporary Credentials:** IAM Identity Center issues short-lived credentials, following security best practices by eliminating long-term access keys.

7. **MFA Support:** Built-in multi-factor authentication support enhances security posture.

**Security Best Practices:**
- Enable MFA for all users
- Use least-privilege permission sets
- Leverage attribute-based access control (ABAC)
- Monitor access via AWS CloudTrail integration

For the SCS-C02 exam, understanding how IAM Identity Center integrates with Organizations, supports federated access, and enforces least-privilege principles is essential.

Amazon Cognito

Amazon Cognito is a fully managed AWS service that provides authentication, authorization, and user management for web and mobile applications. It is a critical component within Domain 4: Identity and Access Management of the AWS Certified Security – Specialty (SCS-C02) exam.

Amazon Cognito consists of two primary components:

1. **User Pools**: These are user directories that provide sign-up and sign-in functionality. User Pools handle user registration, authentication, and account recovery. They support multi-factor authentication (MFA), password policies, and integration with external identity providers (IdPs) such as Google, Facebook, Amazon, Apple, and SAML 2.0/OIDC-based providers. Upon successful authentication, User Pools issue JSON Web Tokens (JWTs), including ID tokens, access tokens, and refresh tokens.

2. **Identity Pools (Federated Identities)**: These provide temporary AWS credentials to users, enabling them to access AWS services like S3 or DynamoDB directly. Identity Pools support both authenticated users (from User Pools or external IdPs) and unauthenticated (guest) users. They leverage AWS STS to assign IAM roles with fine-grained permissions.

Key security features include:
- **Advanced Security**: Adaptive authentication that detects risky sign-in attempts and can trigger additional verification.
- **Lambda Triggers**: Custom workflows at various stages of authentication, such as pre-sign-up validation, custom authentication challenges, and post-confirmation actions.
- **Token Management**: Short-lived tokens with configurable expiration for enhanced security.
- **Encryption**: Data encryption at rest and in transit.
- **Compliance**: Supports HIPAA, SOC, and PCI DSS compliance requirements.

For the SCS-C02 exam, understanding how Cognito integrates with API Gateway, ALB, and other AWS services is essential. Cognito authorizers can secure API Gateway endpoints, while Identity Pools enable least-privilege access to AWS resources through IAM role mapping. Knowing when to use User Pools versus Identity Pools, and how to implement secure federation patterns, is fundamental for exam success.

AWS Organizations and SCPs

AWS Organizations is a service that enables centralized management of multiple AWS accounts. It allows you to consolidate billing, group accounts into Organizational Units (OUs), and apply governance policies across your entire AWS environment. This hierarchical structure provides a scalable way to manage security, compliance, and access at scale.

Service Control Policies (SCPs) are a key feature of AWS Organizations that act as permission guardrails for member accounts. SCPs define the maximum available permissions for IAM users and roles within accounts they are applied to. Importantly, SCPs do not grant permissions — they restrict what actions are allowed, functioning as a filter on top of existing IAM policies.

Key concepts include:

1. **Inheritance**: SCPs are inherited down the organizational hierarchy. A policy applied to the root propagates to all OUs and accounts beneath it. Policies applied to an OU affect all child accounts and nested OUs.

2. **Deny by Default vs. Allow List**: SCPs can follow either a deny-list strategy (start with FullAWSAccess and explicitly deny specific actions) or an allow-list strategy (remove FullAWSAccess and explicitly allow only desired actions). The deny-list approach is more common.

3. **Effective Permissions**: The effective permissions for a principal are the intersection of IAM policies, SCPs, resource-based policies, and permission boundaries. An action must be allowed at every level to succeed.

4. **Management Account Exception**: SCPs do not affect the management (formerly master) account, which retains full permissions regardless of applied SCPs.

5. **Use Cases**: SCPs are commonly used to prevent accounts from disabling CloudTrail, leaving the organization, accessing specific regions, or using unapproved services.

For the SCS-C02 exam, understanding that SCPs are preventive controls (not detective), they don't grant access, and they work in conjunction with IAM policies is critical. SCPs are essential for enforcing organizational security baselines across all member accounts.

IAM Access Analyzer

IAM Access Analyzer is a powerful AWS service that helps you identify resources in your organization and accounts that are shared with external entities. It continuously monitors resource-based policies to detect potential unintended access, which is critical for maintaining a strong security posture.

**Key Features:**

1. **External Access Analysis:** Access Analyzer evaluates resource-based policies on services such as S3 buckets, IAM roles, KMS keys, Lambda functions, SQS queues, and Secrets Manager secrets. It identifies resources that can be accessed from outside your AWS account or organization, flagging them as "findings."

2. **Unused Access Analysis:** It can detect unused IAM roles, unused access keys, unused passwords, and unused permissions, helping you implement least-privilege access by identifying and removing unnecessary entitlements.

3. **Policy Validation:** Access Analyzer provides policy validation by checking IAM policies against AWS best practices and grammar rules, offering actionable recommendations to help you author secure and functional policies.

4. **Policy Generation:** It can generate fine-grained IAM policies based on actual access activity captured in AWS CloudTrail logs, helping you create least-privilege policies tailored to real usage patterns.

5. **Custom Policy Checks:** You can validate that policies conform to your organization's security standards before deployment using custom policy checks powered by automated reasoning.

**How It Works:**
You create an analyzer by selecting a zone of trust (either your AWS account or your entire AWS Organization). Access Analyzer uses mathematical, logic-based reasoning (called automated reasoning) to analyze all possible access paths and generate comprehensive findings.

**Integration:**
Findings can be reviewed in the AWS Console, exported via APIs, sent to AWS Security Hub for centralized monitoring, and trigger automated remediation through Amazon EventBridge.

**Exam Relevance:**
For SCS-C02, understand that Access Analyzer is essential for identifying cross-account access, enforcing least privilege, validating policies, and detecting resource exposure—all fundamental to identity and access management security.

More Domain 4: Identity and Access Management questions
360 questions (total)