Skip to content

OCPBUGS-87109: Scope minted AWS IAM policies to cluster-owned resources#1047

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:release-4.20from
amitesh1201:fix-CVE-2026-10843-release-4.20
Jul 3, 2026
Merged

OCPBUGS-87109: Scope minted AWS IAM policies to cluster-owned resources#1047
openshift-merge-bot[bot] merged 1 commit into
openshift:release-4.20from
amitesh1201:fix-CVE-2026-10843-release-4.20

Conversation

@amitesh1201

Copy link
Copy Markdown

xref: OCPBUGS-87109
Backport of #1043 from master to release-4.20 to fix CVE-2026-10843


Add an implicit StringEquals condition to every Allow statement in minted IAM user policies, requiring the standard kubernetes.io/cluster infraName tag (with a value of "owned"). This restricts minted credentials to resources tagged as belonging to the cluster, reducing the blast radius if credentials are compromised (CVE-2026-10843).

The CVE advisory suggests tightening Resource ARNs from "*" to specific ARNs, but this isn't feasible: CredentialsRequest manifests are authored before cluster infrastructure exists, so resource ARNs for specific clusters are not known when the CR is authored.

Not all AWS actions support the aws:ResourceTag condition. Actions that create new resources fail (because the resource doesn't exist yet). Describe and List actions lack resource-level permissions. Some services don't support it at all. However, within the payload, the list is both finite and rarely changed. As such, we can easily classify the entire list into supported/incompatible categories. Unrecognized actions produce an error state, with directions pointing the developer to update the classification list in the CCO.

The condition is not applied to Deny statements (this would actually narrow and weaken the policy), nor is it applied to the auto-generated iam:GetUser self-lookup statement, which is already scoped to just the own user's ARN.

Backport Notes

  • Cherry-pick had 1 conflict in tagUser (SDK v1 vs v2 type mismatch) — resolved by keeping aws-sdk-go v1 types (*iam.Tag, aws.String()) with the new ccaws.InfraResourceTagValue constant
  • Unit tests pass: go test ./pkg/aws/...
  • hack/verify-action-maps.sh adjusted to 4.20.0 nightly stream

Add an implicit StringEquals condition to every Allow statement in
minted IAM user policies, requiring the standard kubernetes.io/cluster
infraName tag (with a value of "owned"). This restricts minted
credentials to resources tagged as belonging to the cluster, reducing
the blast radius if credentials are compromised (CVE-2026-10843).

The CVE advisory suggests tightening Resource ARNs from "*" to specific
ARNs, but this isn't feasible: CredentialsRequest manifests are authored
before cluster infrastructure exists, so resource ARNs for specific
clusters are not known when the CR is authored.

Not all AWS actions support the aws:ResourceTag condition. Actions that
create new resources fail (because the resource doesn't exist yet).
Describe and List actions lack resource-level permissions. Some services
don't support it at all. However, within the payload, the list is both
finite and rarely changed. As such, we can easily classify the entire
list into supported/incompatible categories. Unrecognized actions
produce an error state, with directions pointing the developer to update
the classification list in the CCO.

The condition is not applied to Deny statements (this would actually
narrow and weaken the policy), nor is it applied to the auto-generated
iam:GetUser self-lookup statement, which is already scoped to just the
own user's ARN.

Co-authored-by: Cursor <cursoragent@cursor.com>
@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jun 30, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@amitesh1201: This pull request references Jira Issue OCPBUGS-87109, which is invalid:

  • expected dependent Jira Issue OCPBUGS-87110 to be in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but it is ASSIGNED instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

xref: OCPBUGS-87109
Backport of #1043 from master to release-4.20 to fix CVE-2026-10843


Add an implicit StringEquals condition to every Allow statement in minted IAM user policies, requiring the standard kubernetes.io/cluster infraName tag (with a value of "owned"). This restricts minted credentials to resources tagged as belonging to the cluster, reducing the blast radius if credentials are compromised (CVE-2026-10843).

The CVE advisory suggests tightening Resource ARNs from "*" to specific ARNs, but this isn't feasible: CredentialsRequest manifests are authored before cluster infrastructure exists, so resource ARNs for specific clusters are not known when the CR is authored.

Not all AWS actions support the aws:ResourceTag condition. Actions that create new resources fail (because the resource doesn't exist yet). Describe and List actions lack resource-level permissions. Some services don't support it at all. However, within the payload, the list is both finite and rarely changed. As such, we can easily classify the entire list into supported/incompatible categories. Unrecognized actions produce an error state, with directions pointing the developer to update the classification list in the CCO.

The condition is not applied to Deny statements (this would actually narrow and weaken the policy), nor is it applied to the auto-generated iam:GetUser self-lookup statement, which is already scoped to just the own user's ARN.

Backport Notes

  • Cherry-pick had 1 conflict in tagUser (SDK v1 vs v2 type mismatch) — resolved by keeping aws-sdk-go v1 types (*iam.Tag, aws.String()) with the new ccaws.InfraResourceTagValue constant
  • Unit tests pass: go test ./pkg/aws/...
  • hack/verify-action-maps.sh adjusted to 4.20.0 nightly stream

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 openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 4f4e699d-c1cc-43c9-ad05-b2abbaeb14a2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ 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 requested review from 2uasimojo and dlom June 30, 2026 10:45
@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 47.05%. Comparing base (080ef1e) to head (298c3e8).

Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff                @@
##           release-4.20    #1047      +/-   ##
================================================
+ Coverage         46.79%   47.05%   +0.26%     
================================================
  Files                97       97              
  Lines             12005    12053      +48     
================================================
+ Hits               5618     5672      +54     
+ Misses             5769     5762       -7     
- Partials            618      619       +1     
Files with missing lines Coverage Δ
pkg/aws/actuator/actuator.go 66.93% <100.00%> (+1.48%) ⬆️
pkg/aws/utils.go 70.45% <100.00%> (+3.78%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@amitesh1201

Copy link
Copy Markdown
Author

/test e2e-aws-qe

@amitesh1201

Copy link
Copy Markdown
Author

/jira refresh

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@amitesh1201: This pull request references Jira Issue OCPBUGS-87109, which is invalid:

  • expected dependent Jira Issue OCPBUGS-87110 to be in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but it is ASSIGNED instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

Details

In response to this:

/jira refresh

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 openshift-eng/jira-lifecycle-plugin repository.

@dlom

dlom commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

/override ci/prow/security

@dlom

dlom commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

/approve

@dlom

dlom commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

/label backport-risk-assessed

@openshift-ci openshift-ci Bot added backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jul 1, 2026
@openshift-ci

openshift-ci Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

@dlom: Overrode contexts on behalf of dlom: ci/prow/security

Details

In response to this:

/override ci/prow/security

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.

@openshift-ci

openshift-ci Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

@amitesh1201: 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.

@dlom

dlom commented Jul 1, 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 Jul 1, 2026
@openshift-ci

openshift-ci Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: amitesh1201, dlom

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

@dlom

dlom commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

/payload 4.20 nightly blocking

@openshift-ci

openshift-ci Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

@dlom: trigger 11 job(s) of type blocking for the nightly release of OCP 4.20

  • periodic-ci-openshift-release-main-nightly-4.20-e2e-aws-ovn-serial-1of2
  • periodic-ci-openshift-release-main-nightly-4.20-e2e-aws-ovn-serial-2of2
  • periodic-ci-openshift-release-main-ci-4.20-e2e-aws-upgrade-ovn-single-node
  • periodic-ci-openshift-release-main-nightly-4.20-e2e-aws-ovn-upgrade-fips
  • periodic-ci-openshift-release-main-ci-4.20-e2e-azure-ovn-upgrade
  • periodic-ci-openshift-release-main-ci-4.20-upgrade-from-stable-4.19-e2e-gcp-ovn-rt-upgrade
  • periodic-ci-openshift-hypershift-release-4.20-periodics-e2e-aws-ovn-conformance
  • periodic-ci-openshift-release-main-nightly-4.20-e2e-metal-ipi-ovn-ipv4
  • periodic-ci-openshift-release-main-nightly-4.20-e2e-metal-ipi-ovn-ipv6
  • periodic-ci-openshift-microshift-release-4.20-periodics-e2e-aws-ovn-ocp-conformance
  • periodic-ci-openshift-microshift-release-4.20-periodics-e2e-aws-ovn-ocp-conformance-serial

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/6ed6fb10-758c-11f1-84ed-7d7f6e54a37a-0

@racheljpg

Copy link
Copy Markdown

/verified by ci

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jul 2, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@racheljpg: This PR has been marked as verified by ci.

Details

In response to this:

/verified by ci

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 openshift-eng/jira-lifecycle-plugin repository.

@amitesh1201

Copy link
Copy Markdown
Author

/jira refresh

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@amitesh1201: This pull request references Jira Issue OCPBUGS-87109, which is invalid:

  • expected dependent Jira Issue OCPBUGS-87110 to be in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but it is ON_QA instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

Details

In response to this:

/jira refresh

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 openshift-eng/jira-lifecycle-plugin repository.

@amitesh1201

Copy link
Copy Markdown
Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Jul 3, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@amitesh1201: This pull request references Jira Issue OCPBUGS-87109, which is valid. The bug has been moved to the POST state.

7 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.20.z) matches configured target version for branch (4.20.z)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note type set to "Release Note Not Required"
  • dependent bug Jira Issue OCPBUGS-87110 is in the state Verified, which is one of the valid states (VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA))
  • dependent Jira Issue OCPBUGS-87110 targets the "4.21.z" version, which is one of the valid target versions: 4.21.0, 4.21.z
  • bug has dependents

No GitHub users were found matching the public email listed for the QA contact in Jira (ocp-sustaining-admins@redhat.com), skipping review request.

Details

In response to this:

/jira refresh

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot removed the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Jul 3, 2026
@openshift-merge-bot openshift-merge-bot Bot merged commit e081490 into openshift:release-4.20 Jul 3, 2026
12 checks passed
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@amitesh1201: Jira Issue Verification Checks: Jira Issue OCPBUGS-87109
✔️ This pull request was pre-merge verified.
✔️ All associated pull requests have merged.
✔️ All associated, merged pull requests were pre-merge verified.

Jira Issue OCPBUGS-87109 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓

Details

In response to this:

xref: OCPBUGS-87109
Backport of #1043 from master to release-4.20 to fix CVE-2026-10843


Add an implicit StringEquals condition to every Allow statement in minted IAM user policies, requiring the standard kubernetes.io/cluster infraName tag (with a value of "owned"). This restricts minted credentials to resources tagged as belonging to the cluster, reducing the blast radius if credentials are compromised (CVE-2026-10843).

The CVE advisory suggests tightening Resource ARNs from "*" to specific ARNs, but this isn't feasible: CredentialsRequest manifests are authored before cluster infrastructure exists, so resource ARNs for specific clusters are not known when the CR is authored.

Not all AWS actions support the aws:ResourceTag condition. Actions that create new resources fail (because the resource doesn't exist yet). Describe and List actions lack resource-level permissions. Some services don't support it at all. However, within the payload, the list is both finite and rarely changed. As such, we can easily classify the entire list into supported/incompatible categories. Unrecognized actions produce an error state, with directions pointing the developer to update the classification list in the CCO.

The condition is not applied to Deny statements (this would actually narrow and weaken the policy), nor is it applied to the auto-generated iam:GetUser self-lookup statement, which is already scoped to just the own user's ARN.

Backport Notes

  • Cherry-pick had 1 conflict in tagUser (SDK v1 vs v2 type mismatch) — resolved by keeping aws-sdk-go v1 types (*iam.Tag, aws.String()) with the new ccaws.InfraResourceTagValue constant
  • Unit tests pass: go test ./pkg/aws/...
  • hack/verify-action-maps.sh adjusted to 4.20.0 nightly stream

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 openshift-eng/jira-lifecycle-plugin repository.

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. backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants