-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception When Policy is Only Used as Permission Boundary #121
Labels
bug
Something isn't working
Comments
I ran into a similar issue except that the error was raised line 184: for p in u['AttachedManagedPolicies']:
user_policies.append(_get_policy_by_arn_or_raise(p['PolicyArn'], result['policies'])) The problematic policy is attached as a permissions policy to an IAM user. I used the same workaround as @brandonstevens but ran into another issue (not sure if linked):
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
PMapper throws an exception and exits when attempting to graph an AWS Account that contains an IAM identity that includes a Permission Boundary that has not other usage. i.e. a managed policy is not attached to any identities and only used as a permission boundary.
To Reproduce
Steps to reproduce the behavior, please include information on suspected users/roles that are the source of the issue when possible:
Expected behavior
PMapper successfully completes graphing the environment.
Note
For testing, I changed https://github.com/nccgroup/PMapper/blob/master/principalmapper/graphing/gathering.py#L187 to no longer raise an error if the policy isn't found in the graph data by swapping the function to
_get_policy_by_arn
(see below).I don't know what side-effects this may have, but if this is acceptable, happy to create a PR with the change.
The text was updated successfully, but these errors were encountered: