private static boolean verifyAllUsersHavePassword(final TomlParseResult tomlParseResult) {
    int configuredUsers = tomlParseResult.getTable("Users").keySet().size();

    int usersWithPasswords =
        tomlParseResult.keyPathSet().parallelStream()
            .filter(
                keySet ->
                    keySet.contains("Users")
                        && keySet.contains("password")
                        && !Strings.isNullOrEmpty(tomlParseResult.getString(keySet)))
            .collect(Collectors.toList())
            .size();

    return configuredUsers == usersWithPasswords;
  }
Validate auth file.

@param commandLine the command line to use for parameter exceptions
@param filename the auth file
@param type the RPC type
@return the auth filename
app/src/main/java/org/hyperledger/besu/cli/custom/RpcAuthFileValidator.java