]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2007. [func] It is now possible to explicitly enable DNSSEC
authorMark Andrews <marka@isc.org>
Thu, 9 Mar 2006 23:38:21 +0000 (23:38 +0000)
committerMark Andrews <marka@isc.org>
Thu, 9 Mar 2006 23:38:21 +0000 (23:38 +0000)
                        validation.  default dnssec-validation no; to
                        be changed to yes in 9.5.0.  [RT #15674]

19 files changed:
CHANGES
bin/named/config.c
bin/named/named.conf.docbook
bin/named/query.c
bin/named/server.c
bin/tests/system/dlv/ns5/named.conf
bin/tests/system/dnssec/ns1/named.conf
bin/tests/system/dnssec/ns2/named.conf
bin/tests/system/dnssec/ns3/named.conf
bin/tests/system/dnssec/ns4/named.conf
bin/tests/system/dnssec/ns5/named.conf
bin/tests/system/dnssec/ns6/named.conf
bin/tests/system/lwresd/ns1/named.conf
doc/arm/Bv9ARM-book.xml
lib/bind9/check.c
lib/dns/include/dns/view.h
lib/dns/resolver.c
lib/dns/view.c
lib/isccfg/namedconf.c

diff --git a/CHANGES b/CHANGES
index 69d19940adacfc7cbe7ce0c11aba035d84ca4836..e3dd6b0e41559065d0b935b908ba79f846c35939 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+2007.  [func]          It is now possible to explicitly enable DNSSEC
+                       validation.  default dnssec-validation no; to
+                       be changed to yes in 9.5.0.  [RT #15674]
+
 2006.  [security]      Allow-query-cache and allow-recursion now default
                        to the builtin acls "localnets" and "localhost".
 
index 2e28723a40068b4b0951ff8276efdeb21f87a425..67e96341c9ba1b4d78857f3d68018b3f86f25d33 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: config.c,v 1.47.18.26 2006/03/09 03:40:33 marka Exp $ */
+/* $Id: config.c,v 1.47.18.27 2006/03/09 23:38:20 marka Exp $ */
 
 /*! \file */
 
@@ -135,7 +135,8 @@ options {\n\
        use-additional-cache true;\n\
        acache-cleaning-interval 60;\n\
        max-acache-size 0;\n\
-       dnssec-enable no; /* Make yes for 9.4. */ \n\
+       dnssec-enable yes;\n\
+       dnssec-validation no; /* Make yes for 9.5. */ \n\
        dnssec-accept-expired no;\n\
        clients-per-query 10;\n\
        max-clients-per-query 100;\n\
index cb0c0d0c84536b431ae6e4ffbfc118773ad2ce87..f2a361e1de7b0a3732dda832cc1ef804b9bfe534 100644 (file)
@@ -17,7 +17,7 @@
  - PERFORMANCE OF THIS SOFTWARE.
 -->
 
-<!-- $Id: named.conf.docbook,v 1.1.2.20 2006/03/06 01:38:00 marka Exp $ -->
+<!-- $Id: named.conf.docbook,v 1.1.2.21 2006/03/09 23:38:20 marka Exp $ -->
 <refentry>
   <refentryinfo>
     <date>Aug 13, 2004</date>
@@ -263,6 +263,7 @@ options {
        root-delegation-only <optional> exclude { <replaceable>quoted_string</replaceable>; ... } </optional>;
        disable-algorithms <replaceable>string</replaceable> { <replaceable>string</replaceable>; ... };
        dnssec-enable <replaceable>boolean</replaceable>;
+       dnssec-validation <replaceable>boolean</replaceable>;
        dnssec-lookaside <replaceable>string</replaceable> trust-anchor <replaceable>string</replaceable>;
        dnssec-must-be-secure <replaceable>string</replaceable> <replaceable>boolean</replaceable>;
        dnssec-accept-expired <replaceable>boolean</replaceable>;
@@ -410,6 +411,7 @@ view <replaceable>string</replaceable> <replaceable>optional_class</replaceable>
        root-delegation-only <optional> exclude { <replaceable>quoted_string</replaceable>; ... } </optional>;
        disable-algorithms <replaceable>string</replaceable> { <replaceable>string</replaceable>; ... };
        dnssec-enable <replaceable>boolean</replaceable>;
+       dnssec-validation <replaceable>boolean</replaceable>;
        dnssec-lookaside <replaceable>string</replaceable> trust-anchor <replaceable>string</replaceable>;
        dnssec-must-be-secure <replaceable>string</replaceable> <replaceable>boolean</replaceable>;
        dnssec-accept-expired <replaceable>boolean</replaceable>;
index 59a51366dd623bce4ae814ba209c692d791c9f41..2956ffc0749282e8403982b9fe6ccc2e5f096984 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: query.c,v 1.257.18.26 2006/03/03 00:56:53 marka Exp $ */
+/* $Id: query.c,v 1.257.18.27 2006/03/09 23:38:20 marka Exp $ */
 
 /*! \file */
 
@@ -4527,13 +4527,17 @@ ns_query_start(ns_client_t *client) {
         * If the client has requested that DNSSEC checking be disabled,
         * allow lookups to return pending data and instruct the resolver
         * to return data before validation has completed.
+        *
+        * We don't need to set DNS_DBFIND_PENDINGOK when validation is
+        * disabled as there will be no pending data.
         */
        if (message->flags & DNS_MESSAGEFLAG_CD ||
            qtype == dns_rdatatype_rrsig)
        {
                client->query.dboptions |= DNS_DBFIND_PENDINGOK;
                client->query.fetchoptions |= DNS_FETCHOPT_NOVALIDATE;
-       }
+       } else if (!client->view->enablevalidation)
+               client->query.fetchoptions |= DNS_FETCHOPT_NOVALIDATE;
 
        /*
         * Allow glue NS records to be added to the authority section
index 51c86e1a6b36964c2a4618b321e658f2e4b3259b..dfe1cb848842f5f36dc1cdcb70dbe170a8dd8875 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: server.c,v 1.419.18.42 2006/03/09 03:40:33 marka Exp $ */
+/* $Id: server.c,v 1.419.18.43 2006/03/09 23:38:20 marka Exp $ */
 
 /*! \file */
 
@@ -1493,6 +1493,11 @@ configure_view(dns_view_t *view, const cfg_obj_t *config,
        INSIST(result == ISC_R_SUCCESS);
        view->acceptexpired = cfg_obj_asboolean(obj);
 
+       obj = NULL;
+       result = ns_config_get(maps, "dnssec-validation", &obj);
+       INSIST(result == ISC_R_SUCCESS);
+       view->enablevalidation = cfg_obj_asboolean(obj);
+
        obj = NULL;
        result = ns_config_get(maps, "dnssec-lookaside", &obj);
        if (result == ISC_R_SUCCESS) {
index c95f790c4c33c381494df533b9bc1c5414afe312..888e648bf0c1f7b6408053e9a0e1d43a1056f236 100644 (file)
@@ -14,7 +14,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.2.2.2 2004/06/04 02:31:53 marka Exp $ */
+/* $Id: named.conf,v 1.2.2.3 2006/03/09 23:38:20 marka Exp $ */
 
 /*
  * Choose a keyname that is unlikely to clash with any real key names.
@@ -58,6 +58,7 @@ options {
        recursion yes;
        notify yes;
        dnssec-enable yes;
+       dnssec-validation yes;
        dnssec-lookaside "." trust-anchor "dlv.utld";
 };
 
index 833e9375d73c3c81c7798be76df22e780005379c..578ca5c8349ff1d007342930ce5ef8a406a3928c 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.20 2004/03/10 02:19:53 marka Exp $ */
+/* $Id: named.conf,v 1.20.18.1 2006/03/09 23:38:20 marka Exp $ */
 
 // NS1
 
@@ -32,6 +32,7 @@ options {
        recursion no;
        notify yes;
        dnssec-enable yes;
+       dnssec-validation yes;
 };
 
 zone "." {
index 94256390c02ca0c68c2afe17025cd0a2055e2933..d14ef89fafe423caaa1c888fedefcb0c6577c594 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.23.18.1 2004/05/05 01:32:35 marka Exp $ */
+/* $Id: named.conf,v 1.23.18.2 2006/03/09 23:38:20 marka Exp $ */
 
 // NS2
 
@@ -32,6 +32,7 @@ options {
        recursion no;
        notify yes;
        dnssec-enable yes;
+       dnssec-validation yes;
 };
 
 zone "." {
index 9a16b14ea8b1872d8ab0ec400076d128fee721e2..6b583d4716d4d707b6b4e6ff6258708dd691b36b 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.25.18.2 2004/05/05 01:32:36 marka Exp $ */
+/* $Id: named.conf,v 1.25.18.3 2006/03/09 23:38:20 marka Exp $ */
 
 // NS3
 
@@ -32,6 +32,7 @@ options {
        recursion no;
        notify yes;
        dnssec-enable yes;
+       dnssec-validation yes;
 };
 
 zone "." {
index 2900aedeaf78b060718386e4bc1f1b5ebed6834a..8cb98f7320b8c4fadc97783a728d1ec3420ecca6 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.22.18.1 2004/04/16 00:01:39 marka Exp $ */
+/* $Id: named.conf,v 1.22.18.2 2006/03/09 23:38:20 marka Exp $ */
 
 // NS4
 
@@ -31,6 +31,7 @@ options {
        listen-on-v6 { none; };
        recursion yes;
        dnssec-enable yes;
+       dnssec-validation yes;
        dnssec-must-be-secure mustbesecure.example yes;
 };
 
index 29191295a3e6e61d2e51e9b0a9c39ad4e773b285..a9b94da0a32f81a8b38bfb5ff8f892000c335ee5 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.20 2004/03/10 02:19:54 marka Exp $ */
+/* $Id: named.conf,v 1.20.18.1 2006/03/09 23:38:20 marka Exp $ */
 
 // NS5
 
@@ -31,6 +31,7 @@ options {
        listen-on-v6 { none; };
        recursion yes;
        dnssec-enable yes;
+       dnssec-validation yes;
 };
 
 zone "." {
index dc2c6671e6888d7d92c576caad938eec8ba622ef..ca4e84a66819b1e85e640f782a4594460cc51a8a 100644 (file)
@@ -14,7 +14,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.6.18.1 2004/06/04 02:31:53 marka Exp $ */
+/* $Id: named.conf,v 1.6.18.2 2006/03/09 23:38:20 marka Exp $ */
 
 // NS6
 
@@ -32,6 +32,7 @@ options {
        notify yes;
        disable-algorithms . { DSA; };
        dnssec-enable yes;
+       dnssec-validation yes;
        dnssec-lookaside . trust-anchor dlv;
 };
 
index f04aa97c4fd0d9a9c12f180fe1cd500e2ad38a13..c71513bde4968a98fd1f52e19f301e7006ff63f1 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.15 2004/03/10 02:19:54 marka Exp $ */
+/* $Id: named.conf,v 1.15.18.1 2006/03/09 23:38:20 marka Exp $ */
 
 controls { /* empty */ };
 
@@ -30,6 +30,7 @@ options {
        recursion no;
        notify no;
        dnssec-enable yes;
+       dnssec-validation yes;
 };
 
 zone "." {
index ffe6372846c14d4e766e78cdf258d30d83140967..078671ce4673079d1332236d82df88a6950dcd9c 100644 (file)
@@ -18,7 +18,7 @@
  - PERFORMANCE OF THIS SOFTWARE.
 -->
 
-<!-- File: $Id: Bv9ARM-book.xml,v 1.241.18.55 2006/03/09 03:40:33 marka Exp $ -->
+<!-- File: $Id: Bv9ARM-book.xml,v 1.241.18.56 2006/03/09 23:38:20 marka Exp $ -->
 <book xmlns:xi="http://www.w3.org/2001/XInclude">
   <title>BIND 9 Administrator Reference Manual</title>
 
@@ -4393,6 +4393,7 @@ category notify { null; };
     <optional> use-id-pool <replaceable>yes_or_no</replaceable>; </optional>
     <optional> maintain-ixfr-base <replaceable>yes_or_no</replaceable>; </optional>
     <optional> dnssec-enable <replaceable>yes_or_no</replaceable>; </optional>
+    <optional> dnssec-validation <replaceable>yes_or_no</replaceable>; </optional>
     <optional> dnssec-lookaside <replaceable>domain</replaceable> trust-anchor <replaceable>domain</replaceable>; </optional>
     <optional> dnssec-must-be-secure <replaceable>domain yes_or_no</replaceable>; </optional>
     <optional> dnssec-accept-expired <replaceable>yes_or_no</replaceable>; </optional>
@@ -5484,6 +5485,18 @@ options {
                 <para>
                   Enable DNSSEC support in named.  Unless set to <userinput>yes</userinput>
                   named behaves as if it does not support DNSSEC.
+                  The default is <userinput>yes</userinput>.
+                </para>
+              </listitem>
+            </varlistentry>
+
+            <varlistentry>
+              <term><command>dnssec-validation</command></term>
+              <listitem>
+                <para>
+                  Enable DNSSEC validation in named.
+                 Note <command>dnssec-enable</command> also needs to be
+                 set to <userinput>yes</userinput> to be effective.
                   The default is <userinput>no</userinput>.
                 </para>
               </listitem>
index 20063c000d6d93b91297e3ca643e61d27423c80d..286ede1dccd8c022c92a2b3ef8687042cbcd9235 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: check.c,v 1.44.18.28 2006/03/06 01:38:01 marka Exp $ */
+/* $Id: check.c,v 1.44.18.29 2006/03/09 23:38:21 marka Exp $ */
 
 /*! \file */
 
@@ -1394,6 +1394,8 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
        isc_result_t result = ISC_R_SUCCESS;
        isc_result_t tresult = ISC_R_SUCCESS;
        cfg_aclconfctx_t actx;
+       cfg_obj_t *obj;
+       isc_boolean_t enablednssec, enablevalidation;
 
        /*
         * Check that all zone statements are syntactically correct and
@@ -1499,6 +1501,33 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
                        result = ISC_R_FAILURE;
        }
 
+       /*
+        * Check that dnssec-enable/dnssec-validation are sensible.
+        */
+       obj = NULL;
+       if (voptions != NULL)
+               (void)cfg_map_get(voptions, "dnssec-enable", &obj);
+       if (obj == NULL)
+               (void)cfg_map_get(config, "dnssec-enable", &obj);
+       if (obj == NULL)
+               enablednssec = ISC_TRUE;
+       else
+               enablednssec = cfg_obj_asboolean(obj);
+
+       obj = NULL;
+       if (voptions != NULL)
+               (void)cfg_map_get(voptions, "dnssec-validation", &obj);
+       if (obj == NULL)
+               (void)cfg_map_get(config, "dnssec-validation", &obj);
+       if (obj == NULL)
+               enablevalidation = ISC_FALSE;   /* XXXMPA Change for 9.5. */
+       else
+               enablevalidation = cfg_obj_asboolean(obj);
+
+       if (enablevalidation && !enablednssec)
+               cfg_obj_log(obj, logctx, ISC_LOG_WARNING,
+                           "'dnssec-validation yes;' and 'dnssec-enable no;'");
+
        if (voptions != NULL)
                tresult = check_options(voptions, logctx, mctx);
        else
index 2b04bfd79a701963173fe9aa26219184f693f2a3..ea3d4c773e4df6dd864cf278d73599359f1ecc16 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: view.h,v 1.91.18.8 2006/01/05 00:10:44 marka Exp $ */
+/* $Id: view.h,v 1.91.18.9 2006/03/09 23:38:21 marka Exp $ */
 
 #ifndef DNS_VIEW_H
 #define DNS_VIEW_H 1
@@ -112,6 +112,7 @@ struct dns_view {
        isc_boolean_t                   additionalfromauth;
        isc_boolean_t                   minimalresponses;
        isc_boolean_t                   enablednssec;
+       isc_boolean_t                   enablevalidation;
        isc_boolean_t                   acceptexpired;
        dns_transfer_format_t           transfer_format;
        dns_acl_t *                     queryacl;
index a2bf27981f2412c1e7811a85aa8aa7ac54d093fd..7b8e8bed06dc13c0043d76a5fc2ddc7675e7ee1f 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: resolver.c,v 1.284.18.45 2006/02/17 00:42:10 marka Exp $ */
+/* $Id: resolver.c,v 1.284.18.46 2006/03/09 23:38:21 marka Exp $ */
 
 /*! \file */
 
@@ -3536,14 +3536,16 @@ cache_name(fetchctx_t *fctx, dns_name_t *name, dns_adbaddrinfo_t *addrinfo,
        /*
         * Is DNSSEC validation required for this name?
         */
-       result = dns_keytable_issecuredomain(res->view->secroots, name,
-                                            &secure_domain);
-       if (result != ISC_R_SUCCESS)
-               return (result);
+       if (res->view->enablevalidation) {
+               result = dns_keytable_issecuredomain(res->view->secroots, name,
+                                                    &secure_domain);
+               if (result != ISC_R_SUCCESS)
+                       return (result);
 
-       if (!secure_domain && res->view->dlv != NULL) {
-               valoptions = DNS_VALIDATOR_DLV;
-               secure_domain = ISC_TRUE;
+               if (!secure_domain && res->view->dlv != NULL) {
+                       valoptions = DNS_VALIDATOR_DLV;
+                       secure_domain = ISC_TRUE;
+               }
        }
 
        if ((fctx->options & DNS_FETCHOPT_NOVALIDATE) != 0)
@@ -3955,14 +3957,16 @@ ncache_message(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
        /*
         * Is DNSSEC validation required for this name?
         */
-       result = dns_keytable_issecuredomain(res->view->secroots, name,
-                                            &secure_domain);
-       if (result != ISC_R_SUCCESS)
-               return (result);
+       if (fctx->res->view->enablevalidation) {
+               result = dns_keytable_issecuredomain(res->view->secroots, name,
+                                                    &secure_domain);
+               if (result != ISC_R_SUCCESS)
+                       return (result);
 
-       if (!secure_domain && res->view->dlv != NULL) {
-               valoptions = DNS_VALIDATOR_DLV;
-               secure_domain = ISC_TRUE;
+               if (!secure_domain && res->view->dlv != NULL) {
+                       valoptions = DNS_VALIDATOR_DLV;
+                       secure_domain = ISC_TRUE;
+               }
        }
 
        if ((fctx->options & DNS_FETCHOPT_NOVALIDATE) != 0)
index de40282e5db3a4499cfc168aaae0715172d6cfcc..4938597397d0fb203a4356e5626b14b867cfb4ce 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: view.c,v 1.126.18.10 2006/01/05 00:10:43 marka Exp $ */
+/* $Id: view.c,v 1.126.18.11 2006/03/09 23:38:21 marka Exp $ */
 
 /*! \file */
 
@@ -160,6 +160,7 @@ dns_view_create(isc_mem_t *mctx, dns_rdataclass_t rdclass,
        view->additionalfromcache = ISC_TRUE;
        view->additionalfromauth = ISC_TRUE;
        view->enablednssec = ISC_TRUE;
+       view->enablevalidation = ISC_TRUE;
        view->acceptexpired = ISC_FALSE;
        view->minimalresponses = ISC_FALSE;
        view->transfer_format = dns_one_answer;
index ae644742f8357679554e5a90090162ad2e94bf79..a009a1f45a80582fa02744af41b863d404c56546 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: namedconf.c,v 1.30.18.36 2006/03/06 01:38:01 marka Exp $ */
+/* $Id: namedconf.c,v 1.30.18.37 2006/03/09 23:38:21 marka Exp $ */
 
 /*! \file */
 
@@ -768,6 +768,7 @@ view_clauses[] = {
        { "disable-algorithms", &cfg_type_disablealgorithm,
          CFG_CLAUSEFLAG_MULTI },
        { "dnssec-enable", &cfg_type_boolean, 0 },
+       { "dnssec-validation", &cfg_type_boolean, 0 },
        { "dnssec-lookaside", &cfg_type_lookaside, CFG_CLAUSEFLAG_MULTI },
        { "dnssec-must-be-secure",  &cfg_type_mustbesecure,
           CFG_CLAUSEFLAG_MULTI },