Skip to content

Simplify call to retrieve the default service account from MDS for ComputeEngineCredentials #1841

@lqiu96

Description

@lqiu96

Follows the changes in #1839 (PR that reverts the call to retrieve the default service account when refreshing the access token).

There was a suggestion in b/458269866 to directly call http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/email to get the princpcal instead of http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/?recursive=true and parsing for the email.

From testing locally, this looks to work as intended and returns a string value instead of json.

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: p2Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions