diff --git a/certbot_dns_yeil/dns_yeil.py b/certbot_dns_yeil/dns_yeil.py index 6712038..b7beaff 100644 --- a/certbot_dns_yeil/dns_yeil.py +++ b/certbot_dns_yeil/dns_yeil.py @@ -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 diff --git a/setup.py b/setup.py index f14ff8f..2f7babc 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages setup( name="certbot-dns-yeil", - version="3.0.0", + version="3.1.0", description="yeil DNS Authenticator plugin for Certbot", url="https://git.eskimo.dev/Yeil/certbot-dns-yeil", author="yeil",