robur-coop / dns-primary-git

A MirageOS unikernel acting as primary DNS server, data stored in a remote git repository
13 stars 4 forks source link

Support for git{ea,hub,lab} webhooks #11

Open reynir opened 2 years ago

reynir commented 2 years ago

A number of git forges (gitea, github, gitlab) support webhooks on updates to the git repository containing the DNS zones but not DNS notify. The server could listen for http requests and poll the git repository when a webhook is triggered.

hannesm commented 2 years ago

Indeed, thanks for the request. Since webhooks require:

Maybe it makes the most sense to:

Having a separate unikernel would make the setup more complex, but would also leave DNS authoritative server as is. Maybe both options are feasible.

hannesm commented 2 years ago

The simple first solution is to listen on port 80 and do a git pull on every connection. Since DNS and git are on the same host, this should not be harmful (in respect to resource usage).

hannesm commented 1 year ago

Not a webhook, but I figured out that dig soa <zone> +opcode=notify -y hmac-sha256:<key-name>:b64-key @server-ip works fine for notification --> there is no need to use onotify from the dns-cli opam package \o/