Skip to content

GCP-429: feat: Add GCP Workload Identity Federation (WIF) credential support#206

Open
apahim wants to merge 1 commit intoopenshift:mainfrom
apahim:gcp-wif-support
Open

GCP-429: feat: Add GCP Workload Identity Federation (WIF) credential support#206
apahim wants to merge 1 commit intoopenshift:mainfrom
apahim:gcp-wif-support

Conversation

@apahim
Copy link

@apahim apahim commented Feb 27, 2026

Add auto-detection of WIF credentials so CNCC can authenticate without long-lived service account keys. The credential priority chain is:

  1. workload_identity_config.json from secret (WIF)
  2. service_account.json from secret (existing behavior)
  3. GOOGLE_APPLICATION_CREDENTIALS env var (for HCP deployments)

The auth mechanism (WithCredentialsJSON) is preserved since it already handles both service_account and external_account credential types.

Additions:

  • extract ensureUniverseDomain() helper for independent testability
  • rewrite universe domain tests to call real code instead of replicating logic inline
  • add invalid JSON test
  • use %w for error wrapping in initialization code to match Azure/AWS patterns

Summary by CodeRabbit

  • New Features

    • Added support for GCP Workload Identity Federation (WIF), with ordered credential source detection and automatic defaulting of the universe domain when missing.
  • Documentation

    • Expanded GCP auth docs with WIF setup, credential detection order, example secret format, migration guidance, and troubleshooting.
  • Tests

    • Added unit tests covering credential parsing, source priority, fallback behavior, and universe-domain handling.

@coderabbitai
Copy link

coderabbitai bot commented Feb 27, 2026

Walkthrough

Adds GCP Workload Identity Federation credential detection and a consolidated credential loader that checks workload_identity_config.json, service_account.json, then GOOGLE_APPLICATION_CREDENTIALS; ensures universe_domain exists in credentials; adds tests and README documentation (duplicate README insertion present).

Changes

Cohort / File(s) Summary
Documentation
README.md
Added GCP Workload Identity Federation (WIF) guidance including credential detection priority, secret format example, migration note, and troubleshooting messages. The WIF section was inserted twice (duplicate).
Credential loading & logic
pkg/cloudprovider/gcp.go
Introduced readGCPCredentialsConfig() to load credentials in priority: workload_identity_config.json (secret), service_account.json (secret), then GOOGLE_APPLICATION_CREDENTIALS; added ensureUniverseDomain() to inject default universe_domain; updated initCredentials() to use these helpers and improved error wrapping; added os and klog/v2 imports.
Tests
pkg/cloudprovider/gcp_test.go
Added newTestGCP test helper and comprehensive tests covering credential source priority (WIF vs SA vs env), missing-file errors, and ensureUniverseDomain behavior for injected, preserved, invalid, and null JSON.

Sequence Diagram(s)

sequenceDiagram
  participant K8sSecret as "Kubernetes Secret (WIF/SA)"
  participant EnvFile as "Env file (`GOOGLE_APPLICATION_CREDENTIALS`)"
  participant GCPProvider as "GCP Cloud Provider"

  GCPProvider->>K8sSecret: check for `workload_identity_config.json`
  alt WIF present
    K8sSecret-->>GCPProvider: return WIF credentials
  else not present
    GCPProvider->>K8sSecret: check for `service_account.json`
    alt SA present
      K8sSecret-->>GCPProvider: return SA credentials
    else not present
      GCPProvider->>EnvFile: check env var file path
      alt env file exists
        EnvFile-->>GCPProvider: return credentials bytes
      else file missing
        EnvFile-->>GCPProvider: return error
      end
    end
  end
  GCPProvider->>GCPProvider: ensureUniverseDomain(credentialsJSON)
  GCPProvider->>GCPProvider: initialize Google client with credentials
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 7.69% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: adding GCP Workload Identity Federation credential support, which is the primary focus of the changeset across all modified files.
Stable And Deterministic Test Names ✅ Passed All test names in the pull request are stable and deterministic, using descriptive static strings without dynamic information such as generated identifiers, timestamps, or IP addresses.
Test Structure And Quality ✅ Passed Test code demonstrates strong quality across all applicable criteria with proper single responsibility, resource setup/cleanup, meaningful assertion messages, and consistency with repository patterns.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

@apahim apahim changed the title Add GCP Workload Identity Federation (WIF) credential support GCP-429: feat: Add GCP Workload Identity Federation (WIF) credential support Feb 27, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Feb 27, 2026
@openshift-ci-robot
Copy link

openshift-ci-robot commented Feb 27, 2026

@apahim: This pull request references GCP-429 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 "4.22.0" version, but no target version was set.

Details

In response to this:

Add auto-detection of WIF credentials so CNCC can authenticate without long-lived service account keys. The credential priority chain is:

  1. workload_identity_config.json from secret (WIF)
  2. service_account.json from secret (existing behavior)
  3. GOOGLE_APPLICATION_CREDENTIALS env var (for HCP deployments)

The auth mechanism (WithCredentialsJSON) is preserved since it already handles both service_account and external_account credential types.

Additions:

  • extract ensureUniverseDomain() helper for independent testability
  • rewrite universe domain tests to call real code instead of replicating logic inline
  • add invalid JSON test
  • use %w for error wrapping in initialization code to match Azure/AWS patterns

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
Copy link

openshift-ci-robot commented Feb 27, 2026

@apahim: This pull request references GCP-429 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 "4.22.0" version, but no target version was set.

Details

In response to this:

Add auto-detection of WIF credentials so CNCC can authenticate without long-lived service account keys. The credential priority chain is:

  1. workload_identity_config.json from secret (WIF)
  2. service_account.json from secret (existing behavior)
  3. GOOGLE_APPLICATION_CREDENTIALS env var (for HCP deployments)

The auth mechanism (WithCredentialsJSON) is preserved since it already handles both service_account and external_account credential types.

Additions:

  • extract ensureUniverseDomain() helper for independent testability
  • rewrite universe domain tests to call real code instead of replicating logic inline
  • add invalid JSON test
  • use %w for error wrapping in initialization code to match Azure/AWS patterns

Summary by CodeRabbit

  • New Features

  • Added support for GCP Workload Identity Federation (WIF) for credential management.

  • Expanded credential detection to support multiple configuration sources with ordered priority checking.

  • Implemented automatic universe domain configuration for GCP credentials.

  • Documentation

  • Enhanced GCP authentication documentation with WIF setup instructions, credential detection order, and troubleshooting guidance.

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@pkg/cloudprovider/gcp.go`:
- Around line 95-109: The code currently treats any error from
g.readSecretData("workload_identity_config.json") and
g.readSecretData("service_account.json") as a benign miss and falls through to
the next credential source; change this so readSecretData errors that are not a
"not found" condition cause an immediate return of that error (fail fast)
instead of trying the next source. In practice update the handling around
wifConfig and saConfig (calls to g.readSecretData) to check the error type/value
and only continue when the error indicates the secret is missing; for any other
error return nil, err (and log it) so functions like readSecretData and the
surrounding logic in pkg/cloudprovider/gcp.go do not silently fall back on
permission or I/O failures.
- Around line 72-83: The code in ensureUniverseDomain unmarshals credentialsJSON
into var jsonMap map[string]interface{} which will be nil if the JSON is the
literal null, causing a panic when assigning jsonMap["universe_domain"]; fix by
checking for a nil map after json.Unmarshal and initializing it (e.g., jsonMap =
make(map[string]interface{})) before setting
jsonMap["universe_domain"]=defaultUniverseDomain, then proceed to json.Marshal
and return; reference symbols: ensureUniverseDomain, jsonMap,
defaultUniverseDomain.

In `@README.md`:
- Around line 104-113: The fenced code block containing the Kubernetes Secret
example is missing a language tag which triggers MD040; update the opening fence
from ``` to ```yaml so the block beginning with "apiVersion: v1" and the Secret
example (workload_identity_config.json, kind: Secret, metadata:name/namespace,
type: Opaque) is annotated as YAML.

ℹ️ Review info

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

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 0357238 and 8102a5c.

📒 Files selected for processing (3)
  • README.md
  • pkg/cloudprovider/gcp.go
  • pkg/cloudprovider/gcp_test.go

@apahim
Copy link
Author

apahim commented Feb 27, 2026

CI Status

All checks relevant to this PR have passed: unit tests, lint, images, and verify-deps. The e2e tests are still running.

The ci/prow/security (Snyk) failure is not related to this PR. All 12 findings (1 HIGH, 9 MEDIUM, 2 LOW) are pre-existing issues in vendored dependencies:

Severity Issue Location
HIGH Sensitive info in error messages vendor/sigs.k8s.io/controller-runtime/pkg/log/log.go
MEDIUM Path Traversal (x4) vendor/github.com/fsnotify/fsnotify/backend_kqueue.go
MEDIUM Path Traversal vendor/github.com/prometheus/procfs/net_dev_snmp6.go
MEDIUM Permissive TrustManager vendor/github.com/google/s2a-go/internal/v2/tlsconfigstore/
LOW 2 issues vendored code

None of these are introduced by the changes in this PR. This scan would fail on main as well.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Feb 27, 2026

@apahim: This pull request references GCP-429 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 "4.22.0" version, but no target version was set.

Details

In response to this:

Add auto-detection of WIF credentials so CNCC can authenticate without long-lived service account keys. The credential priority chain is:

  1. workload_identity_config.json from secret (WIF)
  2. service_account.json from secret (existing behavior)
  3. GOOGLE_APPLICATION_CREDENTIALS env var (for HCP deployments)

The auth mechanism (WithCredentialsJSON) is preserved since it already handles both service_account and external_account credential types.

Additions:

  • extract ensureUniverseDomain() helper for independent testability
  • rewrite universe domain tests to call real code instead of replicating logic inline
  • add invalid JSON test
  • use %w for error wrapping in initialization code to match Azure/AWS patterns

Summary by CodeRabbit

  • New Features

  • Added support for GCP Workload Identity Federation (WIF) and ordered credential source detection.

  • Automatic defaulting of the universe domain in GCP credentials when missing.

  • Documentation

  • Expanded GCP authentication docs with WIF setup, credential detection order, example formats, migration notes, and troubleshooting.

  • Tests

  • Added unit tests covering credential parsing, source priority, and universe-domain behavior.

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.

@apahim
Copy link
Author

apahim commented Mar 2, 2026

/retest-required

@cristianoveiga
Copy link

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 2, 2026
Copy link
Contributor

@ricky-rav ricky-rav left a comment

Choose a reason for hiding this comment

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

Changes look good, I only added a few minor comments.

A couple of more things:

  • you can squash the second commit onto the first one: no need to keep the changes requested by coderabbit separate from the main changes
  • Has this been tested end-to-end already?
  • Are you planning to have any end-to-end tests, perhaps in openshift/origin, to test all three authentication methods as well as perhaps some corner cases, like what happens when a certificate rotates?

t.Fatalf("expected env var config, got: %s", string(data))
}
}

Copy link
Contributor

@ricky-rav ricky-rav Mar 3, 2026

Choose a reason for hiding this comment

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

I would also add a test where you have service_account.json and theGOOGLE_APPLICATION_CREDENTIALS env var, in order to show which one gets picked.
EDIT: Actually, looking at openshift-online/gcp-hcp#7, in the case of HCP I see that GOOGLE_APPLICATION_CREDENTIALS contains the WIF credentials and there's no fallback. Right?

Copy link
Author

@apahim apahim Mar 4, 2026

Choose a reason for hiding this comment

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

Right, for HCP, we always use the GOOGLE_APLICATION_CREDENTIALS.

End-to-end flow:

  1. NEW - HO PR #7824: HyperShift Operator (ReconcileCredentials in hostedcluster controller)
  • Creates secret "cloud-network-config-controller-creds" containing: application_default_credentials.json (WIF external_account JSON)
  1. NEW - HO PR #7824: HyperShift CPO (control-plane-operator, CNO deployment component)
  • Sets GCP_CNCC_CREDENTIALS_FILE=application_default_credentials.json as env var on the CNO deployment in the control plane namespace
  1. NEW - CNO PR #2915: CNO (cluster-network-operator, renderCloudNetworkConfigController)
  • Reads GCP_CNCC_CREDENTIALS_FILE
  • Renders managed/controller.yaml template with GOOGLE_APPLICATION_CREDENTIALS=/etc/secret/cloudprovider/application_default_credentials.json on the CNCC container
  1. EXISTING - already in managed/controller.yaml template: kubelet (on management cluster node)
  • Mounts the secret as a volume at /etc/secret/cloudprovider (configured in the template as volume "cloud-provider-secret")
  1. EXISTING - cloud-token minter
  • Sidecar container in CNCC pod
  • Mints a projected SA token and writes it to /var/run/secrets/openshift/serviceaccount/token
  1. NEW - CNCC PR GCP-429: feat: Add GCP Workload Identity Federation (WIF) credential support #206: CNCC (cloud-network-config-controller, readGCPCredentialsConfig)
  • Reads GOOGLE_APPLICATION_CREDENTIALS
  • Loads WIF config
  • WIF config's credential_source.file references the minted token
  1. EXISTING - CNCC GCP client exchanges token via STS for access credentials

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, so let's add to gcp.go a line explaining that through the GOOGLE_APPLICATION_CREDENTIALS env var we load the WIF config. :)

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Mar 3, 2026
Copy link
Contributor

@ricky-rav ricky-rav left a comment

Choose a reason for hiding this comment

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

Just two more NITs

@openshift-ci-robot
Copy link

openshift-ci-robot commented Mar 4, 2026

@apahim: This pull request references GCP-429 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 "4.22.0" version, but no target version was set.

Details

In response to this:

Add auto-detection of WIF credentials so CNCC can authenticate without long-lived service account keys. The credential priority chain is:

  1. workload_identity_config.json from secret (WIF)
  2. service_account.json from secret (existing behavior)
  3. GOOGLE_APPLICATION_CREDENTIALS env var (for HCP deployments)

The auth mechanism (WithCredentialsJSON) is preserved since it already handles both service_account and external_account credential types.

Additions:

  • extract ensureUniverseDomain() helper for independent testability
  • rewrite universe domain tests to call real code instead of replicating logic inline
  • add invalid JSON test
  • use %w for error wrapping in initialization code to match Azure/AWS patterns

Summary by CodeRabbit

  • New Features

  • Added support for GCP Workload Identity Federation (WIF) and ordered credential source detection; automatically default the universe domain in GCP credentials when missing.

  • Documentation

  • Expanded GCP authentication docs with WIF setup, credential detection order, example formats, migration notes, and troubleshooting.

  • Tests

  • Added unit tests covering credential parsing, source priority, and universe-domain behavior.

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.

Add auto-detection of WIF credentials so CNCC can authenticate without
long-lived service account keys. The credential priority chain is:
1) workload_identity_config.json from secret (WIF)
2) service_account.json from secret (existing behavior)
3) GOOGLE_APPLICATION_CREDENTIALS env var (for HCP deployments)

The auth mechanism (WithCredentialsJSON) is preserved since it already
handles both service_account and external_account credential types.

Extract ensureUniverseDomain() helper for independent testability,
rewrite universe domain tests to call real code instead of replicating
logic inline, add invalid JSON test, and use %w for error wrapping in
initialization code to match Azure/AWS patterns.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@apahim apahim force-pushed the gcp-wif-support branch from b84e086 to b798444 Compare March 4, 2026 13:47
@apahim
Copy link
Author

apahim commented Mar 4, 2026

you can squash the second commit onto the first one: no need to keep the changes requested by coderabbit separate from the main changes

Done

Has this been tested end-to-end already?

Not yet, working on it, I will add the verified label as soon as I have it tested.

Are you planning to have any end-to-end tests, perhaps in openshift/origin, to test all three authentication methods as well as perhaps some corner cases, like what happens when a certificate rotates?

I was planning to have this only tested on the GCP HCP e2e, but I will look into the openshift/origin repository to add the tests for the auth methods. What type of coordination we need there? We first merge this and then have the tests added there?

@openshift-ci-robot
Copy link

openshift-ci-robot commented Mar 4, 2026

@apahim: This pull request references GCP-429 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 "4.22.0" version, but no target version was set.

Details

In response to this:

Add auto-detection of WIF credentials so CNCC can authenticate without long-lived service account keys. The credential priority chain is:

  1. workload_identity_config.json from secret (WIF)
  2. service_account.json from secret (existing behavior)
  3. GOOGLE_APPLICATION_CREDENTIALS env var (for HCP deployments)

The auth mechanism (WithCredentialsJSON) is preserved since it already handles both service_account and external_account credential types.

Additions:

  • extract ensureUniverseDomain() helper for independent testability
  • rewrite universe domain tests to call real code instead of replicating logic inline
  • add invalid JSON test
  • use %w for error wrapping in initialization code to match Azure/AWS patterns

Summary by CodeRabbit

  • New Features

  • Added support for GCP Workload Identity Federation (WIF), with ordered credential source detection and automatic defaulting of the universe domain when missing.

  • Documentation

  • Expanded GCP auth docs with WIF setup, credential detection order, example secret format, migration guidance, and troubleshooting.

  • Tests

  • Added unit tests covering credential parsing, source priority, fallback behavior, and universe-domain handling.

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
Copy link
Contributor

openshift-ci bot commented Mar 4, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: apahim, cristianoveiga
Once this PR has been reviewed and has the lgtm label, please ask for approval from ricky-rav. 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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

♻️ Duplicate comments (1)
pkg/cloudprovider/gcp.go (1)

101-114: ⚠️ Potential issue | 🟠 Major

Do not silently downgrade all secret-read errors to “not found”.

At Line [101] and Line [109], any readSecretData failure falls through; logs at Line [106] and Line [114] also label all errors as “not found”. This can mask real read failures and cause unintended fallback to lower-priority credentials.

#!/bin/bash
# Verify how readSecretData wraps and surfaces file-read errors.
# Expected: confirm whether os.ErrNotExist is preserved (%w) or flattened (%v),
# so callers can reliably distinguish "missing file" vs other failures.

rg -n -C4 'func \(.*\) readSecretData\(' pkg/cloudprovider
rg -n -C4 'unable to read secret data' pkg/cloudprovider
rg -n -C3 'readSecretData\(' pkg/cloudprovider/gcp.go
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pkg/cloudprovider/gcp.go` around lines 101 - 114, The current logic in gcp.go
treats any error from g.readSecretData as "not found" and falls back silently;
change it so that after calling g.readSecretData for wifCredentialsFile and
serviceAccountFile you inspect the returned error and only treat os.ErrNotExist
(or errors.Is(err, fs.ErrNotExist)) as "not found" and continue to the next
priority, but for any other error return that error immediately (or log and
return) instead of falling back; update the log calls around g.readSecretData so
they include the actual error details (use %w or errors.Is for
wrapping/inspection) and reference wifCredentialsFile, serviceAccountFile and
the readSecretData function when locating the code to modify.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@pkg/cloudprovider/gcp.go`:
- Around line 101-114: The current logic in gcp.go treats any error from
g.readSecretData as "not found" and falls back silently; change it so that after
calling g.readSecretData for wifCredentialsFile and serviceAccountFile you
inspect the returned error and only treat os.ErrNotExist (or errors.Is(err,
fs.ErrNotExist)) as "not found" and continue to the next priority, but for any
other error return that error immediately (or log and return) instead of falling
back; update the log calls around g.readSecretData so they include the actual
error details (use %w or errors.Is for wrapping/inspection) and reference
wifCredentialsFile, serviceAccountFile and the readSecretData function when
locating the code to modify.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: e310fb4f-b3c4-4d1a-ac1c-784d6d141973

📥 Commits

Reviewing files that changed from the base of the PR and between b84e086 and b798444.

📒 Files selected for processing (3)
  • README.md
  • pkg/cloudprovider/gcp.go
  • pkg/cloudprovider/gcp_test.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • pkg/cloudprovider/gcp_test.go

t.Fatalf("expected env var config, got: %s", string(data))
}
}

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, so let's add to gcp.go a line explaining that through the GOOGLE_APPLICATION_CREDENTIALS env var we load the WIF config. :)

// Priority:
// 1. WIF config from secret
// 2. service account JSON from secret (existing behavior)
// 3. GOOGLE_APPLICATION_CREDENTIALS env var (for HCP)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add here that GOOGLE_APPLICATION_CREDENTIALS is also used for WIF? Otherwise I'm afraid it's not super clear for somebody who only looks at this repo. Thanks!

@ricky-rav
Copy link
Contributor

Has this been tested end-to-end already?

Not yet, working on it, I will add the verified label as soon as I have it tested.

Ok. Should we involve QE from your team for the /verified label? That's how we do it in our team for our PRs, but I don't know if it's an org-wide rule.

Are you planning to have any end-to-end tests, perhaps in openshift/origin, to test all three authentication methods as well as perhaps some corner cases, like what happens when a certificate rotates?

I was planning to have this only tested on the GCP HCP e2e, but I will look into the openshift/origin repository to add the tests for the auth methods. What type of coordination we need there? We first merge this and then have the tests added there?

Uhm will your GCP HCP e2e tests exercise also these CNCC changes or just the HCP changes?
If the CNCC changes are not exercised, it would be great to have an e2e test in origin, but do let me know about the feasibility of it. I'll get back to you with the exact command to use on an openshift/origin PR to run an e2e test on a number of PRs. I have to ask around first :)

@ricky-rav
Copy link
Contributor

ricky-rav commented Mar 4, 2026

I'll get back to you with the exact command to use on an openshift/origin PR to run an e2e test on a number of PRs. I have to ask around first :)

/payload-job-with-prs $JOB_NAME openshift/<PROJECT>#<PR_NUMBER> openshift/<PROJECT>#<PR_NUMBER> openshift/<PROJECT>#<PR_NUMBER> ...

For instance: openshift/origin#30560 (comment)

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 4, 2026

@apahim: This PR was included in a payload test run from openshift/origin#30832
trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-main-ci-4.22-e2e-gcp-ovn

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/67ccb430-1813-11f1-9f44-422dfd494bcd-0

@apahim
Copy link
Author

apahim commented Mar 4, 2026

@apahim
Copy link
Author

apahim commented Mar 4, 2026

Ok. Should we involve QE from your team for the /verified label? That's how we do it in our team for our PRs, but I don't know if it's an org-wide rule.

We don't have QE, we usually (in hypershift) verify it ourselves. Is that alright?

Uhm will your GCP HCP e2e tests exercise also these CNCC changes or just the HCP changes?
If the CNCC changes are not exercised, it would be great to have an e2e test in origin, but do let me know about the feasibility of it.

Good point, adding here: openshift/origin#30832

@apahim
Copy link
Author

apahim commented Mar 5, 2026

/retest-required

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 5, 2026

@apahim: 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/security b798444 link false /test security

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.

@ricky-rav
Copy link
Contributor

Ok. Should we involve QE from your team for the /verified label? That's how we do it in our team for our PRs, but I don't know if it's an org-wide rule.

We don't have QE, we usually (in hypershift) verify it ourselves. Is that alright?

Sure!

Uhm will your GCP HCP e2e tests exercise also these CNCC changes or just the HCP changes?
If the CNCC changes are not exercised, it would be great to have an e2e test in origin, but do let me know about the feasibility of it.
Good point, adding here: openshift/origin#30832

Great! The new test is failing somewhere :) We can continue the discussion there

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants