security/acme-client: support token authentication in Gandi LiveDNS, closes #3526 (#3740)

This commit is contained in:
Frank Wall
2023-12-30 21:25:36 +01:00
committed by GitHub
parent d9a5fe0e05
commit 1f6e20f197
4 changed files with 19 additions and 3 deletions
+3
View File
@@ -15,6 +15,9 @@ Added:
* add DNSExit DNS API (#3724)
* add World4You DNS API (#3722)
Changed:
* support token authentication in Gandi LiveDNS (#3526)
Fixed:
* fix 2FA support in Synology automation (#3627)
@@ -543,10 +543,16 @@
<style>table_dns table_dns_gandi_livedns</style>
</field>
<field>
<id>validation.dns_gandi_livedns_key</id>
<label>Key</label>
<id>validation.dns_gandi_livedns_token</id>
<label>Personal Access Token</label>
<type>text</type>
</field>
<field>
<id>validation.dns_gandi_livedns_key</id>
<label>API Key (DEPRECATED)</label>
<type>text</type>
<help>The API Key is the previous mechanism that was replaced with Personal Access Tokens. API Keys should no longer be used.</help>
</field>
<field>
<label>Google Cloud DNS</label>
<type>header</type>
@@ -39,6 +39,10 @@ class DnsGandiLivedns extends Base implements LeValidationInterface
{
public function prepare()
{
$this->acme_env['GANDI_LIVEDNS_KEY'] = (string)$this->config->dns_gandi_livedns_key;
if (!empty((string)$this->config->dns_gandi_livedns_token)) {
$this->acme_env['GANDI_LIVEDNS_TOKEN'] = (string)$this->config->dns_gandi_livedns_token;
} else {
$this->acme_env['GANDI_LIVEDNS_KEY'] = (string)$this->config->dns_gandi_livedns_key;
}
}
}
@@ -683,6 +683,9 @@
<dns_gandi_livedns_key type="TextField">
<Required>N</Required>
</dns_gandi_livedns_key>
<dns_gandi_livedns_token type="TextField">
<Required>N</Required>
</dns_gandi_livedns_token>
<dns_gcloud_key type="TextField">
<Required>N</Required>
</dns_gcloud_key>