Skip to content

osc: aws-sts: grant iam:PassRole on the vmimport role - #89767

Open
snir911 wants to merge 1 commit into
openshift:mainfrom
snir911:stsfix
Open

snir911 wants to merge 1 commit into
openshift:mainfrom
snir911:stsfix

Conversation

@snir911

@snir911 snir911 commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

Image creation for AWS peer-pods runs ami-helper.sh, which creates the vmimport IAM role and passes it to EC2 VM Import. The IRSA policy for the OSC operator already granted the role-management actions but omitted iam:PassRole, which recently became required, so image creation failed with AccessDenied.

Add iam:PassRole, scoped to role/vmimport, matching the PassRole group of the documented OSC-ImageCreation-Policy.

Summary by CodeRabbit

This change updates the IRSA IAM policy that the peer-pods param-cm step in openshift/release creates for the OSC operator. The affected file is sandboxed-containers-operator-peerpods-param-cm-commands.sh.

The policy statement scoped to arn:aws:iam::*:role/vmimport gains the iam:PassRole action. The resource scope does not change. The AWS peer-pods image creation flow passes the vmimport role to EC2 VM Import. Without this action, that step fails with AccessDenied.

@coderabbitai

coderabbitai Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review.

Walkthrough

The OSC IRSA policy adds iam:PassRole to the IAM actions scoped to the vmimport role ARN.

Changes

OSC IRSA policy

Layer / File(s) Summary
Update scoped IAM actions
ci-operator/step-registry/sandboxed-containers-operator/peerpods/param-cm/sandboxed-containers-operator-peerpods-param-cm-commands.sh
The policy adds iam:PassRole to the actions scoped to the vmimport role ARN.

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

Change: Bug fix

Suggested reviewers: thejasn

Merge Risk: Minimal · up to 7f61f

This grants the OSC operator permission to pass only the vmimport role during AWS image creation, fixing a reported AccessDenied. The scope is narrow and no merge-blocking risk was identified.

Pre-merge checks: Passed 14

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: adding iam:PassRole to the OSC operator's IRSA policy, scoped to the vmimport role. The raw summary and PR objectives both describe this same change, so the title matc…
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 The check applies to Ginkgo test titles (It, Describe, Context, When, and similar). The reviewed diff changes one file: ci-operator/step-registry/sandboxed-containers-operator/peerpods/param-cm/sandbo…
Test Structure And Quality Passed The check applies to Ginkgo test code. The PR changes exactly one file: ci-operator/step-registry/sandboxed-containers-operator/peerpods/param-cm/sandboxed-containers-operator-peerpods-param-cm-comman…
Microshift Test Compatibility Passed The check applies only when new Ginkgo e2e tests (It, Describe, Context, When, etc.) are added. The PR changes one file: ci-operator/step-registry/sandboxed-containers-operator/peerpods/param-cm/sandb…
Single Node Openshift (Sno) Test Compatibility Passed The check applies only when new Ginkgo e2e tests (It, Describe, Context, When, etc.) are added. The reviewed range changes one file: ci-operator/step-registry/sandboxed-containers-operator/peerpods/pa…
Topology-Aware Scheduling Compatibility Passed The check does not apply to this PR. The PR (openshift/release #89767, author login snir911, head stsfix → main) changes one file: ci-operator/step-registry/sandboxed-containers-operator/peerpods/para…
Ote Binary Stdout Contract Passed The check is not applicable to this pull request. The OTE Binary Stdout Contract check only covers stdout writes in process-level code of OpenShift Tests Extension binaries. The reviewed range changes…
Ipv6 And Disconnected Network Test Compatibility Passed The check applies only when new Ginkgo e2e tests (It, Describe, Context, When, etc.) are added. The PR's changed-file inventory is a single file: ci-operator/step-registry/sandboxed-containers-operato…
No-Weak-Crypto Passed The check "no-weak-crypto" flags MD5, SHA1, DES, RC4, 3DES, Blowfish, ECB usage, custom crypto implementations, and non-constant-time comparison of secrets or tokens. The PR (openshift/release #89767,…
Container-Privileges Passed The check is not applicable to this pull request. The changed-file inventory has one modified file: ci-operator/step-registry/sandboxed-containers-operator/peerpods/param-cm/sandboxed-containers-opera…
No-Sensitive-Data-In-Logs Passed The check "no-sensitive-data-in-logs" is applicable only if the PR adds or changes logging. The reviewed range (refs/coderabbit/pre-merge-check/base..head) modifies one file: ci-operator/step-registry…
Full details: Title check

Explanation

The title names the main change: adding iam:PassRole to the OSC operator's IRSA policy, scoped to the vmimport role. The raw summary and PR objectives both describe this same change, so the title matches the changeset.

Full details: Stable And Deterministic Test Names

Explanation

The check applies to Ginkgo test titles (It, Describe, Context, When, and similar). The reviewed diff changes one file: ci-operator/step-registry/sandboxed-containers-operator/peerpods/param-cm/sandboxed-containers-operator-peerpods-param-cm-commands.sh. That file is a shell step script for the CI registry, not a Ginkgo test suite. A search of the diff for It(, Describe(, Context(, When(, and g.It( found no test-title declarations added or changed. The check is therefore inapplicable to this pull request, and it passes. The PR adds iam:PassRole scoped to role/vmimport. This change does not touch any test title. The primary PR is openshift/release #89767 (head stsfix, base main), authored by snir911.

Full details: Test Structure And Quality

Explanation

The check applies to Ginkgo test code. The PR changes exactly one file: ci-operator/step-registry/sandboxed-containers-operator/peerpods/param-cm/sandboxed-containers-operator-peerpods-param-cm-commands.sh (modified). The diff for the reviewed range contains no Ginkgo constructs (no ginkgo import, g.It, It(, Expect(, or Eventually(). The change is an IAM policy update that adds iam:PassRole scoped to role/vmimport, which is not Ginkgo test code. The check is therefore inapplicable to this PR and passes.

Full details: Microshift Test Compatibility

Explanation

The check applies only when new Ginkgo e2e tests (It, Describe, Context, When, etc.) are added. The PR changes one file: ci-operator/step-registry/sandboxed-containers-operator/peerpods/param-cm/sandboxed-containers-operator-peerpods-param-cm-commands.sh. The diff adds a single IAM action, "iam:PassRole", to an IAM policy statement scoped to arn:aws:iam::*:role/vmimport. A search of the full diff for g.It(, g.Describe(, g.Context(, g.When(, and "ginkgo" found no Ginkgo constructs. No e2e test is added, so there is nothing to assess against the MicroShift criteria. The check is inapplicable and passes.

Full details: Single Node Openshift (Sno) Test Compatibility

Explanation

The check applies only when new Ginkgo e2e tests (It, Describe, Context, When, etc.) are added. The reviewed range changes one file: ci-operator/step-registry/sandboxed-containers-operator/peerpods/param-cm/sandboxed-containers-operator-peerpods-param-cm-commands.sh. It is a modified shell script, not a Go e2e test file. A search of the added lines found no Ginkgo constructs. The PR adds iam:PassRole on arn:aws:iam::*:role/vmimport to the OSC IRSA policy, which is not a multi-node or HA assumption. The check is inapplicable, so it passes. Primary PR: openshift/release #89767 by snir911.

Full details: Topology-Aware Scheduling Compatibility

Explanation

The check does not apply to this PR. The PR (openshift/release #89767, author login snir911, head stsfix → main) changes one file: ci-operator/step-registry/sandboxed-containers-operator/peerpods/param-cm/sandboxed-containers-operator-peerpods-param-cm-commands.sh. The diff adds a single "iam:PassRole" action to an IAM policy statement scoped to arn:aws:iam::*:role/vmimport. This is not a deployment manifest, operator code, or controller. The diff contains no scheduling constraints (no affinity, topology spread, nodeSelector, tolerations, maxUnavailable, PodDisruptionBudget, replica counts, or control-plane/worker/arbiter references). Scanning the full patch for topology-related keywords returned no matches. No topology-aware scheduling concern is introduced.

Full details: Ote Binary Stdout Contract

Explanation

The check is not applicable to this pull request. The OTE Binary Stdout Contract check only covers stdout writes in process-level code of OpenShift Tests Extension binaries. The reviewed range changes exactly one file: ci-operator/step-registry/sandboxed-containers-operator/peerpods/param-cm/sandboxed-containers-operator-peerpods-param-cm-commands.sh. No .go files are changed. The diff adds a single "iam:PassRole" action to an IAM policy JSON, scoped to arn:aws:iam::*:role/vmimport, inside a shell script that writes a policy document. It adds no stdout writes, no klog or log configuration, no Ginkgo suite code, and no OTE binary code. The provider-reported primary PR is #89767 (base main, head stsfix), author login snir911 (verified). Its identity does not affect the outcome.

Full details: Ipv6 And Disconnected Network Test Compatibility

Explanation

The check applies only when new Ginkgo e2e tests (It, Describe, Context, When, etc.) are added. The PR's changed-file inventory is a single file: ci-operator/step-registry/sandboxed-containers-operator/peerpods/param-cm/sandboxed-containers-operator-peerpods-param-cm-commands.sh (status M). The patch adds only one IAM action, "iam:PassRole", to the vmimport role statement in an IRSA policy JSON block. A search of the added lines found no It(, Describe(, Context(, ginkgo, or _test.go references. No new e2e test exists, so none of the IPv4, hardcoded-address, URL-interpolation, or external-connectivity conditions can be triggered. The check is inapplicable and passes.

Full details: No-Weak-Crypto

Explanation

The check "no-weak-crypto" flags MD5, SHA1, DES, RC4, 3DES, Blowfish, ECB usage, custom crypto implementations, and non-constant-time comparison of secrets or tokens. The PR (openshift/release #89767, by snir911, base main, head stsfix) changes one file: ci-operator/step-registry/sandboxed-containers-operator/peerpods/param-cm/sandboxed-containers-operator-peerpods-param-cm-commands.sh. The only added line is the IAM action string "iam:PassRole" in an IAM policy statement scoped to arn:aws:iam::*:role/vmimport. The diff contains no cipher, hash, encryption, token-comparison, or custom crypto code. The check does not apply to the changed behavior, so it passes.

Full details: Container-Privileges

Explanation

The check is not applicable to this pull request. The changed-file inventory has one modified file: ci-operator/step-registry/sandboxed-containers-operator/peerpods/param-cm/sandboxed-containers-operator-peerpods-param-cm-commands.sh. The patch adds the single IAM action "iam:PassRole" to an inline AWS IRSA policy scoped to arn:aws:iam::*:role/vmimport. The diff contains no container or Kubernetes manifest. A search of the full PR diff for privileged, hostPID, hostNetwork, hostIPC, SYS_ADMIN, allowPrivilegeEscalation, runAsUser, and securityContext returned no matches. The change does not add or modify any container privilege setting, so no listed failure condition applies.

Full details: No-Sensitive-Data-In-Logs

Explanation

The check "no-sensitive-data-in-logs" is applicable only if the PR adds or changes logging. The reviewed range (refs/coderabbit/pre-merge-check/base..head) modifies one file: ci-operator/step-registry/sandboxed-containers-operator/peerpods/param-cm/sandboxed-containers-operator-peerpods-param-cm-commands.sh. The only hunk (@@ -125,7 +125,8 @@) adds the string "iam:PassRole" to a JSON IAM policy's Action list in a heredoc, scoped to "arn:aws:iam::*:role/vmimport". The hunk adds no echo, printf, log, or other output statement, and it does not print tokens, keys, credentials, hostnames, or customer data. No existing logging path is changed or newly exposed. Primary PR: openshift/release #89767 by snir911, main <- stsfix. The check passes.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: openshift/release
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: 38a982c
  • Layers: Repository YAML (base), Central YAML (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c46c94f0-e4f4-4e10-bb8f-4d9d8a38abeb
Commits

Reviewing files that changed from the base of the PR and between 5ee5a20 and 7f61f25.

Files selected for processing: 1

  • ci-operator/step-registry/sandboxed-containers-operator/peerpods/param-cm/sandboxed-containers-operator-peerpods-param-cm-commands.sh

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 2, 2026
@openshift-ci
openshift-ci Bot requested review from ldoktor and wainersm December 2, 2026 09:36
@vvoronko

vvoronko commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Dec 2, 2026
@openshift-ci

openshift-ci Bot commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: snir911, vvoronko

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

@vvoronko

vvoronko commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

/pj-rehearse periodic-ci-openshift-sandboxed-containers-operator-devel-downstream-candidate422-aws-ipi-peerpods-sts

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

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

@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Dec 2, 2026
@openshift-ci

openshift-ci Bot commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

New changes are detected. LGTM label has been removed.

Image creation for AWS peer-pods runs ami-helper.sh, which creates the
vmimport IAM role and passes it to EC2 VM Import. The IRSA policy for
the OSC operator already granted the role-management actions but omitted
iam:PassRole, which recently became required, so image creation failed
with AccessDenied.

Add iam:PassRole, scoped to role/vmimport, matching the PassRole group
of the documented OSC-ImageCreation-Policy.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Snir Schreiber <ssheribe@redhat.com>
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@snir911: 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
periodic-ci-openshift-sandboxed-containers-operator-devel-downstream-candidate420-azure-ipi-kata N/A periodic Registry content changed
periodic-ci-openshift-sandboxed-containers-operator-devel-downstream-candidate422-tls-scanner-pqc N/A periodic Registry content changed
periodic-ci-openshift-sandboxed-containers-operator-devel-downstream-candidate422-azure-ipi-peerpods N/A periodic Registry content changed
periodic-ci-openshift-sandboxed-containers-operator-devel-downstream-candidate421-aro-peerpods N/A periodic Registry content changed
periodic-ci-openshift-sandboxed-containers-operator-devel-downstream-candidate500-azure-ipi-peerpods-sts N/A periodic Registry content changed
periodic-ci-openshift-sandboxed-containers-operator-devel-downstream-candidate500-aws-ipi-peerpods-sts N/A periodic Registry content changed
periodic-ci-openshift-sandboxed-containers-operator-devel-downstream-candidate420-aws-ipi-peerpods N/A periodic Registry content changed
periodic-ci-openshift-sandboxed-containers-operator-devel-downstream-candidate420-aro-peerpods N/A periodic Registry content changed
periodic-ci-openshift-sandboxed-containers-operator-devel-downstream-candidate422-azure-ipi-peerpods-sts N/A periodic Registry content changed
periodic-ci-openshift-sandboxed-containers-operator-devel-downstream-candidate-aro-ipi-coco N/A periodic Registry content changed
periodic-ci-openshift-sandboxed-containers-operator-devel-downstream-candidate500-aro-ipi-coco N/A periodic Registry content changed
periodic-ci-openshift-sandboxed-containers-operator-devel-downstream-candidate-azure-ipi-peerpods N/A periodic Registry content changed
periodic-ci-openshift-sandboxed-containers-operator-devel-downstream-candidate421-azure-ipi-peerpods-disconnected N/A periodic Registry content changed
periodic-ci-openshift-sandboxed-containers-operator-devel-downstream-release-aro-ipi-peerpods N/A periodic Registry content changed
periodic-ci-openshift-sandboxed-containers-operator-devel-downstream-release-azure-ipi-kata N/A periodic Registry content changed
periodic-ci-openshift-sandboxed-containers-operator-devel-downstream-candidate500-aws-ipi-peerpods N/A periodic Registry content changed
periodic-ci-openshift-sandboxed-containers-operator-devel-downstream-release-azure-ipi-peerpods N/A periodic Registry content changed
periodic-ci-openshift-sandboxed-containers-operator-devel-downstream-candidate-aro-ipi-peerpods N/A periodic Registry content changed
periodic-ci-openshift-sandboxed-containers-operator-devel-downstream-candidate421-aro-coco N/A periodic Registry content changed
periodic-ci-openshift-sandboxed-containers-operator-devel-downstream-candidate500-azure-ipi-kata-disconnected N/A periodic Registry content changed
periodic-ci-openshift-sandboxed-containers-operator-devel-downstream-release-azure-ipi-coco N/A periodic Registry content changed
periodic-ci-openshift-sandboxed-containers-operator-devel-downstream-candidate420-azure-ipi-coco N/A periodic Registry content changed
periodic-ci-openshift-sandboxed-containers-operator-devel-downstream-candidate420-azure-ipi-kata-disconnected N/A periodic Registry content changed
periodic-ci-openshift-sandboxed-containers-operator-devel-downstream-candidate422-azure-ipi-coco N/A periodic Registry content changed
periodic-ci-openshift-sandboxed-containers-operator-devel-downstream-candidate421-azure-ipi-coco N/A periodic Registry content changed

A total of 51 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

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 Dec 2, 2026

Copy link
Copy Markdown
Contributor

@snir911: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/commits-signed 7f61f25 link false /test commits-signed

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.

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants