-
Notifications
You must be signed in to change notification settings - Fork 33
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
feat: implement TSIGKey API #151
Conversation
I'm really struggeling to understand how the API handles updates, like the |
* feat: working on getting this working * feat: add seperate functions to change the fields * chore: add tests to cover all functions
Hey Tristan! @trizz I think I've figured it out - there are some quirks with the way the API works that (imo) don't really make sense. I'll list them below to shed some light:
I think that's it - lmk if you have any feedback or questions :) |
src/Resources/TSIGKey.php
Outdated
/** | ||
* Set set to "TSIGKey". | ||
* | ||
* @param string $type Set to "TSIGKey" | ||
* | ||
* @return self | ||
*/ | ||
public function setType(string $type) | ||
{ | ||
$this->type = $type; | ||
|
||
return $this; | ||
} |
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.
Should it be possible to change the type?
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.
the type is changeable, but seems pretty fixed in the documentation i'll remove the setter :)
Yup, some things don't make any sense.
Yes, updating records happens in a similar fashion. When updating a record, PowerDNS deletes and re-adds the whole record. However, because no "real" IDs are returned by the PowerDNS API, this isn't very noticeable. I've tried some of your created methods and they seem to work fine. We don't use TSIG keys ourselves (hence it is missing), so I cannot test with real-world data.
Probably to get a canonical domain. The same is required for zones, for example. So, everything looks fine to me. If no other corrections are necessary (see comment on your code), I'll merge and release this feature. |
I wanted to use it in order to generate TSIG keys and the update the zone metadata for |
Description
Add APIs for the /tsigkeys route:
https://doc.powerdns.com/authoritative/http-api/tsigkey.html#tsigkey-endpoints
More information about TSIG:
https://doc.powerdns.com/authoritative/tsig.html
Motivation and context
TSIGKeys were not implemented
How has this been tested?
testing was done using the local docker containers
Screenshots (if appropriate)
Checklist:
Go over all the following points, and put an
x
in all the boxes that apply.Please, please, please, don't send your pull request until all of the boxes are ticked. Once your pull request is created, it will trigger a build on our continuous integration server to make sure your tests pass.
If you're unsure about any of these, don't hesitate to ask. We're here to help!