-
Notifications
You must be signed in to change notification settings - Fork 921
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
[pdnsutil] Do not allow increase-serial on secondary zones #15133
base: master
Are you sure you want to change the base?
Conversation
we got a complaint about |
Why not. Let's make a list of the comamnds where it would apply, I can think of:
Maybe add-meta too? |
the meta stuff may be important for secondaries, like TSIG management, and for setups where a secondary receives a zone to then DNSSEC-sign it. (this means key management is also allowed) clear-zone is a fun one, perhaps it should be allowed. At least it won't cause desynced data, and it will eventually cause a new transfer. People sometimes do the equivalent in SQL. set-account seems harmless and perhaps useful. |
So the list would be:
|
I -think- in this flow, it is impossible to have getDomainInfo fail. So if it does, it exposes a bug or corruption, we can just abort. |
Well, until one week ago, the tinydns backend did not implement |
oh of course. I wonder if there are backends without getDomainInfo, that do allow mutations. So I think your approach is fine, or we can go for 'error' and eventually find out we were too strict :) |
Pull Request Test Coverage Report for Build 13203634449Details
💛 - Coveralls |
These are: add-record, delete-rrset, increase-serial, rectify-zone, replace-rrset. Fixes PowerDNS#15130
5503cc8
to
8067395
Compare
Indeed most of these operations can't run if |
The use of those commands on a secondary zone is limited, but certainly not zero. If we do this there should be an option to force the action, for those who know what they are doing. Rectify on a secondary zone is something that should be possible anyway (inline signing) |
Short description
As reported in #15130,
pdnsutil increase-serial
should fail on secondary zones.The approach in this PR is quite conservative, if the backend is not able to report whether the zone is primary or secondary, we'll try to increase anyway - have to trust the user at some point.
Similarly, there is no check added to
pdnsutil edit-zone
. We assume you know more or less what you are doing.Checklist
I have: