public boolean isAuthorizedLogUser(String user, String fileName) {
        Validate.isTrue(!fileName.contains(".." + FileSystems.getDefault().getSeparator()));
        if (StringUtils.isEmpty(user) || StringUtils.isEmpty(fileName)) {
            return false;
        }
        LogUserGroupWhitelist whitelist = getLogUserGroupWhitelist(fileName);

        List<String> logsUsers = new ArrayList<>();
        logsUsers.addAll(ObjectReader.getStrings(stormConf.get(DaemonConfig.LOGS_USERS)));
        logsUsers.addAll(ObjectReader.getStrings(stormConf.get(Config.NIMBUS_ADMINS)));
        if (whitelist != null) {
            logsUsers.addAll(whitelist.getUserWhitelist());
        }

        List<String> logsGroups = new ArrayList<>();
        logsGroups.addAll(ObjectReader.getStrings(stormConf.get(DaemonConfig.LOGS_GROUPS)));
        logsGroups.addAll(ObjectReader.getStrings(stormConf.get(Config.NIMBUS_ADMINS_GROUPS)));
        if (whitelist != null) {
            logsGroups.addAll(whitelist.getGroupWhitelist());
        }

        String userName = principalToLocal.toLocal(user);
        Set<String> groups = getUserGroups(userName);

        return logsUsers.stream().anyMatch(u -> u.equals(userName))
            || Sets.intersection(groups, new HashSet<>(logsGroups)).size() > 0;

    }
@Test
    public void testFailOnUpwardPathTraversal() {
        Map<String, Object> stormConf = Utils.readStormConfig();

        Map<String, Object> conf = new HashMap<>(stormConf);

        ResourceAuthorizer authorizer = new ResourceAuthorizer(conf);

        Assertions.assertThrows(IllegalArgumentException.class, 
            () -> authorizer.isAuthorizedLogUser("user", Paths.get("some/../path").toString()));   
    }