mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
test: keep CNAME target lookups inside the fixture resolver
When a fixture answers with a CNAME, unbound chases the target through its resolver path, which skips local-zone data and asks the forwarder. On the CI runner Docker DNS answers any *.localhost with ::1, which is _APP_DOMAIN_TARGET_AAAA, so the API rule on the site fixture verified instead of failing on the wrong CNAME. An empty authoritative localhost. zone that the resolver path consults makes every target NXDOMAIN locally, and the wrong CNAME fixture now points under localhost too so nothing leaves the container.
This commit is contained in:
1 parent
89138889ba
commit
39ce2a5817
2 files changed
+18
-1
No files matched your search
@@ -0,0 +1,3 @@
|
||||
$TTL 60
|
||||
localhost. IN SOA ns.localhost. hostmaster.localhost. 1 3600 600 86400 60
|
||||
localhost. IN NS ns.localhost.
|
||||
@@ -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
|
||||
Reference in new issue
Block a user