Project

General

Profile

CommandValidatorConf » History » Revision 4

Revision 3 (Yingdi Yu, 03/17/2014 03:24 PM) → Revision 4/55 (Yingdi Yu, 03/17/2014 03:33 PM)

# Validator Configuration File Format 

 You can set up a `Validator` via a configuration file.  
 Next, we will show you how to write a configuration file. 

 The configuration file consists of **`rules`** contains rules that will be used in validation. 
 applied by `Validator`.  
 Here is an example of configuration file containing two rules. file. 

     rule 
     { 
       for data 
       name "Simple Rule" 
       type self-defined 
       definition 
       { 
         target 
         { 
           type name 
           name "/localhost/example" 
           condition isPrefixOf 
         } 
         signer 
         { 
           type name 
           rule "/ndn/edu/ucla/KEY/yingdi/ksk-1234/ID-CERT" 
           condition equal 
         } 
       } 
     } 
     rule 
     { 
       for data 
       name "Testbed Validation Rule" 
       type hierarchical 
       trust-anchor 
       { 
         type file 
         file-name "testbed-trust-anchor.cert" 
       } 
     } 

 This configuration file consists of two rules. 
 Each rule has a unique its own name (which should be unique in the configuration file), e.g., "Simple Rule", "Testbed Validation Rule". 
 The rule name is defined by the property **`name`**. 

 Each rule must be specified with a usage (either for data validation, or interest validation). 
 The usage is defined by the property **`for`**. 

 Each file).