Skip to content

ServiceOptions.java: Extract projectId from credentials when provided via .setCredentials` #3386

Description

@jabubake

Handwritten clients that use ServiceOptions:

when .setCredentials is used, the project id is not extracted from the service account.
This behavior is different when service account credentials are supplied via GOOGLE_APPLICATION_CREDENTIALS env var (project id is extracted)

https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/google-cloud-clients/google-cloud-core/src/main/java/com/google/cloud/ServiceOptions.java#L465

Similar issue for BigQuery:
GoogleCloudPlatform/java-docs-samples#936

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: corepriority: p2Moderately-important priority. Fix may not be included in next release.type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions