v.23.2Improvement

Prefer Explicit Access Keys for S3 Clients with Environment Credentials

Prefer explicitly defined access keys for S3 clients. If use_environment_credentials is set to true, and the user has provided the access key through query or config, they will be used instead of the ones from the environment variable. #46191 (Antonio Andelic).
ClickHouse now prefers explicitly defined access keys over environment credentials for S3 clients when use_environment_credentials is enabled.

Why it matters

This feature resolves ambiguities and improves credential management by ensuring that if users specify access keys through queries or configuration, these keys take precedence over environment variables. It enhances security and predictability in accessing S3 storage.

How to use it

To apply this feature, set use_environment_credentials to true. If explicit access keys are provided via query parameters or configuration files, ClickHouse will use these keys instead of those from environment variables.