logstash-plugins / logstash-input-google_cloud_storage

Apache License 2.0
4 stars 9 forks source link

Fallback mechanism to unauthenticated mode if no default credentials are found #23

Closed ugosan closed 1 year ago

ugosan commented 1 year ago

Release notes

What does this PR do?

This pull request adds logic that handles three different authentication methods for Google Cloud Storage. It provides a fallback mechanism to unauthenticated mode if no default credentials are found.

If a JSON key path is provided, it uses it to initialize normally. If not, it tries to use the default application credentials, and if they don't exist, it falls back to unauthenticated mode. The code also sets the header provider and retry settings for the storage.

Why is it important/What is the impact to the user?

It allows Logstash to read from public Google Cloud Storage buckets

Checklist

ugosan commented 1 year ago

@andsel all good