Skip to content
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

fix(iam): Role policies cannot grow beyond 10k #20400

Merged
merged 10 commits into from May 25, 2022

Commits on May 18, 2022

  1. fix(iam): Role policies cannot grow beyond 10k

    We add all Role policy statements to the Inline policy, which
    has a maximums size of 10k. Especially when creating CDK Pipelines
    that deploy to a lot of environments, the list of Role ARNs
    the Pipeline should be allowed to assume exceeds this size.
    
    Roles also have the ability to have Managed Policies attached
    (10 by default, 20 with a quota increase), each of them can be 6k
    in size. By spilling over from inline policies into Managed Policies
    we can get a total of 70k of statements attached to reach Role.
    
    This PR introduces `IComparablePrincipal` to be able to value-compare
    two principals: since we want to merge first before we split (to get the
    most bang for our buck), we now need to do statement merging during the
    prepare phase, while we are still working on the object graph (instead
    of the rendered CloudFormation template).
    * That means statement merging had to be modified to work on
      PolicyStatement objects, which requires being able to compare
      Principal objects.
    
    Closes #19276, closes #19939, closes #19835.
    rix0rrr committed May 18, 2022
    Configuration menu
    Copy the full SHA
    b6dcca2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7520981 View commit details
    Browse the repository at this point in the history
  3. Fix tests

    rix0rrr committed May 18, 2022
    Configuration menu
    Copy the full SHA
    072f38d View commit details
    Browse the repository at this point in the history

Commits on May 19, 2022

  1. Fix copy/pasteo

    rix0rrr committed May 19, 2022
    Configuration menu
    Copy the full SHA
    70ebd0f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6d5ab59 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f7c9952 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b07c311 View commit details
    Browse the repository at this point in the history

Commits on May 20, 2022

  1. Configuration menu
    Copy the full SHA
    1d6f4a3 View commit details
    Browse the repository at this point in the history

Commits on May 23, 2022

  1. Configuration menu
    Copy the full SHA
    0b5d853 View commit details
    Browse the repository at this point in the history

Commits on May 25, 2022

  1. Configuration menu
    Copy the full SHA
    2ec115b View commit details
    Browse the repository at this point in the history