Skip to content

CORS-4520: GCP: Add Universe Domain Support - #63

Open
patrickdillon wants to merge 5 commits into
openshift:mainfrom
patrickdillon:gcd-auth
Open

CORS-4520: GCP: Add Universe Domain Support#63
patrickdillon wants to merge 5 commits into
openshift:mainfrom
patrickdillon:gcd-auth

Conversation

@patrickdillon

Copy link
Copy Markdown

Adds support for setting alternate universe domain in GCP. This is needed for supporting OpenShift on Google Cloud Dedicated, GCP's sovereign cloud offering.

See openshift/enhancements#1977 for more details.

Bring in the most up-to-date authentication packages.
go mod tidy && go mod vendor
@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 21, 2026
@openshift-ci-robot

openshift-ci-robot commented Jul 21, 2026

Copy link
Copy Markdown

@patrickdillon: This pull request references CORS-4520 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:

Adds support for setting alternate universe domain in GCP. This is needed for supporting OpenShift on Google Cloud Dedicated, GCP's sovereign cloud offering.

See openshift/enhancements#1977 for more 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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci

openshift-ci Bot commented Jul 21, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: patrickdillon
Once this PR has been reviewed and has the lgtm label, please assign flavianmissi 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

Adds support for non-default universe domains. Allows installing
in Google Cloud Dedicated, GCP's sovreign cloud offering.
patrickdillon and others added 2 commits July 26, 2026 11:45
Replace the manual selfSignedTokenSource approach (credentials.DetectDefault
+ oauth2adapt) with htransport.NewClient from google.golang.org/api, which
uses the SDK's internal auth handling. This ensures the HTTP client used for
direct GCS REST API calls (blob reads, writes, upload sessions) gets properly
authenticated tokens for non-default universe domains, matching the pattern
used by gcp-pd-csi-driver and machine-api-provider-gcp.

The previous approach generated self-signed JWTs with incorrect audience
for GCD, causing 403 Forbidden responses from GCS.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The GCS storage driver was returning 307 redirects for blob reads,
directing clients to signed URLs generated by storage.SignedURL().
In sovereign clouds (GCD), this function generates URLs pointing to
storage.googleapis.com instead of the correct universe domain endpoint,
causing 403 Forbidden errors when clients follow the redirect.

Disable signed URL redirects for non-default universe domains by not
populating the email/privateKey fields, which causes URLFor() to return
ErrUnsupportedMethod and fall back to proxying content through the
registry.

Also refactor Reader() to use the GCS SDK client (d.gcs) instead of
the raw HTTP client (d.client/getObject), matching the pattern used by
GetContent() which is proven to work in sovereign clouds.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

2 participants