diff --git a/tools/nfdc/forwarder-general-module.cpp b/tools/nfdc/forwarder-general-module.cpp
index ee3e0af..e490892 100644
--- a/tools/nfdc/forwarder-general-module.cpp
+++ b/tools/nfdc/forwarder-general-module.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2014-2017,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
@@ -30,11 +30,6 @@
 namespace tools {
 namespace nfdc {
 
-ForwarderGeneralModule::ForwarderGeneralModule()
-  : m_nfdIdCollector(nullptr)
-{
-}
-
 void
 ForwarderGeneralModule::fetchStatus(Controller& controller,
                                     const function<void()>& onSuccess,
@@ -55,30 +50,17 @@
   return status.getCurrentTimestamp() - status.getStartTimestamp();
 }
 
-const Name&
-ForwarderGeneralModule::getNfdId() const
-{
-  if (m_nfdIdCollector != nullptr && m_nfdIdCollector->hasNfdId()) {
-    return m_nfdIdCollector->getNfdId();
-  }
-
-  static Name unavailable("/nfdId-unavailable");
-  return unavailable;
-}
-
 void
 ForwarderGeneralModule::formatStatusXml(std::ostream& os) const
 {
-  this->formatItemXml(os, m_status, this->getNfdId());
+  this->formatItemXml(os, m_status);
 }
 
 void
-ForwarderGeneralModule::formatItemXml(std::ostream& os, const ForwarderStatus& item,
-                                      const Name& nfdId) const
+ForwarderGeneralModule::formatItemXml(std::ostream& os, const ForwarderStatus& item) const
 {
   os << "<generalStatus>";
 
-  os << "<nfdId>" << nfdId << "</nfdId>";
   os << "<version>" << xml::Text{item.getNfdVersion()} << "</version>";
   os << "<startTime>" << xml::formatTimestamp(item.getStartTimestamp()) << "</startTime>";
   os << "<currentTime>" << xml::formatTimestamp(item.getCurrentTimestamp()) << "</currentTime>";
@@ -110,14 +92,12 @@
 ForwarderGeneralModule::formatStatusText(std::ostream& os) const
 {
   os << "General NFD status:\n";
-  this->formatItemText(os, m_status, this->getNfdId());
+  this->formatItemText(os, m_status);
 }
 
 void
-ForwarderGeneralModule::formatItemText(std::ostream& os, const ForwarderStatus& item,
-                                       const Name& nfdId) const
+ForwarderGeneralModule::formatItemText(std::ostream& os, const ForwarderStatus& item) const
 {
-  os << "                 nfdId=" << nfdId << "\n";
   os << "               version=" << item.getNfdVersion() << "\n";
   os << "             startTime=" << text::formatTimestamp(item.getStartTimestamp()) << "\n";
   os << "           currentTime=" << text::formatTimestamp(item.getCurrentTimestamp()) << "\n";
@@ -137,54 +117,6 @@
   os << "             nOutNacks=" << item.getNOutNacks() << "\n";
 }
 
-NfdIdCollector::NfdIdCollector(unique_ptr<ndn::Validator> inner)
-  : m_inner(std::move(inner))
-  , m_hasNfdId(false)
-{
-  BOOST_ASSERT(m_inner != nullptr);
-}
-
-const Name&
-NfdIdCollector::getNfdId() const
-{
-  if (!m_hasNfdId) {
-    BOOST_THROW_EXCEPTION(std::runtime_error("NfdId is unavailable"));
-  }
-
-  return m_nfdId;
-}
-
-void
-NfdIdCollector::checkPolicy(const Data& data, int nSteps,
-                            const ndn::OnDataValidated& accept,
-                            const ndn::OnDataValidationFailed& reject,
-                            std::vector<shared_ptr<ndn::ValidationRequest>>& nextSteps)
-{
-  ndn::OnDataValidated accepted = [this, accept] (const shared_ptr<const Data>& data) {
-    accept(data); // pass the Data to Validator user's validated callback
-
-    if (m_hasNfdId) {
-      return;
-    }
-
-    const ndn::Signature& sig = data->getSignature();
-    if (!sig.hasKeyLocator()) {
-      return;
-    }
-
-    const ndn::KeyLocator& kl = sig.getKeyLocator();
-    if (kl.getType() != ndn::KeyLocator::KeyLocator_Name) {
-      return;
-    }
-
-    m_nfdId = kl.getName();
-    m_hasNfdId = true;
-  };
-
-  BOOST_ASSERT(nSteps == 0);
-  m_inner->validate(data, accepted, reject);
-}
-
 } // namespace nfdc
 } // namespace tools
 } // namespace nfd
diff --git a/tools/nfdc/forwarder-general-module.hpp b/tools/nfdc/forwarder-general-module.hpp
index 9fc6a68..4d65c83 100644
--- a/tools/nfdc/forwarder-general-module.hpp
+++ b/tools/nfdc/forwarder-general-module.hpp
@@ -27,7 +27,6 @@
 #define NFD_TOOLS_NFDC_FORWARDER_GENERAL_MODULE_HPP
 
 #include "module.hpp"
-#include <ndn-cxx/security/validator.hpp>
 
 namespace nfd {
 namespace tools {
@@ -35,16 +34,12 @@
 
 using ndn::nfd::ForwarderStatus;
 
-class NfdIdCollector;
-
 /** \brief provides access to NFD forwarder general status
  *  \sa https://redmine.named-data.net/projects/nfd/wiki/ForwarderStatus
  */
 class ForwarderGeneralModule : public Module, noncopyable
 {
 public:
-  ForwarderGeneralModule();
-
   void
   fetchStatus(Controller& controller,
               const function<void()>& onSuccess,
@@ -52,21 +47,14 @@
               const CommandOptions& options) override;
 
   void
-  setNfdIdCollector(const NfdIdCollector& nfdIdCollector)
-  {
-    m_nfdIdCollector = &nfdIdCollector;
-  }
-
-  void
   formatStatusXml(std::ostream& os) const override;
 
   /** \brief format a single status item as XML
    *  \param os output stream
    *  \param item status item
-   *  \param nfdId NFD's signing certificate name
    */
   void
-  formatItemXml(std::ostream& os, const ForwarderStatus& item, const Name& nfdId) const;
+  formatItemXml(std::ostream& os, const ForwarderStatus& item) const;
 
   void
   formatStatusText(std::ostream& os) const override;
@@ -74,67 +62,14 @@
   /** \brief format a single status item as text
    *  \param os output stream
    *  \param item status item
-   *  \param nfdId NFD's signing certificate name
    */
   void
-  formatItemText(std::ostream& os, const ForwarderStatus& item, const Name& nfdId) const;
+  formatItemText(std::ostream& os, const ForwarderStatus& item) const;
 
 private:
-  const Name&
-  getNfdId() const;
-
-private:
-  const NfdIdCollector* m_nfdIdCollector;
   ForwarderStatus m_status;
 };
 
-
-/** \brief a validator that can collect NFD's signing certificate name
- *
- *  This validator redirects all validation requests to an inner validator.
- *  For the first Data packet accepted by the inner validator that has a Name in KeyLocator,
- *  this Name is collected as NFD's signing certificate name.
- *
- *  \todo #4089 re-implement as v2 ValidationPolicy
- */
-class NfdIdCollector : public ndn::Validator
-{
-public:
-  explicit
-  NfdIdCollector(unique_ptr<ndn::Validator> inner);
-
-  bool
-  hasNfdId() const
-  {
-    return m_hasNfdId;
-  }
-
-  const Name&
-  getNfdId() const;
-
-protected:
-  void
-  checkPolicy(const Interest& interest, int nSteps,
-              const ndn::OnInterestValidated& accept,
-              const ndn::OnInterestValidationFailed& reject,
-              std::vector<shared_ptr<ndn::ValidationRequest>>& nextSteps) override
-  {
-    BOOST_ASSERT(nSteps == 0);
-    m_inner->validate(interest, accept, reject);
-  }
-
-  void
-  checkPolicy(const Data& data, int nSteps,
-              const ndn::OnDataValidated& accept,
-              const ndn::OnDataValidationFailed& reject,
-              std::vector<shared_ptr<ndn::ValidationRequest>>& nextSteps) override;
-
-private:
-  unique_ptr<ndn::Validator> m_inner;
-  bool m_hasNfdId;
-  Name m_nfdId;
-};
-
 } // namespace nfdc
 } // namespace tools
 } // namespace nfd
diff --git a/tools/nfdc/status.cpp b/tools/nfdc/status.cpp
index 529ee82..01222c8 100644
--- a/tools/nfdc/status.cpp
+++ b/tools/nfdc/status.cpp
@@ -40,17 +40,10 @@
 void
 reportStatus(ExecuteContext& ctx, const StatusReportOptions& options)
 {
-  unique_ptr<ndn::security::v2::Validator> validator = make_unique<ndn::security::v2::ValidatorNull>();
-  CommandOptions ctrlOptions;
-
   StatusReport report;
 
   if (options.wantForwarderGeneral) {
-    // auto nfdIdCollector = make_unique<NfdIdCollector>(std::move(validator));
-    auto forwarderGeneralModule = make_unique<ForwarderGeneralModule>();
-    // forwarderGeneralModule->setNfdIdCollector(*nfdIdCollector);
-    report.sections.push_back(std::move(forwarderGeneralModule));
-    // validator = std::move(nfdIdCollector);
+    report.sections.push_back(make_unique<ForwarderGeneralModule>());
   }
 
   if (options.wantChannels) {
@@ -73,7 +66,9 @@
     report.sections.push_back(make_unique<StrategyChoiceModule>());
   }
 
-  uint32_t code = report.collect(ctx.face, ctx.keyChain, *validator, ctrlOptions);
+  uint32_t code = report.collect(ctx.face, ctx.keyChain,
+                                 ndn::security::v2::getAcceptAllValidator(),
+                                 CommandOptions());
   if (code != 0) {
     ctx.exitCode = 1;
     // Give a simple error code for end user.
