provides ControlCommand authorization according to NFD configuration file More...
#include <command-authenticator.hpp>
Public Member Functions | |
void | setConfigFile (ConfigFile &configFile) |
ndn::mgmt::Authorization | makeAuthorization (const std::string &module, const std::string &verb) |
Static Public Member Functions | |
static shared_ptr< CommandAuthenticator > | create () |
provides ControlCommand authorization according to NFD configuration file
Definition at line 38 of file command-authenticator.hpp.
|
static |
Definition at line 42 of file command-authenticator.cpp.
Referenced by nfd::ignoreRibAndLogSections().
void nfd::CommandAuthenticator::setConfigFile | ( | ConfigFile & | configFile | ) |
Definition at line 53 of file command-authenticator.cpp.
References nfd::ConfigFile::addSectionHandler(), NFD_LOG_INFO, NFD_LOG_WARN, and ndn::to_string().
ndn::mgmt::Authorization nfd::CommandAuthenticator::makeAuthorization | ( | const std::string & | module, |
const std::string & | verb | ||
) |
module | management module name |
verb | command verb; currently it's ignored |
Definition at line 150 of file command-authenticator.cpp.
References ndn::security::v1::IdentityCertificate::certificateNameToPublicKeyName(), ndn::SignatureInfo::getKeyLocator(), ndn::KeyLocator::getName(), ndn::Interest::getName(), ndn::KeyLocator::getType(), ndn::SignatureInfo::hasKeyLocator(), ndn::KeyLocator::KeyLocator_Name, ndn::signed_interest::MIN_LENGTH, ns3::ndn::Name, NFD_LOG_DEBUG, ndn::signed_interest::POS_SIG_INFO, ndn::mgmt::SILENT, ndn::Name::size(), ndn::mgmt::STATUS403, ndn::Name::toUri(), ndn::security::Validator::verifySignature(), and ndn::SignatureInfo::wireDecode().
Referenced by nfd::NfdManagerBase::NfdManagerBase().