Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

Weakness in the Lambda code #17

Open
daftkid opened this issue Jan 6, 2023 · 0 comments
Open

Weakness in the Lambda code #17

daftkid opened this issue Jan 6, 2023 · 0 comments

Comments

@daftkid
Copy link
Contributor

daftkid commented Jan 6, 2023

Today just noticed that if someone creates a new IAM user or IAM role and specifies permission boundaries policy during the role/user creation (for example, via creation wizard) and this policy is AWS-managed, Lambda function will not be able to update this policy to be equal to our "correct" policy and fail.

After that IAM user/role's permission boundaries policy will remain the same as specified in a creation request and "correct" policy will not be enforced.

It's needed to manually change policy for each "broken" user/role.

Please see the code here: https://github.com/aws-samples/scp-alternative-solution/blob/main/lambda/scp-iam-event-dispatcher.py#L430

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant