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

[cli] bootstrap with Permissions Boundary #9256

Closed
roskelleycj opened this issue Jul 25, 2020 · 2 comments · Fixed by #9886
Closed

[cli] bootstrap with Permissions Boundary #9256

roskelleycj opened this issue Jul 25, 2020 · 2 comments · Fixed by #9886
Assignees
Labels
effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2 package/tools Related to AWS CDK Tools or CLI

Comments

@roskelleycj
Copy link

❓ General Issue

The Question

Trying to use the new developer preview for cdk-pipelines I needed to run the bootstrap process again. Tutorial steps here. When I ran the process it failed with IAM CreateRole errors. It took some amount of digging to find that the root cause is related to the use of Boundary Permissions. The new bootstrap cloudformation template creates 4 IAM Roles, all of which need a PermissionsBoundary property to be set. Obviously, this is account specific. As my ORG does not allow just random role creation, but will allow the role creation if the PermissionsBoundary is configured properly.

So is it possible to have an option like --cloudformation-execution-policies <policy> wherein the PermissionsBoundary is provided and subsequently applied to roles being created in the bootstrap?

Please note that this is in the context of the bootstrap. However, this question quickly applies to any CDK app. How can one configure as an aspect for a CDK App that all roles be generated with the provided PermissionsBoundary?

Environment

  • CDK CLI Version: 1.54.0 (build c01b9b9)
  • Node.js Version: v12.18.3
  • OS: OSX 10.15.6
  • Language (Version): all
@roskelleycj roskelleycj added guidance Question that needs advice or information. needs-triage This issue or PR still needs to be triaged. labels Jul 25, 2020
@SomayaB SomayaB changed the title [cdk] bootstrap with Permissions Boundary [cdk-pipelines] bootstrap with Permissions Boundary Jul 27, 2020
@github-actions github-actions bot added the @aws-cdk/pipelines CDK Pipelines library label Jul 27, 2020
@ericzbeard ericzbeard removed the needs-triage This issue or PR still needs to be triaged. label Jul 27, 2020
@njlynch njlynch added package/tools Related to AWS CDK Tools or CLI and removed @aws-cdk/pipelines CDK Pipelines library labels Jul 31, 2020
@njlynch njlynch changed the title [cdk-pipelines] bootstrap with Permissions Boundary [cli] bootstrap with Permissions Boundary Jul 31, 2020
@njlynch
Copy link
Contributor

njlynch commented Jul 31, 2020

This is a general feature request for the CLI, I believe. Motivated by, but not specific to, pipelines.

@ericzbeard ericzbeard removed their assignment Aug 3, 2020
@rix0rrr
Copy link
Contributor

rix0rrr commented Aug 4, 2020

It is. And the requests with tweaks to the bootstrapping stack are endless. I've heard 2 already in this week alone, each of them "just one more flag" to add.

We should add CLI parameters to dump the template to stdout and to use the template from a given file, and then tell people to do their org-specific customizations that way. Otherwise there will be no end to this and we'll end up with a 100-flag monstrosity.

@rix0rrr rix0rrr added @aws-cdk/pipelines CDK Pipelines library effort/medium Medium work item – several days of effort p2 feature-request A feature should be added or improved. and removed guidance Question that needs advice or information. labels Aug 4, 2020
@SomayaB SomayaB removed the @aws-cdk/pipelines CDK Pipelines library label Aug 18, 2020
@mergify mergify bot closed this as completed in #9886 Aug 31, 2020
mergify bot pushed a commit that referenced this issue Aug 31, 2020
There are many requests for customization of the built-in bootstrapping
template. Rather than implementing each and every request, it's more
productive to allow users to help themselves.

This change introduces two new flags to `cdk bootstrap`:

* `cdk bootstrap --show-template`: prints the current template to
  stdout, which people can pipe to a file.
* `cdk bootstrap --template FILE`: reads the template from a file
  instead of using the built-in template.

This can be used to arbitrarily customize the bootstrapping template
for use in any organization.

I know that the documentation changes in this PR are pretty light,
but really a Developer Guide topic should be written on bootstrapping,
which is next on my TODO list.

Resolves #9256, resolves #8724, resolves #3684, resolves #1528, necessary for #9681.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2 package/tools Related to AWS CDK Tools or CLI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants