Obaid | 5748c0c | 2014-04-09 18:00:42 -0500 | [diff] [blame^] | 1 | security |
| 2 | { |
| 3 | ; Security section defines the trust model that NRD should use. It consists of rules and |
| 4 | ; trust-anchors, which are briefly defined in this file. For more details please see the |
| 5 | ; following wiki: |
| 6 | ; http://redmine.named-data.net/projects/ndn-cpp-dev/wiki/CommandValidatorConf |
| 7 | ; |
| 8 | ; A trust-anchor is a pre-trusted certificate. It is usually stored in a file in the |
| 9 | ; same directory as this config file. You can download the NDN testbed root certificate as the |
| 10 | ; trust anchor, or you can dump an existing certificate from your system as a trust anchor: |
| 11 | ; $ ndnsec cert-dump /example/certificate/name > trust-anchor.cert |
| 12 | ; or you can generate a self-signed certificate as a trust anchor: |
| 13 | ; $ ndnsec key-gen /example/identity/name > trust-anchor.cert |
| 14 | ; See comments in trust-anchor section for configuration details. |
| 15 | ; |
| 16 | ; A rule defines conditions a valid packet MUST have. A packet must satisfy one of the rules defined |
| 17 | ; here. A rule can be broken into two parts: matching & checking. A packet will be matched against |
| 18 | ; rules from the first to the last until a matched rule is encountered. The matched rule will be |
| 19 | ; used to check the packet. If a packet does not match any rule, it will be treated as invalid. |
| 20 | ; The matching part of a rule consists of `for` and `filter` sections. They collectively define |
| 21 | ; which packets can be checked with this rule. `for` defines packet type (data or interest), |
| 22 | ; while `filter` defines conditions on other properties of a packet. Right now, you can only |
| 23 | ; define conditions on packet name, and you can only specify ONLY ONE filter for packet name. |
| 24 | ; The checking part of a rule consists of `checker`, which defines the conditions that a VALID |
| 25 | ; packet MUST have. See comments in checker section for more details. |
| 26 | |
| 27 | rule |
| 28 | { |
| 29 | id "NRD Prefix Registration Command Rule" ; rule id |
| 30 | for interest ; this rule is used to validate interests |
| 31 | filter |
| 32 | { |
| 33 | type name ; condition on interest name (w/o signature) |
| 34 | regex ^[<localhop><localhost>]<nrd>[<register><unregister>]<>{3}$ |
| 35 | } |
| 36 | checker |
| 37 | { |
| 38 | type customized |
| 39 | sig-type rsa-sha256 ; interest must have a rsa-sha256 signature |
| 40 | key-locator |
| 41 | { |
| 42 | type name ; key locator must be the certificate name of |
| 43 | ; the signing key |
| 44 | regex ^[^<KEY>]*<KEY><>*<ksk-.*><ID-CERT>$ |
| 45 | } |
| 46 | } |
| 47 | } |
| 48 | rule |
| 49 | { |
| 50 | id "Testbed Hierarchy Rule" ; rule id |
| 51 | for data ; this rule is used to validate data |
| 52 | filter |
| 53 | { |
| 54 | type name ; condition on data name |
| 55 | regex ^[^<KEY>]*<KEY><>*<ksk-.*><ID-CERT><>$ |
| 56 | } |
| 57 | checker |
| 58 | { |
| 59 | type hierarchical ; the certificate name of the signing key and |
| 60 | ; the data name must follow the hierarchical model |
| 61 | sig-type rsa-sha256 ; data must have a rsa-sha256 signature |
| 62 | } |
| 63 | } |
| 64 | trust-anchor |
| 65 | { |
| 66 | type file ; trust anchor is stored in a file |
| 67 | file-name "trust-anchor.cert" ; the file name, by default this file should be placed in the |
| 68 | ; same folder as this config file. |
| 69 | } |
| 70 | } |