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
[x] My code follows the style guidelines of this project
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[ ] I have made corresponding change to the default configuration files (and/or docker env variables)
[ ] I have added tests that prove my fix is effective or that my feature works
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