]> git.proxmox.com Git - proxmox-acme.git/blobdiff - src/PVE/ACME/DNSChallenge.pm
dns challenge: add missing plugins to schema
[proxmox-acme.git] / src / PVE / ACME / DNSChallenge.pm
index 3bf8300ab116e2342c7cbbe53f281a57348b941c..2d20ffb8c51c927b32a9b919eccbbfd84c1dcec1 100644 (file)
@@ -18,17 +18,105 @@ sub type {
     return 'dns';
 }
 
-# describe the data schema of the supported plugins
+# describe the data schema of the supported plugins, e.g.:
+#    'dnsprovider' => {
+#      name => 'Full name of Plugin',
+#      fields => {
+#          'FOO_API_KEY' => {
+#              description => "The API key",
+#              default => "none",
+#              optional => 1,
+#              type => 'string',
+#          },
+#          # ...
+#      },
+#    },
 my $plugins = {
+    '1984hosting' => {},
     'acmedns' => {},
     'acmeproxy' => {},
-    'active24' => {},
-    'ad' => {},
-    'ali' => {},
+    'active24' => {
+       name => 'Active24',
+       fields => {
+           'ACTIVE24_Token' => {
+               description => "The API key",
+               type => 'string',
+           },
+       },
+    },
+    'ad' => {
+       name => 'Alwaysdata',
+       fields => {
+           'AD_API_KEY' => {
+               description => "The API key",
+               type => 'string',
+           },
+       },
+    },
+    'ali' => {
+       name => 'Alibaba Cloud DNS',
+       fields => {
+           'Ali_API' => {
+               description => 'The API endpoint',
+               default => "https://alidns.aliyuncs.com/",
+               type => 'string',
+               optional => 1,
+           },
+           'Ali_Key' => {
+               description => 'The API Key',
+               type => 'string',
+           },
+           'Ali_Secret' => {
+               description => 'The API Secret',
+               type => 'string',
+           },
+       },
+    },
+    'anx' => {},
+    'arvan' => {},
     'autodns' => {},
-    'aws' => {},
+    'aws' => {
+       name => 'Amazon Route53 (AWS)',
+       fields => {
+           'AWS_ACCESS_KEY_ID' => {
+               name => 'ACCESS_KEY_ID',
+               description => 'The AWS access-key ID',
+               type => 'string',
+           },
+           'AWS_SECRET_ACCESS_KEY' => {
+               name => 'SECRET_ACCESS_KEY',
+               description => 'The AWS access-key secret',
+               type => 'string',
+           },
+       },
+    },
     'azure' => {},
-    'cf' => {},
+    'cf' => {
+       name => 'Cloudflare Managed DNS',
+       description => 'Either provide global account key and email, or CF API token and Account ID.',
+       fields => {
+           'CF_Key' => {
+               description => 'The Cloudflare Global API Key',
+               type => 'string',
+           },
+           'CF_Email' => {
+               description => 'The Cloudflare Account EMail-Address',
+               type => 'string',
+           },
+           'CF_Token' => {
+               description => 'The new Cloudflare API Token',
+               type => 'string',
+           },
+           'CF_Account_ID' => {
+               description => 'The new Cloudflare API Account ID',
+               type => 'string',
+           },
+           'CF_Zone_ID' => {
+               description => 'For Zone restricted API Token',
+               type => 'string',
+           },
+       },
+    },
     'clouddns' => {},
     'cloudns' => {},
     'cn' => {},
@@ -39,7 +127,16 @@ my $plugins = {
     'da' => {},
     'ddnss' => {},
     'desec' => {},
-    'dgon' => {},
+    'df' => {},
+    'dgon' => {
+       name => 'DigitalOcean DNS',
+       fields => {
+           'DO_API_KEY' => {
+               description => 'The DigitalOcean API Key',
+               type => 'string',
+           },
+       },
+    },
     'dnsimple' => {},
     'do' => {},
     'doapi' => {},
@@ -53,21 +150,51 @@ my $plugins = {
     'dynu' => {},
     'dynv6' => {},
     'easydns' => {},
+    'edgedns' => {},
     'euserv' => {},
     'exoscale' => {},
     'freedns' => {},
     'gandi_livedns' => {},
     'gcloud' => {},
-    'gd' => {},
+    'gd' => {
+       name => 'GoDaddy',
+       fields => {
+           'GD_Key' => {
+               description => 'The GoDaddy API Key',
+               type => 'string',
+           },
+           'GD_Secret' => {
+               description => 'The GoDaddy API Secret',
+               type => 'string',
+           },
+       },
+    },
     'gdnsdk' => {},
     'he' => {},
+    'hetzner' => {},
     'hexonet' => {},
     'hostingde' => {},
+    'huaweicloud' => {},
     'infoblox' => {},
+    'infomaniak' => {},
     'internetbs' => {},
-    'inwx' => {},
+    'inwx' => {
+       name => 'INWX',
+       fields => {
+           'INWX_User' => {
+               description => 'The INWX username',
+               type => 'string',
+           },
+           'INWX_Password' => {
+               description => 'The INWX password',
+               type => 'string',
+           },
+       },
+    },
     'ispconfig' => {},
     'jd' => {},
+    'joker' => {},
+    'kappernet' => {},
     'kas' => {},
     'kinghost' => {},
     'knot' => {},
@@ -90,7 +217,10 @@ my $plugins = {
     'nederhost' => {},
     'neodigit' => {},
     'netcup' => {},
+    'netlify' => {},
     'nic' => {},
+    'njalla' => {},
+    'nm' => {},
     'nsd' => {},
     'nsone' => {},
     'nsupdate' => {},
@@ -98,6 +228,7 @@ my $plugins = {
     'one' => {},
     'online' => {},
     'openprovider' => {},
+    'openstack' => {},
     'opnsense' => {},
     'ovh' => {
        name => 'OVH',
@@ -150,11 +281,13 @@ my $plugins = {
     'selectel' => {},
     'servercow' => {},
     'tele3' => {},
+    'transip' => {},
     'ultra' => {},
     'unoeuro' => {},
     'variomedia' => {},
     'vscale' => {},
     'vultr' => {},
+    'world4you' => {},
     'yandex' => {},
     'zilore' => {},
     'zone' => {},
@@ -243,10 +376,7 @@ sub setup {
     my $domain = $proxmox_acme_command->($self, $acme, $auth, $data, 'setup');
     print "Add TXT record: _acme-challenge.$domain\n";
 
-    # FIXME: probe ourself for propagation of TXT record, while not 100%
-    # failsafe it's good enough of a heuristic to do away with fixed sleep
-    # intervalls - original acme.sh employs that heuristic too.
-    my $delay = $data->{'validation-delay'} // 30;
+    my $delay = $data->{plugin}->{'validation-delay'} // 30;
     if ($delay > 0) {
        print "Sleeping $delay seconds to wait for TXT record propagation\n";
        sleep($delay); # don't care for EINTR