Task #1411
closedConfiguration-based Validator
100%
Description
The Validator class in current security library defines the interface of packet validation.
However, implementing a validator of a particular trust model requires a lot of knowledge about the security library.
In order to help people to construct the desired validator, we provide a helper configurable validator called ValidatorConf
With this ValidatorConf, developer only needs to express their trust model using a defined language in a configuration file, and the security library will automatically construct the validator according to configuration file.
The format and syntax definition of the configuration file can be found at: http://redmine.named-data.net/projects/ndn-cpp-dev/wiki/CommandValidatorConf.
Updated by Junxiao Shi over 11 years ago
Spec questions:
^<ndn><edu>$shall match only one name:/ndn/edu
I believe this regex can also match ndn:/aaandnbbb/ccceduddd, because Perl syntax needs ^ $ anchors to avoid additional octets outside of a match.
To match only ndn:/ndn/edu, the regex would be ^<^ndn$><^edu$>$.
a packet is treated as invalid if it cannot pass none of the checkers
This sentence has double nagation and I can’t understand.
Updated by Yingdi Yu over 11 years ago
Actually, $ cannot match ndn:/aaandnbbb/ccceduddd, because the internal name component matcher is based on boost::regex_match (http://www.boost.org/doc/libs/1_55_0/libs/regex/doc/html/boost_regex/ref/regex_match.html). According to boost doc "Note that the result is true only if the expression matches the whole of the input sequence."
I should re-phrase the doc to emphasize that.
Updated by Yingdi Yu over 11 years ago
Yingdi Yu wrote:
Actually, $ cannot match ndn:/aaandnbbb/ccceduddd, because the internal name component matcher is based on boost::regex_match. According to boost doc "Note that the result is true only if the expression matches the whole of the input sequence."
I should re-phrase the doc to emphasize that.
Updated by Yingdi Yu over 11 years ago
Sorry for the malformat.
Actually, ^<ndn><edu>$ cannot match ndn:/aaandnbbb/ccceduddd, because the internal name component matcher is based on boost::regex_match. According to boost doc, "Note that the result is true only if the expression matches the whole of the input sequence." I will re-phrase the doc to emphasize that.
Updated by Alex Afanasyev over 11 years ago
Implemented as of commit commit:48e8c0ca3bb33f4b4427124c738929be6748f0d2
Updated by Alex Afanasyev over 11 years ago
- Status changed from Code review to Closed