diff --git a/core/manager-base.cpp b/core/manager-base.cpp
index 02190a2..3aeec6f 100644
--- a/core/manager-base.cpp
+++ b/core/manager-base.cpp
@@ -33,7 +33,7 @@
 ManagerBase::ManagerBase(Dispatcher& dispatcher,
                          const std::string& module)
   : m_dispatcher(dispatcher)
-  , m_mgmtModuleName(module)
+  , m_module(module)
 {
 }
 
diff --git a/core/manager-base.hpp b/core/manager-base.hpp
index 8ace6bb..cb90541 100644
--- a/core/manager-base.hpp
+++ b/core/manager-base.hpp
@@ -62,6 +62,12 @@
   ManagerBase(Dispatcher& dispatcher,
               const std::string& module);
 
+  const std::string&
+  getModule() const
+  {
+    return m_module;
+  }
+
 PUBLIC_WITH_TESTS_ELSE_PROTECTED: // registrations to the dispatcher
 
   // difference from mgmt::ControlCommand: accepts nfd::ControlParameters
@@ -134,14 +140,14 @@
   makeRelPrefix(const std::string& verb);
 
 private:
-  Dispatcher&       m_dispatcher;
-  std::string       m_mgmtModuleName;
+  Dispatcher& m_dispatcher;
+  std::string m_module;
 };
 
 inline PartialName
 ManagerBase::makeRelPrefix(const std::string& verb)
 {
-  return PartialName(m_mgmtModuleName).append(verb);
+  return PartialName(m_module).append(verb);
 }
 
 template<typename Command>
diff --git a/daemon/mgmt/face-manager.cpp b/daemon/mgmt/face-manager.cpp
index e3e0cb8..8b7057c 100644
--- a/daemon/mgmt/face-manager.cpp
+++ b/daemon/mgmt/face-manager.cpp
@@ -52,8 +52,8 @@
 
 NFD_LOG_INIT("FaceManager");
 
-FaceManager::FaceManager(FaceTable& faceTable, Dispatcher& dispatcher, CommandValidator& validator)
-  : NfdManagerBase(dispatcher, validator, "faces")
+FaceManager::FaceManager(FaceTable& faceTable, Dispatcher& dispatcher, CommandAuthenticator& authenticator)
+  : NfdManagerBase(dispatcher, authenticator, "faces")
   , m_faceTable(faceTable)
 {
   registerCommandHandler<ndn::nfd::FaceCreateCommand>("create",
diff --git a/daemon/mgmt/face-manager.hpp b/daemon/mgmt/face-manager.hpp
index ec0af92..f31f04b 100644
--- a/daemon/mgmt/face-manager.hpp
+++ b/daemon/mgmt/face-manager.hpp
@@ -46,7 +46,7 @@
 public:
   FaceManager(FaceTable& faceTable,
               Dispatcher& dispatcher,
-              CommandValidator& validator);
+              CommandAuthenticator& authenticator);
 
   /**
    * @brief Subscribe to face_system section for the config file
diff --git a/daemon/mgmt/fib-manager.cpp b/daemon/mgmt/fib-manager.cpp
index 1c15ebf..9992789 100644
--- a/daemon/mgmt/fib-manager.cpp
+++ b/daemon/mgmt/fib-manager.cpp
@@ -34,8 +34,8 @@
 FibManager::FibManager(Fib& fib,
                        const FaceTable& faceTable,
                        Dispatcher& dispatcher,
-                       CommandValidator& validator)
-  : NfdManagerBase(dispatcher, validator, "fib")
+                       CommandAuthenticator& authenticator)
+  : NfdManagerBase(dispatcher, authenticator, "fib")
   , m_fib(fib)
   , m_faceTable(faceTable)
 {
diff --git a/daemon/mgmt/fib-manager.hpp b/daemon/mgmt/fib-manager.hpp
index 9599a01..b5c6984 100644
--- a/daemon/mgmt/fib-manager.hpp
+++ b/daemon/mgmt/fib-manager.hpp
@@ -42,18 +42,10 @@
 class FibManager : public NfdManagerBase
 {
 public:
-  /**
-   * @brief construct a FibManger
-   *
-   * @param fib the managed FIB
-   * @param faceTable FaceTable for querying available faces
-   * @param dispatcher the management dispatcher
-   * @param validator the command validator
-   */
   FibManager(Fib& fib,
              const FaceTable& faceTable,
              Dispatcher& dispatcher,
-             CommandValidator& validator);
+             CommandAuthenticator& authenticator);
 
 private:
   void
diff --git a/daemon/mgmt/nfd-manager-base.cpp b/daemon/mgmt/nfd-manager-base.cpp
index b30eca7..b417934 100644
--- a/daemon/mgmt/nfd-manager-base.cpp
+++ b/daemon/mgmt/nfd-manager-base.cpp
@@ -28,28 +28,17 @@
 namespace nfd {
 
 NfdManagerBase::NfdManagerBase(Dispatcher& dispatcher,
-                               CommandValidator& validator,
+                               CommandAuthenticator& authenticator,
                                const std::string& module)
   : ManagerBase(dispatcher, module)
-  , m_validator(validator)
+  , m_authenticator(authenticator)
 {
-  m_validator.addSupportedPrivilege(module);
 }
 
 ndn::mgmt::Authorization
 NfdManagerBase::makeAuthorization(const std::string& verb)
 {
-  return [this] (const Name& prefix, const Interest& interest,
-                 const ndn::mgmt::ControlParameters* params,
-                 const ndn::mgmt::AcceptContinuation& accept,
-                 const 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); }));
-  };
+  return m_authenticator.makeAuthorization(this->getModule(), verb);
 }
 
 } // namespace nfd
diff --git a/daemon/mgmt/nfd-manager-base.hpp b/daemon/mgmt/nfd-manager-base.hpp
index 49a3ea2..27c3392 100644
--- a/daemon/mgmt/nfd-manager-base.hpp
+++ b/daemon/mgmt/nfd-manager-base.hpp
@@ -26,14 +26,8 @@
 #ifndef NFD_DAEMON_MGMT_NFD_MANAGER_BASE_HPP
 #define NFD_DAEMON_MGMT_NFD_MANAGER_BASE_HPP
 
-#include "core/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>
+#include "command-authenticator.hpp"
 
 namespace nfd {
 
@@ -48,7 +42,7 @@
 {
 public:
   NfdManagerBase(Dispatcher& dispatcher,
-                 CommandValidator& validator,
+                 CommandAuthenticator& authenticator,
                  const std::string& module);
 
 PUBLIC_WITH_TESTS_ELSE_PRIVATE: // command validation
@@ -56,7 +50,7 @@
   makeAuthorization(const std::string& verb) override;
 
 private:
-  CommandValidator& m_validator;
+  CommandAuthenticator& m_authenticator;
 };
 
 } // namespace nfd
diff --git a/daemon/mgmt/strategy-choice-manager.cpp b/daemon/mgmt/strategy-choice-manager.cpp
index 1f0c208..312a35c 100644
--- a/daemon/mgmt/strategy-choice-manager.cpp
+++ b/daemon/mgmt/strategy-choice-manager.cpp
@@ -33,8 +33,8 @@
 
 StrategyChoiceManager::StrategyChoiceManager(StrategyChoice& strategyChoice,
                                              Dispatcher& dispatcher,
-                                             CommandValidator& validator)
-  : NfdManagerBase(dispatcher, validator, "strategy-choice")
+                                             CommandAuthenticator& authenticator)
+  : NfdManagerBase(dispatcher, authenticator, "strategy-choice")
   , m_table(strategyChoice)
 {
   registerCommandHandler<ndn::nfd::StrategyChoiceSetCommand>("set",
diff --git a/daemon/mgmt/strategy-choice-manager.hpp b/daemon/mgmt/strategy-choice-manager.hpp
index 9fd4ad3..5520790 100644
--- a/daemon/mgmt/strategy-choice-manager.hpp
+++ b/daemon/mgmt/strategy-choice-manager.hpp
@@ -43,7 +43,7 @@
 public:
   StrategyChoiceManager(strategy_choice::StrategyChoice& table,
                         Dispatcher& dispatcher,
-                        CommandValidator& validator);
+                        CommandAuthenticator& authenticator);
 
 private:
   void
diff --git a/daemon/nfd.cpp b/daemon/nfd.cpp
index 35fc941..5d6bec7 100644
--- a/daemon/nfd.cpp
+++ b/daemon/nfd.cpp
@@ -38,9 +38,6 @@
 #include "mgmt/forwarder-status-manager.hpp"
 #include "mgmt/general-config-section.hpp"
 #include "mgmt/tables-config-section.hpp"
-#include "mgmt/command-validator.hpp"
-
-#include <ndn-cxx/mgmt/dispatcher.hpp>
 
 namespace nfd {
 
@@ -74,12 +71,10 @@
 {
 }
 
-Nfd::~Nfd()
-{
-  // It is necessary to explicitly define the destructor, because some member variables (e.g.,
-  // unique_ptr<Forwarder>) are forward-declared, but implicitly declared destructor requires
-  // complete types for all members when instantiated.
-}
+// It is necessary to explicitly define the destructor, because some member variables (e.g.,
+// unique_ptr<Forwarder>) are forward-declared, but implicitly declared destructor requires
+// complete types for all members when instantiated.
+Nfd::~Nfd() = default;
 
 void
 Nfd::initialize()
@@ -125,7 +120,6 @@
   }
 }
 
-
 static inline void
 ignoreRibAndLogSections(const std::string& filename, const std::string& sectionName,
                         const ConfigSection& section, bool isDryRun)
@@ -146,24 +140,17 @@
 {
   std::tie(m_internalFace, m_internalClientFace) = face::makeInternalFace(m_keyChain);
   m_forwarder->getFaceTable().addReserved(m_internalFace, face::FACEID_INTERNAL_FACE);
+
   m_dispatcher.reset(new ndn::mgmt::Dispatcher(*m_internalClientFace, m_keyChain));
-
-  m_validator.reset(new CommandValidator());
-
-  m_fibManager.reset(new FibManager(m_forwarder->getFib(),
-                                    m_forwarder->getFaceTable(),
-                                    *m_dispatcher,
-                                    *m_validator));
-
-  m_faceManager.reset(new FaceManager(m_forwarder->getFaceTable(),
-                                      *m_dispatcher,
-                                      *m_validator));
-
-  m_strategyChoiceManager.reset(new StrategyChoiceManager(m_forwarder->getStrategyChoice(),
-                                                          *m_dispatcher,
-                                                          *m_validator));
+  m_authenticator = CommandAuthenticator::create();
 
   m_forwarderStatusManager.reset(new ForwarderStatusManager(*m_forwarder, *m_dispatcher));
+  m_faceManager.reset(new FaceManager(m_forwarder->getFaceTable(),
+                                      *m_dispatcher, *m_authenticator));
+  m_fibManager.reset(new FibManager(m_forwarder->getFib(), m_forwarder->getFaceTable(),
+                                    *m_dispatcher, *m_authenticator));
+  m_strategyChoiceManager.reset(new StrategyChoiceManager(m_forwarder->getStrategyChoice(),
+                                                          *m_dispatcher, *m_authenticator));
 
   ConfigFile config(&ignoreRibAndLogSections);
   general::setConfigFile(config);
@@ -176,8 +163,7 @@
                                    m_forwarder->getNetworkRegionTable());
   tablesConfig.setConfigFile(config);
 
-  m_validator->setConfigFile(config);
-
+  m_authenticator->setConfigFile(config);
   m_faceManager->setConfigFile(config);
 
   // parse config file
@@ -216,10 +202,9 @@
                                    m_forwarder->getStrategyChoice(),
                                    m_forwarder->getMeasurements(),
                                    m_forwarder->getNetworkRegionTable());
-
   tablesConfig.setConfigFile(config);
 
-  m_validator->setConfigFile(config);
+  m_authenticator->setConfigFile(config);
   m_faceManager->setConfigFile(config);
 
   if (!m_configFile.empty()) {
diff --git a/daemon/nfd.hpp b/daemon/nfd.hpp
index d8fd12e..f98d3b6 100644
--- a/daemon/nfd.hpp
+++ b/daemon/nfd.hpp
@@ -42,11 +42,11 @@
 namespace nfd {
 
 class Forwarder;
+class CommandAuthenticator;
 class FibManager;
 class FaceManager;
 class StrategyChoiceManager;
 class ForwarderStatusManager;
-class CommandValidator;
 
 namespace face {
 class Face;
@@ -107,19 +107,18 @@
 
   unique_ptr<Forwarder> m_forwarder;
 
-  ndn::KeyChain&               m_keyChain;
-  shared_ptr<face::Face>       m_internalFace;
-  shared_ptr<ndn::Face>        m_internalClientFace;
-  unique_ptr<CommandValidator> m_validator;
-
-  unique_ptr<ndn::mgmt::Dispatcher>  m_dispatcher;
-  unique_ptr<FibManager>             m_fibManager;
-  unique_ptr<FaceManager>            m_faceManager;
-  unique_ptr<StrategyChoiceManager>  m_strategyChoiceManager;
+  ndn::KeyChain& m_keyChain;
+  shared_ptr<face::Face> m_internalFace;
+  shared_ptr<ndn::Face> m_internalClientFace;
+  unique_ptr<ndn::mgmt::Dispatcher> m_dispatcher;
+  shared_ptr<CommandAuthenticator> m_authenticator;
   unique_ptr<ForwarderStatusManager> m_forwarderStatusManager;
+  unique_ptr<FaceManager> m_faceManager;
+  unique_ptr<FibManager> m_fibManager;
+  unique_ptr<StrategyChoiceManager> m_strategyChoiceManager;
 
   unique_ptr<ndn::util::NetworkMonitor> m_networkMonitor;
-  scheduler::ScopedEventId              m_reloadConfigEvent;
+  scheduler::ScopedEventId m_reloadConfigEvent;
 };
 
 } // namespace nfd
diff --git a/tests/daemon/mgmt/face-manager-create-face.t.cpp b/tests/daemon/mgmt/face-manager-create-face.t.cpp
index 8c67b3a..ef59037 100644
--- a/tests/daemon/mgmt/face-manager-create-face.t.cpp
+++ b/tests/daemon/mgmt/face-manager-create-face.t.cpp
@@ -24,7 +24,7 @@
  */
 
 #include "mgmt/face-manager.hpp"
-#include "fw/forwarder.hpp"
+#include "fw/face-table.hpp"
 #include <ndn-cxx/mgmt/dispatcher.hpp>
 #include <ndn-cxx/util/dummy-client-face.hpp>
 
@@ -46,10 +46,10 @@
 {
 public:
   FaceManagerNode(ndn::KeyChain& keyChain, const std::string& port = "6363")
-    : faceTable(forwarder.getFaceTable())
-    , face(getGlobalIoService(), keyChain, {true, true})
+    : face(getGlobalIoService(), keyChain, {true, true})
     , dispatcher(face, keyChain, ndn::security::SigningInfo())
-    , manager(faceTable, dispatcher, validator)
+    , authenticator(CommandAuthenticator::create())
+    , manager(faceTable, dispatcher, *authenticator)
   {
     dispatcher.addTopPrefix("/localhost/nfd");
 
@@ -88,7 +88,7 @@
 
     ConfigFile config;
     manager.setConfigFile(config);
-    validator.setConfigFile(config);
+    authenticator->setConfigFile(config);
     config.parse(configSection, false, "dummy-config");
   }
 
@@ -96,24 +96,21 @@
   closeFaces()
   {
     std::vector<std::reference_wrapper<Face>> facesToClose;
-    std::copy(forwarder.getFaceTable().begin(), forwarder.getFaceTable().end(),
-              std::back_inserter(facesToClose));
+    std::copy(faceTable.begin(), faceTable.end(), std::back_inserter(facesToClose));
     for (Face& face : facesToClose) {
       face.close();
     }
   }
 
 public:
-  Forwarder forwarder;
-  FaceTable& faceTable;
+  FaceTable faceTable;
   ndn::util::DummyClientFace face;
   ndn::mgmt::Dispatcher dispatcher;
-  CommandValidator validator;
+  shared_ptr<CommandAuthenticator> authenticator;
   FaceManager manager;
 };
 
-class FaceManagerFixture : public UnitTestTimeFixture
-                         , public IdentityManagementFixture
+class FaceManagerFixture : public IdentityManagementTimeFixture
 {
 public:
   FaceManagerFixture()
@@ -401,7 +398,7 @@
           BOOST_REQUIRE_EQUAL(controlResponse.getText(), "OK");
           BOOST_REQUIRE_EQUAL(controlResponse.getCode(), 200);
           uint64_t faceId = ControlParameters(controlResponse.getBody()).getFaceId();
-          auto face = this->node2.forwarder.getFace(static_cast<FaceId>(faceId));
+          auto face = this->node2.faceTable.get(static_cast<FaceId>(faceId));
 
           // to force creation of on-demand face
           auto dummyInterest = make_shared<Interest>("/hello/world");
diff --git a/tests/daemon/mgmt/face-manager-process-config.t.cpp b/tests/daemon/mgmt/face-manager-process-config.t.cpp
index 6296fc8..16996b8 100644
--- a/tests/daemon/mgmt/face-manager-process-config.t.cpp
+++ b/tests/daemon/mgmt/face-manager-process-config.t.cpp
@@ -42,7 +42,7 @@
 {
 public:
   FaceManagerProcessConfigFixture()
-    : m_manager(m_forwarder.getFaceTable(), m_dispatcher, m_validator)
+    : m_manager(m_forwarder.getFaceTable(), m_dispatcher, *m_authenticator)
   {
     m_manager.setConfigFile(m_config);
   }
diff --git a/tests/daemon/mgmt/face-manager.t.cpp b/tests/daemon/mgmt/face-manager.t.cpp
index 851a785..95f82b9 100644
--- a/tests/daemon/mgmt/face-manager.t.cpp
+++ b/tests/daemon/mgmt/face-manager.t.cpp
@@ -44,8 +44,9 @@
 public:
   FaceManagerFixture()
     : m_faceTable(m_forwarder.getFaceTable())
-    , m_manager(m_faceTable, m_dispatcher, m_validator)
+    , m_manager(m_faceTable, m_dispatcher, *m_authenticator)
   {
+    setTopPrefix();
     setPrivilege("faces");
   }
 
diff --git a/tests/daemon/mgmt/fib-manager.t.cpp b/tests/daemon/mgmt/fib-manager.t.cpp
index 3e5ee0e..f03b7b9 100644
--- a/tests/daemon/mgmt/fib-manager.t.cpp
+++ b/tests/daemon/mgmt/fib-manager.t.cpp
@@ -38,8 +38,9 @@
   FibManagerFixture()
     : m_fib(m_forwarder.getFib())
     , m_faceTable(m_forwarder.getFaceTable())
-    , m_manager(m_fib, m_faceTable, m_dispatcher, m_validator)
+    , m_manager(m_fib, m_faceTable, m_dispatcher, *m_authenticator)
   {
+    setTopPrefix();
     setPrivilege("fib");
   }
 
diff --git a/tests/daemon/mgmt/forwarder-status-manager.t.cpp b/tests/daemon/mgmt/forwarder-status-manager.t.cpp
index c267943..3bd8127 100644
--- a/tests/daemon/mgmt/forwarder-status-manager.t.cpp
+++ b/tests/daemon/mgmt/forwarder-status-manager.t.cpp
@@ -40,7 +40,7 @@
     : manager(m_forwarder, m_dispatcher)
     , startTime(time::system_clock::now())
   {
-    setPrivilege("status");
+    setTopPrefix();
   }
 
 protected:
diff --git a/tests/daemon/mgmt/nfd-manager-base.t.cpp b/tests/daemon/mgmt/nfd-manager-base.t.cpp
deleted file mode 100644
index 340c9ec..0000000
--- a/tests/daemon/mgmt/nfd-manager-base.t.cpp
+++ /dev/null
@@ -1,90 +0,0 @@
-/* -*- 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)
-{
-  ndn::mgmt::Authorization authorize = m_manager.makeAuthorization("test-verb");
-
-  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;
-    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.cpp b/tests/daemon/mgmt/nfd-manager-common-fixture.cpp
new file mode 100644
index 0000000..47a1655
--- /dev/null
+++ b/tests/daemon/mgmt/nfd-manager-common-fixture.cpp
@@ -0,0 +1,67 @@
+/* -*- 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-common-fixture.hpp"
+
+namespace nfd {
+namespace tests {
+
+NfdManagerCommonFixture::NfdManagerCommonFixture()
+  : m_authenticator(CommandAuthenticator::create())
+{
+}
+
+void
+NfdManagerCommonFixture::setTopPrefix()
+{
+  this->ManagerCommonFixture::setTopPrefix("/localhost/nfd");
+}
+
+void
+NfdManagerCommonFixture::setPrivilege(const std::string& privilege)
+{
+  this->saveIdentityCertificate(m_identityName, "ManagerCommonFixture.ndncert");
+
+  const std::string& config = R"CONFIG(
+    authorizations
+    {
+      authorize
+      {
+        certfile "ManagerCommonFixture.ndncert"
+        privileges
+        {
+          )CONFIG" + privilege + R"CONFIG(
+        }
+      }
+    }
+  )CONFIG";
+
+  ConfigFile cf;
+  m_authenticator->setConfigFile(cf);
+  cf.parse(config, false, "ManagerCommonFixture.authenticator.conf");
+}
+
+} // namespace tests
+} // namespace nfd
diff --git a/tests/daemon/mgmt/nfd-manager-common-fixture.hpp b/tests/daemon/mgmt/nfd-manager-common-fixture.hpp
index ba06839..32650ce 100644
--- a/tests/daemon/mgmt/nfd-manager-common-fixture.hpp
+++ b/tests/daemon/mgmt/nfd-manager-common-fixture.hpp
@@ -23,54 +23,39 @@
  * 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
+#ifndef NFD_TESTS_NFD_MGMT_NFD_MANAGER_COMMON_FIXTURE_HPP
+#define NFD_TESTS_NFD_MGMT_NFD_MANAGER_COMMON_FIXTURE_HPP
 
 #include "manager-common-fixture.hpp"
 #include "fw/forwarder.hpp"
-#include "mgmt/command-validator.hpp"
+#include "mgmt/command-authenticator.hpp"
 
 namespace nfd {
 namespace tests {
 
-/**
- * @brief a base class shared by all NFD manager's testing fixtures.
+/** \brief base fixture for testing an NFD Manager
  */
 class NfdManagerCommonFixture : public ManagerCommonFixture
 {
 public:
-  NfdManagerCommonFixture()
-    : m_topPrefix("/localhost/nfd")
-  {
-  }
+  NfdManagerCommonFixture();
 
-  /**
-   * @brief configure an interest rule for the module.
-   *
-   * set top prefix before set privilege.
-   *
-   * @param privilege the module name
+  /** \brief add /localhost/nfd as a top prefix to the dispatcher
    */
   void
-  setPrivilege(const std::string& privilege)
-  {
-    setTopPrefix(m_topPrefix);
+  setTopPrefix();
 
-    std::string regex("^");
-    for (auto component : m_topPrefix) {
-      regex += "<" + component.toUri() + ">";
-    }
-
-    m_validator.addInterestRule(regex + "<" + privilege + ">", *m_certificate);
-  }
+  /** \brief grant m_identityName privilege to sign commands for the management module
+   */
+  void
+  setPrivilege(const std::string& privilege);
 
 protected:
   Forwarder m_forwarder;
-  CommandValidator m_validator;
-  Name m_topPrefix;
+  shared_ptr<CommandAuthenticator> m_authenticator;
 };
 
 } // namespace tests
 } // namespace nfd
 
-#endif // NFD_TESTS_NFD_MGMT_NFD_MANAGER_COMMON_HPP
+#endif // NFD_TESTS_NFD_MGMT_NFD_MANAGER_COMMON_FIXTURE_HPP
diff --git a/tests/daemon/mgmt/strategy-choice-manager.t.cpp b/tests/daemon/mgmt/strategy-choice-manager.t.cpp
index 5915e3e..bc4ae70 100644
--- a/tests/daemon/mgmt/strategy-choice-manager.t.cpp
+++ b/tests/daemon/mgmt/strategy-choice-manager.t.cpp
@@ -47,8 +47,9 @@
 public:
   StrategyChoiceManagerFixture()
     : m_strategyChoice(m_forwarder.getStrategyChoice())
-    , m_manager(m_strategyChoice, m_dispatcher, m_validator)
+    , m_manager(m_strategyChoice, m_dispatcher, *m_authenticator)
   {
+    setTopPrefix();
     setPrivilege("strategy-choice");
   }
 
diff --git a/tests/manager-common-fixture.cpp b/tests/manager-common-fixture.cpp
index a491296..88db7e1 100644
--- a/tests/manager-common-fixture.cpp
+++ b/tests/manager-common-fixture.cpp
@@ -24,6 +24,7 @@
  */
 
 #include "manager-common-fixture.hpp"
+#include <ndn-cxx/security/signing-helpers.hpp>
 
 namespace nfd {
 namespace tests {
@@ -33,8 +34,8 @@
   , m_dispatcher(m_face, m_keyChain, ndn::security::SigningInfo())
   , m_responses(m_face.sentData)
   , m_identityName("/unit-test/ManagerCommonFixture/identity")
-  , m_certificate(m_keyChain.getCertificate(m_keyChain.createIdentity(m_identityName)))
 {
+  BOOST_REQUIRE(this->addIdentity(m_identityName));
 }
 
 void
@@ -55,8 +56,7 @@
     beforeSigning(command);
   }
 
-  m_keyChain.sign(*command, ndn::security::SigningInfo(ndn::security::SigningInfo::SIGNER_TYPE_ID,
-                                                       m_identityName));
+  m_keyChain.sign(*command, ndn::security::signingByIdentity(m_identityName));
   return command;
 }
 
diff --git a/tests/manager-common-fixture.hpp b/tests/manager-common-fixture.hpp
index a29c441..b829476 100644
--- a/tests/manager-common-fixture.hpp
+++ b/tests/manager-common-fixture.hpp
@@ -39,8 +39,7 @@
 /**
  * @brief a collection of common functions shared by all manager's testing fixtures.
  */
-class ManagerCommonFixture : public UnitTestTimeFixture
-                           , public IdentityManagementFixture
+class ManagerCommonFixture : public IdentityManagementTimeFixture
 {
 public: // initialize
   ManagerCommonFixture();
@@ -146,8 +145,7 @@
   ndn::util::DummyClientFace m_face;
   ndn::mgmt::Dispatcher m_dispatcher;
   std::vector<Data>& m_responses; ///< a reference of m_face->sentData
-  Name m_identityName; ///< the identity used to sign request
-  shared_ptr<ndn::IdentityCertificate> m_certificate; ///< the certificate used to sign request
+  Name m_identityName; ///< the identity to sign requests
 };
 
 std::ostream&
