Skip to content

Commit d100807

Browse files
committed
Set role configurable key.
1 parent 82c28af commit d100807

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

hub/src/main/java/cloud/katta/protocols/hub/HubUVFVault.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ public Path create(final Session<?> session, final String region, final VaultCre
156156
final VaultResourceApi vaultResourceApi = new VaultResourceApi(hub.getClient());
157157
log.debug("Create vault {}", vaultDto);
158158
vaultResourceApi.apiVaultsVaultIdPut(vaultDto.getId(), vaultDto,
159-
!S3Session.isAwsHostname(storage.getHost().getHostname()), S3Session.isAwsHostname(storage.getHost().getHostname()));
159+
storage.getHost().getProtocol().isRoleConfigurable() && !S3Session.isAwsHostname(storage.getHost().getHostname()),
160+
storage.getHost().getProtocol().isRoleConfigurable() && S3Session.isAwsHostname(storage.getHost().getHostname()));
160161
// Upload JWE
161162
log.debug("Grant access to vault {}", vaultDto);
162163
final UserDto userDto = hub.getMe();

hub/src/main/java/cloud/katta/protocols/hub/serializer/StorageProfileDtoWrapperDeserializer.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ public Boolean booleanForKey(final String key) {
112112
return true;
113113
}
114114
break;
115+
case ROLE_KEY_CONFIGURABLE_KEY:
116+
return dto.getStsRoleArn() != null;
115117
}
116118
return super.booleanForKey(key);
117119
}
@@ -146,6 +148,9 @@ public List<String> keys() {
146148
if(dto.getRegions() != null) {
147149
keys.add(REGIONS_KEY);
148150
}
151+
if(dto.getStsRoleArn() != null) {
152+
keys.add(ROLE_KEY_CONFIGURABLE_KEY);
153+
}
149154
return keys;
150155
}
151156
}

0 commit comments

Comments
 (0)