-
Notifications
You must be signed in to change notification settings - Fork 850
[DO NOT MERGE] Testing Minimal Policy #2807
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
base: master
Are you sure you want to change the base?
Conversation
|
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Code Coverage DiffThis PR does not change the code coverage |
7275322 to
84e80d8
Compare
| "ec2:DescribeAvailabilityZones", | ||
| "ec2:DescribeInstances", | ||
| "ec2:DescribeSnapshots", | ||
| "ec2:DescribeTags", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not actually call this anywhere in the driver besides in a testing function that does not actually need it:
aws-ebs-csi-driver/pkg/cloud/cloud_test.go
Line 3666 in 33be568
| mockEC2.EXPECT().DescribeTags(gomock.Any(), gomock.Any()).Return(&ec2.DescribeTagsOutput{}, nil).AnyTimes() |
So I have removed it from the policy.
| "ec2:DescribeAvailabilityZones", | ||
| "ec2:DescribeInstances", | ||
| "ec2:DescribeSnapshots", | ||
| "ec2:DescribeTags", | ||
| "ec2:DescribeVolumes", | ||
| "ec2:DescribeVolumesModifications", | ||
| "ec2:DescribeVolumeStatus" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These calls have * permissions because they only have ec2:Region as an allowed condition key, therefore we cannot pass in any condition key that would clearly identify a resource managed by the driver (I.e. tags on resource) see: https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonec2.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only made changes here to test CI, feel free to skip review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only made changes here to test CI, feel free to skip review.
| "Effect" : "Allow", | ||
| "Action" : [ | ||
| "ec2:AttachVolume", | ||
| "ec2:DetachVolume" | ||
| ], | ||
| "Resource" : "arn:aws:ec2:*:*:instance/*" | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Necessary for the EBS CSI Driver to perform the privileged task of attaching/detaching volumes on a host on behalf of the user.
|
/retest Trying to see if it was a flake, the pre-provisioned tests should all pass since we actually do add the required tags. |
84e80d8 to
fc23e74
Compare
fc23e74 to
6240ca8
Compare
What type of PR is this?
Testing CI with Minimal Policy & review new proposed minimal policy.
Manual Tests Completed: