AWS IAM: represent STS_ASSUMEROLE_ALLOW from arn:aws:iam::ACCOUNT_NUMBER:root #1416
Labels
analysis
Regarding ways to better understand and present data in the graph
AWS
Related to cartography's AWS module
data-addition
Describes adding new data to the graph
Description:
The AWS IAM sync currently draws STS_ASSUMEROLE_ALLOW relationships by looking for TRUSTS_AWS_PRINCIPAL relationships:
cartography/cartography/intel/aws/iam.py
Lines 457 to 463 in 4fa4b82
This however does not handle
arn:aws:iam::ACCOUNT_NUMBER:root
. If a principal trusts root, then technically any role in that account is able to assume it. To properly represent this, we could draw an STS_ASSUMEROLE_ALLOW relationship from every role in ACCOUNT_NUMBER to the target principal. This could be quite edge heavy in some cases but would properly highlight cross account permissions.cc: @SecPrez eager to hear your thoughts here. I'm thinking this is worth doing even if the rel count can be heavy for some cases.
The text was updated successfully, but these errors were encountered: