security/acme-client: Add support for ZoneEdit DNS API (#4671)

* Add ZoneEdit settings for acme.sh
This commit is contained in:
Anton Avramov 2025-12-03 09:54:51 -05:00 committed by GitHub
parent f249e5c1b1
commit 8a06728c8f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 67 additions and 0 deletions

View file

@ -568,6 +568,21 @@
<label>ApiKey</label>
<type>password</type>
</field>
<field>
<label>ZoneEdit</label>
<type>header</type>
<style>table_dns table_dns_zoneedit</style>
</field>
<field>
<id>validation.dns_zoneedit_id</id>
<label>ZoneEdit ID</label>
<type>text</type>
</field>
<field>
<id>validation.dns_zoneedit_token</id>
<label>ZoneEdit Token</label>
<type>text</type>
</field>
<field>
<label>Gandi LiveDNS</label>
<type>header</type>

View file

@ -0,0 +1,45 @@
<?php
/*
* Copyright (C) 2025 Anton Avramov
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace OPNsense\AcmeClient\LeValidation;
use OPNsense\AcmeClient\LeValidationInterface;
use OPNsense\Core\Config;
/**
* FreeDNS API
* @package OPNsense\AcmeClient
*/
class DnsZoneedit extends Base implements LeValidationInterface
{
public function prepare()
{
$this->acme_env['ZONEEDIT_ID'] = (string)$this->config->dns_zoneedit_id;
$this->acme_env['ZONEEDIT_Token'] = (string)$this->config->dns_zoneedit_token;
}
}

View file

@ -532,6 +532,7 @@
<dns_yandex>Yandex PDD</dns_yandex>
<dns_zilore>Zilore</dns_zilore>
<dns_zone>Zone.eu</dns_zone>
<dns_zoneedit>ZoneEdit</dns_zoneedit>
<dns_zonomi>zonomi.com</dns_zonomi>
</OptionValues>
</dns_service>
@ -1352,6 +1353,12 @@
<dns_scaleway_token type="TextField">
<Required>N</Required>
</dns_scaleway_token>
<dns_zoneedit_id type="TextField">
<Required>N</Required>
</dns_zoneedit_id>
<dns_zoneedit_token type="TextField">
<Required>N</Required>
</dns_zoneedit_token>
</validation>
</validations>
<actions>