diff --git a/src/main/java/com/nike/cerberus/service/MetadataService.java b/src/main/java/com/nike/cerberus/service/MetadataService.java index a5e97305f..9a788a546 100644 --- a/src/main/java/com/nike/cerberus/service/MetadataService.java +++ b/src/main/java/com/nike/cerberus/service/MetadataService.java @@ -108,7 +108,7 @@ private Set getIamPrincipalPermissionSet(SDBMetadata sdb sdbMetadata.getIamRolePermissions().forEach((iamPrincipalArn, roleName) -> { iamPrincipalPermissionSet.add(new IamPrincipalPermission() - .withIamPrincipalArn(iamPrincipalArn) + .withIamPrincipalArn(iamPrincipalArn.trim()) .withRoleId(getRoleIdFromName(roleName)) ); }); diff --git a/src/main/resources/com/nike/cerberus/migration/V1.6.4.0__remove_trailing_whitespace_from_iam_principal_arns_again.sql b/src/main/resources/com/nike/cerberus/migration/V1.6.4.0__remove_trailing_whitespace_from_iam_principal_arns_again.sql new file mode 100644 index 000000000..152f98749 --- /dev/null +++ b/src/main/resources/com/nike/cerberus/migration/V1.6.4.0__remove_trailing_whitespace_from_iam_principal_arns_again.sql @@ -0,0 +1 @@ +UPDATE AWS_IAM_ROLE set AWS_IAM_ROLE_ARN = TRIM(AWS_IAM_ROLE_ARN); \ No newline at end of file