Task #1411
closed
Configuration-based Validator
Added by Yingdi Yu over 11 years ago.
Updated over 11 years ago.
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.
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.
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.
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.
Implemented as of commit commit:48e8c0ca3bb33f4b4427124c738929be6748f0d2
- Status changed from Code review to Closed
Also available in: Atom
PDF