GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Google Cloud Dataflow/Apache Beam and gcloud-java-core · Issue #1207 · googleapis/google-cloud-java

Google Cloud Dataflow/Apache Beam and gcloud-java-core #1207

New issue
Copy link
New issue
Copy link
Closed
#1380
Closed
Google Cloud Dataflow/Apache Beam and gcloud-java-core#1207
#1380
Copy link
Assignees
garrettjonesgoogle
Labels
api: core

Description

@lukecwik
lukecwik
opened on Aug 29, 2016
Issue body actions

We have two external pull requests which add logic to support the active gcloud profile, and also to get the project from the service account which are already supported by gcloud-java-core.

Dataflow/Apache Beam would like to depend on gcloud-java-core for the project detection logic found here: https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/gcloud-java-core/src/main/java/com/google/cloud/ServiceOptions.java?l=66

And also the auth credentials detection here: https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/gcloud-java-core/src/main/java/com/google/cloud/ServiceOptions.java?l=237

Currently these are hidden away, is there a way for you to expose these concepts without needing to create a ServiceOptions subclass?

If not, how do you advise Dataflow/Apache Beam to integrate with gcloud-java-core?

Note, that Apache Beam would be interested in the python versions of that code, and in general this would be useful in the other language implementations as well.

Activity

Next
  1. mziccard commented on Aug 29, 2016

    @mziccard
    mziccard
    on Aug 29, 2016
    Contributor
    More actions

    Hi @lukecwik!

    Currently these are hidden away, is there a way for you to expose these concepts without needing to create a ServiceOptions subclass?

    I can have a look and see if we can expose those functionalities, perhaps as static methods. Out of curiosity (I can thing of a couple of valid reasons) what blocks you from subclassing ServiceOptions?

  2. lukecwik commented on Aug 29, 2016

    @lukecwik
    lukecwik
    on Aug 29, 2016
    Author
    More actions

    The constructor for ServiceOptions takes in a bunch of content which seems like it would be brittle to extend with the least amount of code.

    Implementing defaultServiceFactory and defaultRpcFactory seems to have the same issues.

  3. lukecwik commented on Sep 7, 2016

    @lukecwik
    lukecwik
    on Sep 7, 2016
    Author
    More actions

    Ping?

  4. mziccard commented on Sep 7, 2016

    @mziccard
    mziccard
    on Sep 7, 2016
    Contributor
    More actions

    @lukecwik Sorry I haven't had the time to work on this yet. I'll try to draft a PR soon.

    Did you consider using depending on google-auth-library for the credentials detection part?

  5. lukecwik commented on Sep 7, 2016

    @lukecwik
    lukecwik
    on Sep 7, 2016
    Author
    More actions

    We already depend on the application default credentials, unfortunately the Apiary generated libraries use a credentials object which is different than the credentials object used by gRPC generated libraries in Java (they are very similar, but not the same package). It seems as though gcloud-java-core creates an abstraction that sits on top of both of these.

  6. mziccard commented on Sep 8, 2016

    @mziccard
    mziccard
    on Sep 8, 2016
    Contributor
    More actions

    gRPC generated libraries in Java

    Can you provide more details on this? What class are you referring to? Maybe CallCredentials?

    It seems as though gcloud-java-core creates an abstraction that sits on top of both of these.

    We surely sit on top of google-auth-library but I wouldn't say we sit on top of any gRPC-related credentials class. Also, the long term plan is for us to directly expose classes in google-auth-library as soon as those support all the functionality we need.

  7. lukecwik commented on Sep 8, 2016

    @lukecwik
    lukecwik
    on Sep 8, 2016
    Author
    More actions

    Apiary generated clients use:
    com.google.api.client.googleapis.auth.oauth2.GoogleCredential

    gRPC generated clients use:
    com.google.auth.oauth2.GoogleCredentials

    I though glcoud-java-core sat on top of both, but it seems as though HttpCredentialsAdapter was created which converts a com.google.auth.oauth2.GoogleCredentials to be a HttpRequestInitializer that is compatible with Apiary generated clients and gRPC generated clients use com.google.auth.oauth2.GoogleCredentials directly.

    AuthCredentials was what I was thinking of was your common point between Apiary and gRPC generated code and it was what I was referring to as the common abstraction point that Dataflow could depend on/expose instead of exposing com.google.api.client.googleapis.auth.oauth2.GoogleCredential or com.google.auth.oauth2.GoogleCredentials

    What functionality are you waiting on from google-auth-library?

  8. mziccard commented on Sep 8, 2016

    @mziccard
    mziccard
    on Sep 8, 2016
    Contributor
    More actions

    What functionality are you waiting on from google-auth-library?

    Main blockers at the moment are that those classes are not Serializable and do not expose a method to sign byte arrays. Are you going to need this?

  9. lukecwik commented on Sep 8, 2016

    @lukecwik
    lukecwik
    on Sep 8, 2016
    Author
    More actions

    Signing isn't important for us yet, Serializable could be useful for our end users but not useful for us since Dataflow uses the GCE VM credentials, but for other runners like Spark/Flink, this could be very useful.

    How do you deal with short lived credentials, do you have hooks into expiry time?

  10. mziccard commented on Sep 9, 2016

    @mziccard
    mziccard
    on Sep 9, 2016
    Contributor
    More actions

    How do you deal with short lived credentials, do you have hooks into expiry time?

    Credentials expose a refresh method. The HttpCredentialsAdapter automatically refreshes tokens if needed (see HttpCredentialsAdapter.handlerResponse).

    You can also create AuthCredentials from an existing accessToken (see createFor(String accessToken, Date expirationTime)), these are one-time-only credentials. Same applies to google-auth-library credentials created from just an access token (see this constructor).

  11. garrettjonesgoogle
    added
    api: core
    triaged for beta
    on Nov 23, 2016
  12. garrettjonesgoogle
    added
    api: datastoreIssues related to the Datastore API.
    and removed
    triaged for beta
    on Dec 12, 2016
  13. garrettjonesgoogle
    self-assigned this
    on Dec 12, 2016
  14. 4 remaining items

  15. meltsufin
    added a commit that references this issue on Dec 22, 2025

    chore: upgrade native image checks to graalvm-22.3.0 (#1718) (#1207)

    5209398
  16. chingor13
    added a commit that references this issue on Jan 6, 2026

    chore(main): release 0.130.27-alpha (#1207)

    126b379
  17. chingor13
    added a commit that references this issue on Jan 22, 2026

    chore(main): release 2.17.3 (#1207)

    83caba9
  18. chingor13
    added a commit that references this issue on Feb 24, 2026

    build: migrate release scripts (#1799) (#1207)

    ce985c6
  19. suztomo
    added a commit that references this issue on Mar 11, 2026

    chore: upgrade native image checks to graalvm-22.3.0 (googleapis#1718) (

    91bb8e6
  20. chingor13
    added a commit that references this issue on Mar 12, 2026

    build: migrate release scripts (#1799) (#1207)

    d9acdbe
  21. suztomo
    added 2 commits that reference this issue on Mar 23, 2026

    deps: update dependency com.google.cloud:google-cloud-spanner-bom to …

    9a013f1

    chore(main): release 2.9.13 (googleapis#1213)

    1e98789
  22. suztomo
    added a commit that references this issue on Mar 30, 2026

    chore: Java 8 unit test to build code in Java 17 and run tests on Jav…

    9b9afd9
  23. lqiu96
    added a commit that references this issue on Apr 1, 2026

    chore: Java 8 unit test to build code in Java 17 and run tests on Jav…

    a8a57d5
  24. meltsufin
    added 4 commits that reference this issue on Apr 29, 2026

    deps: update dependency com.google.cloud:google-cloud-shared-dependen…

    d355509

    chore(main): release 1.120.5 (#1208)

    28fc134

    deps: update dependency com.google.cloud:google-cloud-shared-dependen…

    c7bd108

    chore(main): release 1.120.5 (#1208)

    2571d94
  25. benjaminp
    added a commit that references this issue on Jul 13, 2026

    deps: update dependency org.graalvm.buildtools:junit-platform-native …

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

Metadata

Metadata

Assignees

  • @garrettjonesgoogle
    garrettjonesgoogle

Labels

api: core

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.