nsec3_auth.feature 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. Feature: NSEC3 Authoritative service
  2. This feature tests NSEC3 as defined in RFC5155, using the example
  3. zone from appendix A and testing responses appendix B.
  4. Additional tests can be added as well
  5. # Data is taken directly from RFC5155; with 1 changes:
  6. # inserted whitespace in base64 output where it is inserted by dig
  7. Scenario: B.1. Name Error
  8. Given I have bind10 running with configuration nsec3/nsec3_auth.config
  9. A dnssec query for a.c.x.w.example. should have rcode NXDOMAIN
  10. The last query response should have flags qr aa rd
  11. # TODO: check DO bit?
  12. The last query response should have ancount 0
  13. The last query response should have nscount 8
  14. The last query response should have adcount 1
  15. The authority section of the last query response should be
  16. """
  17. example. 3600 IN SOA ns1.example. bugs.x.w.example. 1 3600 300 3600000 3600
  18. example. 3600 IN RRSIG SOA 7 1 3600 20150420235959 20051021000000 40430 example. Hu25UIyNPmvPIVBrldN+9Mlp9Zql39qaUd8iq4ZLlYWfUUbbAS41pG+6 8z81q1xhkYAcEyHdVI2LmKusbZsT0Q==
  19. 0p9mhaveqvm6t7vbl5lop2u3t2rp3tom.example. 3600 IN NSEC3 1 1 12 aabbccdd 2t7b4g4vsa5smi47k61mv5bv1a22bojr NS SOA MX RRSIG DNSKEY NSEC3PARAM
  20. 0p9mhaveqvm6t7vbl5lop2u3t2rp3tom.example. 3600 IN RRSIG NSEC3 7 2 3600 20150420235959 20051021000000 40430 example. OSgWSm26B+cS+dDL8b5QrWr/dEWhtCsKlwKLIBHYH6blRxK9rC0bMJPw Q4mLIuw85H2EY762BOCXJZMnpuwhpA==
  21. b4um86eghhds6nea196smvmlo4ors995.example. 3600 IN NSEC3 1 1 12 aabbccdd gjeqe526plbf1g8mklp59enfd789njgi MX RRSIG
  22. b4um86eghhds6nea196smvmlo4ors995.example. 3600 IN RRSIG NSEC3 7 2 3600 20150420235959 20051021000000 40430 example. ZkPG3M32lmoHM6pa3D6gZFGB/rhL//Bs3Omh5u4m/CUiwtblEVOaAKKZ d7S959OeiX43aLX3pOv0TSTyiTxIZg==
  23. 35mthgpgcu1qg68fab165klnsnk3dpvl.example. 3600 IN NSEC3 1 1 12 aabbccdd b4um86eghhds6nea196smvmlo4ors995 NS DS RRSIG
  24. 35mthgpgcu1qg68fab165klnsnk3dpvl.example. 3600 IN RRSIG NSEC3 7 2 3600 20150420235959 20051021000000 40430 example. g6jPUUpduAJKRljUsN8gB4UagAX0NxY9shwQAynzo8EUWH+z6hEIBlUT PGj15eZll6VhQqgZXtAIR3chwgW+SA==
  25. """
  26. Scenario: B.2. No Data Error
  27. Given I have bind10 running with configuration nsec3/nsec3_auth.config
  28. A dnssec query for ns1.example. type MX should have rcode NOERROR
  29. The last query response should have flags qr aa rd
  30. # TODO: check DO bit?
  31. The last query response should have ancount 0
  32. The last query response should have nscount 4
  33. The last query response should have adcount 1
  34. The authority section of the last query response should be
  35. """
  36. example. 3600 IN SOA ns1.example. bugs.x.w.example. 1 3600 300 3600000 3600
  37. example. 3600 IN RRSIG SOA 7 1 3600 20150420235959 20051021000000 40430 example. Hu25UIyNPmvPIVBrldN+9Mlp9Zql39qaUd8iq4ZLlYWfUUbbAS41pG+6 8z81q1xhkYAcEyHdVI2LmKusbZsT0Q==
  38. 2t7b4g4vsa5smi47k61mv5bv1a22bojr.example. 3600 IN NSEC3 1 1 12 aabbccdd 2vptu5timamqttgl4luu9kg21e0aor3s A RRSIG
  39. 2t7b4g4vsa5smi47k61mv5bv1a22bojr.example. 3600 IN RRSIG NSEC3 7 2 3600 20150420235959 20051021000000 40430 example. OmBvJ1Vgg1hCKMXHFiNeIYHK9XVW0iLDLwJN4TFoNxZuP03gAXEI634Y wOc4YBNITrj413iqNI6mRk/r1dOSUw==
  40. """
  41. Scenario: B2.1. No Data Error, Empty Non-Terminal
  42. Given I have bind10 running with configuration nsec3/nsec3_auth.config
  43. A dnssec query for y.w.example. should have rcode NOERROR
  44. The last query response should have flags qr aa rd
  45. # TODO: check DO bit?
  46. The last query response should have ancount 0
  47. The last query response should have nscount 4
  48. The last query response should have adcount 1
  49. The authority section of the last query response should be
  50. """
  51. example. 3600 IN SOA ns1.example. bugs.x.w.example. 1 3600 300 3600000 3600
  52. example. 3600 IN RRSIG SOA 7 1 3600 20150420235959 20051021000000 40430 example. Hu25UIyNPmvPIVBrldN+9Mlp9Zql39qaUd8iq4ZLlYWfUUbbAS41pG+6 8z81q1xhkYAcEyHdVI2LmKusbZsT0Q==
  53. ji6neoaepv8b5o6k4ev33abha8ht9fgc.example. 3600 IN NSEC3 1 1 12 aabbccdd k8udemvp1j2f7eg6jebps17vp3n8i58h
  54. ji6neoaepv8b5o6k4ev33abha8ht9fgc.example. 3600 IN RRSIG NSEC3 7 2 3600 20150420235959 20051021000000 40430 example. gPkFp1s2QDQ6wQzcg1uSebZ61W33rUBDcTj72F3kQ490fEdp7k1BUIfb cZtPbX3YCpE+sIt0MpzVSKfTwx4uYA==
  55. """
  56. Scenario: B.3. Referral to an Opt-Out Unsigned Zone
  57. Given I have bind10 running with configuration nsec3/nsec3_auth.config
  58. A dnssec query for mc.c.example. type MX should have rcode NOERROR
  59. The last query response should have flags qr rd
  60. # TODO: check DO bit?
  61. The last query response should have ancount 0
  62. The last query response should have nscount 6
  63. The last query response should have adcount 3
  64. The authority section of the last query response should be
  65. """
  66. c.example. 3600 IN NS ns1.c.example.
  67. c.example. 3600 IN NS ns2.c.example.
  68. 35mthgpgcu1qg68fab165klnsnk3dpvl.example. 3600 IN NSEC3 1 1 12 aabbccdd b4um86eghhds6nea196smvmlo4ors995 NS DS RRSIG
  69. 35mthgpgcu1qg68fab165klnsnk3dpvl.example. 3600 IN RRSIG NSEC3 7 2 3600 20150420235959 20051021000000 40430 example. g6jPUUpduAJKRljUsN8gB4UagAX0NxY9shwQAynzo8EUWH+z6hEIBlUT PGj15eZll6VhQqgZXtAIR3chwgW+SA==
  70. 0p9mhaveqvm6t7vbl5lop2u3t2rp3tom.example. 3600 IN NSEC3 1 1 12 aabbccdd 2t7b4g4vsa5smi47k61mv5bv1a22bojr NS SOA MX RRSIG DNSKEY NSEC3PARAM
  71. 0p9mhaveqvm6t7vbl5lop2u3t2rp3tom.example. 3600 IN RRSIG NSEC3 7 2 3600 20150420235959 20051021000000 40430 example. OSgWSm26B+cS+dDL8b5QrWr/dEWhtCsKlwKLIBHYH6blRxK9rC0bMJPw Q4mLIuw85H2EY762BOCXJZMnpuwhpA==
  72. """
  73. The additional section of the last query response should be
  74. """
  75. ns1.c.example. 3600 IN A 192.0.2.7
  76. ns2.c.example. 3600 IN A 192.0.2.8
  77. """
  78. Scenario: B.4. Wildcard Expansion
  79. Given I have bind10 running with configuration nsec3/nsec3_auth.config
  80. A dnssec query for a.z.w.example. type MX should have rcode NOERROR
  81. The last query response should have flags qr aa rd
  82. # TODO: check DO bit?
  83. # BUG: NO RRSIG IN WILDCARD RESPONSE!!!
  84. #The last query response should have ancount 2
  85. The last query response should have nscount 5
  86. The last query response should have adcount 9
  87. #The answer section of the last query response should be
  88. #"""
  89. #a.z.w.example. 3600 IN MX 1 ai.example.
  90. #a.z.w.example. 3600 IN RRSIG MX 7 2 3600 20150420235959 20051021000000 40430 example. CikebjQwGQPwijVcxgcZcSJKtfynugtlBiKb9FcBTrmOoyQ4InoWVudh CWsh/URX3lc4WRUMivEBP6+4KS3ldA==
  91. #"""
  92. The authority section of the last query response should be
  93. """
  94. example. 3600 IN NS ns1.example.
  95. example. 3600 IN NS ns2.example.
  96. example. 3600 IN RRSIG NS 7 1 3600 20150420235959 20051021000000 40430 example. PVOgtMK1HHeSTau+HwDWC8Ts+6C8qtqd4pQJqOtdEVgg+MA+ai4fWDEh u3qHJyLcQ9tbD2vvCnMXjtz6SyObxA==
  97. q04jkcevqvmu85r014c7dkba38o0ji5r.example. 3600 IN NSEC3 1 1 12 aabbccdd r53bq7cc2uvmubfu5ocmm6pers9tk9en A RRSIG
  98. q04jkcevqvmu85r014c7dkba38o0ji5r.example. 3600 IN RRSIG NSEC3 7 2 3600 20150420235959 20051021000000 40430 example. hV5I89b+4FHJDATp09g4bbN0R1F845CaXpL3ZxlMKimoPAyqletMlEWw LfFia7sdpSzn+ZlNNlkxWcLsIlMmUg==
  99. """
  100. # This is slightly different from the example in RFC5155
  101. The additional section of the last query response should be
  102. """
  103. ai.example. 3600 IN A 192.0.2.9
  104. ai.example. 3600 IN AAAA 2001:db8::f00:baa9
  105. ns1.example. 3600 IN A 192.0.2.1
  106. ns2.example. 3600 IN A 192.0.2.2
  107. ai.example. 3600 IN RRSIG A 7 2 3600 20150420235959 20051021000000 40430 example. hVe+wKYMlObTRPhX0NL67GxeZfdxqr/QeR6FtfdAj5+FgYxyzPEjIzvK Wy00hWIl6wD3Vws+rznEn8sQ64UdqA==
  108. ai.example. 3600 IN RRSIG AAAA 7 2 3600 20150420235959 20051021000000 40430 example. LcdxKaCB5bGZwPDg+3JJ4O02zoMBrjxqlf6WuaHQZZfTUpb9Nf2nxFGe 2XRPfR5tpJT6GdRGcHueLuXkMjBArQ==
  109. ns1.example. 3600 IN RRSIG A 7 2 3600 20150420235959 20051021000000 40430 example. bu6kx73n6XEunoVGuRfAgY7EF/AJqHy7hj0jkiqJjB0dOrx3wuz9SaBe GfqWIdn/uta3SavN4FRvZR9SCFHF5Q==
  110. ns2.example. 3600 IN RRSIG A 7 2 3600 20150420235959 20051021000000 40430 example. ktQ3TqE0CfRfki0Rb/Ip5BM0VnxelbuejCC4zpLbFKA/7eD7UNAwxMgx JPtbdST+syjYSJaj4IHfeX6n8vfoGA==
  111. """
  112. Scenario: B.5. Wildcard No Data Error
  113. Given I have bind10 running with configuration nsec3/nsec3_auth.config
  114. A dnssec query for a.z.w.example. type AAAA should have rcode NOERROR
  115. The last query response should have flags qr aa rd
  116. The last query response should have ancount 0
  117. The last query response should have nscount 8
  118. The last query response should have adcount 1
  119. The authority section of the last query response should be
  120. """
  121. example. 3600 IN SOA ns1.example. bugs.x.w.example. 1 3600 300 3600000 3600
  122. example. 3600 IN RRSIG SOA 7 1 3600 20150420235959 20051021000000 40430 example. Hu25UIyNPmvPIVBrldN+9Mlp9Zql39qaUd8iq4ZLlYWfUUbbAS41pG+6 8z81q1xhkYAcEyHdVI2LmKusbZsT0Q==
  123. k8udemvp1j2f7eg6jebps17vp3n8i58h.example. 3600 IN NSEC3 1 1 12 aabbccdd kohar7mbb8dc2ce8a9qvl8hon4k53uhi
  124. k8udemvp1j2f7eg6jebps17vp3n8i58h.example. 3600 IN RRSIG NSEC3 7 2 3600 20150420235959 20051021000000 40430 example. FtXGbvF0+wf8iWkyo73enAuVx03klN+pILBKS6qCcftVtfH4yVzsEZqu J27NHR7ruxJWDNMtOtx7w9WfcIg62A==
  125. q04jkcevqvmu85r014c7dkba38o0ji5r.example. 3600 IN NSEC3 1 1 12 aabbccdd r53bq7cc2uvmubfu5ocmm6pers9tk9en A RRSIG
  126. q04jkcevqvmu85r014c7dkba38o0ji5r.example. 3600 IN RRSIG NSEC3 7 2 3600 20150420235959 20051021000000 40430 example. hV5I89b+4FHJDATp09g4bbN0R1F845CaXpL3ZxlMKimoPAyqletMlEWw LfFia7sdpSzn+ZlNNlkxWcLsIlMmUg==
  127. r53bq7cc2uvmubfu5ocmm6pers9tk9en.example. 3600 IN NSEC3 1 1 12 aabbccdd t644ebqk9bibcna874givr6joj62mlhv MX RRSIG
  128. r53bq7cc2uvmubfu5ocmm6pers9tk9en.example. 3600 IN RRSIG NSEC3 7 2 3600 20150420235959 20051021000000 40430 example. aupviViruXs4bDg9rCbezzBMf9h1ZlDvbW/CZFKulIGXXLj8B/fsDJar XVDA9bnUoRhEbKp+HF1FWKW7RIJdtQ==
  129. """
  130. Scenario: B.6. DS Child Zone No Data Error
  131. Given I have bind10 running with configuration nsec3/nsec3_auth.config
  132. A dnssec query for example. type DS should have rcode NOERROR
  133. The last query response should have flags qr aa rd
  134. The last query response should have ancount 0
  135. The last query response should have nscount 4
  136. The last query response should have adcount 1
  137. The authority section of the last query response should be
  138. """
  139. example. 3600 IN SOA ns1.example. bugs.x.w.example. 1 3600 300 3600000 3600
  140. example. 3600 IN RRSIG SOA 7 1 3600 20150420235959 20051021000000 40430 example. Hu25UIyNPmvPIVBrldN+9Mlp9Zql39qaUd8iq4ZLlYWfUUbbAS41pG+6 8z81q1xhkYAcEyHdVI2LmKusbZsT0Q==
  141. 0p9mhaveqvm6t7vbl5lop2u3t2rp3tom.example. 3600 IN NSEC3 1 1 12 aabbccdd 2t7b4g4vsa5smi47k61mv5bv1a22bojr NS SOA MX RRSIG DNSKEY NSEC3PARAM
  142. 0p9mhaveqvm6t7vbl5lop2u3t2rp3tom.example. 3600 IN RRSIG NSEC3 7 2 3600 20150420235959 20051021000000 40430 example. OSgWSm26B+cS+dDL8b5QrWr/dEWhtCsKlwKLIBHYH6blRxK9rC0bMJPw Q4mLIuw85H2EY762BOCXJZMnpuwhpA==
  143. """