Alexander Afanasyev | 7c6aeb0 | 2014-04-10 19:59:19 -0700 | [diff] [blame] | 1 | Validator Configuration File Format |
| 2 | =================================== |
| 3 | |
| 4 | You can set up a ``Validator`` via a configuration file. Next, we will |
| 5 | show you how to write a configuration file. |
| 6 | |
| 7 | The configuration file consists of **rules** and **trust-anchors** that |
| 8 | will be used in validation. **Rules** tell the validator how to validate |
| 9 | a packet, while **trust-anchors** tell the validator which certificates |
| 10 | are valid immediately. Here is an example of configuration file |
| 11 | containing two rules. |
| 12 | |
| 13 | :: |
| 14 | |
| 15 | rule |
| 16 | { |
| 17 | id "Simple Rule" |
| 18 | for data |
| 19 | filter |
| 20 | { |
| 21 | type name |
| 22 | name /localhost/example |
| 23 | relation is-prefix-of |
| 24 | } |
| 25 | checker |
| 26 | { |
| 27 | type customized |
| 28 | sig-type rsa-sha256 |
| 29 | key-locator |
| 30 | { |
| 31 | type name |
| 32 | name /ndn/edu/ucla/KEY/yingdi/ksk-1234/ID-CERT |
| 33 | relation equal |
| 34 | } |
| 35 | } |
| 36 | } |
| 37 | rule |
| 38 | { |
| 39 | id "Testbed Validation Rule" |
| 40 | for data |
| 41 | checker |
| 42 | { |
| 43 | type hierarchical |
| 44 | sig-type rsa-sha256 |
| 45 | } |
| 46 | } |
| 47 | trust-anchor |
| 48 | { |
| 49 | type file |
| 50 | file-name "testbed-trust-anchor.cert" |
| 51 | } |
| 52 | |
| 53 | - \ **ATTENTION: The order of rules MATTERS!**\ |
| 54 | |
| 55 | A rule can be broken into two parts: |
| 56 | |
| 57 | - The first part is to qualify packets to which the rule can be |
| 58 | applied; |
| 59 | - The second part is to check whether further validation process is |
| 60 | necessary. |
| 61 | |
| 62 | When receiving a packet, the validator will apply rules in the |
| 63 | configuration file one-by-one against the packet, until finding a rule |
| 64 | that the packet qualifies for. And the second part of the matched rule |
| 65 | will be used to check the validity of the packet. If the packet cannot |
| 66 | qualify for any rules, it is treated as an invalid packet. Once a packet |
| 67 | has been matched by a rule, the rest rules will not be applied against |
| 68 | the packet. Therefore, you should always put the most specific rule to |
| 69 | the top, otherwise it will become useless. |
| 70 | |
| 71 | In the example configuration, the first rule indicates that all the data |
| 72 | packets under the name prefix "/localhost/example" must be signed by a |
| 73 | key whose certificate name is |
| 74 | "/ndn/edu/ucla/KEY/yingdi/ksk-1234/ID-CERT". If a packet does not have a |
| 75 | name under prefix "/localhost/example", validator will skip the first |
| 76 | rule and apply the second rule. The second rule indicates that any data |
| 77 | packets must be validated along a hierarchy. And a certificate stored in |
| 78 | a file "testbed-trust-anchor.cert" is valid. |
| 79 | |
| 80 | Rules in general |
| 81 | ---------------- |
| 82 | |
| 83 | A rule has four types of properties: **id**, **for**, **filter**, and |
| 84 | **checker**. |
| 85 | |
| 86 | The property **id** uniquely identifies the rule in the configuration |
| 87 | file. As long as being unique, any name can be given to a rule, e.g., |
| 88 | "Simple Rule", "Testbed Validation Rule". A rule must have one and only |
| 89 | one **id** property. |
| 90 | |
| 91 | A rule is either used to validate an interest packet or a data packet. |
| 92 | This information is specified in the property **for**. Only two value |
| 93 | can be specified: **data** and **interest**. A rule must have one and |
| 94 | only one **for** property. |
| 95 | |
| 96 | The property **filter** further constrains the packets that can be |
| 97 | checked by the rule. Filter property is not required in a rule, in this |
| 98 | case, the rule will capture all the packets passed to it. A rule may |
| 99 | contain more than one filters, in this case, a packet can be checked by |
| 100 | a rule only if the packet satisfies all the filters. |
| 101 | |
| 102 | - \ **ATTENTION: A packet that satisfies all the filters may not be |
| 103 | valid**\ . |
| 104 | |
| 105 | The property **checker** defines the conditions that a matched packet |
| 106 | must fulfill to be treated as a valid packet. A rule must have at least |
| 107 | one **checker** property, a packet is treated as invalid if it cannot |
| 108 | pass none of the checkers. |
| 109 | |
| 110 | **filter** and **checker** have their own properties. Next, we will |
| 111 | introduce them separately. |
| 112 | |
| 113 | Filter Property |
| 114 | --------------- |
| 115 | |
| 116 | Filter has its own **type** property. Although a rule may contain more |
| 117 | than one filters, there is at most one filter of each type. So far, only |
| 118 | one type of filter is defined: **name**. In other word, only one filter |
| 119 | can be specified in a rule for now. |
| 120 | |
| 121 | Name Filter |
| 122 | ~~~~~~~~~~~ |
| 123 | |
| 124 | There are two ways to express the conditions on name. The first way is |
| 125 | to specify a relationship between the packet name and a particular name. |
| 126 | In this case, two more properties are required: **name** and |
| 127 | **relation**. A packet can fulfill the condition if the **name** has a |
| 128 | **relation\* to the packet name. Three types of **\ relation\*\* has |
| 129 | been defined: **equal**, **is-prefix-of**, **is-strict-prefix-of**. For |
| 130 | example, a filter |
| 131 | |
| 132 | :: |
| 133 | |
| 134 | filter |
| 135 | { |
| 136 | type name |
| 137 | name /localhost/example |
| 138 | relation equal |
| 139 | } |
| 140 | |
| 141 | shall only capture a packet with the exact name "/localhost/example". |
| 142 | And a filter |
| 143 | |
| 144 | :: |
| 145 | |
| 146 | filter |
| 147 | { |
| 148 | type name |
| 149 | name /localhost/example |
| 150 | relation is-prefix-of |
| 151 | } |
| 152 | |
| 153 | shall capture a packet with name "/localhost/example" or |
| 154 | "/localhost/example/data", but cannot catch a packet with name |
| 155 | "/localhost/another\_example". And a filter |
| 156 | |
| 157 | :: |
| 158 | |
| 159 | filter |
| 160 | { |
| 161 | type name |
| 162 | name /localhost/example |
| 163 | relation is-strict-prefix-of |
| 164 | } |
| 165 | |
| 166 | shall capture a packet with name "/localhost/example/data", but cannot |
| 167 | catch a packet with name "/localhost/example". |
| 168 | |
| 169 | The second way is to specify an [[Regex\|NDN Regular Expression]] that |
| 170 | can match the packet. In this case, only one property **regex** is |
| 171 | required. For example, a filter |
| 172 | |
| 173 | :: |
| 174 | |
| 175 | filter |
| 176 | { |
| 177 | type name |
| 178 | regex ^[^<KEY>]*<KEY><>*<ksk-.*><ID-CERT>$ |
| 179 | } |
| 180 | |
| 181 | shall capture all the identity certificates. |
| 182 | |
| 183 | Checker Property |
| 184 | ---------------- |
| 185 | |
| 186 | Passing all the filters in a rule only indicates that a packet can be |
| 187 | checked using the rule, and it does not necessarily implies that the |
| 188 | packet is valid. The validity of a packet is determined by the property |
| 189 | **checker**, which defines the conditions that a valid packet must |
| 190 | fulfill. |
| 191 | |
| 192 | Same as **filter**, **checker** has a property **type**. We have defined |
| 193 | three types of checkers: **customized**, and **hierarchical**, and |
| 194 | **fixed-signer**. As suggested by its name, **customized** checker |
| 195 | allows you to customize the conditions according to specific |
| 196 | requirements. **hierarchical** checker and **fixed-signer** checker are |
| 197 | pre-defined shortcuts, which specify specific trust models separately. |
| 198 | |
| 199 | Customized Checker |
| 200 | ~~~~~~~~~~~~~~~~~~ |
| 201 | |
| 202 | So far, we only allow three customized properties in a customized |
| 203 | checker: **sig-type**, **key-locator**. All of them are related to the |
| 204 | ``SignatureInfo`` of a packet. |
| 205 | |
| 206 | :: |
| 207 | |
| 208 | checker |
| 209 | { |
| 210 | type customized |
| 211 | sig-type ... |
| 212 | key-locator |
| 213 | { |
| 214 | ... |
| 215 | } |
| 216 | } |
| 217 | |
Yingdi Yu | 5ec0ee3 | 2014-06-24 16:26:09 -0700 | [diff] [blame] | 218 | The property **sig-type** specifies the acceptable signature type. |
| 219 | Right now three signature types have been defined: **rsa-sha256** and |
| 220 | **ecdsa-sha256** (which are strong signature types) and **sha256** |
| 221 | (which is a weak signature type). |
Alexander Afanasyev | 7c6aeb0 | 2014-04-10 19:59:19 -0700 | [diff] [blame] | 222 | If sig-type is sha256, then **key-locator** will be ignored. Validator |
| 223 | will simply calculate the digest of a packet and compare it with the one |
Yingdi Yu | 5ec0ee3 | 2014-06-24 16:26:09 -0700 | [diff] [blame] | 224 | in ``SignatureValue``. If sig-type is rsa-sha256 or ecdsa-sha256, you |
| 225 | have to further customize the checker with **key-locator**. |
Alexander Afanasyev | 7c6aeb0 | 2014-04-10 19:59:19 -0700 | [diff] [blame] | 226 | |
| 227 | The property **key-locator** which specifies the conditions on |
| 228 | ``KeyLocator``. If the **key-locator** property is specified, it |
| 229 | requires the existence of the ``KeyLocator`` field in ``SignatureInfo``. |
| 230 | Although there are more than one types of ``KeyLocator`` defined in the |
| 231 | `Packet Format <http://named-data.net/doc/ndn-tlv/signature.html>`__, |
| 232 | **key-locator** property only supports one type: **name**: |
| 233 | |
| 234 | :: |
| 235 | |
| 236 | key-locator |
| 237 | { |
| 238 | type name |
| 239 | ... |
| 240 | } |
| 241 | |
| 242 | Such a key-locator property specifies the conditions on the certificate |
| 243 | name of the signing key. Since the conditions are about name, they can |
| 244 | be specified in the same way as the name filter. For example, a checker |
| 245 | could be: |
| 246 | |
| 247 | :: |
| 248 | |
| 249 | checker |
| 250 | { |
| 251 | type customized |
| 252 | sig-type rsa-sha256 |
| 253 | key-locator |
| 254 | { |
| 255 | type name |
| 256 | name /ndn/edu/ucla/KEY/yingdi/ksk-1234/ID-CERT |
| 257 | relation equal |
| 258 | } |
| 259 | } |
| 260 | |
| 261 | This checker property requires that the packet must have a rsa-sha256 |
| 262 | signature generated by a key whose certificate name is |
| 263 | "/ndn/edu/ucla/KEY/yingdi/ksk-1234/ID-CERT". |
| 264 | |
| 265 | Besides the two ways to express conditions on the ``KeyLocator`` name |
| 266 | (name and regex), you can further constrain the ``KeyLocator`` name |
| 267 | using the information extracted from the packet name. This third type of |
| 268 | condition is expressed via a property **hyper-relation**. The |
| 269 | **hyper-relation** property consists of three parts: |
| 270 | |
| 271 | - an NDN regular expression that can extract information from packet |
| 272 | name |
| 273 | - an NDN regular expression that can extract information from |
| 274 | ``KeyLocator`` name |
| 275 | - relation from the part extracted from ``KeyLocator`` name to the one |
| 276 | extracted from the packet name |
| 277 | |
| 278 | For example, a checker: |
| 279 | |
| 280 | :: |
| 281 | |
| 282 | checker |
| 283 | { |
| 284 | type customized |
| 285 | sig-type rsa-sha256 |
| 286 | key-locator |
| 287 | { |
| 288 | type name |
| 289 | hyper-relation |
| 290 | { |
| 291 | k-regex ^([^<KEY>]*)<KEY>(<>*)<ksk-.*><ID-CERT>$ |
| 292 | k-expand \\1\\2 |
| 293 | h-relation is-prefix-of |
| 294 | p-regex ^(<>*)$ |
| 295 | p-expand \\1 |
| 296 | |
| 297 | } |
| 298 | } |
| 299 | } |
| 300 | |
| 301 | requires the packet name must be under the corresponding namespace of |
| 302 | the ``KeyLocator`` name. |
| 303 | |
| 304 | In some cases, you can even customize checker with another property For |
| 305 | example: |
| 306 | |
| 307 | :: |
| 308 | |
| 309 | checker |
| 310 | { |
| 311 | type customized |
| 312 | sig-type rsa-sha256 |
| 313 | key-locator |
| 314 | { |
| 315 | type name |
| 316 | hyper-relation |
| 317 | { |
| 318 | k-regex ^([^<KEY>]*)<KEY>(<>*)<ksk-.*><ID-CERT>$ |
| 319 | k-expand \\1\\2 |
| 320 | h-relation is-prefix-of |
| 321 | p-regex ^(<>*)$ |
| 322 | p-expand \\1 |
| 323 | } |
| 324 | } |
| 325 | } |
| 326 | |
| 327 | Hierarchical Checker |
| 328 | ~~~~~~~~~~~~~~~~~~~~ |
| 329 | |
| 330 | As implied by its name, hierarchical checker requires that the packet |
| 331 | name must be under the namespace of the packet signer. A hierarchical |
| 332 | checker: |
| 333 | |
| 334 | :: |
| 335 | |
| 336 | checker |
| 337 | { |
| 338 | type hierarchical |
| 339 | sig-type rsa-sha256 |
| 340 | } |
| 341 | |
| 342 | is equivalent to a customized checker: |
| 343 | |
| 344 | :: |
| 345 | |
| 346 | checker |
| 347 | { |
| 348 | type customized |
| 349 | sig-type rsa-sha256 |
| 350 | key-locator |
| 351 | { |
| 352 | type name |
| 353 | hyper-relation |
| 354 | { |
| 355 | k-regex ^([^<KEY>]*)<KEY>(<>*)<ksk-.*><ID-CERT>$ |
| 356 | k-expand \\1\\2 |
| 357 | h-relation is-prefix-of |
| 358 | p-regex ^(<>*)$ |
| 359 | p-expand \\1 |
| 360 | } |
| 361 | } |
| 362 | } |
| 363 | |
| 364 | Fixed-Signer Checker |
| 365 | ~~~~~~~~~~~~~~~~~~~~ |
| 366 | |
| 367 | In some cases, you only accept packets signed with pre-trusted |
| 368 | certificates, i.e. "one-step validation". Such a trust model can be |
| 369 | expressed with **fixed-signer** checker. And you only need to specify |
| 370 | the trusted certificate via property **signer**. The definition of |
| 371 | **signer** is the same as **trust-anchor**. For example: |
| 372 | |
| 373 | :: |
| 374 | |
| 375 | checker |
| 376 | { |
| 377 | type fixed-signer |
| 378 | sig-type rsa-sha256 |
| 379 | signer |
| 380 | { |
| 381 | type file |
| 382 | file-name "trusted-signer.cert" |
| 383 | } |
| 384 | signer |
| 385 | { |
| 386 | type base64 |
| 387 | base64-string "Bv0DGwdG...amHFvHIMDw==" |
| 388 | } |
| 389 | } |
| 390 | |
Alexander Afanasyev | d36dd55 | 2014-06-30 12:42:46 -0700 | [diff] [blame] | 391 | .. _validator-conf-trust-anchors: |
| 392 | |
Alexander Afanasyev | 7c6aeb0 | 2014-04-10 19:59:19 -0700 | [diff] [blame] | 393 | Trust Anchors |
| 394 | ------------- |
| 395 | |
| 396 | Although **trust-anchor** is always not required in the configuration |
| 397 | file (for example, if fixed-signer checker is used), it is very common |
| 398 | to have a few trust-anchors in the configuration file, otherwise most |
| 399 | packets cannot be validated. A configuration file may contain more than |
| 400 | one trust anchors, but the order of trust anchors does not matter. The |
| 401 | structure of trust-anchor is same as the **signer** in fixed-signer |
| 402 | checker, for example: |
| 403 | |
| 404 | :: |
| 405 | |
| 406 | trust-anchor |
| 407 | { |
| 408 | type file |
| 409 | file-name "trusted-signer.cert" |
| 410 | } |
| 411 | trust-anchor |
| 412 | { |
| 413 | type base64 |
| 414 | base64-string "Bv0DGwdG...amHFvHIMDw==" |
| 415 | } |
| 416 | |
Yingdi Yu | b465065 | 2014-04-17 10:19:59 -0700 | [diff] [blame] | 417 | You may also specify a trust-anchor directory. All certificates under this |
| 418 | directory are taken as trust anchors. For example, if all trust anchors are |
| 419 | put into ``/usr/local/etc/ndn/keys``. |
| 420 | |
| 421 | :: |
| 422 | |
| 423 | trust-anchor |
| 424 | { |
| 425 | type dir |
| 426 | file-name /usr/local/etc/ndn/keys |
| 427 | } |
| 428 | |
| 429 | If certificates under the directory might be changed during runtime, you can |
| 430 | set a refresh period, such as |
| 431 | |
| 432 | :: |
| 433 | |
| 434 | trust-anchor |
| 435 | { |
| 436 | type dir |
| 437 | file-name /usr/local/etc/ndn/keys |
| 438 | refresh 1h ; refresh certificates every hour, other units include m (for minutes) and s (for seconds) |
| 439 | } |
| 440 | |
| 441 | There is another special trust anchor **any**. |
Yingdi Yu | 44d190c | 2014-04-16 17:05:46 -0700 | [diff] [blame] | 442 | As long as such a trust-anchor is defined in config file, |
| 443 | packet validation will be turned off. |
| 444 | |
| 445 | - **ATTENTION: This type of trust anchor is dangerous. |
| 446 | You should used it only when you want to disable packet validation temporarily |
| 447 | (e.g, debugging code, building a demo).** |
| 448 | |
| 449 | :: |
| 450 | |
| 451 | trust-anchor |
| 452 | { |
| 453 | type any |
| 454 | } |
| 455 | |
Yingdi Yu | b465065 | 2014-04-17 10:19:59 -0700 | [diff] [blame] | 456 | |
Alexander Afanasyev | 7c6aeb0 | 2014-04-10 19:59:19 -0700 | [diff] [blame] | 457 | Example Configuration For NLSR |
| 458 | ------------------------------ |
| 459 | |
| 460 | The trust model of NLSR is semi-hierarchical. An example certificate |
| 461 | signing hierarchy is: |
| 462 | |
| 463 | :: |
| 464 | |
| 465 | root |
| 466 | | |
| 467 | +--------------+---------------+ |
| 468 | site1 site2 |
| 469 | | | |
| 470 | +---------+---------+ + |
| 471 | operator1 operator2 operator3 |
| 472 | | | | |
| 473 | +-----+-----+ +----+-----+ +-----+-----+--------+ |
| 474 | router1 router2 router3 router4 router5 router6 router7 |
| 475 | | | | | | | | |
| 476 | + + + + + + + |
| 477 | NLSR NSLR NSLR NSLR NSLR NSLR NSLR |
| 478 | |
| 479 | However, entities name may not follow the signing hierarchy, for |
| 480 | example: |
| 481 | |
Alexander Afanasyev | 3aeeaeb | 2014-04-22 23:34:23 -0700 | [diff] [blame] | 482 | +------------+-------------------------------------------------------------------------------------+ |
| 483 | | Entity | Identity name and examples | |
| 484 | +============+=====================================================================================+ |
| 485 | | root | ``/<network>`` | |
| 486 | | | | |
| 487 | | | Identity example: ``/ndn`` | |
| 488 | | | | |
| 489 | | | Certificate name example: ``/ndn/KEY/ksk-1/ID-CERT/%01`` | |
| 490 | +------------+-------------------------------------------------------------------------------------+ |
| 491 | | site | ``/<network>/<site>`` | |
| 492 | | | | |
| 493 | | | Identity example: ``/ndn/edu/ucla`` | |
| 494 | | | | |
| 495 | | | Certificate name example: ``/ndn/edu/ucla/KEY/ksk-2/ID-CERT/%01`` | |
| 496 | +------------+-------------------------------------------------------------------------------------+ |
| 497 | | operator | ``/<network>/<site>/%C1.O.N./<operator-id>`` | |
| 498 | | | | |
| 499 | | | Identity example: ``/ndn/edu/ucla/%C1.O.N./op1`` | |
| 500 | | | | |
| 501 | | | Certificate name example: ``/ndn/edu/ucla/%C1.O.N./op1/KEY/ksk-3/ID-CERT/%01`` | |
| 502 | +------------+-------------------------------------------------------------------------------------+ |
| 503 | | router | ``/<network>/<site>/%C1.O.R./<router-id>`` | |
| 504 | | | | |
| 505 | | | Identity example: ``/ndn/edu/ucla/%C1.O.R./rt1`` | |
| 506 | | | | |
| 507 | | | Certificate name example: ``/ndn/edu/ucla/%C1.O.R./rt1/KEY/ksk-4/ID-CERT/%01`` | |
| 508 | +------------+-------------------------------------------------------------------------------------+ |
| 509 | | NLSR | ``/<network>/<site>/%C1.O.R./<router-id>/NLSR`` | |
| 510 | | | | |
| 511 | | | Identity example: ``/ndn/edu/ucla/%C1.O.R./rt1/NLSR`` | |
| 512 | | | | |
| 513 | | | Certificate name example: ``/ndn/edu/ucla/%C1.O.R./rt1/NLSR/KEY/ksk-5/ID-CERT/%01`` | |
| 514 | +------------+-------------------------------------------------------------------------------------+ |
Alexander Afanasyev | 7c6aeb0 | 2014-04-10 19:59:19 -0700 | [diff] [blame] | 515 | |
| 516 | Assume that a typical NLSR data name is |
| 517 | ``/ndn/edu/ucla/%C1.O.R./rt1/NLSR/LSA/LSType.1/%01``. Then, the exception |
| 518 | of naming hierarchy is "operator-router". So we can write a |
| 519 | configuration file with three rules. The first one is a customized rule |
| 520 | that capture the normal NLSR data. The second one is a customized rule |
| 521 | that handles the exception case of the hierarchy (operator->router). And |
| 522 | the last one is a hierarchical rule that handles the normal cases of the |
| 523 | hierarchy. |
| 524 | |
| 525 | We put the NLSR data rule to the first place, because NLSR data packets |
| 526 | are the most frequently checked. The hierarchical exception rule is put |
| 527 | to the second, because it is more specific than the last one. |
| 528 | |
| 529 | And here is the configuration file: |
| 530 | |
| 531 | :: |
| 532 | |
| 533 | rule |
| 534 | { |
| 535 | id "NSLR LSA Rule" |
| 536 | for data |
| 537 | filter |
| 538 | { |
| 539 | type name |
| 540 | regex ^[^<NLSR><LSA>]*<NLSR><LSA> |
| 541 | } |
| 542 | checker |
| 543 | { |
| 544 | type customized |
| 545 | sig-type rsa-sha256 |
| 546 | key-locator |
| 547 | { |
| 548 | type name |
| 549 | hyper-relation |
| 550 | { |
| 551 | k-regex ^([^<KEY>]*)<KEY><ksk-.*><ID-CERT>$ |
| 552 | k-expand \\1 |
| 553 | h-relation equal |
| 554 | p-regex ^([^<NLSR><LSA>]*)<NLSR><LSA><LSType\.\d><>$ |
| 555 | p-expand \\1 |
| 556 | } |
| 557 | } |
| 558 | } |
| 559 | } |
| 560 | rule |
| 561 | { |
| 562 | id "NSLR Hierarchy Exception Rule" |
| 563 | for data |
| 564 | filter |
| 565 | { |
| 566 | type name |
| 567 | regex ^[^<KEY><%C1.O.R.>]*<%C1.O.R.><><KEY><ksk-.*><ID-CERT><>$ |
| 568 | } |
| 569 | checker |
| 570 | { |
| 571 | type customized |
| 572 | sig-type rsa-sha256 |
| 573 | key-locator |
| 574 | { |
| 575 | type name |
| 576 | hyper-relation |
| 577 | { |
| 578 | k-regex ^([^<KEY><%C1.O.N.>]*)<%C1.O.N.><><KEY><ksk-.*><ID-CERT>$ |
| 579 | k-expand \\1 |
| 580 | h-relation equal |
| 581 | p-regex ^([^<KEY><%C1.O.R.>]*)<%C1.O.R.><><KEY><ksk-.*><ID-CERT><>$ |
| 582 | p-expand \\1 |
| 583 | } |
| 584 | } |
| 585 | } |
| 586 | } |
| 587 | rule |
| 588 | { |
| 589 | id "NSLR Hierarchical Rule" |
| 590 | for data |
| 591 | filter |
| 592 | { |
| 593 | type name |
| 594 | regex ^[^<KEY>]*<KEY><ksk-.*><ID-CERT><>$ |
| 595 | } |
| 596 | checker |
| 597 | { |
| 598 | type hierarchical |
| 599 | sig-type rsa-sha256 |
| 600 | } |
| 601 | } |
| 602 | trust-anchor |
| 603 | { |
| 604 | type file |
| 605 | file-name "testbed-trust-anchor.cert" |
| 606 | } |
| 607 | |
| 608 | Example Configuration For NRD |
| 609 | ----------------------------- |
| 610 | |
| 611 | Assume NRD allows any valid testbed certificate to register prefix, the |
| 612 | configuration file could be written as: |
| 613 | |
| 614 | :: |
| 615 | |
| 616 | rule |
| 617 | { |
| 618 | id "NRD Prefix Registration Command Rule" |
| 619 | for interest |
| 620 | filter |
| 621 | { |
| 622 | type name |
| 623 | regex ^<localhost><nrd>[<register><unregister><advertise><withdraw>] |
| 624 | } |
| 625 | checker |
| 626 | { |
| 627 | type customized |
| 628 | sig-type rsa-sha256 |
| 629 | key-locator |
| 630 | { |
| 631 | type name |
| 632 | regex ^[^<KEY>]*<KEY><>*<ksk-.*><ID-CERT>$ |
| 633 | } |
| 634 | } |
| 635 | } |
| 636 | rule |
| 637 | { |
| 638 | id "Testbed Hierarchy Rule" |
| 639 | for data |
| 640 | filter |
| 641 | { |
| 642 | type name |
| 643 | regex ^[^<KEY>]*<KEY><>*<ksk-.*><ID-CERT><>$ |
| 644 | } |
| 645 | checker |
| 646 | { |
| 647 | type hierarchical |
| 648 | sig-type rsa-sha256 |
| 649 | } |
| 650 | } |
| 651 | trust-anchor |
| 652 | { |
| 653 | type file |
| 654 | file-name "testbed-trust-anchor.cert" |
| 655 | } |