Aiven-Open / tiered-storage-for-apache-kafka

RemoteStorageManager for Apache Kafka® Tiered Storage
Apache License 2.0
95 stars 20 forks source link

Make gcs.credentials.default ternary #393

Closed ivanyu closed 1 year ago

ivanyu commented 1 year ago

null should be the default value for gcs.credentials.default, because otherwise certain practical combinations are impossible (e.g. just setting gcs.credentials.json without anything else).

Also this commit refactors how the credentials settings are validated: the validation logic is completely delegated to CredentialsBuilder to have it in one place.

ivanyu commented 1 year ago

Do we actually need all this machinery for checking if multiple ways to specify credentials were used simultaneously? Looks like a common approach is to specify the priority of credentials lookup and just use the first specified according to that priority, should we follow that?

I like the current approach better, it's intuitive for the user.