Docs / Trust graph
Trust graph
How AccessLens maps who can assume what across your AWS accounts, highlights risky paths to admin, and answers "who can do X?" and path questions.
Updated
The Trust graph shows the IAM relationships in every scanned account as one graph, built from each account's latest scan.
What's in it
Nodes: AWS accounts, IAM users, IAM roles, external accounts (ones that aren't in AccessLens), AWS service principals, federated identity providers (OIDC and SAML), IAM Roles Anywhere trust anchors, and * (anyone).
A Roles Anywhere trust anchor is drawn for a role when the role trusts Roles Anywhere, the trust's aws:SourceArn condition (if it has one) names that anchor, and an enabled profile in the anchor's Region lists the role. Anyone holding a certificate the anchor's certificate authority issued can then get the role's credentials, so the anchor is an entry point like an OIDC provider.
Edges:
| Edge | Means |
|---|---|
| Trusted by | The role's trust policy admits the principal. |
| Can assume | The trust policy admits the principal, the principal's own explicit denies and service control policies don't rule it out, and, across accounts, its identity policy allows sts:AssumeRole. Resolved when both accounts are in AccessLens. |
| Passes role to | The principal has iam:PassRole on a role a service can use, for one of the services the role trusts. |
An edge that depends on a condition AccessLens can't check offline, such as MFA, a source IP or an ExternalId, is marked as conditional. An edge that a service control policy or an explicit deny rules out isn't drawn at all. Service control policies are applied once the organization's management account (or a delegated administrator) has been scanned.
Admin principals are drawn larger, and nodes with critical or high findings are outlined in red.
Risky paths
Highlight risky paths finds paths from public, external or federated entry points (*, accounts outside AccessLens, OIDC and SAML providers, and Roles Anywhere trust anchors) to admin principals, and highlights them. A GitHub Actions OIDC trust without a sub condition that leads, through role chaining, to an admin role is the kind of path it exists to show.
Ask questions
Select a node to see its kind and account, its findings and, for users and roles, its policies and trust policy. From a selected node you can:
- Show all paths to another user or role: every path between them, up to 8 hops and 100 paths;
- show what it can reach: everything reachable from it.
Who can …?
Enter an action, such as s3:GetObject, and a resource ARN (or * for actions that aren't resource-scoped), and Who can…? lists every principal that can do it:
- directly, with the policies and statements that grant it. It combines each principal's identity policies, permissions boundary, explicit denies and service control policies with the resource's own policy when AccessLens collected it (S3 buckets and objects, KMS keys, role trust policies, Lambda, SQS, SNS, Secrets Manager, ECR, DynamoDB, EFS and the other resource-policy collectors). In the same account either side is enough, except for KMS keys and role trust, where the resource policy must allow; across accounts both must allow; an explicit deny in the resource policy wins.
- through others, by assuming or passing roles that have the access, with the shortest path.
Each answer is Allowed or Depends on conditions, with the condition keys that decide it. Principals the resource policy names that AccessLens can't evaluate, such as *, other accounts and AWS services, are listed too. The answer notes what wasn't included, such as service control policies before the management account is scanned, or a resource AccessLens hasn't collected. Everything happens on your computer; the query makes no AWS calls.
Filter and search
Filter by account, by risk (admin principals, high-risk nodes, or anything with findings) and by edge type, and hide AWS service principals to reduce noise. Search finds a node by role name, ARN or account.
Large accounts
The layout is computed off the main thread. Graphs up to 1,500 nodes are drawn as SVG and larger ones on a canvas. Pan and zoom with the mouse or trackpad, or with the zoom buttons from the keyboard. Everything shown in the graph is also available as a table of edges.
Export
Export the current view as SVG or PNG, or the filtered graph as JSON, with the native save dialog.