diff --git a/src/common.hpp b/src/common.hpp
index 3611c02..efeabe6 100644
--- a/src/common.hpp
+++ b/src/common.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014,  Regents of the University of California.
+ * Copyright (c) 2014-2017, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -27,7 +27,7 @@
 #include <ndn-cxx/selectors.hpp>
 #include <ndn-cxx/key-locator.hpp>
 #include <ndn-cxx/security/key-chain.hpp>
-#include <ndn-cxx/security/validator-config.hpp>
+#include <ndn-cxx/security/validator.hpp>
 #include <ndn-cxx/util/time.hpp>
 #include <ndn-cxx/util/scheduler.hpp>
 
@@ -59,7 +59,7 @@
 using ndn::KeyLocator;
 using ndn::KeyChain;
 using ndn::Scheduler;
-using ndn::ValidatorConfig;
+using ndn::Validator;
 
 using std::shared_ptr;
 using std::make_shared;
diff --git a/src/handles/delete-handle.cpp b/src/handles/delete-handle.cpp
index 5cfbea2..f39856f 100644
--- a/src/handles/delete-handle.cpp
+++ b/src/handles/delete-handle.cpp
@@ -22,8 +22,8 @@
 namespace repo {
 
 DeleteHandle::DeleteHandle(Face& face, RepoStorage& storageHandle, KeyChain& keyChain,
-                           Scheduler& scheduler,// RepoStorage& storeindex,
-                           ValidatorConfig& validator)
+                           Scheduler& scheduler,
+                           Validator& validator)
   : BaseHandle(face, storageHandle, keyChain, scheduler)
   , m_validator(validator)
 {
diff --git a/src/handles/delete-handle.hpp b/src/handles/delete-handle.hpp
index 5493d2e..0bb0e06 100644
--- a/src/handles/delete-handle.hpp
+++ b/src/handles/delete-handle.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014,  Regents of the University of California.
+ * Copyright (c) 2014-2017, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -21,7 +21,6 @@
 #define REPO_HANDLES_DELETE_HANDLE_HPP
 
 #include "base-handle.hpp"
-#include <ndn-cxx/security/validator-config.hpp>
 
 namespace repo {
 
@@ -41,7 +40,7 @@
 
 public:
   DeleteHandle(Face& face, RepoStorage& storageHandle, KeyChain& keyChain,
-               Scheduler& scheduler, ValidatorConfig& validator);
+               Scheduler& scheduler, Validator& validator);
 
   virtual void
   listen(const Name& prefix);
@@ -85,7 +84,7 @@
   processSegmentDeleteCommand(const Interest& interest, RepoCommandParameter& parameter);
 
 private:
-  ValidatorConfig& m_validator;
+  Validator& m_validator;
 
 };
 
diff --git a/src/handles/tcp-bulk-insert-handle.cpp b/src/handles/tcp-bulk-insert-handle.cpp
index 1d81b17..53a60d6 100644
--- a/src/handles/tcp-bulk-insert-handle.cpp
+++ b/src/handles/tcp-bulk-insert-handle.cpp
@@ -99,7 +99,7 @@
   m_acceptor.listen(255);
 
   shared_ptr<ip::tcp::socket> clientSocket =
-    make_shared<ip::tcp::socket>(boost::ref(m_acceptor.get_io_service()));
+    make_shared<ip::tcp::socket>(std::ref(m_acceptor.get_io_service()));
   m_acceptor.async_accept(*clientSocket,
                           bind(&TcpBulkInsertHandle::handleAccept, this, _1,
                                clientSocket));
@@ -127,12 +127,12 @@
   std::cerr << "New connection from " << socket->remote_endpoint() << std::endl;
 
   shared_ptr<detail::TcpBulkInsertClient> client =
-    make_shared<detail::TcpBulkInsertClient>(boost::ref(*this), socket);
+    make_shared<detail::TcpBulkInsertClient>(std::ref(*this), socket);
   detail::TcpBulkInsertClient::startReceive(client);
 
   // prepare accepting the next connection
   shared_ptr<ip::tcp::socket> clientSocket =
-    make_shared<ip::tcp::socket>(boost::ref(m_acceptor.get_io_service()));
+    make_shared<ip::tcp::socket>(std::ref(m_acceptor.get_io_service()));
   m_acceptor.async_accept(*clientSocket,
                           bind(&TcpBulkInsertHandle::handleAccept, this, _1,
                                clientSocket));
diff --git a/src/handles/watch-handle.cpp b/src/handles/watch-handle.cpp
index 25ce278..97aea8f 100644
--- a/src/handles/watch-handle.cpp
+++ b/src/handles/watch-handle.cpp
@@ -25,7 +25,7 @@
 static const milliseconds DEFAULT_INTEREST_LIFETIME(4000);
 
 WatchHandle::WatchHandle(Face& face, RepoStorage& storageHandle, KeyChain& keyChain,
-                         Scheduler& scheduler, ValidatorConfig& validator)
+                         Scheduler& scheduler, Validator& validator)
   : BaseHandle(face, storageHandle, keyChain, scheduler)
   , m_validator(validator)
   , m_interestNum(0)
diff --git a/src/handles/watch-handle.hpp b/src/handles/watch-handle.hpp
index f34b1fb..a3e9e5f 100644
--- a/src/handles/watch-handle.hpp
+++ b/src/handles/watch-handle.hpp
@@ -34,11 +34,8 @@
  * @brief WatchHandle provides a different way for repo to insert data.
  *
  * Repo keeps sending interest to request the data with same prefix,
- *
  * but with different exclude selectors(updated every time). Repo will stop
- *
  * watching the prefix until a command interest tell it to stop, the total
- *
  * amount of sent interests reaches a specific number or time out.
  */
 class WatchHandle : public BaseHandle
@@ -58,7 +55,7 @@
 
 public:
   WatchHandle(Face& face, RepoStorage& storageHandle, KeyChain& keyChain,
-              Scheduler& scheduler, ValidatorConfig& validator);
+              Scheduler& scheduler, Validator& validator);
 
   virtual void
   listen(const Name& prefix);
@@ -155,8 +152,7 @@
   onRunning(const Name& name);
 
 private:
-
-  ValidatorConfig& m_validator;
+  Validator& m_validator;
 
   map<Name, std::pair<RepoCommandResponse, bool> > m_processes;
   int64_t m_interestNum;
diff --git a/src/handles/write-handle.cpp b/src/handles/write-handle.cpp
index 16c622e..862616a 100644
--- a/src/handles/write-handle.cpp
+++ b/src/handles/write-handle.cpp
@@ -28,8 +28,8 @@
 static const milliseconds DEFAULT_INTEREST_LIFETIME(4000);
 
 WriteHandle::WriteHandle(Face& face, RepoStorage& storageHandle, KeyChain& keyChain,
-                         Scheduler& scheduler,// RepoStorage& storeindex,
-                         ValidatorConfig& validator)
+                         Scheduler& scheduler,
+                         Validator& validator)
   : BaseHandle(face, storageHandle, keyChain, scheduler)
   , m_validator(validator)
   , m_retryTime(RETRY_TIMEOUT)
diff --git a/src/handles/write-handle.hpp b/src/handles/write-handle.hpp
index a02f675..1347470 100644
--- a/src/handles/write-handle.hpp
+++ b/src/handles/write-handle.hpp
@@ -22,8 +22,6 @@
 
 #include "base-handle.hpp"
 
-#include <ndn-cxx/security/validator-config.hpp>
-
 #include <queue>
 
 namespace repo {
@@ -70,7 +68,7 @@
 
 public:
   WriteHandle(Face& face, RepoStorage& storageHandle, KeyChain& keyChain,
-              Scheduler& scheduler, ValidatorConfig& validator);
+              Scheduler& scheduler, Validator& validator);
 
   virtual void
   listen(const Name& prefix);
@@ -228,8 +226,7 @@
   negativeReply(const Interest& interest, int statusCode);
 
 private:
-
-  ValidatorConfig& m_validator;
+  Validator& m_validator;
 
   map<ProcessId, ProcessInfo> m_processes;
 
diff --git a/src/repo.cpp b/src/repo.cpp
index dcf7007..ff2422d 100644
--- a/src/repo.cpp
+++ b/src/repo.cpp
@@ -118,7 +118,6 @@
   , m_face(ioService)
   , m_store(std::make_shared<SqliteStorage>(config.dbPath))
   , m_storageHandle(config.nMaxPackets, *m_store)
-  , m_validator(m_face)
   , m_readHandle(m_face, m_storageHandle, m_keyChain, m_scheduler)
   , m_writeHandle(m_face, m_storageHandle, m_keyChain, m_scheduler, m_validator)
   , m_watchHandle(m_face, m_storageHandle, m_keyChain, m_scheduler, m_validator)
@@ -126,7 +125,7 @@
   , m_tcpBulkInsertHandle(ioService, m_storageHandle)
 
 {
-  m_validator.load(config.validatorNode, config.repoConfigPath);
+  this->enableValidation();
 }
 
 void
@@ -173,7 +172,9 @@
 void
 Repo::enableValidation()
 {
-  m_validator.load(m_config.validatorNode, m_config.repoConfigPath);
+  std::cerr << "Validation is temporarily disabled. All commands will be authorized.\n";
+  /// \todo #4091 restore with ValidatorPolicyConf
+  // m_validator.load(m_config.validatorNode, m_config.repoConfigPath);
 }
 
 } // namespace repo
diff --git a/src/repo.hpp b/src/repo.hpp
index 754a63c..ef506a7 100644
--- a/src/repo.hpp
+++ b/src/repo.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014,  Regents of the University of California.
+ * Copyright (c) 2014-2017, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -32,6 +32,7 @@
 
 #include "common.hpp"
 
+#include <ndn-cxx/security/validator-null.hpp>
 #include <boost/property_tree/ptree.hpp>
 #include <boost/property_tree/info_parser.hpp>
 
@@ -85,7 +86,7 @@
   std::shared_ptr<Storage> m_store;
   RepoStorage m_storageHandle;
   KeyChain m_keyChain;
-  ValidatorConfig m_validator;
+  ndn::ValidatorNull m_validator;
   ReadHandle m_readHandle;
   WriteHandle m_writeHandle;
   WatchHandle m_watchHandle;
diff --git a/src/storage/sqlite-storage.cpp b/src/storage/sqlite-storage.cpp
index ae380ea..034ae66 100644
--- a/src/storage/sqlite-storage.cpp
+++ b/src/storage/sqlite-storage.cpp
@@ -20,6 +20,7 @@
 #include "../../build/src/config.hpp"
 #include "sqlite-storage.hpp"
 #include "index.hpp"
+#include <ndn-cxx/util/crypto.hpp>
 #include <boost/filesystem.hpp>
 #include <istream>
 
diff --git a/tests/dataset-fixtures.hpp b/tests/dataset-fixtures.hpp
index f60526b..fbed46d 100644
--- a/tests/dataset-fixtures.hpp
+++ b/tests/dataset-fixtures.hpp
@@ -20,15 +20,14 @@
 #ifndef REPO_TESTS_DATASET_FIXTURES_HPP
 #define REPO_TESTS_DATASET_FIXTURES_HPP
 
-#include <ndn-cxx/security/key-chain.hpp>
+#include "identity-management-fixture.hpp"
 #include <vector>
 #include <boost/mpl/vector.hpp>
 
 namespace repo {
 namespace tests {
 
-
-class DatasetBase
+class DatasetBase : public virtual IdentityManagementFixture
 {
 public:
   class Error : public std::runtime_error
@@ -57,13 +56,12 @@
     if (map.count(name) > 0)
       return map[name];
 
-    static ndn::KeyChain keyChain;
     static std::vector<uint8_t> content(1500, '-');
 
     std::shared_ptr<ndn::Data> data = std::make_shared<ndn::Data>();
     data->setName(name);
     data->setContent(&content[0], content.size());
-    keyChain.sign(*data);
+    m_keyChain.sign(*data);
 
     map.insert(std::make_pair(name, data));
     return data;
diff --git a/tests/identity-management-fixture.cpp b/tests/identity-management-fixture.cpp
new file mode 100644
index 0000000..e824246
--- /dev/null
+++ b/tests/identity-management-fixture.cpp
@@ -0,0 +1,82 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2017, Regents of the University of California.
+ *
+ * This file is part of NDN repo-ng (Next generation of NDN repository).
+ * See AUTHORS.md for complete list of repo-ng authors and contributors.
+ *
+ * repo-ng 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.
+ *
+ * repo-ng 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
+ * repo-ng, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "identity-management-fixture.hpp"
+#include <ndn-cxx/security/pib/identity.hpp>
+#include <ndn-cxx/security/pib/key.hpp>
+#include <ndn-cxx/security/pib/pib.hpp>
+#include <ndn-cxx/security/v2/certificate.hpp>
+#include <ndn-cxx/util/io.hpp>
+#include <boost/filesystem.hpp>
+
+namespace repo {
+namespace tests {
+
+IdentityManagementFixture::IdentityManagementFixture()
+  : m_keyChain("pib-memory:", "tpm-memory:")
+{
+  m_keyChain.createIdentity("/DEFAULT");
+}
+
+IdentityManagementFixture::~IdentityManagementFixture()
+{
+  boost::system::error_code ec;
+  for (const auto& certFile : m_certFiles) {
+    boost::filesystem::remove(certFile, ec); // ignore error
+  }
+}
+
+bool
+IdentityManagementFixture::addIdentity(const Name& identity, const ndn::KeyParams& params)
+{
+  try {
+    m_keyChain.createIdentity(identity, params);
+    return true;
+  }
+  catch (const std::runtime_error&) {
+    return false;
+  }
+}
+
+bool
+IdentityManagementFixture::saveIdentityCertificate(const Name& identity, const std::string& filename, bool wantAdd)
+{
+  ndn::security::v2::Certificate cert;
+  try {
+    cert = m_keyChain.getPib().getIdentity(identity).getDefaultKey().getDefaultCertificate();
+  }
+  catch (const ndn::security::Pib::Error&) {
+    if (wantAdd && this->addIdentity(identity)) {
+      return this->saveIdentityCertificate(identity, filename, false);
+    }
+    return false;
+  }
+
+  m_certFiles.push_back(filename);
+  try {
+    ndn::io::save(cert, filename);
+    return true;
+  }
+  catch (const ndn::io::Error&) {
+    return false;
+  }
+}
+
+} // namespace tests
+} // namespace repo
diff --git a/tests/identity-management-fixture.hpp b/tests/identity-management-fixture.hpp
new file mode 100644
index 0000000..300c53a
--- /dev/null
+++ b/tests/identity-management-fixture.hpp
@@ -0,0 +1,66 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2017, Regents of the University of California.
+ *
+ * This file is part of NDN repo-ng (Next generation of NDN repository).
+ * See AUTHORS.md for complete list of repo-ng authors and contributors.
+ *
+ * repo-ng 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.
+ *
+ * repo-ng 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
+ * repo-ng, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef REPO_TESTS_IDENTITY_MANAGEMENT_FIXTURE_HPP
+#define REPO_TESTS_IDENTITY_MANAGEMENT_FIXTURE_HPP
+
+#include "common.hpp"
+#include <ndn-cxx/security/key-chain.hpp>
+
+namespace repo {
+namespace tests {
+
+/** \brief a fixture providing an in-memory KeyChain
+ */
+class IdentityManagementFixture : noncopyable
+{
+public:
+  IdentityManagementFixture();
+
+  /** \brief deletes saved certificate files
+   */
+  ~IdentityManagementFixture();
+
+  /** \brief add identity
+   *  \return whether successful
+   */
+  bool
+  addIdentity(const Name& identity,
+              const ndn::KeyParams& params = ndn::KeyChain::getDefaultKeyParams());
+
+  /** \brief save identity certificate to a file
+   *  \param identity identity name
+   *  \param filename file name, should be writable
+   *  \param wantAdd if true, add new identity when necessary
+   *  \return whether successful
+   */
+  bool
+  saveIdentityCertificate(const Name& identity, const std::string& filename, bool wantAdd = false);
+
+protected:
+  ndn::KeyChain m_keyChain;
+
+private:
+  std::vector<std::string> m_certFiles;
+};
+
+} // namespace tests
+} // namespace repo
+
+#endif // REPO_TESTS_IDENTITY_MANAGEMENT_FIXTURE_HPP
diff --git a/tests/integrated/command-fixture.cpp b/tests/integrated/command-fixture.cpp
new file mode 100644
index 0000000..be800e2
--- /dev/null
+++ b/tests/integrated/command-fixture.cpp
@@ -0,0 +1,34 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2017, Regents of the University of California.
+ *
+ * This file is part of NDN repo-ng (Next generation of NDN repository).
+ * See AUTHORS.md for complete list of repo-ng authors and contributors.
+ *
+ * repo-ng 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.
+ *
+ * repo-ng 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
+ * repo-ng, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "command-fixture.hpp"
+
+namespace repo {
+namespace tests {
+
+CommandFixture::CommandFixture()
+  : scheduler(repoFace.getIoService())
+  , keyChain(m_keyChain)
+{
+  this->saveIdentityCertificate(keyChain.getPib().getDefaultIdentity().getName(),
+                                "tests/integrated/insert-delete-test.cert");
+}
+
+} // namespace tests
+} // namespace repo
diff --git a/tests/integrated/command-fixture.hpp b/tests/integrated/command-fixture.hpp
new file mode 100644
index 0000000..341e00c
--- /dev/null
+++ b/tests/integrated/command-fixture.hpp
@@ -0,0 +1,46 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2017, Regents of the University of California.
+ *
+ * This file is part of NDN repo-ng (Next generation of NDN repository).
+ * See AUTHORS.md for complete list of repo-ng authors and contributors.
+ *
+ * repo-ng 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.
+ *
+ * repo-ng 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
+ * repo-ng, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef REPO_TESTS_INTEGRATED_COMMAND_FIXTURE_HPP
+#define REPO_TESTS_INTEGRATED_COMMAND_FIXTURE_HPP
+
+#include "../identity-management-fixture.hpp"
+#include <ndn-cxx/security/validator-null.hpp>
+
+namespace repo {
+namespace tests {
+
+class CommandFixture : public virtual IdentityManagementFixture
+{
+protected:
+  CommandFixture();
+
+protected:
+  Face repoFace;
+  Scheduler scheduler;
+  KeyChain& keyChain;
+
+  /// \todo #4091 switch to ValidatorPolicyConf and load insert-delete-validator-config.conf
+  ndn::ValidatorNull validator;
+};
+
+} // namespace tests
+} // namespace repo
+
+#endif // REPO_TESTS_INTEGRATED_COMMAND_FIXTURE_HPP
diff --git a/tests/integrated/test-basic-command-insert-delete.cpp b/tests/integrated/test-basic-command-insert-delete.cpp
index f9e58e3..775a16d 100644
--- a/tests/integrated/test-basic-command-insert-delete.cpp
+++ b/tests/integrated/test-basic-command-insert-delete.cpp
@@ -21,13 +21,12 @@
 #include "handles/delete-handle.hpp"
 #include "storage/sqlite-storage.hpp"
 #include "storage/repo-storage.hpp"
-#include "common.hpp"
 
+#include "command-fixture.hpp"
 #include "../repo-storage-fixture.hpp"
 #include "../dataset-fixtures.hpp"
 
 #include <ndn-cxx/util/random.hpp>
-#include <ndn-cxx/util/io.hpp>
 #include <boost/preprocessor/comparison/not_equal.hpp>
 #include <boost/test/unit_test.hpp>
 #include <fstream>
@@ -46,13 +45,11 @@
 const static uint8_t content[8] = {3, 1, 4, 1, 5, 9, 2, 6};
 
 template<class Dataset>
-class Fixture : public RepoStorageFixture, public Dataset
+class Fixture : public CommandFixture, public RepoStorageFixture, public Dataset
 {
 public:
   Fixture()
-    : scheduler(repoFace.getIoService())
-    , validator(repoFace)
-    , writeHandle(repoFace, *handle, keyChain, scheduler, validator)
+    : writeHandle(repoFace, *handle, keyChain, scheduler, validator)
     , deleteHandle(repoFace, *handle, keyChain, scheduler, validator)
     , insertFace(repoFace.getIoService())
     , deleteFace(repoFace.getIoService())
@@ -61,14 +58,6 @@
     deleteHandle.listen(Name("/repo/command"));
   }
 
-  ~Fixture()
-  {
-    repoFace.getIoService().stop();
-  }
-
-  void
-  generateDefaultCertificateFile();
-
   void
   scheduleInsertEvent();
 
@@ -85,10 +74,6 @@
   delayedInterest();
 
   void
-  stopFaceProcess();
-
-
-  void
   onInsertData(const Interest& interest, const Data& data);
 
   void
@@ -113,10 +98,6 @@
   checkDeleteOk(const Interest& interest);
 
 public:
-  Face repoFace;
-  Scheduler scheduler;
-  ValidatorConfig validator;
-  KeyChain keyChain;
   WriteHandle writeHandle;
   DeleteHandle deleteHandle;
   Face insertFace;
@@ -124,29 +105,13 @@
   std::map<Name, EventId> insertEvents;
 };
 
-template<class T>  void
-Fixture<T>::generateDefaultCertificateFile()
-{
-  Name defaultIdentity = keyChain.getDefaultIdentity();
-  Name defaultKeyname = keyChain.getDefaultKeyNameForIdentity(defaultIdentity);
-  Name defaultCertficateName = keyChain.getDefaultCertificateNameForKey(defaultKeyname);
-  shared_ptr<ndn::IdentityCertificate> defaultCertficate =
-    keyChain.getCertificate(defaultCertficateName);
-  //test-integrated should run in root directory of repo-ng.
-  //certificate file should be removed after tests for security issue.
-  std::fstream certificateFile("tests/integrated/insert-delete-test.cert",
-                               std::ios::out | std::ios::binary | std::ios::trunc);
-  ndn::io::save(*defaultCertficate, certificateFile);
-  certificateFile.close();
-}
-
 template<class T> void
 Fixture<T>::onInsertInterest(const Interest& interest)
 {
   Data data(Name(interest.getName()));
   data.setContent(content, sizeof(content));
   data.setFreshnessPeriod(milliseconds(0));
-  keyChain.signByIdentity(data, keyChain.getDefaultIdentity());
+  keyChain.sign(data);
   insertFace.put(data);
   std::map<Name, EventId>::iterator event = insertEvents.find(interest.getName());
   if (event != insertEvents.end()) {
@@ -173,12 +138,6 @@
 }
 
 template<class T> void
-Fixture<T>::stopFaceProcess()
-{
-  repoFace.getIoService().stop();
-}
-
-template<class T> void
 Fixture<T>::onInsertData(const Interest& interest, const Data& data)
 {
   RepoCommandResponse response;
@@ -265,7 +224,7 @@
 
     insertCommandName.append(insertParameter.wireEncode());
     Interest insertInterest(insertCommandName);
-    keyChain.signByIdentity(insertInterest, keyChain.getDefaultIdentity());
+    keyChain.sign(insertInterest);
     //schedule a job to express insertInterest every 50ms
     scheduler.scheduleEvent(milliseconds(timeCount * 50 + 1000),
                             bind(&Fixture<T>::sendInsertInterest, this, insertInterest));
@@ -298,7 +257,7 @@
     deleteParameter.setName((*i)->getName());
     deleteCommandName.append(deleteParameter.wireEncode());
     Interest deleteInterest(deleteCommandName);
-    keyChain.signByIdentity(deleteInterest, keyChain.getDefaultIdentity());
+    keyChain.sign(deleteInterest);
     scheduler.scheduleEvent(milliseconds(4000 + timeCount * 50),
                             bind(&Fixture<T>::sendDeleteInterest, this, deleteInterest));
     timeCount++;
@@ -313,19 +272,13 @@
 
 BOOST_FIXTURE_TEST_CASE_TEMPLATE(InsertDelete, T, Datasets, Fixture<T>)
 {
-  this->generateDefaultCertificateFile();
-  this->validator.load("tests/integrated/insert-delete-validator-config.conf");
-
   // schedule events
   this->scheduler.scheduleEvent(seconds(0),
                                 bind(&Fixture<T>::scheduleInsertEvent, this));
   this->scheduler.scheduleEvent(seconds(10),
                                 bind(&Fixture<T>::scheduleDeleteEvent, this));
 
-  // schedule an event to terminate IO
-  this->scheduler.scheduleEvent(seconds(30),
-                                bind(&Fixture<T>::stopFaceProcess, this));
-  this->repoFace.getIoService().run();
+  this->repoFace.processEvents(seconds(30));
 }
 
 BOOST_AUTO_TEST_SUITE_END()
diff --git a/tests/integrated/test-basic-command-watch.cpp b/tests/integrated/test-basic-command-watch.cpp
index 8c4c13e..8b8f327 100644
--- a/tests/integrated/test-basic-command-watch.cpp
+++ b/tests/integrated/test-basic-command-watch.cpp
@@ -19,13 +19,12 @@
 
 #include "handles/watch-handle.hpp"
 #include "storage/sqlite-storage.hpp"
-#include "common.hpp"
 
+#include "command-fixture.hpp"
 #include "../repo-storage-fixture.hpp"
 #include "../dataset-fixtures.hpp"
 
 #include <ndn-cxx/util/random.hpp>
-#include <ndn-cxx/util/io.hpp>
 
 #include <boost/test/unit_test.hpp>
 #include <fstream>
@@ -44,26 +43,16 @@
 const static uint8_t content[8] = {3, 1, 4, 1, 5, 9, 2, 6};
 
 template<class Dataset>
-class Fixture : public RepoStorageFixture, public Dataset
+class Fixture : public CommandFixture, public RepoStorageFixture, public Dataset
 {
 public:
   Fixture()
-    : scheduler(repoFace.getIoService())
-    , validator(repoFace)
-    , watchHandle(repoFace, *handle, keyChain, scheduler, validator)
+    : watchHandle(repoFace, *handle, keyChain, scheduler, validator)
     , watchFace(repoFace.getIoService())
   {
     watchHandle.listen(Name("/repo/command"));
   }
 
-  ~Fixture()
-  {
-    repoFace.getIoService().stop();
-  }
-
-  void
-  generateDefaultCertificateFile();
-
   void
   scheduleWatchEvent();
 
@@ -77,9 +66,6 @@
   delayedInterest();
 
   void
-  stopFaceProcess();
-
-  void
   onWatchData(const Interest& interest, const Data& data);
 
   void
@@ -98,38 +84,18 @@
   checkWatchOk(const Interest& interest);
 
 public:
-  Face repoFace;
-  Scheduler scheduler;
-  ValidatorConfig validator;
-  KeyChain keyChain;
   WatchHandle watchHandle;
   Face watchFace;
   std::map<Name, EventId> watchEvents;
 };
 
-template<class T>  void
-Fixture<T>::generateDefaultCertificateFile()
-{
-  Name defaultIdentity = keyChain.getDefaultIdentity();
-  Name defaultKeyname = keyChain.getDefaultKeyNameForIdentity(defaultIdentity);
-  Name defaultCertficateName = keyChain.getDefaultCertificateNameForKey(defaultKeyname);
-  shared_ptr<ndn::IdentityCertificate> defaultCertficate =
-  keyChain.getCertificate(defaultCertficateName);
-  //test-integrated should run in root directory of repo-ng.
-  //certificate file should be removed after tests for security issue.
-  std::fstream certificateFile("tests/integrated/insert-delete-test.cert",
-                               std::ios::out | std::ios::binary | std::ios::trunc);
-  ndn::io::save(*defaultCertficate, certificateFile);
-  certificateFile.close();
-}
-
 template<class T> void
 Fixture<T>::onWatchInterest(const Interest& interest)
 {
   shared_ptr<Data> data = make_shared<Data>(Name(interest.getName()).appendNumber(random::generateWord64()+100));
   data->setContent(content, sizeof(content));
   data->setFreshnessPeriod(milliseconds(0));
-  keyChain.signByIdentity(*data, keyChain.getDefaultIdentity());
+  keyChain.sign(*data);
   watchFace.put(*data);
 
   // schedule an event 50ms later to check whether watch is Ok
@@ -152,12 +118,6 @@
 }
 
 template<class T> void
-Fixture<T>::stopFaceProcess()
-{
-  repoFace.getIoService().stop();
-}
-
-template<class T> void
 Fixture<T>::onWatchData(const Interest& interest, const Data& data)
 {
   RepoCommandResponse response;
@@ -226,7 +186,7 @@
   watchParameter.setWatchTimeout(milliseconds(1000000000));
   watchCommandName.append(watchParameter.wireEncode());
   Interest watchInterest(watchCommandName);
-  keyChain.signByIdentity(watchInterest, keyChain.getDefaultIdentity());
+  keyChain.sign(watchInterest);
   //schedule a job to express watchInterest
   scheduler.scheduleEvent(milliseconds(1000),
                           bind(&Fixture<T>::sendWatchStartInterest, this, watchInterest));
@@ -235,7 +195,7 @@
   RepoCommandParameter watchStopParameter;
   watchStopName.append(watchStopParameter.wireEncode());
   Interest watchStopInterest(watchStopName);
-  keyChain.signByIdentity(watchStopInterest, keyChain.getDefaultIdentity());
+  keyChain.sign(watchStopInterest);
 
  // scheduler.scheduleEvent(milliseconds(10000),
   //                        bind(&Fixture<T>::sendWatchStopInterest, this, watchStopInterest));
@@ -250,17 +210,11 @@
 
 BOOST_FIXTURE_TEST_CASE_TEMPLATE(WatchDelete, T, Dataset, Fixture<T>)
 {
-  this->generateDefaultCertificateFile();
-  this->validator.load("tests/integrated/insert-delete-validator-config.conf");
-
   // schedule events
   this->scheduler.scheduleEvent(seconds(0),
                                 bind(&Fixture<T>::scheduleWatchEvent, this));
 
-  // schedule an event to terminate IO
-  this->scheduler.scheduleEvent(seconds(500),
-                                bind(&Fixture<T>::stopFaceProcess, this));
-  this->repoFace.getIoService().run();
+  this->repoFace.processEvents(seconds(500));
 }
 
 BOOST_AUTO_TEST_SUITE_END()
diff --git a/tests/integrated/test-basic-interest-read.cpp b/tests/integrated/test-basic-interest-read.cpp
index 79a7e8f..eb412e8 100644
--- a/tests/integrated/test-basic-interest-read.cpp
+++ b/tests/integrated/test-basic-interest-read.cpp
@@ -81,12 +81,6 @@
   }
 
   void
-  stopFaceProcess()
-  {
-    repoFace.getIoService().stop();
-  }
-
-  void
   onReadData(const ndn::Interest& interest, const ndn::Data& data)
   {
     int rc = memcmp(data.getContent().value(), content, sizeof(content));
@@ -137,10 +131,7 @@
   this->scheduler.scheduleEvent(ndn::time::seconds(0),
                                 bind(&BasicInterestReadFixture<T>::scheduleReadEvent, this));
 
-  // schedule an event to terminate IO
-  this->scheduler.scheduleEvent(ndn::time::seconds(20),
-                                bind(&BasicInterestReadFixture<T>::stopFaceProcess, this));
-  this->repoFace.getIoService().run();
+  this->repoFace.processEvents(ndn::time::seconds(20));
 
 }
 
diff --git a/tests/unit/index.cpp b/tests/unit/index.cpp
index ca96536..7a04c36 100644
--- a/tests/unit/index.cpp
+++ b/tests/unit/index.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014,  Regents of the University of California.
+ * Copyright (c) 2014-2017, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -18,10 +18,14 @@
  */
 
 #include "storage/index.hpp"
+#include <ndn-cxx/security/signing-helpers.hpp>
+#include <ndn-cxx/util/crypto.hpp>
+#include <ndn-cxx/util/random.hpp>
 
 #include "../sqlite-fixture.hpp"
 #include "../dataset-fixtures.hpp"
 
+#include <boost/mpl/push_back.hpp>
 #include <boost/test/unit_test.hpp>
 #include <iostream>
 
@@ -43,7 +47,7 @@
   {
     shared_ptr<Data> data = make_shared<Data>(name);
     data->setContent(reinterpret_cast<const uint8_t*>(&id), sizeof(id));
-    m_keyChain.signWithSha256(*data);
+    m_keyChain.sign(*data, ndn::signingWithSha256());
     data->wireEncode();
     m_index.insert(*data, id);
 
diff --git a/tests/unit/repo-storage.cpp b/tests/unit/repo-storage.cpp
index 61632ad..1caecf1 100644
--- a/tests/unit/repo-storage.cpp
+++ b/tests/unit/repo-storage.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014,  Regents of the University of California.
+ * Copyright (c) 2014-2017, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -22,6 +22,7 @@
 #include "../dataset-fixtures.hpp"
 #include "../repo-storage-fixture.hpp"
 
+#include <boost/mpl/push_back.hpp>
 #include <boost/test/unit_test.hpp>
 #include <iostream>
 #include <string.h>
diff --git a/tools/ndnputfile.cpp b/tools/ndnputfile.cpp
index f08a7a3..078be77 100644
--- a/tools/ndnputfile.cpp
+++ b/tools/ndnputfile.cpp
@@ -366,16 +366,12 @@
 NdnPutFile::signData(ndn::Data& data)
 {
   if (useDigestSha256) {
-    m_keyChain.signWithSha256(data);
+    m_keyChain.sign(data, ndn::signingWithSha256());
   }
+  else if (identityForData.empty())
+    m_keyChain.sign(data);
   else {
-    if (identityForData.empty())
-      m_keyChain.sign(data);
-    else {
-      ndn::Name keyName = m_keyChain.getDefaultKeyNameForIdentity(ndn::Name(identityForData));
-      ndn::Name certName = m_keyChain.getDefaultCertificateNameForKey(keyName);
-      m_keyChain.sign(data, certName);
-    }
+    m_keyChain.sign(data, ndn::signingByIdentity(identityForData));
   }
 }
 
diff --git a/tools/ndnrepowatch.cpp b/tools/ndnrepowatch.cpp
index 4172d79..4d2d9c5 100644
--- a/tools/ndnrepowatch.cpp
+++ b/tools/ndnrepowatch.cpp
@@ -22,6 +22,7 @@
 
 #include <ndn-cxx/face.hpp>
 #include <ndn-cxx/security/key-chain.hpp>
+#include <ndn-cxx/security/signing-helpers.hpp>
 #include <ndn-cxx/util/scheduler.hpp>
 #include <fstream>
 #include <string>
@@ -287,7 +288,7 @@
   if (identityForCommand.empty())
     m_keyChain.sign(interest);
   else {
-    m_keyChain.signByIdentity(interest, ndn::Name(identityForCommand));
+    m_keyChain.sign(interest, ndn::signingByIdentity(identityForCommand));
   }
 
   return interest;
