-
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
CDK Diff and Deploy do not include AWS::SSO::Assignment in security related changes #29835
CDK Diff and Deploy do not include AWS::SSO::Assignment in security related changes #29835
Comments
Another resource like this: #29731 |
For issue aws/aws-cdk#29835 This is the first of 2 PRs. The other PR will be to the main aws-cdk repository. Notice that AWS::SSO::PermissionSet has a property called `ManagedPolicies`. That's why I add that property check. And judging by the db.json that we create in this package (the service spec), AWS::SSO::PermissionSet is the only resource with that property name: ``` (18:36:39) bergjak@bcd074b101ed ~/workplace/CDK/awscdk-service-spec AwsSsoFix ✔ ➜ cat ~/db.json4 | jq '.schema.resource.entities.[]' | jq '.properties' | grep ManagedPolicies "scrutinizable": "ManagedPolicies" "scrutinizable": "ManagedPolicies" "scrutinizable": "ManagedPolicies" "scrutinizable": "ManagedPolicies" "scrutinizable": "CustomerManagedPolicies" "ManagedPolicies": { "scrutinizable": "ManagedPolicies" ``` AWS::SSO is the IAM Identity Center, and therefore changes to AWS SSO resources are security sensitive. Hence the issue. ### Testing As you'll see in the next pull request, I have integration tests for this change * Here is the PR with all the testing aws/aws-cdk#30009
### Issue # (if applicable) Closes #29835 ### Reason for this change IAM Identity Center resources were ignored in the security diff ### Description of changes * Adds the IAM Identity Center resources to CDK diff * fixes not presenting property changes when a resource is removed from the template ### Description of how you validated changes * Added unit tests and integration tests. * Ran the integration tests that mention cdk diff (`bin/run-suite -a cli-integ-tests -t 'cdk diff'`): ``` Test Suites: 2 skipped, 1 passed, 1 of 3 total Tests: 90 skipped, 13 passed, 103 total Snapshots: 0 total Time: 312.397 s Ran all test suites with tests matching "cdk diff": ``` ### Dependent PRs * Before this change can be merged, this change cdklabs/awscdk-service-spec#1052 must be merged. ### Checklist - [Y] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one. |
Context
We received a report regarding diff not handling AWS::SSO::Assignment resource changes as we security related change. We currently handle two packages as security related in cloudformation-diff:
iam
andnetwork
. We should add similar logic for SSO.I'm not actually positive whether we should call this a bug or a feature request because on closer inspection of our documentation for ConfirmPermissionsBroadening specifies
Pause the pipeline if a deployment would add IAM permissions or Security Group rules.
but the difference here is not super important. We should add this.Task
Update diff to include these resource changes. As part of this task we should also check to see if any other security related libraries have been added since this was last updated (Organizations comes to mind) and check to see if any updates have been added within the known libraries that we may not be checking for already. If those are found, new tasks should be added for each of those.
Acceptance Criteria
Original Report
Summary
Details
PoC
The text was updated successfully, but these errors were encountered: