Self sign-up has been disabled due to increased spam activity. If you want to get access, please send an email to a project owner (preferred) or at gitlab(at)nic(dot)cz. We apologize for the inconvenience.
improve error output for NSEC3 errors. e.g.: incoherent NSEC3 chain/missing NSEC3: output should list with both hashed and plain text hostname as this simplifies finding the error
kzonecheck usage typo: --der should be --dir
I had problems using kzonecheck --dir because it required a sub path of keymgr --dir. e.g. keymgr --dir /tmp is equal to kzonecheck --dir /tmp/kasp/
typo in error "wrong NSEC3 TLL" should be "wrong Original TTL in NSEC3"
For NSEC3 incorrect type bitmap the error is "incorrect type bitmap in NSEC". Should be NSEC3.
I also noticed some checks which are missing and I think they would be useful:
NSEC3 checks
bad iterations
bad salt
bad hash algorithm value
bad flags (not 1 or 0)
RRSIG
invalid signature
expiration/inception time does not match signature
bad key tag (e.g. signer key not found)
bad algorithm value
DS
bad hash length
bad or unsupported digest type
From the above list, I think validating the signatures is the most useful check missing.
I removed the key check as I was told not to use kasp in kzonecheck. Also the whole list is implemented.
Except missing NSEC3 as I think it is impossible to find hashed hostname (if really needed I might add generating for the error message).
Also NSEC3 iterations are compared to NSEC3PARAM error, should I try to add maximal iterations for different key lengths or is this enough?
As RRSIGs go, kzonecheck wont give you details, so if its really important to know detail such as for example if algorithm is wrong, let me know and I will try figure something out.
As before, you can find current version in kzonecheck branch.
that is odd. It didnt fail for me nor in pipeline. May I ask, how do you configure knot and what system do you use?
And for now you can probably skip it.
Or try reset the repository if you didnt do so yet (Im not sure If I didnt force push)
Thank you, this looks really cool. I have to admit that I currently test manually only. I guess, I will implement some test cases so that I can provide faster and more in-depth feedback in the future.
I removed the key check as I was told not to use kasp in kzonecheck. Also the whole list is implemented.
I actually like it without the kasp dependency a lot more as well as it allows kzonecheck to be used in more use-cases.
Also NSEC3 iterations are compared to NSEC3PARAM error, should I try to add maximal iterations for different key lengths or is this enough?
Looks good to me.
Some additional feedback below:
I got the impression that the NSEC3 opt-out flag is not checked. To be honest, my spec understanding is not very good in this regard and I'm not sure if mixed usage of NSEC3 opt-out/not-using-opt-out is even valid. So, this is just an observation for the moment.
So called "duplicate" signatures of a DNSKEY which is not found in the zone
are reported as an error. However, I believe this should be accepted. If at
least one signature can be verified with a DNSKEY published in the zone, then
it's ok. The reason this might happen is if someone is doing an algorithm
rollover and he is using the "conservative" approach where he published RRSIG
with the new algorithm before publishing the DNSKEY.
If we have KSK and ZSK and the DNSKEY RR is only signed by the ZSK, then this is
not shown as an error. I believe this is correct as it's "valid" to use the ZSK as a trust anchor in the parent zone. I just wanted to mention this as some people might disagree.
If a signature exists for a non-existing RR this is shown as an error. I would propose that you ignore this error-condition. You should only check signatures for which there are records. Obsolete signature are not used by a nameserver anyway and cause no harm. If you really want, you could make it optionally with a "strict" validation or something like that.
@dsalzman thank you, looks good to me. some small comments below:
Building
Noticed that ./configure --disable-daemon also disabled kzonecheck. I had expected it to be part of utilities.
Usage
If the -t <timestamp> is not given in full YYYYMMDDHHmmSS format, the
current UNIX timestamp is used. I had wrongly expected that using
YYYYMMDDHH would result in YYYYMMDDHH0000. I can understand if my
assumption is wrong but I think it is an error to not inform the user
that the given malformed timestamp is unused. Maybe just break and show an error for invalid input?
Man Page
In knot.conf.5 on semantic-checks: is the second bullet point not a
sub issue of broken NSEC chain and therefore already covered by the
first bullet point?
Building: kzonecheck is not part of the utilities intentionally as it would add some dependencies (liburcu) to the utilities - semantic checks are shared with the server :-/