Project

General

Profile

CommandValidatorConf » History » Version 3

Yingdi Yu, 03/17/2014 03:24 PM

1 3 Yingdi Yu
# Validator Configuration File Format
2 1 Yingdi Yu
3 3 Yingdi Yu
You can set up a `Validator` via a configuration file. 
4
Next, we will show you how to write a configuration file.
5 1 Yingdi Yu
6 3 Yingdi Yu
The configuration file contains rules that will be applied by `Validator`. 
7
Here is an example of configuration file.
8
9
    rule
10 1 Yingdi Yu
    {
11 3 Yingdi Yu
      for data
12
      name "Simple Rule"
13
      type self-defined
14
      definition
15 1 Yingdi Yu
      {
16 3 Yingdi Yu
        target
17 1 Yingdi Yu
        {
18 3 Yingdi Yu
          type name
19
          name "/localhost/example"
20
          condition isPrefixOf
21 1 Yingdi Yu
        }
22 3 Yingdi Yu
        signer
23 1 Yingdi Yu
        {
24 3 Yingdi Yu
          type name
25
          rule "/ndn/edu/ucla/KEY/yingdi/ksk-1234/ID-CERT"
26
          condition equal
27 2 Yingdi Yu
        }
28
      }
29
    }
30 3 Yingdi Yu
    rule
31
    {
32
      for data
33
      name "Testbed Validation Rule"
34
      type hierarchical
35
      trust-anchor
36
      {
37
        type file
38
        file-name "testbed-trust-anchor.cert"
39
      }
40
    }
41 1 Yingdi Yu
42 3 Yingdi Yu
This configuration file consists of two rules.
43
Each rule has its own name (which should be unique in the configuration file).
44 1 Yingdi Yu