mgmt: use a separate validator for prefix announcements

This commit also configures the default prefix_announcement_validation
section in nfd.conf.sample to accept any prefix announcement.

refs: #5031
Change-Id: I82e34ce783dfe77c170dd02e78a4bc86faa0147a
diff --git a/tests/daemon/rib/service.t.cpp b/tests/daemon/rib/service.t.cpp
index 4832afd..caa59d3 100644
--- a/tests/daemon/rib/service.t.cpp
+++ b/tests/daemon/rib/service.t.cpp
@@ -80,6 +80,36 @@
 
 BOOST_AUTO_TEST_SUITE(ProcessConfig)
 
+BOOST_AUTO_TEST_CASE(EmptyLocalhostSecurity)
+{
+  const std::string CONFIG = R"CONFIG(
+    rib
+    {
+      localhost_security
+    }
+  )CONFIG";
+
+  runOnRibIoService([&] {
+    BOOST_CHECK_NO_THROW(Service(makeSection(CONFIG), m_ribKeyChain));
+  });
+  poll();
+}
+
+BOOST_AUTO_TEST_CASE(EmptyPrefixAnnouncementValidation)
+{
+  const std::string CONFIG = R"CONFIG(
+    rib
+    {
+      prefix_announcement_validation
+    }
+  )CONFIG";
+
+  runOnRibIoService([&] {
+    BOOST_CHECK_NO_THROW(Service(makeSection(CONFIG), m_ribKeyChain));
+  });
+  poll();
+}
+
 BOOST_AUTO_TEST_CASE(LocalhopAndPropagate)
 {
   const std::string CONFIG = R"CONFIG(