security/acme-client: add support for Domeneshop DNS API, fixes #2390

This commit is contained in:
Frank Wall
2021-07-09 12:07:52 +02:00
parent a4efaae149
commit 66ad35a410
4 changed files with 68 additions and 0 deletions
+1
View File
@@ -15,6 +15,7 @@ Added:
* add support for DDNSS DNS API (#2415)
* add support for Zone.eu DNS API (#2417)
* add support for Njalla DNS API (#2446)
* add support for Domeneshop DNS API (#2390)
Fixed:
* sftp update of write protected cert files with a numeric owner (#2426)
@@ -339,6 +339,21 @@
<label>Password</label>
<type>password</type>
</field>
<field>
<label>Domeneshop DNS API</label>
<type>header</type>
<style>table_dns table_dns_domeneshop</style>
</field>
<field>
<id>validation.dns_domeneshop_token</id>
<label>Token</label>
<type>text</type>
</field>
<field>
<id>validation.dns_domeneshop_secret</id>
<label>Secret</label>
<type>password</type>
</field>
<field>
<label>DNSPod</label>
<type>header</type>
@@ -0,0 +1,45 @@
<?php
/*
* Copyright (C) 2021 Frank Wall
* 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;
/**
* Domeneshop API
* @package OPNsense\AcmeClient
*/
class DnsDomeneshop extends Base implements LeValidationInterface
{
public function prepare()
{
$this->acme_env['DOMENESHOP_Token'] = (string)$this->config->dns_domeneshop_token;
$this->acme_env['DOMENESHOP_Secret'] = (string)$this->config->dns_domeneshop_secret;
}
}
@@ -387,6 +387,7 @@
<dns_dgon>DigitalOcean API</dns_dgon>
<dns_da>DirectAdmin API</dns_da>
<dns_dnsimple>DNSimple API</dns_dnsimple>
<dns_domeneshop>Domeneshop API</dns_domeneshop>
<dns_me>DNSMadeEasy.com API</dns_me>
<dns_dp>DNSPod.cn API</dns_dp>
<dns_doapi>Domain-Offensive LetsEncrypt API</dns_doapi>
@@ -545,6 +546,12 @@
<dns_do_password type="TextField">
<Required>N</Required>
</dns_do_password>
<dns_domeneshop_token type="TextField">
<Required>N</Required>
</dns_domeneshop_token>
<dns_domeneshop_secret type="TextField">
<Required>N</Required>
</dns_domeneshop_secret>
<dns_dp_id type="TextField">
<Required>N</Required>
</dns_dp_id>