@Test public void assumeRoleNotInActions() { assertThat(awsInstanceProfileEC2TrustValidator.checkAssumeRoleInActions( Collections.singletonList(S3Actions.CreateBucket))).isFalse(); assertThat(awsInstanceProfileEC2TrustValidator.checkAssumeRoleInActions( Collections.singletonList(SecurityTokenServiceActions.AssumeRoleWithSAML))).isFalse(); assertThat(awsInstanceProfileEC2TrustValidator.checkAssumeRoleInActions( Arrays.asList( S3Actions.CreateBucket, SecurityTokenServiceActions.AssumeRoleWithSAML ))).isFalse(); }
boolean checkAssumeRoleInActions(List<Action> actions) { return actions.stream().anyMatch( action -> SecurityTokenServiceActions.AssumeRole.getActionName().equals(action.getActionName())); }
AwsInstanceProfileEC2TrustValidator { boolean checkAssumeRoleInActions(List<Action> actions) { return actions.stream().anyMatch( action -> SecurityTokenServiceActions.AssumeRole.getActionName().equals(action.getActionName())); } }
AwsInstanceProfileEC2TrustValidator { boolean checkAssumeRoleInActions(List<Action> actions) { return actions.stream().anyMatch( action -> SecurityTokenServiceActions.AssumeRole.getActionName().equals(action.getActionName())); }  }
AwsInstanceProfileEC2TrustValidator { boolean checkAssumeRoleInActions(List<Action> actions) { return actions.stream().anyMatch( action -> SecurityTokenServiceActions.AssumeRole.getActionName().equals(action.getActionName())); }  boolean isTrusted(InstanceProfile instanceProfile, ValidationResultBuilder resultBuilder); }
AwsInstanceProfileEC2TrustValidator { boolean checkAssumeRoleInActions(List<Action> actions) { return actions.stream().anyMatch( action -> SecurityTokenServiceActions.AssumeRole.getActionName().equals(action.getActionName())); }  boolean isTrusted(InstanceProfile instanceProfile, ValidationResultBuilder resultBuilder);  }