diff --git a/core/conf/config-file.cpp b/core/conf/config-file.cpp
new file mode 100644
index 0000000..c25018c
--- /dev/null
+++ b/core/conf/config-file.cpp
@@ -0,0 +1,97 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014,  Regents of the University of California
+ *
+ * This file is part of NSL (NDN Signature Logger).
+ * See AUTHORS.md for complete list of NSL authors and contributors.
+ *
+ * NSL is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NSL is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NSL, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * See AUTHORS.md for complete list of nsl authors and contributors.
+ */
+
+#include "config-file.hpp"
+#include <boost/property_tree/info_parser.hpp>
+#include <boost/filesystem.hpp>
+namespace nsl {
+namespace conf {
+
+ConfigFile::ConfigFile(const std::string& filename)
+  : m_filename(filename)
+{
+}
+
+void
+ConfigFile::parse()
+{
+  std::ifstream input;
+  input.open(m_filename.c_str());
+  if (!input.good() || !input.is_open())
+    throw Error("Failed to read configuration file: " + m_filename);
+
+  ConfigSection configSection;
+  try {
+    boost::property_tree::read_info(input, configSection);
+  }
+  catch (boost::property_tree::info_parser_error& error) {
+    std::stringstream msg;
+    msg << "Failed to parse configuration file";
+    msg << " " << m_filename;
+    msg << " " << error.message() << " line " << error.line();
+    throw Error(msg.str());
+  }
+
+  bool hasLoggerName = false;
+  bool hasDbDir = false;
+  bool hasPolicy = false;
+  bool hasValidatorRule = false;
+  for (const auto& section : configSection) {
+    if (boost::iequals(section.first, "logger-name")) {
+      try {
+        m_loggerName = Name(section.second.data());
+      }
+      catch (Name::Error& e) {
+        throw Error("Wrong logger-name: " + section.second.data());
+      }
+      hasLoggerName = true;
+    }
+    else if (boost::iequals(section.first, "db-dir")) {
+      using namespace boost::filesystem;
+
+      m_dbDir = absolute(section.second.data(), path(m_filename).parent_path()).string();
+      hasDbDir = true;
+    }
+    else if (boost::iequals(section.first, "policy")) {
+      m_policy = section.second;
+      hasPolicy = true;
+    }
+    else if (boost::iequals(section.first, "validator")) {
+      m_validatorRule = section.second;
+      hasValidatorRule = true;
+    }
+    else
+      throw Error("Error in loading policy checker: unrecognized section " + section.first);
+  }
+
+  if (!hasDbDir) {
+    m_dbDir = boost::filesystem::path(m_filename).parent_path().string();
+    hasDbDir = true;
+  }
+
+  if (hasDbDir && hasLoggerName && hasPolicy && hasValidatorRule)
+    return;
+
+  throw Error("incomplete configuration");
+}
+
+} // namespace conf
+} // namespace nsl
diff --git a/core/conf/config-file.hpp b/core/conf/config-file.hpp
new file mode 100644
index 0000000..882fbab
--- /dev/null
+++ b/core/conf/config-file.hpp
@@ -0,0 +1,79 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014,  Regents of the University of California
+ *
+ * This file is part of NSL (NDN Signature Logger).
+ * See AUTHORS.md for complete list of NSL authors and contributors.
+ *
+ * NSL is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NSL is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NSL, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * See AUTHORS.md for complete list of nsl authors and contributors.
+ */
+
+#ifndef NSL_CONF_CONFIG_FILE_HPP
+#define NSL_CONF_CONFIG_FILE_HPP
+
+#include "common.hpp"
+#include "config.hpp"
+
+namespace nsl {
+namespace conf {
+class ConfigFile
+{
+public:
+  ConfigFile(const std::string& filename);
+
+  void
+  parse();
+
+  const std::string&
+  getConfFileName() const
+  {
+    return m_filename;
+  }
+
+  const Name&
+  getLoggerName() const
+  {
+    return m_loggerName;
+  }
+
+  const std::string&
+  getDbDir() const
+  {
+    return m_dbDir;
+  }
+
+  const ConfigSection&
+  getPolicy() const
+  {
+    return m_policy;
+  }
+
+  const ConfigSection&
+  getValidatorRule() const
+  {
+    return m_validatorRule;
+  }
+
+private:
+  std::string m_filename;
+  Name m_loggerName;
+  std::string m_dbDir;
+  ConfigSection m_policy;
+  ConfigSection m_validatorRule;
+};
+
+} // namespace conf
+} // namespace nsl
+
+#endif // NSL_CONF_CONFIG_FILE_HPP
diff --git a/tests/core/config.t.cpp b/tests/core/config.t.cpp
new file mode 100644
index 0000000..eabd425
--- /dev/null
+++ b/tests/core/config.t.cpp
@@ -0,0 +1,112 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014,  Regents of the University of California
+ *
+ * This file is part of NSL (NDN Signature Logger).
+ * See AUTHORS.md for complete list of NSL authors and contributors.
+ *
+ * NSL is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NSL is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NSL, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * See AUTHORS.md for complete list of nsl authors and contributors.
+ */
+
+#include "conf/config-file.hpp"
+
+#include <boost/filesystem.hpp>
+#include <fstream>
+
+#include "boost-test.hpp"
+
+namespace nsl {
+namespace tests {
+
+BOOST_AUTO_TEST_SUITE(TestConfig)
+
+BOOST_AUTO_TEST_CASE(Basic)
+{
+  const std::string CONFIG =
+    "logger-name /test/logger                             \n"
+    "db-dir /test/db                                      \n"
+    "policy                                               \n"
+    "{                                                    \n"
+    "  policy-key policy-value                            \n"
+    "}                                                    \n"
+    "validator                                            \n"
+    "{                                                    \n"
+    "  validator-key validator-value                      \n"
+    "}                                                    \n";
+
+  namespace fs = boost::filesystem;
+
+  fs::create_directory(fs::path(TEST_LOGGER_PATH));
+
+  fs::path configPath = fs::path(TEST_LOGGER_PATH) / "logger-test.conf";
+  std::ofstream os(configPath.c_str());
+  os << CONFIG;
+  os.close();
+
+  conf::ConfigFile config(configPath.string());
+
+  BOOST_CHECK_NO_THROW(config.parse());
+
+  BOOST_CHECK_EQUAL(config.getConfFileName(), configPath.string());
+  BOOST_CHECK_EQUAL(config.getLoggerName(), Name("/test/logger"));
+  BOOST_CHECK_EQUAL(config.getDbDir(), "/test/db");
+  BOOST_CHECK_EQUAL(config.getPolicy().begin()->first, "policy-key");
+  BOOST_CHECK_EQUAL(config.getPolicy().begin()->second.data(), "policy-value");
+  BOOST_CHECK_EQUAL(config.getValidatorRule().begin()->first, "validator-key");
+  BOOST_CHECK_EQUAL(config.getValidatorRule().begin()->second.data(), "validator-value");
+
+  fs::remove_all(fs::path(TEST_LOGGER_PATH));
+}
+
+BOOST_AUTO_TEST_CASE(Basic2)
+{
+  const std::string CONFIG =
+    "logger-name /test/logger                             \n"
+    "policy                                               \n"
+    "{                                                    \n"
+    "  policy-key policy-value                            \n"
+    "}                                                    \n"
+    "validator                                            \n"
+    "{                                                    \n"
+    "  validator-key validator-value                      \n"
+    "}                                                    \n";
+
+  namespace fs = boost::filesystem;
+
+  fs::create_directory(fs::path(TEST_LOGGER_PATH));
+
+  fs::path configPath = fs::path(TEST_LOGGER_PATH) / "logger-test.conf";
+  std::ofstream os(configPath.c_str());
+  os << CONFIG;
+  os.close();
+
+  conf::ConfigFile config(configPath.string());
+
+  BOOST_CHECK_NO_THROW(config.parse());
+
+  BOOST_CHECK_EQUAL(config.getConfFileName(), configPath.string());
+  BOOST_CHECK_EQUAL(config.getLoggerName(), Name("/test/logger"));
+  BOOST_CHECK_EQUAL(config.getDbDir(), fs::path(TEST_LOGGER_PATH).string());
+  BOOST_CHECK_EQUAL(config.getPolicy().begin()->first, "policy-key");
+  BOOST_CHECK_EQUAL(config.getPolicy().begin()->second.data(), "policy-value");
+  BOOST_CHECK_EQUAL(config.getValidatorRule().begin()->first, "validator-key");
+  BOOST_CHECK_EQUAL(config.getValidatorRule().begin()->second.data(), "validator-value");
+
+  fs::remove_all(fs::path(TEST_LOGGER_PATH));
+}
+
+BOOST_AUTO_TEST_SUITE_END()
+
+} // namespace tests
+} // namespace nsl
