Project

General

Profile

CommandValidatorConf » History » Revision 3

Revision 2 (Yingdi Yu, 03/17/2014 12:47 PM) → Revision 3/55 (Yingdi Yu, 03/17/2014 03:24 PM)

# Command Validator Configuration Config File Format 
 ==================================== 

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

 The configuration file contains rules that will be applied by `Validator`.  
 Here is an example of configuration file. 

     rule policies 
     { 
       for data policy 
       name "Simple Rule" 
       type self-defined 
       definition 
       { 
         target prefix "/localhost/nrd" 
         trust_model 
         { 
           type name hierarchical 
           name "/localhost/example" 
           condition isPrefixOf anchor-file "trust-anchor.cert" 
         } 
       } 
       policy 
       { 
         signer prefix "/localhost/nfd" 
         trust-model 
         { 
           type name fixed 
           rule "/ndn/edu/ucla/KEY/yingdi/ksk-1234/ID-CERT" anchor-file "cert1.cert" 
           condition equal anchor-file "cert2.cert" 
         } 
       } 
     } 
     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 its own name (which should be unique in the configuration file).