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

feat: Allow adding permissions boundaries via app upgrade #5949

Open
wants to merge 1 commit into
base: mainline
Choose a base branch
from

Conversation

aburgel
Copy link

@aburgel aburgel commented Oct 7, 2024

I couldn't find a way to add permissions boundary to an existing app, so I kinda hacked around the internals to make it possible. I thought others might find this helpful.

I added a --permissions-boundary flag to copilot app upgrade, so you can set a boundary. During the upgrade process, the application parameter in Parameter Store will get updated with the permissions boundary value and the infra roles and app stackset will get upgraded as well. Then you can deploy your envs, services and jobs individually, which will add permissions boundaries to their resources.

I also added a --force flag to force "upgrading" an app when the version is unchanged. This allows you to add the permissions boundary to an existing app even if it's already on the latest version.

I haven't added tests or anything since I doubt this is the best way to implement this (or if it's even safe to add a permissions boundary). But I am happy to get this into a shippable state if anyone has any feedback. Piggy-backing on upgrade was mostly for expediency, this may be better implemented in a new command like app modify or something.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the Apache 2.0 License.

@aburgel aburgel requested a review from a team as a code owner October 7, 2024 18:27
@aburgel aburgel requested review from KollaAdithya and removed request for a team October 7, 2024 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant