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

DataAllCustomPolicy is removed from the cdk-hnb659fds-cfn-exec-role after installing the latest version of cdkExecPolicy #1203

Closed
TejasRGitHub opened this issue Apr 19, 2024 · 3 comments
Labels

Comments

@TejasRGitHub
Copy link
Contributor

Describe the bug

After installing / updating the existing cdkExecPolicy.yaml on CF . The new DataAllCustomPolicy is created by appending the region.

This though removes the attached policy on the cdk-hnb659fds-cfn-exec-role.

How to Reproduce

Update the stack used to create the DataAllCustomPolicy.
Check if the cdk-hnb659fds-cfn-exec-role now doesn't have the policy attached

Expected behavior

No response

Your project

No response

Screenshots

No response

OS

Mac

Python version

3.9

AWS data.all version

2.4

Additional context

No response

@anushka-singh
Copy link
Contributor

I faced this too while creating a new environment in the OS deployed code

@dlpzx dlpzx added the type: bug Something isn't working label Apr 22, 2024
@dlpzx
Copy link
Contributor

dlpzx commented Apr 22, 2024

Hi @TejasRGitHub and @anushka-singh. Because of feature #1064, I updated the policy DataAllCustomPolicy because it was causing issues for multi-region setups.

For new environments, the bootstraping changes a bit. As it appears in the UI command the name of the policy is no longer DataAllCustomPolicy but DataAllCustomPolicyREGION. So if you have documentation internally around this, it needs to be updated. We will make sure to add it in the release notes.

For existing environments, they can continue using the CDKToolkit as they were using it. If there is a need to update the custom policy (e.g. we add new permissions), then they should update the policy in CloudFormation and then run the cdk bootstrap command again with the new DataAllCustomPolicyREGION, this will update the CDKToolkit stack. DO NOT DELETE AND RE-CREATE Deleting IAM roles might cause issues for some AWS resources. I have not tested it, but I some AWS resources created by CDK can contain resource policies referencing that role, for example KMS keys.

dlpzx added a commit that referenced this issue Apr 25, 2024
### Feature or Bugfix
Documentation

### Detail
Explaining some changes for multiple environments in same account 

### Relates
#1203 

### Security
Please answer the questions below briefly where applicable, or write
`N/A`. Based on
[OWASP 10](https://owasp.org/Top10/en/).

- Does this PR introduce or modify any input fields or queries - this
includes
fetching data from storage outside the application (e.g. a database, an
S3 bucket)?
  - Is the input sanitized?
- What precautions are you taking before deserializing the data you
consume?
  - Is injection prevented by parametrizing queries?
  - Have you ensured no `eval` or similar functions are used?
- Does this PR introduce any functionality or component that requires
authorization?
- How have you ensured it respects the existing AuthN/AuthZ mechanisms?
  - Are you logging failed auth attempts?
- Are you using or adding any cryptographic features?
  - Do you use a standard proven implementations?
  - Are the used keys controlled by the customer? Where are they stored?
- Are you introducing any new policies/roles/users?
  - Have you used the least-privilege principle? How?


By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.
@dlpzx dlpzx added this to To do in v2.5.0 via automation Apr 29, 2024
@dlpzx dlpzx removed this from To do in v2.5.0 Apr 29, 2024
@TejasRGitHub
Copy link
Contributor Author

Hi @dlpzx , Thanks for clearing this up. I was able to upgrade to the new policy.

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

No branches or pull requests

3 participants