mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-03 16:15:27 +00:00
Add nsec3 system test that transfers in NSEC3
Similar to an attempt to add NSEC through dynamic update, add a test case that tries to add NSEC3 through zone transfer.
This commit is contained in:
46
bin/tests/system/nsec3/ns2/named.conf.in
Normal file
46
bin/tests/system/nsec3/ns2/named.conf.in
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MPL-2.0
|
||||||
|
*
|
||||||
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
|
*
|
||||||
|
* See the COPYRIGHT file distributed with this work for additional
|
||||||
|
* information regarding copyright ownership.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// NS2
|
||||||
|
|
||||||
|
dnssec-policy "nsec3" {
|
||||||
|
nsec3param;
|
||||||
|
};
|
||||||
|
|
||||||
|
options {
|
||||||
|
query-source address 10.53.0.2;
|
||||||
|
notify-source 10.53.0.2;
|
||||||
|
transfer-source 10.53.0.2;
|
||||||
|
port @PORT@;
|
||||||
|
pid-file "named.pid";
|
||||||
|
listen-on { 10.53.0.2; };
|
||||||
|
listen-on-v6 { none; };
|
||||||
|
allow-transfer { any; };
|
||||||
|
recursion no;
|
||||||
|
};
|
||||||
|
|
||||||
|
key rndc_key {
|
||||||
|
secret "1234abcd8765";
|
||||||
|
algorithm @DEFAULT_HMAC@;
|
||||||
|
};
|
||||||
|
|
||||||
|
controls {
|
||||||
|
inet 10.53.0.2 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
|
||||||
|
};
|
||||||
|
|
||||||
|
zone "nsec3-xfr-inline.kasp" {
|
||||||
|
type primary;
|
||||||
|
file "nsec3-xfr-inline.kasp.db";
|
||||||
|
inline-signing yes;
|
||||||
|
dnssec-policy "nsec3";
|
||||||
|
};
|
22
bin/tests/system/nsec3/ns2/setup.sh
Normal file
22
bin/tests/system/nsec3/ns2/setup.sh
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MPL-2.0
|
||||||
|
#
|
||||||
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
# file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
|
#
|
||||||
|
# See the COPYRIGHT file distributed with this work for additional
|
||||||
|
# information regarding copyright ownership.
|
||||||
|
|
||||||
|
# shellcheck source=conf.sh
|
||||||
|
. ../../conf.sh
|
||||||
|
|
||||||
|
echo_i "ns2/setup.sh"
|
||||||
|
|
||||||
|
zone="nsec3-xfr-inline.kasp"
|
||||||
|
echo_i "setting up zone: $zone"
|
||||||
|
zonefile="${zone}.db"
|
||||||
|
cp template.db.in "$zonefile"
|
28
bin/tests/system/nsec3/ns2/template.db.in
Normal file
28
bin/tests/system/nsec3/ns2/template.db.in
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||||
|
;
|
||||||
|
; SPDX-License-Identifier: MPL-2.0
|
||||||
|
;
|
||||||
|
; This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
; file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
|
;
|
||||||
|
; See the COPYRIGHT file distributed with this work for additional
|
||||||
|
; information regarding copyright ownership.
|
||||||
|
|
||||||
|
$TTL 300
|
||||||
|
@ IN SOA mname1. . (
|
||||||
|
1 ; serial
|
||||||
|
20 ; refresh (20 seconds)
|
||||||
|
20 ; retry (20 seconds)
|
||||||
|
1814400 ; expire (3 weeks)
|
||||||
|
3600 ; minimum (1 hour)
|
||||||
|
)
|
||||||
|
|
||||||
|
NS ns2
|
||||||
|
ns2 A 10.53.0.2
|
||||||
|
ns3 A 10.53.0.3
|
||||||
|
|
||||||
|
a A 10.0.0.1
|
||||||
|
b A 10.0.0.2
|
||||||
|
c A 10.0.0.3
|
||||||
|
|
@@ -208,3 +208,11 @@ zone "nsec3-dynamic-update-inline.kasp" {
|
|||||||
allow-update { any; };
|
allow-update { any; };
|
||||||
dnssec-policy "nsec";
|
dnssec-policy "nsec";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
zone "nsec3-xfr-inline.kasp" {
|
||||||
|
type secondary;
|
||||||
|
file "nsec3-xfr-inline.kasp.db";
|
||||||
|
inline-signing yes;
|
||||||
|
dnssec-policy "nsec";
|
||||||
|
primaries { 10.53.0.2; };
|
||||||
|
};
|
||||||
|
@@ -18,8 +18,12 @@ set -e
|
|||||||
|
|
||||||
$SHELL clean.sh
|
$SHELL clean.sh
|
||||||
|
|
||||||
|
copy_setports ns2/named.conf.in ns2/named.conf
|
||||||
|
(
|
||||||
|
cd ns2
|
||||||
|
$SHELL setup.sh
|
||||||
|
)
|
||||||
copy_setports ns3/named.conf.in ns3/named.conf
|
copy_setports ns3/named.conf.in ns3/named.conf
|
||||||
|
|
||||||
(
|
(
|
||||||
cd ns3
|
cd ns3
|
||||||
$SHELL setup.sh
|
$SHELL setup.sh
|
||||||
|
@@ -339,6 +339,14 @@ set_key_default_values "KEY1"
|
|||||||
echo_i "initial check zone ${ZONE}"
|
echo_i "initial check zone ${ZONE}"
|
||||||
check_nsec3
|
check_nsec3
|
||||||
|
|
||||||
|
# Zone: nsec3-xfr-inline.kasp.
|
||||||
|
# This is a secondary zone, where the primary is signed with NSEC3 but
|
||||||
|
# the dnssec-policy dictates NSEC.
|
||||||
|
set_zone_policy "nsec3-xfr-inline.kasp" "nsec" 1 3600
|
||||||
|
set_key_default_values "KEY1"
|
||||||
|
echo_i "initial check zone ${ZONE}"
|
||||||
|
check_nsec
|
||||||
|
|
||||||
# Zone: nsec3-dynamic-update-inline.kasp.
|
# Zone: nsec3-dynamic-update-inline.kasp.
|
||||||
set_zone_policy "nsec3-dynamic-update-inline.kasp" "nsec" 1 3600
|
set_zone_policy "nsec3-dynamic-update-inline.kasp" "nsec" 1 3600
|
||||||
set_key_default_values "KEY1"
|
set_key_default_values "KEY1"
|
||||||
|
Reference in New Issue
Block a user