View a markdown version of this page

How AWS Assurance works with IAM - AWS Assurance

How AWS Assurance works with IAM

Before you use IAM to manage access to AWS Assurance, learn which IAM features you can use with AWS Assurance. To get a high-level view of how AWS Assurance and other AWS services work with IAM, see AWS services that work with IAM in the IAM User Guide.

IAM feature AWS Assurance support

Identity-based policies

Yes

Resource-based policies

No

Policy actions

Yes

Policy resources

Yes

Service-specific policy condition keys

No

Attribute-based access control (ABAC) with tags

Yes

Temporary credentials

Yes

Forward access sessions

Yes

Service roles

Yes

Service-linked roles

Yes

Access control lists (ACLs)

No

Users who sign in to the web application through IAM Identity Center are also subject to permission sets. Permission sets narrow what each user can do. They never grant more than IAM allows.

Identity-based policies for AWS Assurance

With IAM identity-based policies, you can allow or deny actions on resources, under conditions that you choose. AWS Assurance has no AWS managed policies for users, so you write your own. To view example policies, see AWS Assurance identity-based policy examples. To learn about all of the elements that you can use in a JSON policy, see IAM JSON policy elements reference in the IAM User Guide.

Resource-based policies within AWS Assurance

AWS Assurance doesn’t support resource-based policies. To let another AWS account connect to your environment, send that account an invitation. For more information, see Cross-account assessments.

Policy actions for AWS Assurance

The Action element of a policy lists the actions that the policy allows or denies. Policy actions usually have the same name as the associated AWS Assurance API operation.

Policy actions in AWS Assurance use the assurance prefix. For example, to grant someone permission to start an assessment with the StartAssessment API operation, you include the assurance:StartAssessment action in their policy. To specify multiple actions in a single statement, separate them with commas.

"Action": [ "assurance:GetAssessment", "assurance:StartAssessment" ]

You can specify multiple actions with wildcards (*). For example, to specify all actions that begin with the word List, include the following action.

"Action": "assurance:List*"

For the list of AWS Assurance actions, see Actions defined by AWS Assurance.

Some AWS Assurance actions also require permissions for other services:

  • CreateEnvironment and UpdateEnvironment – iam:PassRole for each role that you specify for the environment, and the dependent actions listed in Actions defined by AWS Assurance. For more information, see Service roles.

  • CreateEnvironment with tags – assurance:TagResource. For more information, see ABAC with AWS Assurance.

  • AssignPermissionSet – sso:DescribeInstance on the environment’s IAM Identity Center instance.

  • Any action that reads or writes content in an environment that uses a customer managed key – permissions on that key. For more information, see Encryption at rest for AWS Assurance.

Policy resources for AWS Assurance

The Resource element specifies the object or objects to which the action applies. AWS Assurance defines one resource type, the environment. All of an environment’s projects, frameworks, assessments, evidence, and tasks are covered by the environment’s ARN. The environment ARN has the following format.

arn:${Partition}:assurance:${Region}:${Account}:environment/${EnvironmentId}

For example, to specify one environment in your statement, use its ARN.

"Resource": "arn:aws:assurance:us-east-1:111122223333:environment/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111"

To specify all environments in an account and Region, use a wildcard (*).

"Resource": "arn:aws:assurance:us-east-1:111122223333:environment/*"

Some actions, such as CreateEnvironment and ListEnvironments, don’t act on an existing environment. For those actions, use "*".

"Resource": "*"

For more information about the format of ARNs, see IAM ARNs in the IAM User Guide.

Policy condition keys for AWS Assurance

The Condition element specifies when statements run based on defined criteria. AWS Assurance doesn’t define service-specific condition keys. It supports the following global condition keys for tags:

  • aws:ResourceTag/${TagKey} – Filters access by the tags on the environment. Supported by every action that acts on an environment.

  • aws:RequestTag/${TagKey} – Filters access by the tags in the request. Supported by CreateEnvironment and TagResource.

  • aws:TagKeys – Filters access by the tag keys in the request. Supported by CreateEnvironment, TagResource, and UntagResource.

You can also use global condition keys that apply to all requests, such as aws:SourceIp and aws:RequestedRegion. To see all AWS global condition keys, see AWS global condition context keys in the IAM User Guide.

ABAC with AWS Assurance

Attribute-based access control (ABAC) grants access based on tags. You can tag an environment and then use the aws:ResourceTag/${TagKey} condition key to control access to it. A tag condition on an environment also covers everything in it, such as its projects and evidence.

To tag an environment when you create it, a principal needs both the assurance:CreateEnvironment and assurance:TagResource permissions. AWS Assurance treats the request tags as the tags of the new environment. So a policy that requires a resource tag also allows CreateEnvironment when the request includes that tag.

For an example policy, see Accessing environments based on tags.

Using temporary credentials with AWS Assurance

AWS Assurance supports temporary credentials. You obtain temporary credentials when you sign in with federation, assume an IAM role, or assume a cross-account role. You can also call AWS STS API operations such as AssumeRole or GetFederationToken.

Forward access sessions for AWS Assurance

Some AWS Assurance actions call other AWS services with the caller’s permissions. This is called a forward access session (FAS). Your policies must allow these downstream requests:

  • AWS KMS – AWS Assurance uses the caller’s permissions to encrypt and decrypt content with a customer managed key. The key policy must allow the caller to use the key.

  • IAM Identity Center – AWS Assurance uses the caller’s permissions to create and manage its application in your IAM Identity Center instance. AssignPermissionSet calls sso:DescribeInstance with the caller’s permissions.

For more information about forward access sessions, see Forward access sessions in the IAM User Guide.

Service roles for AWS Assurance

AWS Assurance uses the following IAM roles that you create in your account and specify for an environment. Each role must trust the AWS Assurance service principal, assurance.amazonaws.com. To discover and evaluate your resources, AWS Assurance uses its service-linked role instead. You don’t create or specify that role. For more information, see Service-linked roles for AWS Assurance.

  • Operator access role (operatorRole) – AWS Assurance assumes this role to issue temporary credentials to users who sign in to the web application with IAM credentials.

  • Identity Center role (identityStore.identityCenterRole) – AWS Assurance assumes this role for users who sign in to the web application. Its trust policy must allow both sts:AssumeRole and sts:SetContext, because AWS Assurance passes each user’s IAM Identity Center identity to the session. The role’s permissions policy is the most that any web application user can do in the environment.

To specify a role when you call CreateEnvironment or UpdateEnvironment, you need permission to pass it to AWS Assurance. Allow iam:PassRole on the role, and limit it with the iam:PassedToService condition key set to assurance.amazonaws.com. For an example, see Creating and managing environments.

To prevent the confused deputy problem, add the aws:SourceArn and aws:SourceAccount condition keys to each role’s trust policy. For more information, see Cross-service confused deputy prevention.

Service-linked roles for AWS Assurance

AWS Assurance uses a service-linked role named AWSServiceRoleForAssurance, with the AssuranceServiceRolePolicy managed policy attached. AWS Assurance uses this role to discover and evaluate the resources in each account of an environment. To create an environment or accept an invitation, a principal needs the iam:CreateServiceLinkedRole permission.

You can delete the role in IAM only when the account owns no environments in any Region, has no active connections to environments in other accounts, and has trusted access for AWS Assurance disabled. For more information, see Service-linked roles for AWS Assurance.