googleapis / googleapis/google-cloud-go

auth: Allow overriding the universeDomain using GOOGLE_CLOUD_UNIVERSE_DOMAIN

Open
#13,844 0 comments 4 reactions 0 assignees View on GitHub
triage me
Dominant language
Go
Stars
4.5k
Forks
1.6k
Avg merge
1d 13h
Merged PRs (30d)
109

Description

## Is your feature request related to a problem? Please describe.

Allow overriding the universe domain, similar to how the REST client allows overriding it using the environment variable `GOOGLE_CLOUD_UNIVERSE_DOMAIN`

The [getUniverseDomain()](https://github.com/googleapis/google-cloud-go/blob/c8ae2e2a0a89e378892414af4db41ccd9b40bc9e/auth/internal/transport/cba.go#L81-L86) call for the gRPC transport does not take into account the override environment variable.

https://github.com/googleapis/google-cloud-go/blob/c8ae2e2a0a89e378892414af4db41ccd9b40bc9e/auth/internal/transport/cba.go#L81-L86

## Describe the solution you'd like

Similar to the [REST implementation](https://github.com/googleapis/google-api-go-client/blob/62e5a8eeb37dc6d8b31b104bdb6f100369d69ff2/internal/settings.go#L251-L259) that respects the `GOOGLE_CLOUD_UNIVERSE_DOMAIN` environment variable to allow overriding the universeDomain.

## Describe alternatives you've considered
None at the moment, we are using a GCP whitelabel cloud provider which requires the universe domain to be overridden. At the moment, the only solution is to switch from gRPC to REST. However, many open source tools only implement the gRPC client and there is no solution at the moment.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.