-
Notifications
You must be signed in to change notification settings - Fork 923
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Secure and Rectify Zones When they are Created or Modified Through API Calls (POST/PATCH) #3417
Conversation
pdns/pdnsutil.cc
Outdated
cerr<<"Adding NSEC ordering information "<<endl; | ||
else if(!narrow) { | ||
if(!isOptOut) | ||
cerr<<"Adding NSEC3 hashed ordering information for '"<<zone.toString()<<"'"<<endl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like these messages are completely gone after your pull?
Thank you for submitting this PR. It's a long-standing TODO and indeed we should be doing this sooner than later. As @Habbie noted elsewhere, we've been holding off doing this for various reasons, but we can work on them later after it works as imagined :-) I have some comments on your changes; if you want/need clarifications or help feel free to drop by on IRC for a more real-time interaction.
|
Documentation also needs an update saying what's supported now. (Incl. a warning that turning off dnssec or back on is not supported yet?) |
By the way, all gmysql tests pass for us on master. If they don't pass for you, perhaps you are missing some tools (like |
What @zeha is referring to that I said elsewhere is: we've always felt that the right approach is to do a surgically small rectify around the actual update (and I still feel that way). However, because of that idea, we basically forgot to consider your approach, i.e. a full rectify after each update. We have given this some thought today and indeed we want to go forward with your approach. For small zones it will be just fine, for big zones it will make updates slower, but most people have small zones and thus a full rectify is much better than no rectify. Great work! |
Thanks for the feedback, it is highly appreciated. I'll start working on the mentioned points as soon as possible and then get back to you. |
1f97ce1
to
9cb4f6d
Compare
@zeha, I would like to move error checking in Why is
|
@zeha, I did some research on the I'd leave the |
581a0e8
to
2a105a3
Compare
It appears to return false on catastrophic failure/misconfiguration. That's odd. Maybe it's behaviour will be a lot clearer if the function is split as suggested above. Thanks! |
This branch has conflicts |
This branch still has conflicts. |
If a POST request contains the "dnssec" parameter set to true, we sign the zone with DNSSECKeeper.addKey and algorithms and parameters given in the - default-ksk-algorithms - default-zsk-algorithms - default-ksk-size - default-zsk-size config paratmers. If the configured algorithms cannot be used, we throw an ApiException. The zone will not yet be automatically rectified.
Copied code from pdnsutil to DNSSECKeeper in order to reuse it.
This previously resulted into segfault.
9b96283
to
ddeffb0
Compare
ddeffb0
to
85e721d
Compare
94cd603
to
0df0818
Compare
0df0818
to
92698a2
Compare
This commit takes a lot of ideas and code from PowerDNS#3417 and subsequent development and implements the following things: - Generate DNSSEC keys for a zone when "dnssec" is true in an API POST/PATCH for zones - Rectify DNSSEC zones after POST/PATCH when API-RECTIFY metadata is 1 - Allow setting this metadata via the "api-rectify" param in a Zone object - Shows "nsec3param" and "nsec3narrow" in Zone API responses - Adds an "rrsets" request parameter for a zone to skip sending RRSets in the response (Closes PowerDNS#5712) Closes PowerDNS#3417 Many thanks to Nils Wisiol (@nils-wisiol) for the initial implementation.
This commit takes a lot of ideas and code from PowerDNS#3417 and subsequent development and implements the following things: - Generate DNSSEC keys for a zone when "dnssec" is true in an API POST/PATCH for zones - Rectify DNSSEC zones after POST/PATCH when API-RECTIFY metadata is 1 - Allow setting this metadata via the "api-rectify" param in a Zone object - Shows "nsec3param" and "nsec3narrow" in Zone API responses - Adds an "rrsets" request parameter for a zone to skip sending RRSets in the response (Closes PowerDNS#5712) Closes PowerDNS#3417 Many thanks to Nils Wisiol (@nils-wisiol) for the initial implementation.
This commit takes a lot of ideas and code from PowerDNS#3417 and subsequent development and implements the following things: - Generate DNSSEC keys for a zone when "dnssec" is true in an API POST/PATCH for zones - Rectify DNSSEC zones after POST/PATCH when API-RECTIFY metadata is 1 - Allow setting this metadata via the "api-rectify" param in a Zone object - Shows "nsec3param" and "nsec3narrow" in Zone API responses - Adds an "rrsets" request parameter for a zone to skip sending RRSets in the response (Closes PowerDNS#5712) Closes PowerDNS#3417 Many thanks to Nils Wisiol (@nils-wisiol) for the initial implementation.
This commit takes a lot of ideas and code from PowerDNS#3417 and subsequent development and implements the following things: - Generate DNSSEC keys for a zone when "dnssec" is true in an API POST/PATCH for zones - Rectify DNSSEC zones after POST/PATCH when API-RECTIFY metadata is 1 - Allow setting this metadata via the "api-rectify" param in a Zone object - Shows "nsec3param" and "nsec3narrow" in Zone API responses - Adds an "rrsets" request parameter for a zone to skip sending RRSets in the response (Closes PowerDNS#5712) Closes PowerDNS#3417 Many thanks to Nils Wisiol (@nils-wisiol) for the initial implementation.
This PR extends existing API functionality of POST and PATCH zones by optionally sign and rectify them. To do so, the patch honors the
dnssec
,nsec3param
andnsec3narrow
parameters of the API request on POST and stores them. If anything goes wrong with signing or rectifying, the API throws an APIException and aborts the transaction -- the zone will not be inserted. On a PATCH, the zone is rectified again.Technical note: the code for signing and rectifying was taken from pdnsutil. Due to the amount of code needed for rectifying, it was moved to the DNSSECKeeper to use the same code in pdnsutil and in the API.
The PR does not cause any more gmysql test cases to fail than before. Failing test cases are:
I can edit the commit messages if desired.
Please let me know if any more editing is needed in order to pass this PR.