Skip to content

Make it easier to use non defaults CredentialsProvider #472

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gpoulin opened this issue Jan 28, 2021 · 3 comments · Fixed by #475
Closed

Make it easier to use non defaults CredentialsProvider #472

gpoulin opened this issue Jan 28, 2021 · 3 comments · Fixed by #475
Assignees
Labels
api: pubsublite Issues related to the googleapis/java-pubsublite API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@gpoulin
Copy link

gpoulin commented Jan 28, 2021

Is your feature request related to a problem? Please describe.
To be able to set a CredentialsProvider on a SubscriberSettings, you need to set the credentials on a Supplier<SubscriberServiceClient>, a Supplier<CursorServiceClient> and a PartitionAssignmentServiceClient

Describe the solution you'd like
Be able to set CredentialsProvider on the SubscriberSettings directly.

@product-auto-label product-auto-label bot added the api: pubsublite Issues related to the googleapis/java-pubsublite API. label Jan 28, 2021
@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Jan 29, 2021
@anguillanneuf anguillanneuf added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. and removed triage me I really want to be triaged. labels Jan 29, 2021
@dpcollins-google
Copy link
Collaborator

Hi Guillaume,

Trying to figure out how to prioritize this: Are you unable to use default credentials either through GOOGLE_APPLICATION_CREDENTIALS or machine defaults on Compute Engine? If so, why? If we implemented this, we'd probably want to do it across other languages as well.

-Dan

@gpoulin
Copy link
Author

gpoulin commented Jan 31, 2021

Do facilitate our migration to GCP, we will need to be able to publish messages to Pub/Sub from our data center. In our infrastructure, the local filesystem can't be considered secure . For other GCP client, we simply base64 the credential file and put he result as an environment variable. Creating a CredentialsProvider from that is pretty trivial.

In addition, we have used impersonated credentials from time to time.

@dpcollins-google
Copy link
Collaborator

Thank you for the scope as to why this is necessary. I'll ensure this is implemented in all clients.

dpcollins-google added a commit that referenced this issue Feb 1, 2021
These objects require more than one client and are annoying to construct correctly. Add a commonly needed setting to the top level here.

Fixes #472
dpcollins-google added a commit that referenced this issue Feb 1, 2021
These objects require more than one client and are annoying to construct correctly. Add a commonly needed setting to the top level here.

Fixes #472
dpcollins-google added a commit that referenced this issue Feb 1, 2021
These objects require more than one client and are annoying to construct correctly. Add a commonly needed setting to the top level here.

Fixes #472
dpcollins-google added a commit that referenced this issue Feb 1, 2021
)

* feat: Add CredentialsProvider to Publisher and Subscriber settings

These objects require more than one client and are annoying to construct correctly. Add a commonly needed setting to the top level here.

Fixes #472

* feat: Add CredentialsProvider to Publisher and Subscriber settings

These objects require more than one client and are annoying to construct correctly. Add a commonly needed setting to the top level here.

Fixes #472

* feat: Add CredentialsProvider to Publisher and Subscriber settings

These objects require more than one client and are annoying to construct correctly. Add a commonly needed setting to the top level here.

Fixes #472

* fix: clirr

* fix: flaky test

* fix: deps

* fix: scopes

* fix: format

* fix: dependencies again

* fix: admin endpoint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsublite Issues related to the googleapis/java-pubsublite API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants