Skip to content

CORS-4516: GCP: Update Required Permissions - #493

Open
patrickdillon wants to merge 1 commit into
openshift:mainfrom
patrickdillon:gcd-auth
Open

CORS-4516: GCP: Update Required Permissions#493
patrickdillon wants to merge 1 commit into
openshift:mainfrom
patrickdillon:gcd-auth

Conversation

@patrickdillon

@patrickdillon patrickdillon commented Jul 20, 2026

Copy link
Copy Markdown

Updates the credentialsrequests to include the minimal permissions required to provision a cluster in GCP. With the current implementation OpenShift does not use the mounted credentials, provisioned from the credentials request. Instead it authenticates using the service account attached to the VM. When the mounted credentials are actually used, the cloud provider will fail due to the missing permissions which are added in this commit.

Summary by CodeRabbit

  • Security & Permissions
    • Expanded Google Cloud IAM permissions for the GCP credentials request, including internal variants for compute.addresses operations.
    • Added additional read-only, list, policy update, and “use” permissions across several Compute resources (health checks, instance groups, instances, networks, region backend services, and subnetworks).

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 20, 2026
@openshift-ci-robot

openshift-ci-robot commented Jul 20, 2026

Copy link
Copy Markdown

@patrickdillon: This pull request references CORS-4516 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Updates the credentialsrequests to include the minimal permissions required to provision a cluster in GCP. With the current implementation OpenShift does not use the mounted credentials, provisioned from the credentials request. Instead it authenticates using the service account attached to the VM. When the mounted credentials are actually used, the cloud provider will fail due to the missing permissions which are added in this commit.

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 Jul 20, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Enterprise

Run ID: 3d62bf2e-53c7-4585-8994-15b6cb283fbb

📥 Commits

Reviewing files that changed from the base of the PR and between 0143e6b and 6d769e7.

📒 Files selected for processing (1)
  • manifests/0000_26_cloud-controller-manager-operator_16_credentialsrequest-gcp.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • manifests/0000_26_cloud-controller-manager-operator_16_credentialsrequest-gcp.yaml

Walkthrough

The GCP CredentialsRequest manifest expands IAM permissions for internal address operations and additional Compute Engine resource capabilities, while removing the existing compute.instances.use permission.

Changes

GCP IAM permissions

Layer / File(s) Summary
Internal address permissions
manifests/0000_26_cloud-controller-manager-operator_16_credentialsrequest-gcp.yaml
Adds internal address creation, deletion, and usage permissions while retaining existing address permissions.
Additional Compute permissions
manifests/0000_26_cloud-controller-manager-operator_16_credentialsrequest-gcp.yaml
Adds health check, instance group, instance list, network policy, backend service, subnetwork, and target pool permissions, and removes compute.instances.use.

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

Suggested reviewers: theobarberbany, radekmanak

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: updating required GCP permissions for the cloud controller manager.
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 Only a GCP CredentialsRequest manifest changed; no test files or Ginkgo titles were added or modified.
Test Structure And Quality ✅ Passed Only a CredentialsRequest manifest changed; no Ginkgo test code was modified, so this check is not applicable.
Microshift Test Compatibility ✅ Passed Only a CredentialsRequest YAML changed; no new Ginkgo e2e tests or MicroShift-sensitive APIs were added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed Only a GCP CredentialsRequest manifest changed; no new Ginkgo e2e tests were added, so the SNO compatibility check is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed Only a GCP CredentialsRequest permissions manifest changed; no pod specs, replicas, affinity, node selectors, PDBs, or topology logic were introduced.
Ote Binary Stdout Contract ✅ Passed PR changes only a GCP CredentialsRequest manifest; no code paths or process-level stdout writes were added.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed Only a GCP CredentialsRequest manifest changed; no new Ginkgo e2e tests or network assumptions were added.
No-Weak-Crypto ✅ Passed Only a GCP CredentialsRequest YAML changed; no crypto code, algorithms, modes, or secret comparisons were added.
Container-Privileges ✅ Passed The only changed file is a GCP CredentialsRequest listing IAM permissions; it contains no privileged/root/hostPID/hostNetwork/hostIPC/allowPrivilegeEscalation settings.
No-Sensitive-Data-In-Logs ✅ Passed PR only expands GCP IAM permissions in a manifest; no logging code or sensitive-data exposure appears in the diff.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@manifests/0000_26_cloud-controller-manager-operator_16_credentialsrequest-gcp.yaml`:
- Around line 21-25: Add the missing compute.addresses.deleteInternal permission
alongside the existing internal address permissions in the credentials manifest,
preserving the current address permission entries.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Enterprise

Run ID: 0cb770e6-8ca8-4bf0-b7ec-c070b93169c1

📥 Commits

Reviewing files that changed from the base of the PR and between 2b2e777 and 2f26e5b.

📒 Files selected for processing (1)
  • manifests/0000_26_cloud-controller-manager-operator_16_credentialsrequest-gcp.yaml

@patrickdillon

Copy link
Copy Markdown
Author

/test unit

@patrickdillon

patrickdillon commented Jul 23, 2026

Copy link
Copy Markdown
Author

/test e2e-gcp-ovn

Currently these credentials are unused, which is why things are working fine without the adequate permissions that this PR adds. To use them, we need either openshift/cloud-provider-gcp#131 or to set token-url to nil in the cloud config.

So this test verifies only basic regression testing.

@barbacbd barbacbd left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

I don't know that this is going to test anything new though

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

Copy link
Copy Markdown
Author

The reason we need this is because openshift/cloud-provider-gcp#131 makes it to that the mounted credentials will actually be used. The e2e-gcp-ovn test on that PR is failing but the adequate permissions should make it pass

/testwith openshift/cloud-provider-gcp/main/e2e-gcp-ovn openshift/cloud-provider-gcp#131

@patrickdillon

Copy link
Copy Markdown
Author

testwith is not triggerring right now.

install succeeded with this pr on gcd!

@damdo damdo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@openshift-ci

openshift-ci Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: damdo

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

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

Copy link
Copy Markdown
Author

/testwith openshift/cloud-provider-gcp/main/e2e-gcp-ovn openshift/cloud-provider-gcp#131

@patrickdillon

Copy link
Copy Markdown
Author

/test e2e-gcp-ovn

@damdo

damdo commented Jul 25, 2026

Copy link
Copy Markdown
Member

Sigkilled

/testwith openshift/cloud-provider-gcp/main/e2e-gcp-ovn openshift/cloud-provider-gcp#131

- "compute.httpHealthChecks.create"
- "compute.httpHealthChecks.delete"
- "compute.httpHealthChecks.get"
- "compute.httpHealthChecks.update"

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs
compute.httpHealthChecks.useReadOnly

@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 26, 2026
Updates the credentialsrequests to include the minimal permissions
required to provision a cluster in GCP. With the current implementation
OpenShift does not use the mounted crdentials, provisioned from
the credentials request. Instead it authenticates using the service
account attached to the VM. When the mounted credentials are actually
used, the cloud provider will fail due to the missing permissions
which are added in this commit.

@tthvo tthvo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

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

tthvo commented Jul 27, 2026

Copy link
Copy Markdown
Member

/testwith openshift/cloud-provider-gcp/main/e2e-gcp-ovn openshift/cloud-provider-gcp#131

@patrickdillon

Copy link
Copy Markdown
Author

/test e2e-gcp-ovn

@tthvo

tthvo commented Jul 29, 2026

Copy link
Copy Markdown
Member

/test e2e-gcp-ovn

It's that time of the year where CI is fighting for its life 😅

@openshift-ci

openshift-ci Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

@patrickdillon: The following tests 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/e2e-azure-ovn-upgrade 6d769e7 link true /test e2e-azure-ovn-upgrade
ci/prow/level0-clusterinfra-azure-ipi-proxy-tests 6d769e7 link false /test level0-clusterinfra-azure-ipi-proxy-tests
ci/prow/e2e-gcp-ovn 6d769e7 link false /test e2e-gcp-ovn

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. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants