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
6
6
import com.azure.storage.common.StorageSharedKeyCredential
7
7
import com.fasterxml.jackson.annotation.JsonIgnore
8
8
import io.minio.MinioClient
9
+ import io.minio.credentials.IamAwsProvider
9
10
import org.apache.hadoop.conf.Configuration
10
11
import org.radarbase.output.Application.Companion.CACHE_SIZE_DEFAULT
11
12
import org.radarbase.output.Plugin
@@ -361,8 +362,10 @@ data class S3Config(
361
362
362
363
fun createS3Client (): MinioClient = MinioClient .Builder ().apply {
363
364
endpoint(endpoint)
364
- if (! accessToken.isNullOrBlank() && ! secretKey.isNullOrBlank()) {
365
+ if (accessToken.isNullOrBlank() || secretKey.isNullOrBlank()) {
365
366
credentials(accessToken, secretKey)
367
+ } else {
368
+ credentialsProvider(IamAwsProvider (null , null ))
366
369
}
367
370
}.build()
368
371
You can’t perform that action at this time.
0 commit comments