File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
hub/src/main/java/cloud/katta/protocols/s3 Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 55package cloud .katta .protocols .s3 ;
66
77import ch .cyberduck .core .CredentialsConfigurator ;
8+ import ch .cyberduck .core .Profile ;
89import ch .cyberduck .core .Protocol ;
910import ch .cyberduck .core .s3 .S3Protocol ;
1011
@@ -19,9 +20,9 @@ public class S3AssumeRoleProtocol extends S3Protocol {
1920 public static final String OAUTH_TOKENEXCHANGE_BASEPATH = "oauth.tokenexchange.basepath" ;
2021
2122 // STS assume role with web identity from Cyberduck core (AWS + MinIO)
22- public static final String S3_ASSUMEROLE_ROLEARN = "s3.assumerole.rolearn" ;
23- public static final String S3_ASSUMEROLE_ROLESESSIONNAME = "s3.assumerole.rolesessionname" ;
24- public static final String S3_ASSUMEROLE_DURATIONSECONDS = "s3.assumerole.durationseconds" ;
23+ public static final String S3_ASSUMEROLE_ROLEARN = Profile . STS_ROLE_ARN_PROPERTY_KEY ;
24+ public static final String S3_ASSUMEROLE_ROLESESSIONNAME = Profile . STS_ROLE_SESSION_NAME_PROPERTY_KEY ;
25+ public static final String S3_ASSUMEROLE_DURATIONSECONDS = Profile . STS_DURATION_SECONDS_PROPERTY_KEY ;
2526 public static final String S3_ASSUMEROLE_POLICY = "s3.assumerole.policy" ;
2627 // STS role chaining (AWS only)
2728 public static final String S3_ASSUMEROLE_ROLEARN_2 = "s3.assumerole.rolearn.2" ;
Original file line number Diff line number Diff line change @@ -46,9 +46,9 @@ public STSChainedAssumeRoleRequestInterceptor(final OAuth2RequestInterceptor oau
4646 */
4747 @ Override
4848 public TemporaryAccessTokens assumeRoleWithWebIdentity (final Credentials credentials ) throws BackgroundException {
49- final TemporaryAccessTokens tokens = super .assumeRoleWithWebIdentity (credentials
50- .withProperty (Profile .STS_ROLE_ARN_PROPERTY_KEY , bookmark .getProperty (Profile .STS_ROLE_ARN_PROPERTY_KEY )));
5149 final PreferencesReader settings = new ProxyPreferencesReader (bookmark , credentials );
50+ final TemporaryAccessTokens tokens = super .assumeRoleWithWebIdentity (credentials
51+ .withProperty (Profile .STS_ROLE_ARN_PROPERTY_KEY , settings .getProperty (S3AssumeRoleProtocol .S3_ASSUMEROLE_ROLEARN )));
5252 if (StringUtils .isNotBlank (settings .getProperty (S3AssumeRoleProtocol .S3_ASSUMEROLE_ROLEARN_2 ))) {
5353 log .debug ("Assume role with temporary credentials {}" , tokens );
5454 // Assume role with previously obtained temporary access token
You can’t perform that action at this time.
0 commit comments