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

  • New Features
    • Expanded Google Cloud IAM permissions to support internal address operations.
    • Added additional read-only, list, policy-update, and “use” capabilities for health checks, instance groups, instances, networks, 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: fcd1dbfb-3090-46f1-8690-f450f02d9836

📥 Commits

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

📒 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 health check, instance group, instance, network, backend service, and subnetwork capabilities.

Changes

GCP IAM permissions

Layer / File(s) Summary
Expand Compute Engine permissions
manifests/0000_26_cloud-controller-manager-operator_16_credentialsrequest-gcp.yaml
Adds internal address creation, deletion, and usage permissions, plus health check, instance group, instance, network policy, backend service, and subnetwork permissions.

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

Suggested reviewers: radekmanak, theobarberbany

🚥 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 clearly matches the PR's GCP permissions update and identifies the main change.
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 The PR changes only a GCP credentials-request manifest; no Ginkgo tests or test titles were added or modified.
Test Structure And Quality ✅ Passed Only a GCP credentials manifest changed; no Ginkgo test code was added or modified, so the test-quality check is not applicable.
Microshift Test Compatibility ✅ Passed Only a YAML CredentialsRequest manifest changed; no new Ginkgo tests or MicroShift-sensitive APIs were added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed Only a GCP credentials manifest changed; no new or modified Ginkgo tests were added, so SNO compatibility is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed Only a GCP CredentialsRequest IAM-permissions manifest changed; no scheduling, affinity, nodeSelector, or replica logic was added.
Ote Binary Stdout Contract ✅ Passed Only a YAML CredentialsRequest manifest changed; no process-level code or stdout writes were added.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed Only a GCP CredentialsRequest manifest changed; no new Ginkgo/e2e tests were added, so the IPv4/disconnected check is not applicable.
No-Weak-Crypto ✅ Passed The only touched manifest adds GCP IAM permissions; no weak-crypto algorithms or custom/non-constant-time crypto code appear in the change.
Container-Privileges ✅ Passed Changed file only edits GCP CredentialsRequest permissions; no privileged, hostPID/Network/IPC, SYS_ADMIN, root, or allowPrivilegeEscalation settings were added.
No-Sensitive-Data-In-Logs ✅ Passed The PR only updates GCP IAM permissions in a manifest; no logging statements or sensitive-data exposure were added.
✨ 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 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign elmiko for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@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

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

@openshift-ci

openshift-ci Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

@patrickdillon: 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/e2e-gcp-ovn 646c26a 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.

@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

3 participants