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&
