File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
src/main/java/org/radarbase/output/config Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import com.azure.storage.blob.BlobServiceClientBuilder
66import com.azure.storage.common.StorageSharedKeyCredential
77import com.fasterxml.jackson.annotation.JsonIgnore
88import io.minio.MinioClient
9+ import io.minio.credentials.IamAwsProvider
910import org.apache.hadoop.conf.Configuration
1011import org.radarbase.output.Application.Companion.CACHE_SIZE_DEFAULT
1112import org.radarbase.output.Plugin
@@ -361,8 +362,10 @@ data class S3Config(
361362
362363 fun createS3Client (): MinioClient = MinioClient .Builder ().apply {
363364 endpoint(endpoint)
364- if (! accessToken.isNullOrBlank() && ! secretKey.isNullOrBlank()) {
365+ if (accessToken.isNullOrBlank() || secretKey.isNullOrBlank()) {
365366 credentials(accessToken, secretKey)
367+ } else {
368+ credentialsProvider(IamAwsProvider (null , null ))
366369 }
367370 }.build()
368371
You can’t perform that action at this time.
0 commit comments