googleauth - Module Google::Auth::ExternalAccount::ExternalAccountUtils (v1.12.1)

Reference documentation and code samples for the googleauth module Google::Auth::ExternalAccount::ExternalAccountUtils.

Authenticates requests using External Account credentials, such as those provided by the AWS provider or OIDC provider like Azure, etc.

Methods

#normalize_timestamp

def normalize_timestamp(time)

#project_id

def project_id() -> string, nil

Retrieves the project ID corresponding to the workload identity or workforce pool. For workforce pool credentials, it returns the project ID corresponding to the workforce_pool_user_project. When not determinable, None is returned.

The resource may not have permission (resourcemanager.projects.get) to call this API or the required scopes may not be selected: https://cloud.google.com/resource-manager/reference/rest/v1/projects/get#authorization-scopes

Returns
  • (string, nil) — The project ID corresponding to the workload identity pool or workforce pool if determinable.

#project_number

def project_number() -> string, nil

Retrieve the project number corresponding to workload identity pool STS audience pattern: //iam.googleapis.com/projects/$PROJECT_NUMBER/locations/...

Returns
  • (string, nil)

#service_account_email

def service_account_email()

Constants

CLOUD_RESOURCE_MANAGER

value: "https://cloudresourcemanager.googleapis.com/v1/projects/".freeze
Cloud resource manager URL used to retrieve project information.