-
Notifications
You must be signed in to change notification settings - Fork 4k
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
(aws-cdk): (Disallow CDK Bootstrap to default AdministratorAccess for cfn-exec-role) #27097
Comments
I can't give any specifics due to your situation, but the following articles may be of interest to you:
Do keep in mind the AWS Shared Responsibility Model: https://aws.amazon.com/compliance/shared-responsibility-model/ |
Hi @indrora, Thank you for sending the permission boundary information. We are actually enforcing a few things to securing the accounts that also include permission boundaries:
As you already called out, the Permission Boundary will restrict users and cdk to only the permission they should have. However, we still need to remove the default AdministratorAccess role when bootstrapped without the --cloudformation-execution-policies' parameter. Our Security and Policy scanning tool finds the AdministratorAccess role and flagging the accounts status as violation. The Config Rules then removes that entry making CDK unusable.
|
@smislam this is a possible solution, but keep in mind that it would degrade the bootstrapping experience for all the user who currently have no such constraints as you do. Without knowing more about your specific circumstances, it's hard to tell, but couldn't you automate this process yourself, to make sure that the role has the right policies? Given that you do it monthly, I'm assuming you already have some CI/CD or bash script triggered by a cron job or something that does the bootstrap for you. |
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
@otaviomacedo , thank you for responding. Yes, I agree there are multiple ways of fixing this. I am focusing on least privileged access as part of AWS best practices. Adding a requirement of |
Describe the feature
By default, CDK Bootstrap uses AdministratorAccess for cfn-exec-role when we run the
cdk bootstrap
command. This allows CDK to have higher privileges that the user is authorized to perform and poses a security concern. Feature request is to make '--cloudformation-execution-policies' parameter mandatory.Use Case
In my account, the account administrator disabled using AdministratorAccess. The account also has Config rules to remove AdministratorAccess access if found. We also have a security policy that removes the CDK S3 bucket first day of a month. Since we require re-bootstrapping the account each month, it would be ideal to make cdk bootstrap '--cloudformation-execution-policies' parameter mandatory. That way, it will force us to pass the right cfn-exec-role than to have CDK default to AdministratorAccess role.
Proposed Solution
Make '--cloudformation-execution-policies' parameter mandatory
Other Information
No response
Acknowledgements
CDK version used
2.94.0 (build 987c329)
Environment details (OS name and version, etc.)
AWS Workspace (Microsoft Windows Server 2016 DataCenter 10.0.14393 Build 14393)
The text was updated successfully, but these errors were encountered: