GoogleCloudDataproc / hadoop-connectors

Libraries and tools for interoperability between Hadoop-related open-source software and Google Cloud Platform.
Apache License 2.0
280 stars 238 forks source link

Access Token provider - examples? #597

Closed qcastel closed 2 years ago

qcastel commented 3 years ago

Hello !

First, note that I am new to the space and still trying to figuring out things. Please don't hesitate to ask me more details or redirect me to some documentations that I may have missed.

In Dataiku, we would like to allow hadoop to connect to GCS via OAuth2. Looking at your configuration, it seems we need to implement a custom AccessTokenProvider. From that, we got a few questions:

Thanks in advance, any help to achieve an OAuth2 connection to GCS from Hadoop would be welcome!

medb commented 3 years ago

Please take a look at this implementation as an example.

May you elaborate more on your use case, from where/how do you plan to obtain access tokens to access GCS?

qcastel commented 3 years ago

Hello @medb

Apologies for the delay. We made it work on our side at the end, although we noticed that there isn't anything particular to our product in our custom OAuth2 provider. This is why we would be happy to actually contribute our custom OAuth2 provider to the google hadoop connector directly.

It seems to me that the best place was here: https://github.com/GoogleCloudPlatform/gcp-token-broker/pull/39 This give you a better view of what we intended to implement initially.

PS: happy to move the PR to this repo if you prefer and/or change the implement accordingly.

qcastel commented 2 years ago

hello @medb

I spoke to @jphalip today, who suggested me it was best to move this PR to this repo!

Let us know if you find this contribution a good fit for this connector :)