Aiven-Open/gcs-connector-for-apache-kafka

Connector does not allow connecting with default credentials.

Closed this issue · 3 comments

The GoogleCredentialsBuilder supports falling back to environment based default credentials when a path or json has not been supplied.

The GcsSinkConfig however uses a "No Credentials" option when both are omitted.

We need a configuration that is able to allow the connector to actually use the environment based default credentials.

I am happy to contribute a fix, but would like to get consensus on the way you as a project would like to support this option.

Since "no credentials" is a valid option, we cannot remove that code path. Maybe we need to add a new configuration option that allows the code path for default credentials to be hit?

Suggest adding a new boolean option "gcs.credentials.default, that will allow default credentials to be used?

The following PR introduced the problem last year.

#228

My preference would be to revert the behaviour back to how it was in the past, especially since that is the behaviour documented by the properties documentation.