-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add support for universe domain (phase 1) #477
Conversation
This reverts commit dd75d5b.
@vishwarajanand we won't cut a release until after the freeze, but I'd love to get an approval on this before the EOY |
*/ | ||
public function getUniverseDomain(): string | ||
{ | ||
if (null === $this->universeDomain) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to handle the case when universeDomain
is an empty string? Or is it guaranteed to be having a valid value (eg. when always downloaded from gcp console)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question. The spec does not provide any guidance around empty strings for universe domain (go/cloudsdk-tpc-authlibs), except when it is a 404 error from the MDS (which is handled in phase 2).
If we added special handling for empty strings, it would be to throw an exception. But as an empty string for a universe domain will throw an error in the client libraries anyway (because we throw an error for a user-supplied empty string, and also for a mismatch), I can't think of a real important reason why we need to throw an exception now, and would prefer to leave it out (unless we can think of a specific case where it would be important to do so).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
Co-authored-by: Vishwaraj Anand <vishwaraj.anand00@gmail.com>
Requirements:
universe_domain
read property. The default value for the property isgoogleapis.com
.universe_domain
from the credentials file and expose the value through the property created above. If the credentials file does not have the universe_domain value, the property should use the default valuegoogleapis.com
.