security/acme-client: add support for internetbs.net DNS API

This commit is contained in:
Frank Wall
2024-01-11 00:27:39 +01:00
parent 80206e3d6f
commit 8a4f7ac2fd
4 changed files with 67 additions and 0 deletions
+1
View File
@@ -19,6 +19,7 @@ Added:
* add ConoHa DNS API
* add Constellix DNS API
* add Exoscale DNS API
* add internetbs.net DNS API
Changed:
* use a dedicated acme.sh runtime directory for every cert (#3127)
@@ -1772,4 +1772,19 @@
<label>Secret Key</label>
<type>password</type>
</field>
<field>
<label>internetbs.net</label>
<type>header</type>
<style>table_dns table_dns_internetbs</style>
</field>
<field>
<id>validation.dns_internetbs_key</id>
<label>API Key</label>
<type>text</type>
</field>
<field>
<id>validation.dns_internetbs_password</id>
<label>Password</label>
<type>password</type>
</field>
</form>
@@ -0,0 +1,44 @@
<?php
/*
* Copyright (C) 2024 Frank Wall
*
* 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;
/**
* internetbs.net API
* @package OPNsense\AcmeClient
*/
class DnsInternetbs extends Base implements LeValidationInterface
{
public function prepare()
{
$this->acme_env['INTERNETBS_API_KEY'] = (string)$this->config->dns_internetbs_key;
$this->acme_env['INTERNETBS_API_PASSWORD'] = (string)$this->config->dns_internetbs_password;
}
}
@@ -471,6 +471,7 @@
<dns_he>Hurricane Electric</dns_he>
<dns_infoblox>Infoblox</dns_infoblox>
<dns_infomaniak>Infomaniak</dns_infomaniak>
<dns_internetbs>internetbs.net</dns_internetbs>
<dns_inwx>INWX XMLRPC</dns_inwx>
<dns_ionos>IONOS domain</dns_ionos>
<dns_ipv64>IPv64.net</dns_ipv64>
@@ -1230,6 +1231,12 @@
<dns_exoscale_secret type="TextField">
<Required>N</Required>
</dns_exoscale_secret>
<dns_internetbs_key type="TextField">
<Required>N</Required>
</dns_internetbs_key>
<dns_internetbs_password type="TextField">
<Required>N</Required>
</dns_internetbs_password>
</validation>
</validations>
<actions>