1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

Provider support for DS records as children only (#765)

This functionality is required by the GCLOUD provider, which supports
recordsets of type DS but only for child records of the zone, to enable
further delegation. It does not support them at the apex of the zone (@)
because Google Cloud DNS is not itself a registrar which needs to model
this information.

A related change (14ff68b151, #760) was
previously introduced to enable DS support in Google, which broke
integration tests with this provider.

To cleanly support this, we introduce a new provider capability
CanUseDSForChildren and appropriate integration tests. Further, it is no
longer possible to verify a provider has the proper capabilities for a
zone simply by existence of particular records; we adapt the capability
checks to enable inspection of the individual recordsets where this is
required.

Closes #762
This commit is contained in:
Matthew Huxtable
2020-06-18 22:24:13 +01:00
committed by GitHub
parent 505062b628
commit ff8ce26cee
7 changed files with 201 additions and 37 deletions

View File

@ -850,6 +850,25 @@ func makeTests(t *testing.T) []*TestGroup {
tc("add 2 more DS", ds("foo", 2, 13, 4, "ADIGEST"), ds("@", 65535, 5, 4, "ADIGEST"), ds("@", 65535, 253, 4, "ADIGEST")),
),
testgroup("DS (children only)",
requires(providers.CanUseDSForChildren),
// Use a valid digest value here, because GCLOUD (which implements this capability) verifies
// the value passed in is a valid digest. RFC 4034, s5.1.4 specifies SHA1 as the only digest
// algo at present, i.e. only hexadecimal values currently usable.
tc("create DS", ds("child", 1, 13, 1, "0123456789ABCDEF")),
tc("modify field 1", ds("child", 65535, 13, 1, "0123456789ABCDEF")),
tc("modify field 3", ds("child", 65535, 13, 2, "0123456789ABCDEF")),
tc("modify field 2+3", ds("child", 65535, 1, 4, "0123456789ABCDEF")),
tc("modify field 2", ds("child", 65535, 3, 4, "0123456789ABCDEF")),
tc("modify field 2", ds("child", 65535, 254, 4, "0123456789ABCDEF")),
tc("delete 1, create 1", ds("another-child", 2, 13, 4, "0123456789ABCDEF")),
tc("add 2 more DS",
ds("another-child", 2, 13, 4, "0123456789ABCDEF"),
ds("another-child", 65535, 5, 4, "0123456789ABCDEF"),
ds("another-child", 65535, 253, 4, "0123456789ABCDEF"),
),
),
//
// Pseudo rtypes:
//