security/acme-client: add support for IONOS domain API, fixes #2345

This commit is contained in:
Frank Wall
2021-07-09 12:15:06 +02:00
parent 66ad35a410
commit f7bdcda43c
4 changed files with 68 additions and 0 deletions
+1
View File
@@ -16,6 +16,7 @@ Added:
* add support for Zone.eu DNS API (#2417)
* add support for Njalla DNS API (#2446)
* add support for Domeneshop DNS API (#2390)
* add support for IONOS domain API (#2345)
Fixed:
* sftp update of write protected cert files with a numeric owner (#2426)
@@ -550,6 +550,21 @@
<label>Password</label>
<type>password</type>
</field>
<field>
<label>IONOS domain API</label>
<type>header</type>
<style>table_dns table_dns_ionos</style>
</field>
<field>
<id>validation.dns_ionos_prefix</id>
<label>Prefix</label>
<type>text</type>
</field>
<field>
<id>validation.dns_ionos_secret</id>
<label>Secret</label>
<type>password</type>
</field>
<field>
<label>IPSConfig</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;
/**
* IONOS API
* @package OPNsense\AcmeClient
*/
class DnsIonos extends Base implements LeValidationInterface
{
public function prepare()
{
$this->acme_env['IONOS_PREFIX'] = (string)$this->config->dns_ionos_prefix;
$this->acme_env['IONOS_SECRET'] = (string)$this->config->dns_ionos_secret;
}
}
@@ -409,6 +409,7 @@
<dns_infoblox>Infoblox API</dns_infoblox>
<dns_infomaniak>Infomaniak API</dns_infomaniak>
<dns_inwx>INWX XMLRPC API</dns_inwx>
<dns_ionos>IONOS domain API</dns_ionos>
<dns_ispconfig>ISPConfig 3.1+ API</dns_ispconfig>
<dns_joker>Joker API</dns_joker>
<dns_kinghost>KingHost DNS API</dns_kinghost>
@@ -621,6 +622,12 @@
<dns_inws_password type="TextField">
<Required>N</Required>
</dns_inws_password>
<dns_ionos_prefix type="TextField">
<Required>N</Required>
</dns_ionos_prefix>
<dns_ionos_secret type="TextField">
<Required>N</Required>
</dns_ionos_secret>
<dns_ispconfig_user type="TextField">
<Required>N</Required>
</dns_ispconfig_user>