summaryrefslogtreecommitdiffstats
path: root/bin/tests/system/kasp/ns4
diff options
context:
space:
mode:
Diffstat (limited to 'bin/tests/system/kasp/ns4')
-rw-r--r--bin/tests/system/kasp/ns4/example1.db.in24
-rw-r--r--bin/tests/system/kasp/ns4/example2.db.in24
-rw-r--r--bin/tests/system/kasp/ns4/named.conf.in176
-rw-r--r--bin/tests/system/kasp/ns4/setup.sh33
-rw-r--r--bin/tests/system/kasp/ns4/template.db.in27
5 files changed, 284 insertions, 0 deletions
diff --git a/bin/tests/system/kasp/ns4/example1.db.in b/bin/tests/system/kasp/ns4/example1.db.in
new file mode 100644
index 0000000..c9e537f
--- /dev/null
+++ b/bin/tests/system/kasp/ns4/example1.db.in
@@ -0,0 +1,24 @@
+; 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 ns4
+ns4 A 10.53.0.4
+
+view TXT "view1"
diff --git a/bin/tests/system/kasp/ns4/example2.db.in b/bin/tests/system/kasp/ns4/example2.db.in
new file mode 100644
index 0000000..c1f16a2
--- /dev/null
+++ b/bin/tests/system/kasp/ns4/example2.db.in
@@ -0,0 +1,24 @@
+; 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 ns4
+ns4 A 10.53.0.4
+
+view TXT "view2"
diff --git a/bin/tests/system/kasp/ns4/named.conf.in b/bin/tests/system/kasp/ns4/named.conf.in
new file mode 100644
index 0000000..fff45ab
--- /dev/null
+++ b/bin/tests/system/kasp/ns4/named.conf.in
@@ -0,0 +1,176 @@
+/*
+ * 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.
+ */
+
+// NS4
+
+key rndc_key {
+ secret "1234abcd8765";
+ algorithm hmac-sha256;
+};
+
+controls {
+ inet 10.53.0.4 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
+};
+
+key "sha1" {
+ algorithm "hmac-sha1";
+ secret "FrSt77yPTFx6hTs4i2tKLB9LmE0=";
+};
+
+key "sha224" {
+ algorithm "hmac-sha224";
+ secret "hXfwwwiag2QGqblopofai9NuW28q/1rH4CaTnA==";
+};
+
+key "sha256" {
+ algorithm "hmac-sha256";
+ secret "R16NojROxtxH/xbDl//ehDsHm5DjWTQ2YXV+hGC2iBY=";
+};
+
+key "keyforview1" {
+ algorithm @DEFAULT_HMAC@;
+ secret "YPfMoAk6h+3iN8MDRQC004iSNHY=";
+};
+
+key "keyforview2" {
+ algorithm @DEFAULT_HMAC@;
+ secret "4xILSZQnuO1UKubXHkYUsvBRPu8=";
+};
+
+key "keyforview3" {
+ algorithm @DEFAULT_HMAC@;
+ secret "C1Azf+gGPMmxrUg/WQINP6eV9Y0=";
+};
+
+dnssec-policy "test" {
+ keys {
+ csk key-directory lifetime 0 algorithm 14;
+ };
+};
+
+options {
+ query-source address 10.53.0.4;
+ port @PORT@;
+ pid-file "named.pid";
+ listen-on { 10.53.0.4; };
+ listen-on-v6 { none; };
+ recursion no;
+ dnssec-policy "test";
+};
+
+view "inherit" {
+ match-clients { key "sha1"; };
+
+ /* Inherit dnssec-policy 'test' */
+ zone "inherit.inherit.signed" {
+ type primary;
+ file "inherit.inherit.signed.db";
+ inline-signing yes;
+ };
+
+ /* Override dnssec-policy */
+ zone "override.inherit.signed" {
+ type primary;
+ file "override.inherit.signed.db";
+ inline-signing yes;
+ dnssec-policy "default";
+ };
+
+ /* Unset dnssec-policy */
+ zone "none.inherit.signed" {
+ type primary;
+ file "none.inherit.signed.db";
+ dnssec-policy "none";
+ };
+};
+
+view "override" {
+ match-clients { key "sha224"; };
+ dnssec-policy "default";
+
+ /* Inherit dnssec-policy 'test' */
+ zone "inherit.override.signed" {
+ type primary;
+ file "inherit.override.signed.db";
+ inline-signing yes;
+ };
+
+ /* Override dnssec-policy */
+ zone "override.override.signed" {
+ type primary;
+ file "override.override.signed.db";
+ inline-signing yes;
+ dnssec-policy "test";
+ };
+
+ /* Unset dnssec-policy */
+ zone "none.override.signed" {
+ type primary;
+ file "none.override.signed.db";
+ dnssec-policy "none";
+ };
+};
+
+view "none" {
+ match-clients { key "sha256"; };
+ dnssec-policy "none";
+
+ /* Inherit dnssec-policy 'none' */
+ zone "inherit.none.signed" {
+ type primary;
+ file "inherit.none.signed.db";
+ };
+
+ /* Override dnssec-policy */
+ zone "override.none.signed" {
+ type primary;
+ file "override.none.signed.db";
+ inline-signing yes;
+ dnssec-policy "test";
+ };
+
+ /* Unset dnssec-policy */
+ zone "none.none.signed" {
+ type primary;
+ file "none.none.signed.db";
+ dnssec-policy "none";
+ };
+};
+
+view "example1" {
+ match-clients { key "keyforview1"; };
+
+ allow-update { any; };
+
+ zone "example.net" {
+ type primary;
+ file "example1.db";
+ };
+};
+
+view "example2" {
+ match-clients { key "keyforview2"; };
+
+ zone "example.net" {
+ type primary;
+ file "example2.db";
+ inline-signing yes;
+ };
+};
+
+view "example3" {
+ match-clients { key "keyforview3"; };
+ zone "example.net" {
+ in-view example2;
+ };
+};
diff --git a/bin/tests/system/kasp/ns4/setup.sh b/bin/tests/system/kasp/ns4/setup.sh
new file mode 100644
index 0000000..45cb5b3
--- /dev/null
+++ b/bin/tests/system/kasp/ns4/setup.sh
@@ -0,0 +1,33 @@
+#!/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
+. "$SYSTEMTESTTOP/conf.sh"
+
+echo_i "ns4/setup.sh"
+
+#
+# Set up zones that potentially will be initially signed.
+#
+for zn in inherit.inherit override.inherit none.inherit \
+ inherit.override override.override none.override \
+ inherit.none override.none none.none
+do
+ zone="$zn.signed"
+ echo_i "setting up zone: $zone"
+ zonefile="${zone}.db"
+ cp template.db.in $zonefile
+done
+
+cp example1.db.in example1.db
+cp example2.db.in example2.db
diff --git a/bin/tests/system/kasp/ns4/template.db.in b/bin/tests/system/kasp/ns4/template.db.in
new file mode 100644
index 0000000..0f72e9c
--- /dev/null
+++ b/bin/tests/system/kasp/ns4/template.db.in
@@ -0,0 +1,27 @@
+; 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 ns4
+ns4 A 10.53.0.4
+
+a A 10.0.0.1
+b A 10.0.0.2
+c A 10.0.0.3
+