26 #ifndef NFD_DAEMON_MGMT_COMMAND_AUTHENTICATOR_HPP
27 #define NFD_DAEMON_MGMT_COMMAND_AUTHENTICATOR_HPP
30 #include <ndn-cxx/mgmt/dispatcher.hpp>
31 #include <ndn-cxx/security/command-interest-validator.hpp>
32 #include <ndn-cxx/security/public-key.hpp>
41 static shared_ptr<CommandAuthenticator>
52 ndn::mgmt::Authorization
62 processConfig(
const ConfigSection& section,
bool isDryRun,
const std::string& filename);
64 static std::pair<bool, Name>
65 extractKeyName(
const Interest& interest);
68 struct AuthorizedCerts
70 bool allowAny =
false;
71 std::unordered_map<Name, ndn::PublicKey> certs;
73 std::unordered_map<std::string, AuthorizedCerts> m_moduleAuth;
75 ndn::security::CommandInterestValidator m_validator;
80 #endif // NFD_DAEMON_MGMT_COMMAND_AUTHENTICATOR_HPP
configuration file parsing utility
ndn::mgmt::Authorization makeAuthorization(const std::string &module, const std::string &verb)
provides ControlCommand authorization according to NFD configuration file
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
boost::property_tree::ptree ConfigSection
static shared_ptr< CommandAuthenticator > create()
void setConfigFile(ConfigFile &configFile)