Shuo Chen | 478204c | 2014-03-18 18:27:04 -0700 | [diff] [blame] | 1 | repo |
| 2 | { |
Davide Pesavento | 4a16004 | 2020-04-13 16:50:02 -0400 | [diff] [blame] | 3 | ; Section defining the list of Data prefixes to register. |
| 4 | ; Additionally defines how many components off the end of these Data prefixes to insert into NFD. |
| 5 | ; The 'prefix' option can be repeated multiple times. |
Nick Gordon | 190e4dc | 2017-10-04 16:54:10 -0500 | [diff] [blame] | 6 | ; 'registration-subset' defines how many components to exclude. This includes the implicit digest |
Davide Pesavento | 4a16004 | 2020-04-13 16:50:02 -0400 | [diff] [blame] | 7 | ; at the end of the Data name. |
Shuo Chen | 478204c | 2014-03-18 18:27:04 -0700 | [diff] [blame] | 8 | data |
| 9 | { |
Nick Gordon | 190e4dc | 2017-10-04 16:54:10 -0500 | [diff] [blame] | 10 | registration-subset 2 |
Shuo Chen | 478204c | 2014-03-18 18:27:04 -0700 | [diff] [blame] | 11 | prefix "ndn:/example/data/1" |
| 12 | prefix "ndn:/example/data/2" |
| 13 | } |
| 14 | |
Davide Pesavento | 4a16004 | 2020-04-13 16:50:02 -0400 | [diff] [blame] | 15 | ; Section defining the list of command prefixes (to insert or delete Data) to register. |
Shuo Chen | 478204c | 2014-03-18 18:27:04 -0700 | [diff] [blame] | 16 | command |
| 17 | { |
Davide Pesavento | e9b09b8 | 2023-01-19 13:30:07 -0500 | [diff] [blame] | 18 | ; Only the 'prefix' option is allowed here and it can be repeated multiple times. |
Shuo Chen | 478204c | 2014-03-18 18:27:04 -0700 | [diff] [blame] | 19 | prefix "ndn:/example/repo/1" |
| 20 | prefix "ndn:/example/repo/2" |
| 21 | } |
| 22 | |
Davide Pesavento | 4a16004 | 2020-04-13 16:50:02 -0400 | [diff] [blame] | 23 | ; Section to specify where the data should be stored. |
Shuo Chen | 478204c | 2014-03-18 18:27:04 -0700 | [diff] [blame] | 24 | storage |
| 25 | { |
Davide Pesavento | 4a16004 | 2020-04-13 16:50:02 -0400 | [diff] [blame] | 26 | method "sqlite" ; Currently, only the sqlite storage engine is supported |
Davide Pesavento | 4162cc5 | 2019-01-25 01:32:30 -0500 | [diff] [blame] | 27 | path "/var/lib/ndn/repo-ng" ; Path to repo-ng storage folder |
Weiqi Shi | f0330d5 | 2014-07-09 10:54:27 -0700 | [diff] [blame] | 28 | max-packets 100000 |
Shuo Chen | 478204c | 2014-03-18 18:27:04 -0700 | [diff] [blame] | 29 | } |
| 30 | |
Davide Pesavento | 4a16004 | 2020-04-13 16:50:02 -0400 | [diff] [blame] | 31 | ; Section to configure the TCP bulk insert capability. |
| 32 | ; An empty section enables TCP bulk insert to listen on localhost, port 7376. |
Davide Pesavento | 4162cc5 | 2019-01-25 01:32:30 -0500 | [diff] [blame] | 33 | tcp_bulk_insert |
| 34 | { |
| 35 | ; host "localhost" ; Set to listen on a different IP address or hostname |
| 36 | ; port 7376 ; Set to listen on a different port number |
Shuo Chen | 478204c | 2014-03-18 18:27:04 -0700 | [diff] [blame] | 37 | } |
| 38 | |
| 39 | validator |
| 40 | { |
Weiqi Shi | f0330d5 | 2014-07-09 10:54:27 -0700 | [diff] [blame] | 41 | ; The following rule disables all security in the repo |
Davide Pesavento | 4162cc5 | 2019-01-25 01:32:30 -0500 | [diff] [blame] | 42 | trust-anchor |
| 43 | { |
| 44 | type any |
Shuo Chen | 5d9c419 | 2014-06-21 16:25:38 +0800 | [diff] [blame] | 45 | } |
Shuo Chen | c88c87d | 2014-06-25 20:21:02 +0800 | [diff] [blame] | 46 | |
Davide Pesavento | e9b09b8 | 2023-01-19 13:30:07 -0500 | [diff] [blame] | 47 | ; The following rules are examples to validate signed Interests for commands and data. |
| 48 | ; One can define their own rules for signed Interests and Data packets to be inserted |
| 49 | ; according to the Validator Configuration File Format. |
| 50 | ; See https://docs.named-data.net/ndn-cxx/current/tutorials/security-validator-config.html |
| 51 | ; |
Weiqi Shi | f0330d5 | 2014-07-09 10:54:27 -0700 | [diff] [blame] | 52 | ; rule |
| 53 | ; { |
Davide Pesavento | 4a16004 | 2020-04-13 16:50:02 -0400 | [diff] [blame] | 54 | ; id "Simple Rule For Interests" |
Weiqi Shi | f0330d5 | 2014-07-09 10:54:27 -0700 | [diff] [blame] | 55 | ; for interest |
| 56 | ; filter |
| 57 | ; { |
| 58 | ; type name |
| 59 | ; name /example/repo/1 |
| 60 | ; relation is-prefix-of |
| 61 | ; } |
| 62 | ; checker |
| 63 | ; { |
| 64 | ; type fixed-signer |
| 65 | ; sig-type rsa-sha256 |
| 66 | ; signer |
| 67 | ; { |
| 68 | ; type file |
Davide Pesavento | 4a16004 | 2020-04-13 16:50:02 -0400 | [diff] [blame] | 69 | ; ; repo-ng.cert.sample is a non-existent certificate. |
| 70 | ; ; One should create their certificates using the ndnsec tool. |
Weiqi Shi | f0330d5 | 2014-07-09 10:54:27 -0700 | [diff] [blame] | 71 | ; file-name "repo-ng.cert.sample" |
| 72 | ; } |
| 73 | ; } |
| 74 | ; } |
| 75 | ; |
| 76 | ; rule |
| 77 | ; { |
| 78 | ; id "Simple Rule For Data" |
| 79 | ; for data |
| 80 | ; filter |
| 81 | ; { |
| 82 | ; type name |
| 83 | ; name /example/data/1 |
| 84 | ; relation is-prefix-of |
| 85 | ; } |
| 86 | ; checker |
| 87 | ; { |
| 88 | ; type fixed-signer |
| 89 | ; sig-type rsa-sha256 |
| 90 | ; signer |
| 91 | ; { |
| 92 | ; type file |
Davide Pesavento | 4a16004 | 2020-04-13 16:50:02 -0400 | [diff] [blame] | 93 | ; ; repo-ng.cert.sample is a non-existent certificate. |
| 94 | ; ; One should create their certificates using the ndnsec tool. |
Weiqi Shi | f0330d5 | 2014-07-09 10:54:27 -0700 | [diff] [blame] | 95 | ; file-name "repo-ng.cert.sample" |
| 96 | ; } |
| 97 | ; } |
| 98 | ; } |
Shuo Chen | 478204c | 2014-03-18 18:27:04 -0700 | [diff] [blame] | 99 | } |
Davide Pesavento | 4162cc5 | 2019-01-25 01:32:30 -0500 | [diff] [blame] | 100 | } |