# Attribute-Based Access Control

Attribute-Based Access Control is an authorization model that grants or denies access by evaluating attributes of the requester, resource, requested action, and request context.

Cloud concept. Updated 2026-10-29. Page: https://blowstack.com/tools/cloud-concepts-hub/attribute-based-access-control

> ABAC expresses access rules using attributes such as project, department, environment, or data classification instead of maintaining separate permissions for every identity and resource. In cloud environments, trusted identity attributes and resource tags can make permissions scale with changing teams and infrastructure, provided attribute assignment and modification are tightly controlled.

Practice exams covering Attribute-Based Access Control: [SOA-C03 AWS Certified CloudOps Engineer - Associate](https://blowstack.com/practice-exams/aws-certified-cloudops-engineer-associate), [DEA-C01 AWS Certified Data Engineer - Associate](https://blowstack.com/practice-exams/aws-certified-data-engineer-associate), [DVA-C02 AWS Certified Developer - Associate](https://blowstack.com/practice-exams/aws-certified-developer-associate), [DOP-C02 AWS Certified DevOps Engineer - Professional](https://blowstack.com/practice-exams/aws-certified-devops-engineer-professional), [MLA-C02 (beta) AWS Certified Machine Learning Engineer - Associate](https://blowstack.com/practice-exams/aws-certified-machine-learning-engineer-associate), [SCS-C03 AWS Certified Security - Specialty](https://blowstack.com/practice-exams/aws-certified-security-specialty), [SAA-C03 AWS Certified Solutions Architect - Associate](https://blowstack.com/practice-exams/aws-certified-solutions-architect-associate), [SAP-C03 AWS Certified Solutions Architect - Professional](https://blowstack.com/practice-exams/aws-certified-solutions-architect-professional).

## 6 key aspects of Attribute-Based Access Control

ABAC scales authorization through trusted attributes, supported policy conditions, protected tagging workflows, and validation of both permitted and denied requests.

1. **Attribute-driven policy evaluation**: Policies evaluate trusted attributes of the requester, resource, action, and environment. Matching a project or department attribute can scope access without listing each resource individually.
2. **Scalable resource selection**: New resources can enter an existing authorization scope when their attributes satisfy the policy. This reduces policy duplication, but requires consistent attribute names, values, and provisioning controls.
3. **Protected attribute lifecycle**: Authorization attributes must be protected from unauthorized assignment, modification, and removal. Treat permissions to modify identity attributes, pass session tags, or retag resources as potentially privilege-escalating capabilities.
4. **RBAC and ABAC composition**: Roles can establish job-function permissions while attributes restrict the resources those permissions affect. This hybrid avoids creating a separate role for every combination of team, project, and environment.
5. **Action-specific enforcement**: Attribute conditions work only where the authorization system and requested operation support them. Check resource-level authorization, condition-key support, and creation-time request attributes before relying on a tag-based rule.
6. **Negative-path testing**: Test missing attributes, mismatched values, unauthorized tagging, and explicit denies. Inspect the attributes on the actual temporary session rather than assuming they match the identity directory.

## Cloud services for Attribute-Based Access Control

IAM defines authorization rules, while IAM Identity Center and STS make trusted identity attributes available in temporary sessions. Policies compare those principal attributes with tags on supported resources, such as EC2 instances or Secrets Manager secrets. Roles or permission sets establish the allowed operations, and attribute conditions narrow their resource scope. Provisioning workflows must apply approved tags, and authorization policies must protect subsequent tag changes. Because service actions expose different authorization capabilities, validate condition-key support and test the complete flow from identity attributes through resource access.

- **[Amazon EC2](https://blowstack.com/tools/cloud-services-hub/amazon-ec2)**: EC2 supports tag-based access controls for many resource types and actions, including supported tag-on-create workflows. Engineers must check each action because EC2 operations differ in their resource-level and condition-key support.
- **[AWS Secrets Manager](https://blowstack.com/tools/cloud-services-hub/aws-secrets-manager)**: Secrets Manager supports resource-tag conditions that can restrict access to secrets by attributes such as project or environment. Protect secret-tagging permissions so users cannot change a secret's authorization scope to gain access.

## Attribute-Based Access Control exam questions

Real practice exam questions on Attribute-Based Access Control, with the correct answer and its explanation.

### Question 1 (SAP-C03)

**Question:**

A company uses a central identity account and a production account. Engineers federate into the identity account. Each engineer's source role session receives an authoritative, nontransitive Project tag from the corporate identity provider. Engineers cannot change this source-session tag or the identity provider's mappings.

All engineers assume one shared DataReader role in the production account. They supply a Project session tag in the AssumeRole request. The DataReader role's permissions allow secretsmanager:GetSecretValue only when the secret's Project resource tag equals aws:PrincipalTag/Project. Engineers cannot modify secrets or their tags. No other policies grant access to the secrets.

The DataReader trust policy currently allows the designated source role to perform sts:AssumeRole and sts:TagSession without tag conditions. A security review finds that engineers can request another project's Project session tag and read that project's secrets.

Which change will prevent this privilege escalation while retaining the shared destination role and access to each engineer's own project?

**Correct answer:** Update the DataReader trust policy to allow sts:AssumeRole and sts:TagSession only when aws:RequestTag/Project equals ${aws:PrincipalTag/Project}. Also require the Project request tag to be present and use ForAllValues:StringEquals on aws:TagKeys to permit only the Project tag key.

**Explanation:** During role assumption, aws:PrincipalTag/Project identifies the calling source session's authoritative project, while aws:RequestTag/Project is the value requested for the new session. Requiring equality prevents the engineer from selecting another project's value. Requiring the tag and restricting allowed tag keys prevents omission and unauthorized additional session attributes. The destination permissions policy can then safely use the resulting Project principal tag.

### Question 2 (SOA-C03)

**Question:**

A company uses a shared IAM permissions policy for operations roles. Each role has a Department tag assigned by security administrators, and engineers cannot change role tags. Engineers must be able to create AWS Secrets Manager secrets only when the creation request includes a Department tag that matches their role's Department tag. Requests that omit the tag or specify another department must fail.

A CloudOps engineer is preparing an Allow statement for secretsmanager:CreateSecret with Resource set to "*". All dependent permissions needed to create tagged secrets are already configured. No other policy grants CreateSecret or restricts the required requests.

Which condition should the engineer add to the Allow statement?

**Correct answer:** {"StringEquals": {"aws:RequestTag/Department": "${aws:PrincipalTag/Department}"}}

**Explanation:** This compares the Department tag supplied in the creation request with the requesting role's trusted Department tag. StringEquals does not match when the request tag is absent or has a different value, so only correctly tagged creation requests receive this permission.

### Question 3 (SCS-C03)

**Question:**

A company federates security personnel into a shared SecurityEntry IAM role by using AWS STS. Each SecurityEntry session receives a Duty session tag from an administrator-controlled identity provider attribute. The value is either Analyst or IncidentResponder. Users cannot change the Duty tag on their SecurityEntry sessions.

Users then call AssumeRole to obtain credentials for either an Investigation role or a Remediation role. Both destination roles currently trust SecurityEntry without conditions. SecurityEntry allows sts:AssumeRole on both roles. Investigation grants approved read-only permissions, and Remediation grants approved write permissions.

Analysts must be able to assume only Investigation. Incident responders must be able to assume both roles. Users control their AssumeRole request parameters, including RoleSessionName and requested session tags. The destination roles already permit sts:TagSession without tag-related restrictions. No transitive tags are involved, and no other policies restrict role assumption.

The company must retain the existing roles and permissions policies. Which change to the Remediation role's trust policy will enforce the required job-function restriction?

**Correct answer:** Add a StringEquals condition requiring aws:PrincipalTag/Duty to equal IncidentResponder to the statement that allows sts:AssumeRole.

**Explanation:** During role assumption, aws:PrincipalTag/Duty evaluates the trusted tag on the calling SecurityEntry session. Only IncidentResponder sessions satisfy the condition. A tag requested for the destination session does not replace the caller's principal tag during this evaluation. Investigation remains available to both job functions.

### Question 4 (DEA-C01)

**Question:**

A company uses Amazon Athena to query tables in an AWS Lake Formation–managed data lake. Each database has a business-domain classification that its tables inherit. A publishing pipeline classifies each table as Internal, Partner, or Restricted before making it available for queries. Finance analysts must be able to read all current and future Finance tables classified as Internal or Partner, but no Restricted tables or tables from other domains. Administrators must not maintain individual table grants as tables are added. The analysts' IAM role already has the necessary Athena and supporting IAM permissions, but it has no Lake Formation data permissions or direct access to the underlying Amazon S3 objects. Which solution best meets these requirements?

**Correct answer:** Assign LF-Tags for Domain to databases and Classification to tables. Grant the analyst role SELECT through one LF-Tag expression requiring Domain=Finance AND Classification to be either Internal or Partner.

**Explanation:** Lake Formation tag-based access control supports inherited database tags and table-level tags. Within an LF-Tag expression, different tag keys are combined with AND, while multiple values for one key are combined with OR. This grant therefore covers only Finance tables classified as Internal or Partner, including newly published tables with matching tags.

### Question 5 (DOP-C02)

**Question:**

A company uses AWS Organizations to manage workload accounts. Each workload account contains deployment IAM roles with centrally controlled Department role tags. A central services account contains shared operations roles with centrally controlled owningDepartment role tags.

A deployment role must be able to assume a shared operations role only when the caller belongs to the company's organization and its Department tag matches the target role's owningDepartment tag. New workload accounts and departments must be supported without updating account lists or department values in the shared roles' trust policies.

The deployment roles' identity policies already allow sts:AssumeRole and sts:TagSession on the shared operations roles. Calling sessions have no session tags. Deployment teams cannot modify IAM role tags or policies, but they can supply session tags in AssumeRole requests if a target trust policy permits them. No other authorization restrictions apply.

Which trust policy design for the shared operations roles meets these requirements?

**Correct answer:** Use one Allow statement with Principal set to "*" and Action set to sts:AssumeRole. In the same StringEquals condition, require aws:PrincipalOrgID to equal the company's organization ID and aws:PrincipalTag/Department to equal "${aws:ResourceTag/owningDepartment}". Include no other Allow statements.

**Explanation:** Conditions in this statement must all be satisfied. aws:PrincipalOrgID restricts callers to the organization, and the principal-tag comparison requires the caller's centrally controlled Department to match the target role's owningDepartment. The policy does not enumerate accounts or departments. Because it does not allow sts:TagSession, callers cannot use a requested session tag to override the Department attribute in the resulting session.

### Question 6 (SAA-C03)

**Question:**

A company lets application teams create secrets in AWS Secrets Manager in one AWS account. Each team's IAM role has a nonempty CostCenter principal tag managed by the security team. Team members cannot change role tags or modify a secret's CostCenter tag after creation.

Every CreateSecret request must include a CostCenter tag whose value matches the calling role's CostCenter tag. Requests that omit this tag must fail. New cost centers are added frequently, so the company requires one reusable permissions policy without lists of cost center values or secret ARNs.

No existing policy allows secretsmanager:CreateSecret. All required dependent permissions are already configured, and no other authorization controls restrict creation.

Which Allow statement should a solutions architect add to the reusable policy?

**Correct answer:** Allow secretsmanager:CreateSecret on Resource "*" with a StringEquals condition comparing aws:RequestTag/CostCenter to ${aws:PrincipalTag/CostCenter}.

**Explanation:** This condition compares the CostCenter tag supplied in the creation request with the caller's trusted principal tag. StringEquals does not match when the request tag is absent, so missing or mismatched tags receive no Allow. The same policy works for new cost centers without policy changes.

## Practice Attribute-Based Access Control in a full exam

Questions on Attribute-Based Access Control in each practice exam, with every answer option and an explanation for each:

- [SCS-C03](https://blowstack.com/practice-exams/aws-certified-security-specialty): 18 questions
- [DOP-C02](https://blowstack.com/practice-exams/aws-certified-devops-engineer-professional): 7 questions
- [SOA-C03](https://blowstack.com/practice-exams/aws-certified-cloudops-engineer-associate): 5 questions
- [DEA-C01](https://blowstack.com/practice-exams/aws-certified-data-engineer-associate): 3 questions
- [SAA-C03](https://blowstack.com/practice-exams/aws-certified-solutions-architect-associate): 3 questions
- [MLA-C02 (beta)](https://blowstack.com/practice-exams/aws-certified-machine-learning-engineer-associate): 1 question
- [SAP-C03](https://blowstack.com/practice-exams/aws-certified-solutions-architect-professional): 1 question
- [DVA-C02](https://blowstack.com/practice-exams/aws-certified-developer-associate): 1 question

## What is Attribute-Based Access Control

Attribute-Based Access Control (ABAC) makes authorization decisions by evaluating attributes against policy rules. Attributes can describe the subject requesting access, the target resource, the requested operation, and environmental conditions such as time or network origin. For example, a policy might permit an engineer to read a secret only when the engineer's project attribute matches the secret's project attribute. Authentication establishes who the requester is; ABAC determines what that requester may do.

Cloud implementations commonly represent attributes through identity metadata, resource tags, and temporary-session attributes. In AWS, IAM policies can compare a principal tag such as aws:PrincipalTag/Project with a resource tag through aws:ResourceTag/Project or a service-specific condition key. A shared policy can therefore authorize supported operations on resources belonging to the caller's project without enumerating every resource identifier. Tags alone do not grant access: an applicable policy must explicitly use them, and the requested action must support the relevant condition keys.

Consider an organization running several application teams. Engineers assume a role that permits selected development operations, while a trusted identity provider supplies their project as a session tag. Resources carry a corresponding Project tag. The same role and policy structure can serve multiple teams, with the tag comparison separating their access. A newly created resource can fall within the policy automatically when it has the required attributes, but only if other authorization controls also permit the operation.

Role-Based Access Control (RBAC) instead groups permissions around job functions, such as developer, auditor, or database administrator. ABAC and RBAC are complementary rather than mutually exclusive. A practical hybrid uses roles to define allowed categories of actions and attributes to determine which resources those actions may affect. RBAC is often easier for a small set of stable responsibilities; ABAC reduces repeated policies across many projects but introduces dependencies on attribute quality and governance.

Attribute integrity is a security boundary. An engineer who can change a resource's Project tag or choose an unrestricted session tag might gain access to another team's resources. Restrict who can assign identity attributes, which session-tag keys and values are accepted, and who can add, change, or remove authorization-sensitive resource tags. AWS role trust policies must appropriately authorize session tagging through sts:TagSession. Validate permitted tags during resource creation using supported request-tag and tag-key conditions, and protect subsequent tagging operations separately.

Creation requires special attention because the resource may not yet have tags available for authorization. Use request attributes where the creation API supports them, require mandatory tags, and test operations that create several related resources. Tagging support does not automatically imply support for tag-based authorization, and some actions cannot be restricted by resource tags. Consult each action's authorization capabilities and design separate permissions for unsupported operations.

Troubleshooting should verify the actual session attributes, resource tags, condition operators, action support, and all applicable policies. Missing attributes can cause conditions to fail, while negated operators or IfExists conditions can behave differently from an ordinary equality check. An ABAC allow does not override an applicable explicit deny, and permission boundaries or organizational controls can still constrain access. Test matching, mismatching, missing-tag, and unauthorized-retagging scenarios rather than validating only successful requests.

## Learn Attribute-Based Access Control in lessons

12 short lessons on Attribute-Based Access Control in 7 certification courses.

- MLA-C02 (beta): Attribute-Based Access Control: project-scoped permissions (Premium), https://app.blowstack.com/lessons/attribute-based-access-control-project-scoped-permissions-mla-c02
- SAP-C03: Attribute-Based Access Control: trusted tag-based authorization (Premium), https://app.blowstack.com/lessons/attribute-based-access-control-trusted-tag-based-authorization-sap-c03
- SOA-C03: Attribute-Based Access Control: tag-based authorization in AWS (Premium), https://app.blowstack.com/lessons/attribute-based-access-control-tag-based-authorization-in-aws-soa-c03
- SCS-C03: Attribute-Based Access Control: secure tag-based authorization (Premium), https://app.blowstack.com/lessons/attribute-based-access-control-secure-tag-based-authorization-scs-c03
- DEA-C01: Attribute-Based Access Control versus Role-Based Access Control (Premium), https://app.blowstack.com/lessons/attribute-based-access-control-versus-role-based-access-control-dea-c01
- DOP-C02: Attribute-Based Access Control: trusted attributes for scalable permissions (Premium), https://app.blowstack.com/lessons/attribute-based-access-control-trusted-attributes-for-scalable-permissions-dop-c02
