diff --git a/tests/resources/dns/localhost.zone b/tests/resources/dns/localhost.zone new file mode 100644 index 0000000000..544aa59ade --- /dev/null +++ b/tests/resources/dns/localhost.zone @@ -0,0 +1,3 @@ +$TTL 60 +localhost. IN SOA ns.localhost. hostmaster.localhost. 1 3600 600 86400 60 +localhost. IN NS ns.localhost. diff --git a/tests/resources/dns/zones.conf b/tests/resources/dns/zones.conf index 4fae5b04c3..5a9882ec87 100644 --- a/tests/resources/dns/zones.conf +++ b/tests/resources/dns/zones.conf @@ -29,7 +29,7 @@ local-data: "stage-function.webapp.com. 60 IN CNAME cname.localhost." # Verification must reject a CNAME pointing somewhere else. local-zone: "stage-wrong-cname.webapp.com." redirect -local-data: "stage-wrong-cname.webapp.com. 60 IN CNAME cname-wrong.tests.appwrite.io." +local-data: "stage-wrong-cname.webapp.com. 60 IN CNAME cname-wrong.localhost." # An A record matching the expected target. local-zone: "correct-a.webapp.com." redirect @@ -51,3 +51,17 @@ local-data: 'stage-correct-caa.webapp.com. 60 IN CAA 0 issue "digicert.com"' local-zone: "wrong-a-webapp.com." redirect local-data: "wrong-a-webapp.com. 60 IN SOA ns.wrong-a-webapp.com. hostmaster.wrong-a-webapp.com. 1 3600 600 86400 60" local-data: "wrong-a-webapp.com. 60 IN A 203.0.0.5" + +# The platform targets the fixtures point at live under localhost. When a +# fixture answers with a CNAME, unbound chases the target through its resolver +# path, which skips local-zone data and would otherwise ask the forwarder. The +# runner's Docker DNS answers any *.localhost with 127.0.0.1 and ::1, and ::1 +# is _APP_DOMAIN_TARGET_AAAA, so a wrong CNAME would verify. An auth-zone is +# consulted by that path: the empty zone makes every target NXDOMAIN with an +# SOA, locally. +auth-zone: + name: "localhost." + zonefile: "/mnt/resources/localhost.zone" + for-downstream: yes + for-upstream: yes + fallback-enabled: no