public ConfigData get(String path, Set<String> keys) {
        if (allowedPaths == null) {
            throw new IllegalStateException("The provider has not been configured yet.");
        }

        Map<String, String> data = new HashMap<>();
        if (path == null || path.isEmpty()) {
            return new ConfigData(data);
        }

        Path filePath = allowedPaths.parseUntrustedPath(path);
        if (filePath == null) {
            log.warn("The path {} is not allowed to be accessed", path);
            return new ConfigData(data);
        }

        try (Reader reader = reader(filePath)) {
            Properties properties = new Properties();
            properties.load(reader);
            for (String key : keys) {
                String value = properties.getProperty(key);
                if (value != null) {
                    data.put(key, value);
                }
            }
            return new ConfigData(data);
        } catch (IOException e) {
            log.error("Could not read properties from file {}", path, e);
            throw new ConfigException("Could not read properties from file " + path);
        }
    }
Retrieves the data with the given keys at the given Properties file.

@param path the file where the data resides
@param keys the keys whose values will be retrieved
@return the configuration data
clients/src/main/java/org/apache/kafka/common/config/provider/FileConfigProvider.java