mirror of
https://github.com/acme-dns/acme-dns.git
synced 2026-04-27 04:45:48 +03:00
[PR #388] Add API setting registration_allowfrom #401
Labels
No labels
Documentation
Documentation
bug
enhancement
feature request
feature request
help wanted
pull-request
question
security
security
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/acme-dns#401
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/acme-dns/acme-dns/pull/388
Author: @candlerb
Created: 6/24/2025
Status: 🔄 Open
Base:
master← Head:candlerb/216📝 Commits (1)
9aaec6cAdd API setting registration_allowfrom📊 Changes
11 files changed (+129 additions, -92 deletions)
View changed files
📝
README.md(+2 -0)📝
config.cfg(+2 -0)📝
pkg/acmedns/acmetxt.go(+0 -33)➖
pkg/acmedns/acmetxt_test.go(+0 -38)📝
pkg/acmedns/cidrslice.go(+31 -0)📝
pkg/acmedns/cidrslice_test.go(+34 -0)📝
pkg/acmedns/config.go(+4 -0)📝
pkg/acmedns/types.go(+14 -13)📝
pkg/api/api_test.go(+28 -4)📝
pkg/api/auth.go(+4 -4)📝
pkg/api/register.go(+10 -0)📄 Description
Fixes #216
Repurpose the user "allowfrom" code to add a new API setting
registration_allowfrom, so that the API can be open to the Internet but registration only accepted from trusted IP addresses.For discussion:
registration_allowfromis not symmetrical withdisable_registration. Furthermore, "allowfrom" ought to be two words, but I was copying what the API does.I am happy to change it to something else, maybe
restrict_registration. However, I think it would be good to leave the door open to adding future restrictions on registration, e.g. having a static username/password or HTTP Basic Auth. I note that other settings share a common prefix (e..gtls_*orlog*)[general], then it will be silently ignored, and your registration will be open to the world. But the same is true of other settings, includingdisable_registration. It would be more secure if the TOML parser could be made strict: see #294🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.