Skip to content

Commit 2653fb9

Browse files
committed
Fail on missing configuration.
1 parent 79e494a commit 2653fb9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

hub/src/main/java/cloud/katta/protocols/s3/STSChainedAssumeRoleRequestInterceptor.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,12 @@ public TemporaryAccessTokens assumeRoleWithWebIdentity(final OAuthTokens oauth,
7474
if(StringUtils.isNotBlank(settings.getProperty(S3AssumeRoleProtocol.S3_ASSUMEROLE_ROLEARN_TAG))) {
7575
log.debug("Assume role with temporary credentials {}", tokens);
7676
// Assume role with previously obtained temporary access token
77+
final String key = HostPreferencesFactory.get(bookmark).getProperty("s3.assumerole.rolearn.tag.vaultid.key");
78+
if(null == key) {
79+
throw new InteroperabilityException("No vault tag key set");
80+
}
7781
return super.assumeRole(credentials.setTokens(tokens)
78-
.setProperty(Profile.STS_TAGS_PROPERTY_KEY, String.format("%s=%s", HostPreferencesFactory.get(bookmark).getProperty("s3.assumerole.rolearn.tag.vaultid.key"), vaultId)),
82+
.setProperty(Profile.STS_TAGS_PROPERTY_KEY, String.format("%s=%s", key, vaultId)),
7983
settings.getProperty(S3AssumeRoleProtocol.S3_ASSUMEROLE_ROLEARN_TAG));
8084
}
8185
log.warn("No vault tag set. Skip assuming role with temporary credentials {} for {}", tokens, bookmark);

0 commit comments

Comments
 (0)