diff --git a/daemon/mgmt/manager-base.cpp b/core/manager-base.cpp
similarity index 82%
rename from daemon/mgmt/manager-base.cpp
rename to core/manager-base.cpp
index 418c3d6..bad25b9 100644
--- a/daemon/mgmt/manager-base.cpp
+++ b/core/manager-base.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2015,  Regents of the University of California,
+ * Copyright (c) 2014-2016,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -31,13 +31,10 @@
 using ndn::mgmt::Authorization;
 
 ManagerBase::ManagerBase(Dispatcher& dispatcher,
-                         CommandValidator& validator,
                          const std::string& module)
   : m_dispatcher(dispatcher)
-  , m_validator(validator)
   , m_mgmtModuleName(module)
 {
-  m_validator.addSupportedPrivilege(module);
 }
 
 void
@@ -56,20 +53,6 @@
 }
 
 void
-ManagerBase::authorize(const Name& prefix, const Interest& interest,
-                       const ndn::mgmt::ControlParameters* params,
-                       ndn::mgmt::AcceptContinuation accept,
-                       ndn::mgmt::RejectContinuation reject)
-{
-  BOOST_ASSERT(params != nullptr);
-  BOOST_ASSERT(typeid(*params) == typeid(ndn::nfd::ControlParameters));
-
-  m_validator.validate(interest,
-                       bind(&ManagerBase::extractRequester, this, interest, accept),
-                       bind([&] { reject(ndn::mgmt::RejectReply::STATUS403); }));
-}
-
-void
 ManagerBase::extractRequester(const Interest& interest,
                               ndn::mgmt::AcceptContinuation accept)
 {
diff --git a/daemon/mgmt/manager-base.hpp b/core/manager-base.hpp
similarity index 92%
rename from daemon/mgmt/manager-base.hpp
rename to core/manager-base.hpp
index 988fff1..31de566 100644
--- a/daemon/mgmt/manager-base.hpp
+++ b/core/manager-base.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2015,  Regents of the University of California,
+ * Copyright (c) 2014-2016,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -23,11 +23,10 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef NFD_DAEMON_MGMT_MANAGER_BASE_HPP
-#define NFD_DAEMON_MGMT_MANAGER_BASE_HPP
+#ifndef NFD_CORE_MANAGER_BASE_HPP
+#define NFD_CORE_MANAGER_BASE_HPP
 
 #include "common.hpp"
-#include "mgmt/command-validator.hpp"
 
 #include <ndn-cxx/mgmt/dispatcher.hpp>
 #include <ndn-cxx/management/nfd-control-command.hpp>
@@ -43,10 +42,10 @@
 using ndn::nfd::ControlParameters;
 
 /**
- * @brief a collection of common functions shared by all NFD managers,
+ * @brief a collection of common functions shared by all NFD managers and RIB manager,
  *        such as communicating with the dispatcher and command validator.
  */
-class ManagerBase : public noncopyable
+class ManagerBase : noncopyable
 {
 public:
   class Error : public std::runtime_error
@@ -61,7 +60,6 @@
 
 public:
   ManagerBase(Dispatcher& dispatcher,
-              CommandValidator& validator,
               const std::string& module);
 
 PUBLIC_WITH_TESTS_ELSE_PROTECTED: // registrations to the dispatcher
@@ -84,7 +82,7 @@
   ndn::mgmt::PostNotification
   registerNotificationStream(const std::string& verb);
 
-PUBLIC_WITH_TESTS_ELSE_PRIVATE: // command validation
+PUBLIC_WITH_TESTS_ELSE_PROTECTED: // command validation
   /**
    * @brief validate a request for ControlCommand.
    *
@@ -99,11 +97,11 @@
    * @param accept callback of successful validation, take the requester string as a argument
    * @param reject callback of failure in validation, take the action code as a argument
    */
-  void
+  virtual void
   authorize(const Name& prefix, const Interest& interest,
             const ndn::mgmt::ControlParameters* params,
             ndn::mgmt::AcceptContinuation accept,
-            ndn::mgmt::RejectContinuation reject);
+            ndn::mgmt::RejectContinuation reject) = 0;
 
   /**
    * @brief extract a requester from a ControlCommand request
@@ -151,7 +149,6 @@
 
 private:
   Dispatcher&       m_dispatcher;
-  CommandValidator& m_validator;
   std::string       m_mgmtModuleName;
 };
 
@@ -177,4 +174,4 @@
 
 } // namespace nfd
 
-#endif // NFD_DAEMON_MGMT_MANAGER_BASE_HPP
+#endif // NFD_CORE_MANAGER_BASE_HPP
diff --git a/daemon/mgmt/face-manager.cpp b/daemon/mgmt/face-manager.cpp
index 0c94fea..b8506ac 100644
--- a/daemon/mgmt/face-manager.cpp
+++ b/daemon/mgmt/face-manager.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2015,  Regents of the University of California,
+ * Copyright (c) 2014-2016,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -55,7 +55,7 @@
 FaceManager::FaceManager(FaceTable& faceTable,
                          Dispatcher& dispatcher,
                          CommandValidator& validator)
-  : ManagerBase(dispatcher, validator, "faces")
+  : NfdManagerBase(dispatcher, validator, "faces")
   , m_faceTable(faceTable)
 {
   registerCommandHandler<ndn::nfd::FaceCreateCommand>("create",
diff --git a/daemon/mgmt/face-manager.hpp b/daemon/mgmt/face-manager.hpp
index fda4fbe..b97a629 100644
--- a/daemon/mgmt/face-manager.hpp
+++ b/daemon/mgmt/face-manager.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2015,  Regents of the University of California,
+ * Copyright (c) 2014-2016,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -26,7 +26,7 @@
 #ifndef NFD_DAEMON_MGMT_FACE_MANAGER_HPP
 #define NFD_DAEMON_MGMT_FACE_MANAGER_HPP
 
-#include "manager-base.hpp"
+#include "nfd-manager-base.hpp"
 #include <ndn-cxx/management/nfd-face-status.hpp>
 #include <ndn-cxx/management/nfd-face-query-filter.hpp>
 #include "face/face.hpp"
@@ -41,7 +41,7 @@
  * @brief implement the Face Management of NFD Management Protocol.
  * @sa http://redmine.named-data.net/projects/nfd/wiki/FaceMgmt
  */
-class FaceManager : public ManagerBase
+class FaceManager : public NfdManagerBase
 {
 public:
   FaceManager(FaceTable& faceTable,
diff --git a/daemon/mgmt/fib-manager.cpp b/daemon/mgmt/fib-manager.cpp
index 9882033..09e184a 100644
--- a/daemon/mgmt/fib-manager.cpp
+++ b/daemon/mgmt/fib-manager.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2015,  Regents of the University of California,
+ * Copyright (c) 2014-2016,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -34,7 +34,7 @@
                        function<shared_ptr<Face>(FaceId)> getFace,
                        Dispatcher& dispatcher,
                        CommandValidator& validator)
-  : ManagerBase(dispatcher, validator, "fib")
+  : NfdManagerBase(dispatcher, validator, "fib")
   , m_fib(fib)
   , m_getFace(getFace)
 {
@@ -151,4 +151,4 @@
   }
 }
 
-} // namespace
+} // namespace nfd
diff --git a/daemon/mgmt/fib-manager.hpp b/daemon/mgmt/fib-manager.hpp
index 7c66138..94300cb 100644
--- a/daemon/mgmt/fib-manager.hpp
+++ b/daemon/mgmt/fib-manager.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2015,  Regents of the University of California,
+ * Copyright (c) 2014-2016,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -26,7 +26,7 @@
 #ifndef NFD_DAEMON_MGMT_FIB_MANAGER_HPP
 #define NFD_DAEMON_MGMT_FIB_MANAGER_HPP
 
-#include "manager-base.hpp"
+#include "nfd-manager-base.hpp"
 #include "core/logger.hpp"
 #include "table/fib.hpp"
 #include "fw/forwarder.hpp"
@@ -37,7 +37,7 @@
  * @brief implement the FIB Management of NFD Management Protocol.
  * @sa http://redmine.named-data.net/projects/nfd/wiki/FibMgmt
  */
-class FibManager : public ManagerBase
+class FibManager : public NfdManagerBase
 {
 public:
   /**
diff --git a/daemon/mgmt/nfd-manager-base.cpp b/daemon/mgmt/nfd-manager-base.cpp
new file mode 100644
index 0000000..c0ecaae
--- /dev/null
+++ b/daemon/mgmt/nfd-manager-base.cpp
@@ -0,0 +1,53 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2016,  Regents of the University of California,
+ *                           Arizona Board of Regents,
+ *                           Colorado State University,
+ *                           University Pierre & Marie Curie, Sorbonne University,
+ *                           Washington University in St. Louis,
+ *                           Beijing Institute of Technology,
+ *                           The University of Memphis.
+ *
+ * This file is part of NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD 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.
+ *
+ * NFD 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
+ * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "nfd-manager-base.hpp"
+
+namespace nfd {
+
+NfdManagerBase::NfdManagerBase(Dispatcher& dispatcher,
+                               CommandValidator& validator,
+                               const std::string& module)
+  : ManagerBase(dispatcher, module)
+  , m_validator(validator)
+{
+  m_validator.addSupportedPrivilege(module);
+}
+
+void
+NfdManagerBase::authorize(const Name& prefix, const Interest& interest,
+                          const ndn::mgmt::ControlParameters* params,
+                          ndn::mgmt::AcceptContinuation accept,
+                          ndn::mgmt::RejectContinuation reject)
+{
+  BOOST_ASSERT(params != nullptr);
+  BOOST_ASSERT(typeid(*params) == typeid(ndn::nfd::ControlParameters));
+
+  m_validator.validate(interest,
+                       bind([&interest, this, accept] { extractRequester(interest, accept); }),
+                       bind([reject] { reject(ndn::mgmt::RejectReply::STATUS403); }));
+}
+
+} // namespace nfd
diff --git a/daemon/mgmt/nfd-manager-base.hpp b/daemon/mgmt/nfd-manager-base.hpp
new file mode 100644
index 0000000..4104fbe
--- /dev/null
+++ b/daemon/mgmt/nfd-manager-base.hpp
@@ -0,0 +1,81 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2016,  Regents of the University of California,
+ *                           Arizona Board of Regents,
+ *                           Colorado State University,
+ *                           University Pierre & Marie Curie, Sorbonne University,
+ *                           Washington University in St. Louis,
+ *                           Beijing Institute of Technology,
+ *                           The University of Memphis.
+ *
+ * This file is part of NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD 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.
+ *
+ * NFD 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
+ * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef NFD_DAEMON_MGMT_NFD_MANAGER_BASE_HPP
+#define NFD_DAEMON_MGMT_NFD_MANAGER_BASE_HPP
+
+#include "common.hpp"
+#include "command-validator.hpp"
+#include "core/manager-base.hpp"
+
+#include <ndn-cxx/mgmt/dispatcher.hpp>
+#include <ndn-cxx/management/nfd-control-command.hpp>
+#include <ndn-cxx/management/nfd-control-response.hpp>
+#include <ndn-cxx/management/nfd-control-parameters.hpp>
+
+namespace nfd {
+
+using ndn::mgmt::Dispatcher;
+using ndn::nfd::ControlParameters;
+
+/**
+ * @brief a collection of common functions shared by all NFD managers,
+ *        such as communicating with the dispatcher and command validator.
+ */
+class NfdManagerBase : public ManagerBase
+{
+public:
+  NfdManagerBase(Dispatcher& dispatcher,
+                 CommandValidator& validator,
+                 const std::string& module);
+
+PUBLIC_WITH_TESTS_ELSE_PRIVATE: // command validation
+  /**
+   * @brief validate a request for ControlCommand.
+   *
+   * This is called by the dispatcher.
+   *
+   * @pre params != null
+   * @pre typeid(*params) == typeid(ndn::nfd::ControlParameters)
+   *
+   * @param prefix the top prefix
+   * @param interest a request for ControlCommand
+   * @param params the parameters for ControlCommand
+   * @param accept callback of successful validation, take the requester string as a argument
+   * @param reject callback of failure in validation, take the action code as a argument
+   */
+  virtual void
+  authorize(const Name& prefix, const Interest& interest,
+            const ndn::mgmt::ControlParameters* params,
+            ndn::mgmt::AcceptContinuation accept,
+            ndn::mgmt::RejectContinuation reject) DECL_OVERRIDE;
+
+private:
+  CommandValidator& m_validator;
+};
+
+} // namespace nfd
+
+#endif // NFD_DAEMON_MGMT_NFD_MANAGER_BASE_HPP
diff --git a/daemon/mgmt/strategy-choice-manager.cpp b/daemon/mgmt/strategy-choice-manager.cpp
index fba7f4c..a28e237 100644
--- a/daemon/mgmt/strategy-choice-manager.cpp
+++ b/daemon/mgmt/strategy-choice-manager.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2015,  Regents of the University of California,
+ * Copyright (c) 2014-2016,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -34,7 +34,7 @@
 StrategyChoiceManager::StrategyChoiceManager(StrategyChoice& strategyChoice,
                                              Dispatcher& dispatcher,
                                              CommandValidator& validator)
-  : ManagerBase(dispatcher, validator, "strategy-choice")
+  : NfdManagerBase(dispatcher, validator, "strategy-choice")
   , m_strategyChoice(strategyChoice)
 {
   registerCommandHandler<ndn::nfd::StrategyChoiceSetCommand>("set",
@@ -96,4 +96,4 @@
   context.end();
 }
 
-} // namespace
+} // namespace nfd
diff --git a/daemon/mgmt/strategy-choice-manager.hpp b/daemon/mgmt/strategy-choice-manager.hpp
index 74c54db..eff3418 100644
--- a/daemon/mgmt/strategy-choice-manager.hpp
+++ b/daemon/mgmt/strategy-choice-manager.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2015,  Regents of the University of California,
+ * Copyright (c) 2014-2016,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -26,7 +26,7 @@
 #ifndef NFD_DAEMON_MGMT_STRATEGY_CHOICE_MANAGER_HPP
 #define NFD_DAEMON_MGMT_STRATEGY_CHOICE_MANAGER_HPP
 
-#include "manager-base.hpp"
+#include "nfd-manager-base.hpp"
 
 namespace nfd {
 
@@ -36,7 +36,7 @@
  * @brief implement the Strategy Choice Management of NFD Management Protocol.
  * @sa http://redmine.named-data.net/projects/nfd/wiki/StrategyChoice
  */
-class StrategyChoiceManager : public ManagerBase
+class StrategyChoiceManager : public NfdManagerBase
 {
 public:
   StrategyChoiceManager(StrategyChoice& strategyChoice,
diff --git a/tests/daemon/mgmt/manager-base.t.cpp b/tests/core/manager-base.t.cpp
similarity index 73%
rename from tests/daemon/mgmt/manager-base.t.cpp
rename to tests/core/manager-base.t.cpp
index ff2f0d4..7ebe95e 100644
--- a/tests/daemon/mgmt/manager-base.t.cpp
+++ b/tests/core/manager-base.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2015,  Regents of the University of California,
+ * Copyright (c) 2014-2016,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -23,7 +23,7 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "mgmt/manager-base.hpp"
+#include "core/manager-base.hpp"
 #include "manager-common-fixture.hpp"
 
 #include <ndn-cxx/security/key-chain.hpp>
@@ -51,26 +51,37 @@
   }
 };
 
+class ManagerTester : public ManagerBase
+{
+public:
+  ManagerTester(Dispatcher& dispatcher,
+                const std::string& module)
+    : ManagerBase(dispatcher, module) {
+  }
+
+  virtual void
+  authorize(const Name& prefix, const Interest& interest,
+            const ndn::mgmt::ControlParameters* params,
+            ndn::mgmt::AcceptContinuation accept,
+            ndn::mgmt::RejectContinuation reject) {
+    extractRequester(interest, accept);
+  }
+};
+
 class ManagerBaseFixture : public ManagerCommonFixture
 {
 public:
   ManagerBaseFixture()
-    : m_manager(m_dispatcher, m_validator, "test-module")
+    : m_manager(m_dispatcher, "test-module")
   {
   }
 
 protected:
-  ManagerBase m_manager;
+  ManagerTester m_manager;
 };
 
-BOOST_FIXTURE_TEST_SUITE(MgmtManagerBase, ManagerBaseFixture)
-
-BOOST_AUTO_TEST_CASE(AddSupportedPrivilegeInConstructor)
-{
-  BOOST_CHECK_NO_THROW(m_validator.addSupportedPrivilege("other-module"));
-  // test-module has already been added by the constructor of ManagerBase
-  BOOST_CHECK_THROW(m_validator.addSupportedPrivilege("test-module"), CommandValidator::Error);
-}
+BOOST_AUTO_TEST_SUITE(Core)
+BOOST_FIXTURE_TEST_SUITE(TestManagerBase, ManagerBaseFixture)
 
 BOOST_AUTO_TEST_CASE(RegisterCommandHandler)
 {
@@ -79,7 +90,7 @@
 
   m_manager.registerCommandHandler<TestCommandVoidParameters>("test-void", handler);
   m_manager.registerCommandHandler<TestCommandRequireName>("test-require-name", handler);
-  setTopPrefixAndPrivilege("/localhost/nfd", "test-module");
+  setTopPrefix("/localhost/nfd");
 
   auto testRegisterCommandHandler = [&wasCommandHandlerCalled, this] (const Name& commandName) {
     wasCommandHandlerCalled = false;
@@ -99,8 +110,7 @@
   auto handler = bind([&] { isStatusDatasetCalled = true; });
 
   m_manager.registerStatusDatasetHandler("test-status", handler);
-  m_dispatcher.addTopPrefix("/localhost/nfd");
-  advanceClocks(time::milliseconds(1));
+  setTopPrefix("/localhost/nfd");
 
   receiveInterest(makeInterest("/localhost/nfd/test-module/test-status"));
   BOOST_CHECK(isStatusDatasetCalled);
@@ -109,8 +119,7 @@
 BOOST_AUTO_TEST_CASE(RegisterNotificationStream)
 {
   auto post = m_manager.registerNotificationStream("test-notification");
-  m_dispatcher.addTopPrefix("/localhost/nfd");
-  advanceClocks(time::milliseconds(1));
+  setTopPrefix("/localhost/nfd");
 
   post(Block("\x82\x01\x02", 3));
   advanceClocks(time::milliseconds(1));
@@ -120,32 +129,6 @@
                     Name("/localhost/nfd/test-module/test-notification/%FE%00"));
 }
 
-BOOST_AUTO_TEST_CASE(CommandAuthorization)
-{
-  bool didAcceptCallbackFire = false;
-  bool didRejectCallbackFire = false;
-  auto testAuthorization = [&] {
-    didAcceptCallbackFire = false;
-    didRejectCallbackFire = false;
-
-    auto command = makeControlCommandRequest("/localhost/nfd/test-module/test-verb",
-                                             ControlParameters());
-    ndn::nfd::ControlParameters params;
-    m_manager.authorize("/top/prefix", *command, &params,
-                        bind([&] { didAcceptCallbackFire = true; }),
-                        bind([&] { didRejectCallbackFire = true; }));
-  };
-
-  testAuthorization();
-  BOOST_CHECK(!didAcceptCallbackFire);
-  BOOST_CHECK(didRejectCallbackFire);
-
-  m_validator.addInterestRule("^<localhost><nfd><test-module>", *m_certificate);
-  testAuthorization();
-  BOOST_CHECK(didAcceptCallbackFire);
-  BOOST_CHECK(!didRejectCallbackFire);
-}
-
 BOOST_AUTO_TEST_CASE(ExtractRequester)
 {
   std::string requesterName;
@@ -182,7 +165,8 @@
   BOOST_CHECK_EQUAL(generatedRelPrefix, PartialName("/test-module/test-verb"));
 }
 
-BOOST_AUTO_TEST_SUITE_END()
+BOOST_AUTO_TEST_SUITE_END() // TestManagerBase
+BOOST_AUTO_TEST_SUITE_END() // Core
 
 } // namespace tests
 } // namespace nfd
diff --git a/tests/daemon/mgmt/face-manager-process-config.t.cpp b/tests/daemon/mgmt/face-manager-process-config.t.cpp
index b5a7312..0b1a156 100644
--- a/tests/daemon/mgmt/face-manager-process-config.t.cpp
+++ b/tests/daemon/mgmt/face-manager-process-config.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2015,  Regents of the University of California,
+ * Copyright (c) 2014-2016,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -30,7 +30,7 @@
 #include "face/ethernet-factory.hpp"
 #endif // HAVE_LIBPCAP
 
-#include "manager-common-fixture.hpp"
+#include "nfd-manager-common-fixture.hpp"
 
 namespace nfd {
 namespace tests {
@@ -38,7 +38,7 @@
 BOOST_AUTO_TEST_SUITE(Mgmt)
 BOOST_AUTO_TEST_SUITE(TestFaceManager)
 
-class FaceManagerProcessConfigFixture : public ManagerCommonFixture
+class FaceManagerProcessConfigFixture : public NfdManagerCommonFixture
 {
 public:
   FaceManagerProcessConfigFixture()
diff --git a/tests/daemon/mgmt/face-manager.t.cpp b/tests/daemon/mgmt/face-manager.t.cpp
index a8f3015..d3e0b34 100644
--- a/tests/daemon/mgmt/face-manager.t.cpp
+++ b/tests/daemon/mgmt/face-manager.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2015,  Regents of the University of California,
+ * Copyright (c) 2014-2016,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -24,7 +24,7 @@
  */
 
 #include "mgmt/face-manager.hpp"
-#include "manager-common-fixture.hpp"
+#include "nfd-manager-common-fixture.hpp"
 #include "../face/dummy-face.hpp"
 #include "face/tcp-factory.hpp"
 #include "face/udp-factory.hpp"
@@ -39,15 +39,14 @@
 
 BOOST_AUTO_TEST_SUITE(Mgmt)
 
-
-class FaceManagerFixture : public ManagerCommonFixture
+class FaceManagerFixture : public NfdManagerCommonFixture
 {
 public:
   FaceManagerFixture()
     : m_faceTable(m_forwarder.getFaceTable())
     , m_manager(m_faceTable, m_dispatcher, m_validator)
   {
-    setTopPrefixAndPrivilege("/localhost/nfd", "faces");
+    setPrivilege("faces");
   }
 
 public:
diff --git a/tests/daemon/mgmt/fib-manager.t.cpp b/tests/daemon/mgmt/fib-manager.t.cpp
index 87856ed..ee56cf7 100644
--- a/tests/daemon/mgmt/fib-manager.t.cpp
+++ b/tests/daemon/mgmt/fib-manager.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2015,  Regents of the University of California,
+ * Copyright (c) 2014-2016,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -24,7 +24,7 @@
  */
 #include "mgmt/fib-manager.hpp"
 
-#include "manager-common-fixture.hpp"
+#include "nfd-manager-common-fixture.hpp"
 #include "table/fib-nexthop.hpp"
 #include "../face/dummy-face.hpp"
 #include <ndn-cxx/management/nfd-fib-entry.hpp>
@@ -32,7 +32,7 @@
 namespace nfd {
 namespace tests {
 
-class FibManagerFixture : public ManagerCommonFixture
+class FibManagerFixture : public NfdManagerCommonFixture
 {
 public:
   FibManagerFixture()
@@ -40,7 +40,7 @@
     , m_faceTable(m_forwarder.getFaceTable())
     , m_manager(m_fib, bind(&Forwarder::getFace, &m_forwarder, _1), m_dispatcher, m_validator)
   {
-    setTopPrefixAndPrivilege("/localhost/nfd", "fib");
+    setPrivilege("fib");
   }
 
 public: // for test
diff --git a/tests/daemon/mgmt/forwarder-status-manager.t.cpp b/tests/daemon/mgmt/forwarder-status-manager.t.cpp
index cf19880..c38482b 100644
--- a/tests/daemon/mgmt/forwarder-status-manager.t.cpp
+++ b/tests/daemon/mgmt/forwarder-status-manager.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2015,  Regents of the University of California,
+ * Copyright (c) 2014-2016,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -26,21 +26,21 @@
 #include "mgmt/forwarder-status-manager.hpp"
 #include "version.hpp"
 
-#include "manager-common-fixture.hpp"
+#include "nfd-manager-common-fixture.hpp"
 
 namespace nfd {
 namespace tests {
 
 BOOST_AUTO_TEST_SUITE(Mgmt)
 
-class ForwarderStatusManagerFixture : public ManagerCommonFixture
+class ForwarderStatusManagerFixture : public NfdManagerCommonFixture
 {
 protected:
   ForwarderStatusManagerFixture()
     : manager(m_forwarder, m_dispatcher)
     , startTime(time::system_clock::now())
   {
-    this->setTopPrefixAndPrivilege("/localhost/nfd", "status");
+    setPrivilege("status");
   }
 
 protected:
diff --git a/tests/daemon/mgmt/nfd-manager-base.t.cpp b/tests/daemon/mgmt/nfd-manager-base.t.cpp
new file mode 100644
index 0000000..410f41c
--- /dev/null
+++ b/tests/daemon/mgmt/nfd-manager-base.t.cpp
@@ -0,0 +1,88 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2016,  Regents of the University of California,
+ *                           Arizona Board of Regents,
+ *                           Colorado State University,
+ *                           University Pierre & Marie Curie, Sorbonne University,
+ *                           Washington University in St. Louis,
+ *                           Beijing Institute of Technology,
+ *                           The University of Memphis.
+ *
+ * This file is part of NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD 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.
+ *
+ * NFD 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
+ * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "mgmt/nfd-manager-base.hpp"
+#include "manager-common-fixture.hpp"
+
+#include <ndn-cxx/security/key-chain.hpp>
+#include <ndn-cxx/management/nfd-control-command.hpp>
+
+namespace nfd {
+namespace tests {
+
+class NfdManagerBaseFixture : public ManagerCommonFixture
+{
+public:
+  NfdManagerBaseFixture()
+    : m_manager(m_dispatcher, m_validator, "test-module")
+  {
+  }
+
+protected:
+  CommandValidator m_validator;
+  NfdManagerBase m_manager;
+};
+
+BOOST_AUTO_TEST_SUITE(Mgmt)
+BOOST_FIXTURE_TEST_SUITE(TestNfdManagerBase, NfdManagerBaseFixture)
+
+BOOST_AUTO_TEST_CASE(AddSupportedPrivilegeInConstructor)
+{
+  BOOST_CHECK_NO_THROW(m_validator.addSupportedPrivilege("other-module"));
+  // test-module has already been added by the constructor of ManagerBase
+  BOOST_CHECK_THROW(m_validator.addSupportedPrivilege("test-module"), CommandValidator::Error);
+}
+
+BOOST_AUTO_TEST_CASE(CommandAuthorization)
+{
+  bool didAcceptCallbackFire = false;
+  bool didRejectCallbackFire = false;
+  auto testAuthorization = [&] {
+    didAcceptCallbackFire = false;
+    didRejectCallbackFire = false;
+
+    auto command = makeControlCommandRequest("/localhost/nfd/test-module/test-verb",
+                                             ControlParameters());
+    ndn::nfd::ControlParameters params;
+    m_manager.authorize("/top/prefix", *command, &params,
+                        bind([&] { didAcceptCallbackFire = true; }),
+                        bind([&] { didRejectCallbackFire = true; }));
+  };
+
+  testAuthorization();
+  BOOST_CHECK(!didAcceptCallbackFire);
+  BOOST_CHECK(didRejectCallbackFire);
+
+  m_validator.addInterestRule("^<localhost><nfd><test-module>", *m_certificate);
+  testAuthorization();
+  BOOST_CHECK(didAcceptCallbackFire);
+  BOOST_CHECK(!didRejectCallbackFire);
+}
+
+BOOST_AUTO_TEST_SUITE_END() // TestNfdManagerBase
+BOOST_AUTO_TEST_SUITE_END() // Mgmt
+
+} // namespace tests
+} // namespace nfd
diff --git a/tests/daemon/mgmt/nfd-manager-common-fixture.hpp b/tests/daemon/mgmt/nfd-manager-common-fixture.hpp
new file mode 100644
index 0000000..ba06839
--- /dev/null
+++ b/tests/daemon/mgmt/nfd-manager-common-fixture.hpp
@@ -0,0 +1,76 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2016,  Regents of the University of California,
+ *                           Arizona Board of Regents,
+ *                           Colorado State University,
+ *                           University Pierre & Marie Curie, Sorbonne University,
+ *                           Washington University in St. Louis,
+ *                           Beijing Institute of Technology,
+ *                           The University of Memphis.
+ *
+ * This file is part of NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD 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.
+ *
+ * NFD 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
+ * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef NFD_TESTS_NFD_MGMT_NFD_MANAGER_COMMON_HPP
+#define NFD_TESTS_NFD_MGMT_NFD_MANAGER_COMMON_HPP
+
+#include "manager-common-fixture.hpp"
+#include "fw/forwarder.hpp"
+#include "mgmt/command-validator.hpp"
+
+namespace nfd {
+namespace tests {
+
+/**
+ * @brief a base class shared by all NFD manager's testing fixtures.
+ */
+class NfdManagerCommonFixture : public ManagerCommonFixture
+{
+public:
+  NfdManagerCommonFixture()
+    : m_topPrefix("/localhost/nfd")
+  {
+  }
+
+  /**
+   * @brief configure an interest rule for the module.
+   *
+   * set top prefix before set privilege.
+   *
+   * @param privilege the module name
+   */
+  void
+  setPrivilege(const std::string& privilege)
+  {
+    setTopPrefix(m_topPrefix);
+
+    std::string regex("^");
+    for (auto component : m_topPrefix) {
+      regex += "<" + component.toUri() + ">";
+    }
+
+    m_validator.addInterestRule(regex + "<" + privilege + ">", *m_certificate);
+  }
+
+protected:
+  Forwarder m_forwarder;
+  CommandValidator m_validator;
+  Name m_topPrefix;
+};
+
+} // namespace tests
+} // namespace nfd
+
+#endif // NFD_TESTS_NFD_MGMT_NFD_MANAGER_COMMON_HPP
diff --git a/tests/daemon/mgmt/strategy-choice-manager.t.cpp b/tests/daemon/mgmt/strategy-choice-manager.t.cpp
index 9e7a8c2..90789a0 100644
--- a/tests/daemon/mgmt/strategy-choice-manager.t.cpp
+++ b/tests/daemon/mgmt/strategy-choice-manager.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2015,  Regents of the University of California,
+ * Copyright (c) 2014-2016,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -24,7 +24,7 @@
  */
 
 #include "mgmt/strategy-choice-manager.hpp"
-#include "manager-common-fixture.hpp"
+#include "nfd-manager-common-fixture.hpp"
 
 #include "face/face.hpp"
 #include "face/internal-face.hpp"
@@ -40,14 +40,14 @@
 namespace nfd {
 namespace tests {
 
-class StrategyChoiceManagerFixture : public ManagerCommonFixture
+class StrategyChoiceManagerFixture : public NfdManagerCommonFixture
 {
 public:
   StrategyChoiceManagerFixture()
     : m_strategyChoice(m_forwarder.getStrategyChoice())
     , m_manager(m_strategyChoice, m_dispatcher, m_validator)
   {
-    setTopPrefixAndPrivilege("/localhost/nfd", "strategy-choice");
+    setPrivilege("strategy-choice");
   }
 
 public:
diff --git a/tests/daemon/mgmt/manager-common-fixture.cpp b/tests/manager-common-fixture.cpp
similarity index 89%
rename from tests/daemon/mgmt/manager-common-fixture.cpp
rename to tests/manager-common-fixture.cpp
index 8638d66..cdf818d 100644
--- a/tests/daemon/mgmt/manager-common-fixture.cpp
+++ b/tests/manager-common-fixture.cpp
@@ -38,17 +38,10 @@
 }
 
 void
-ManagerCommonFixture::setTopPrefixAndPrivilege(const Name& topPrefix,
-                                               const std::string& privilege)
+ManagerCommonFixture::setTopPrefix(const Name& topPrefix)
 {
   m_dispatcher.addTopPrefix(topPrefix); // such that all filters are added
   advanceClocks(time::milliseconds(1));
-
-  std::string regex("^");
-  for (auto component : topPrefix) {
-    regex += "<" + component.toUri() + ">";
-  }
-  m_validator.addInterestRule(regex + "<" + privilege + ">", *m_certificate);
 }
 
 shared_ptr<Interest>
@@ -136,17 +129,14 @@
 ManagerCommonFixture::concatenateResponses(size_t startIndex, size_t nResponses)
 {
   auto isFinalSegment = [] (const Data& data) -> bool {
-    const auto& segment = data.getName().at(-1);
-    if (segment.isSegment() == false) {
-      return true;
-    }
-    return segment == data.getFinalBlockId();
+    const name::Component& lastComponent = data.getName().at(-1);
+    return !lastComponent.isSegment() || lastComponent == data.getFinalBlockId();
   };
 
-  while (isFinalSegment(m_responses.back()) == false) {
-    auto name = m_responses.back().getName();
-    auto prefix = name.getPrefix(-1);
-    auto segmentNo = name.at(-1).toSegment() + 1;
+  while (!isFinalSegment(m_responses.back())) {
+    const Name& name = m_responses.back().getName();
+    Name prefix = name.getPrefix(-1);
+    uint64_t segmentNo = name.at(-1).toSegment() + 1;
     // request for the next segment
     receiveInterest(makeInterest(prefix.appendSegment(segmentNo)));
   }
diff --git a/tests/daemon/mgmt/manager-common-fixture.hpp b/tests/manager-common-fixture.hpp
similarity index 90%
rename from tests/daemon/mgmt/manager-common-fixture.hpp
rename to tests/manager-common-fixture.hpp
index 539d56a..aaa06f8 100644
--- a/tests/daemon/mgmt/manager-common-fixture.hpp
+++ b/tests/manager-common-fixture.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2015,  Regents of the University of California,
+ * Copyright (c) 2014-2016,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -23,13 +23,12 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef NFD_TESTS_NFD_MGMT_MANAGER_COMMON_HPP
-#define NFD_TESTS_NFD_MGMT_MANAGER_COMMON_HPP
+#ifndef NFD_TESTS_MANAGER_COMMON_FIXTURE_HPP
+#define NFD_TESTS_MANAGER_COMMON_FIXTURE_HPP
 
 #include "tests/test-common.hpp"
 #include "tests/identity-management-fixture.hpp"
-#include "mgmt/manager-base.hpp"
-#include "fw/forwarder.hpp"
+#include "core/manager-base.hpp"
 
 #include <ndn-cxx/mgmt/dispatcher.hpp>
 #include <ndn-cxx/util/dummy-client-face.hpp>
@@ -47,15 +46,14 @@
   ManagerCommonFixture();
 
   /**
-   * @brief set topPrefix to the dispatcher and configure an interest rule for the module.
+   * @brief set topPrefix to the dispatcher.
    *
    * after setting @param topPrefix, call advanceClocks to ensure all added filters take effects.
    *
    * @param topPrefix top prefix for the dispatcher
-   * @param privilege the module name
    */
   void
-  setTopPrefixAndPrivilege(const Name& topPrefix, const std::string& privilege);
+  setTopPrefix(const Name& topPrefix);
 
 public: // test
   typedef std::function<void(shared_ptr<Interest> interest)> InterestHandler;
@@ -147,8 +145,6 @@
 protected:
   shared_ptr<ndn::util::DummyClientFace> m_face;
   ndn::mgmt::Dispatcher                  m_dispatcher;
-  CommandValidator                       m_validator;
-  Forwarder                              m_forwarder;
   std::vector<Data>&                     m_responses; // a reference of m_face->sentDatas
   Name                                   m_identityName; // the identity used to sign request
   shared_ptr<ndn::IdentityCertificate>   m_certificate; // the certificate used to sign request
@@ -160,4 +156,4 @@
 } // namespace tests
 } // namespace nfd
 
-#endif // NFD_TESTS_NFD_MGMT_MANAGER_COMMON_HPP
+#endif // NFD_TESTS_MANAGER_COMMON_FIXTURE_HPP
