feat: point plugin at api.yeil.app/v1/dns gateway (v3.1.0)
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
"""DNS-01 authenticator plugin for Certbot using the yeil public API.
|
||||
|
||||
Authenticates to dns.yeil.app with a yeil App key (yk_...) sent as a
|
||||
Authenticates to api.yeil.app/v1/dns with a yeil App key (yk_...) sent as a
|
||||
Bearer token, then adds/removes TXT records via the public records API.
|
||||
Create an App with DNS record-write permission on your zone(s) in your
|
||||
yeil team settings (the Apps tab) and put its key in the credentials file.
|
||||
|
||||
The certbot host only needs HTTPS reachability to dns.yeil.app; no
|
||||
The certbot host only needs HTTPS reachability to api.yeil.app/v1/dns; no
|
||||
NetBird or shared admin key.
|
||||
"""
|
||||
|
||||
@@ -20,7 +20,7 @@ from zope.interface import implementer
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
DEFAULT_BASE_URL = "https://dns.yeil.app"
|
||||
DEFAULT_BASE_URL = "https://api.yeil.app/v1/dns"
|
||||
HTTP_TIMEOUT = 30
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ class Authenticator(dns_common.DNSAuthenticator):
|
||||
def more_info(self):
|
||||
return (
|
||||
"Configures Certbot to perform DNS-01 challenges by adding TXT "
|
||||
"records via the yeil public DNS API at dns.yeil.app."
|
||||
"records via the yeil public DNS API at api.yeil.app/v1/dns."
|
||||
)
|
||||
|
||||
def _setup_credentials(self):
|
||||
@@ -130,7 +130,7 @@ class Authenticator(dns_common.DNSAuthenticator):
|
||||
|
||||
result = self._request(
|
||||
"GET",
|
||||
f"/api/v1/zones?suffix_of={quote(fqdn, safe='')}",
|
||||
f"/zones?suffix_of={quote(fqdn, safe='')}",
|
||||
)
|
||||
if not isinstance(result, dict) or "id" not in result:
|
||||
raise errors.PluginError(
|
||||
@@ -162,7 +162,7 @@ class Authenticator(dns_common.DNSAuthenticator):
|
||||
rel_name = self._relative_name(validation_name, zone_name)
|
||||
result = self._request(
|
||||
"POST",
|
||||
f"/api/v1/zones/{zone_id}/records",
|
||||
f"/zones/{zone_id}/records",
|
||||
body={
|
||||
"name": rel_name,
|
||||
"type": "TXT",
|
||||
@@ -193,7 +193,7 @@ class Authenticator(dns_common.DNSAuthenticator):
|
||||
try:
|
||||
self._request(
|
||||
"DELETE",
|
||||
f"/api/v1/zones/{zone_id}/records/{record_id}",
|
||||
f"/zones/{zone_id}/records/{record_id}",
|
||||
)
|
||||
except errors.PluginError as e:
|
||||
# Don't fail the renewal because of a stale TXT we couldn't
|
||||
|
||||
Reference in New Issue
Block a user