File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed
fluss-filesystems/fluss-fs-s3/src/main/java/org/apache/fluss/fs/s3 Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 1919
2020/** S3 configuration options that are explicitly read by name. */
2121public final class S3ConfigOptions {
22- public static final String PROVIDER_CONFIG_NAME = "fs.s3a.aws.credentials.provider" ;
22+ public static final String CREDENTIALS_PROVIDER_CONFIG_NAME = "fs.s3a.aws.credentials.provider" ;
23+ public static final String ASSUMED_ROLE_CREDENTIALS_PROVIDER_CONFIG_NAME =
24+ "fs.s3a.assumed.role.credentials.provider" ;
2325}
Original file line number Diff line number Diff line change 2828import org .apache .fluss .fs .s3 .token .S3ADelegationTokenReceiver ;
2929import org .apache .fluss .fs .s3 .token .S3DelegationTokenProvider ;
3030import org .apache .fluss .fs .s3 .token .S3DelegationTokenReceiver ;
31+
3132import org .apache .hadoop .fs .s3a .S3AFileSystem ;
3233import org .slf4j .Logger ;
3334import org .slf4j .LoggerFactory ;
@@ -73,7 +74,8 @@ public class S3FileSystemPlugin implements FileSystemPlugin {
7374 "access.key" ,
7475 "secret-key" ,
7576 "secret.key" ,
76- "aws.credentials.provider" ));
77+ "aws.credentials.provider" ,
78+ "assumed.role.credentials.provider" ));
7779
7880 private static final List <String > TOKEN_DELEGATION_DEFAULT_CREDENTIAL_PROVIDER =
7981 Collections .singletonList ("org.apache.hadoop.fs.s3a.SimpleAWSCredentialsProvider" );
@@ -143,7 +145,8 @@ org.apache.hadoop.conf.Configuration getHadoopConfiguration(Configuration flussC
143145 org .apache .hadoop .conf .Configuration conf = new org .apache .hadoop .conf .Configuration ();
144146
145147 // Credential providers must be explicitly set by the user
146- conf .set (S3ConfigOptions .PROVIDER_CONFIG_NAME , "" );
148+ conf .set (S3ConfigOptions .CREDENTIALS_PROVIDER_CONFIG_NAME , "" );
149+ conf .set (S3ConfigOptions .ASSUMED_ROLE_CREDENTIALS_PROVIDER_CONFIG_NAME , "" );
147150
148151 if (flussConfig == null ) {
149152 return conf ;
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ public static void updateHadoopConfigCredentialProviders(
4949 org .apache .hadoop .conf .Configuration hadoopConfig , List <String > credentialProvider ) {
5050 LOG .info ("Updating credential providers in Hadoop configuration" );
5151
52- String providers = hadoopConfig .get (S3ConfigOptions .PROVIDER_CONFIG_NAME , "" );
52+ String providers = hadoopConfig .get (S3ConfigOptions .CREDENTIALS_PROVIDER_CONFIG_NAME , "" );
5353 List <String > credentialProviderPrependOrder = new ArrayList <>(credentialProvider );
5454 Collections .reverse (credentialProviderPrependOrder );
5555
@@ -62,7 +62,7 @@ public static void updateHadoopConfigCredentialProviders(
6262 providers = credentialProviderName + "," + providers ;
6363 LOG .debug ("Prepending provider, new providers value: {}" , providers );
6464 }
65- hadoopConfig .set (S3ConfigOptions .PROVIDER_CONFIG_NAME , providers );
65+ hadoopConfig .set (S3ConfigOptions .CREDENTIALS_PROVIDER_CONFIG_NAME , providers );
6666 } else {
6767 LOG .debug ("Provider {} already exists in chain" , credentialProviderName );
6868 }
You can’t perform that action at this time.
0 commit comments