Amazon Web Services
Connect AWS accounts to AccessRoot with a read-only discovery role, and learn what AccessRoot reads and how it builds the access model.
The AWS connection gives AccessRoot read-only access to the identity and authorization configuration of the accounts you choose. From that it builds the access model behind Access Graph, the baseline Access Diff compares pull requests against, and the observed state Access Drift checks.
What AccessRoot reads
For each connected account, AccessRoot reads:
- IAM identities and roles;
- identity policies and resource policies;
- trust relationships between roles, including cross-account trust;
- the resource metadata needed to place a permission on a resource, such as which table or bucket an action applies to.
It combines these into effective access: what an identity can actually do once identity policies, resource permissions, trust relationships and authorization constraints are considered together.
What AccessRoot does not need
The analysis does not require reading application records, object contents or secret values. For example, AccessRoot can determine that a role is allowed to call dynamodb:PutItem on the CustomerRecords table without reading any item in the table. The connection is for authorization analysis, and it has no permission to change IAM.
Connect an account
You need permission to create an IAM role in the account.
- Open Settings › Connections and choose AWS under Cloud environments.
- Follow the setup to create the discovery role in the account you want to analyze. Each account you connect has its own role.
- Select the account, for example
halvorne-prod. - Save the connection.
AccessRoot uses temporary credentials with the discovery role. For cross-account access, it uses scoped IAM roles and temporary credentials. Once the connection is active it is listed as Read-only, for example “AWS · halvorne-prod”, with the description Discovery role, temporary credentials.
What the role looks like
The connection setup supplies the exact trust relationship and read permissions to use. The snippet below is illustrative only, to show the shape of a read-only discovery role defined in Terraform. Do not copy the placeholder values.
resource "aws_iam_role" "accessroot_discovery" {
name = "accessroot-discovery"
# Illustrative: the trusted principal and any extra conditions
# come from the connection setup in your workspace.
assume_role_policy = jsonencode({
Statement = [{
Effect = "Allow"
Action = "sts:AssumeRole"
Principal = { AWS = "<principal shown in the setup>" }
}]
})
}
# Illustrative: read-only identity, policy and resource metadata.
# The complete action list is provided by the connection setup.
data "aws_iam_policy_document" "discovery_read" {
statement {
effect = "Allow"
actions = ["iam:Get*", "iam:List*"]
resources = ["*"]
}
}
Connect more than one account
Connect every account whose access you want to see in one place. In the sample workspace, halvorne-prod holds production and halvorne-shared holds shared services. With both connected, Access Graph can show a path that crosses the boundary: partner-sync-role in halvorne-shared can assume reporting-role, which reads objects from the customer-exports-prod bucket with s3:GetObject. If only one account were connected, the graph would stop at the account boundary and the path would be incomplete.
What you can do once it is connected
- Start from a sensitive resource, such as
CustomerRecords, and list every identity with a path to it, including paths through assumable roles. See Access Graph. - Find identities with broad or unexpected access to production resources. See Prioritization.
- Review the access impact of Terraform changes against these accounts. See Terraform and OpenTofu.
- Compare approved configuration with what AWS reports. See Access Drift.
Understand the limits of the model
AccessRoot models authorization from the configuration it can read. Access in AWS can also depend on other controls and on conditions attached to a request. Findings that are projected from a policy change say so: the access is projected from the policy, and effective access may also depend on other AWS controls. Treat a path as a reason to investigate, not as proof of use.
Change or remove the connection
Administrators can review connected accounts, update their scope and revoke the connection under Settings › Connections. Revoking stops new collection through that connection. Metadata and findings that were already collected stay subject to your workspace retention and deletion settings. Each change is recorded in Settings › Audit log. See Workspace and audit.
Related
- Permissions and data lists what each connection can and cannot do.
- The AWS integration page describes the AWS access model in more detail.