Skip to content

fix(aws): add EC2 snapshot perms to user-min-permissions#81509

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
deepsm007:fix/aws-user-min-permissions-ec2-snapshots
Jul 6, 2026
Merged

fix(aws): add EC2 snapshot perms to user-min-permissions#81509
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
deepsm007:fix/aws-user-min-permissions-ec2-snapshots

Conversation

@deepsm007

@deepsm007 deepsm007 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor
  • Add ec2:CreateSnapshot and ec2:DescribeSnapshots to the minimal AWS user policy applied via iam:PutUserPolicy for minted CI users

Summary by CodeRabbit

This updates the OpenShift CI minimal AWS user permissions flow so minted CI users can work with EC2 snapshots when AWS_INSTALL_USE_MINIMAL_PERMISSIONS=yes. Practically, the ipi-conf-aws-user-min-permissions step now grants ec2:CreateSnapshot and ec2:DescribeSnapshots in addition to the existing snapshot delete permission, aligning the minted-user policy with the snapshot operations needed during AWS-based installation workflows.

@openshift-ci
openshift-ci Bot requested review from neisw and xueqzhan July 6, 2026 17:11
@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

Two EC2 permissions, ec2:CreateSnapshot and ec2:DescribeSnapshots, are added to the minimal AWS IAM permissions list generated for OCP versions prior to 4.18 in the user-min-permissions CI step-registry script.

Changes

EC2 Snapshot Permissions

Layer / File(s) Summary
Add snapshot permissions to pre-4.18 policy list
ci-operator/step-registry/ipi/conf/aws/user-min-permissions/ipi-conf-aws-user-min-permissions-commands.sh
Adds ec2:CreateSnapshot and ec2:DescribeSnapshots to the generated minimal permissions list for OCP versions before 4.18.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed PR only changes a shell script policy list; no Ginkgo test titles or test files were added or modified.
Test Structure And Quality ✅ Passed Only a shell script changed; no Ginkgo tests or cluster test code were added, so the test-structure checklist is not applicable.
Microshift Test Compatibility ✅ Passed No new Ginkgo e2e tests were added; the PR only updates an AWS permissions shell script, so the MicroShift check is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed This PR only changes an AWS permissions shell script; no new Ginkgo tests or SNO-relevant test logic were added.
Topology-Aware Scheduling Compatibility ✅ Passed Only AWS permission list entries were added in a shell script; no manifests, controllers, or scheduling constraints were introduced.
Ote Binary Stdout Contract ✅ Passed PR only changes a step-registry bash script; no main/TestMain/BeforeSuite stdout paths or OTE binary setup code are touched.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The PR only changes an AWS permissions shell script; no new Ginkgo e2e tests were added, so the IPv4/disconnected-network check is not applicable.
No-Weak-Crypto ✅ Passed Only EC2 snapshot permissions were added to an AWS policy list; no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB or secret-comparison code was introduced.
Container-Privileges ✅ Passed PR only edits an AWS IAM permission list in a shell script; no container/K8s manifests or privilege settings were changed.
No-Sensitive-Data-In-Logs ✅ Passed The patch only adds EC2 permission strings to a policy list; no new log/echo statements or secret-bearing values were added.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding EC2 snapshot permissions to the AWS user-min-permissions policy.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 6, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@deepsm007: the pj-rehearse plugin accommodates running rehearsal tests for the changes in this PR. Expand 'Interacting with pj-rehearse' for usage details. The following rehearsable tests have been affected by this change:

Test name Repo Type Reason
pull-ci-openshift-cluster-etcd-operator-main-e2e-operator openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-main-e2e-operator-fips openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-main-e2e-aws-cpms openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-release-5.1-e2e-operator openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-release-5.1-e2e-operator-fips openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-release-5.1-e2e-aws-cpms openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-release-5.0-e2e-operator openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-release-5.0-e2e-operator-fips openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-release-5.0-e2e-aws-cpms openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-release-4.23-e2e-operator openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-release-4.23-e2e-operator-fips openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-release-4.23-e2e-aws-cpms openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-release-4.22-e2e-operator openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-release-4.22-e2e-operator-fips openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-release-4.22-e2e-aws-cpms openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-release-4.21-e2e-operator openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-release-4.21-e2e-operator-fips openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-release-4.21-e2e-aws-cpms openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-release-4.20-e2e-operator openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-release-4.20-e2e-operator-fips openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-release-4.20-e2e-aws-cpms openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-release-4.19-e2e-operator openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-release-4.19-e2e-operator-fips openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-release-4.19-e2e-aws-cpms openshift/cluster-etcd-operator presubmit Registry content changed
pull-ci-openshift-cluster-etcd-operator-release-4.18-e2e-operator openshift/cluster-etcd-operator presubmit Registry content changed

A total of 12811 jobs have been affected by this change. The above listing is non-exhaustive and limited to 25 jobs.

A full list of affected jobs can be found here
Prior to this PR being merged, you will need to either run and acknowledge or opt to skip these rehearsals.

Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse list to get an up-to-date list of affected jobs
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

@openshift-ci

openshift-ci Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

@deepsm007: all tests passed!

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

@hector-vido

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 6, 2026
@bear-redhat

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci

openshift-ci Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bear-redhat, deepsm007, hector-vido

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@YamunadeviShanmugam

Copy link
Copy Markdown
Contributor

/pj-rehearse skip

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@YamunadeviShanmugam: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-merge-bot openshift-merge-bot Bot added the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label Jul 6, 2026
@YamunadeviShanmugam

Copy link
Copy Markdown
Contributor

/pj-rehearse ack

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@YamunadeviShanmugam: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@YamunadeviShanmugam

Copy link
Copy Markdown
Contributor

Skipping the tests as the CI runs are blocked by other issues - this PR is needed to unblock origin PRs

@openshift-merge-bot
openshift-merge-bot Bot merged commit 184a561 into openshift:main Jul 6, 2026
10 checks passed
SachinNinganure pushed a commit to SachinNinganure/release that referenced this pull request Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. rehearsals-ack Signifies that rehearsal jobs have been acknowledged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants