Merge pull request #3319 from jan-win1993/acme-jdcloud-dns-api

security/acme: Add JD Cloud API dns challenge type, closes #3315
This commit is contained in:
Frank Wall
2023-02-21 22:21:27 +01:00
committed by GitHub
4 changed files with 77 additions and 0 deletions
+1
View File
@@ -11,6 +11,7 @@ Plugin Changelog
3.16
Added:
* add JD Cloud DNS API (#3315)
* new automation: deploy certificates on Palo Alto Networks Firewall (#3289)
3.15
@@ -644,6 +644,26 @@
<type>checkbox</type>
<help>Uncheck this box if you have a valid SSL certificate for your ISPConfig installation.</help>
</field>
<field>
<label>JD Cloud</label>
<type>header</type>
<style>table_dns table_dns_jd</style>
</field>
<field>
<id>validation.dns_jd_id</id>
<label>API key id</label>
<type>text</type>
</field>
<field>
<id>validation.dns_jd_region</id>
<label>JD Cloud region</label>
<type>text</type>
</field>
<field>
<id>validation.dns_jd_secret</id>
<label>API key secret</label>
<type>text</type>
</field>
<field>
<label>Joker</label>
<type>header</type>
@@ -0,0 +1,46 @@
<?php
/*
* Copyright (C) 2023 Jan Winkler
* 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;
/**
* JD Cloud DNS API
* @package OPNsense\AcmeClient
*/
class DnsJd extends Base implements LeValidationInterface
{
public function prepare()
{
$this->acme_env['JD_ACCESS_KEY_ID'] = (string)$this->config->dns_jd_id;
$this->acme_env['JD_REGION'] = (string)$this->config->dns_jd_region;
$this->acme_env['JD_ACCESS_KEY_SECRET'] = (string)$this->config->dns_jd_secret;
}
}
@@ -465,6 +465,7 @@
<dns_inwx>INWX XMLRPC</dns_inwx>
<dns_ionos>IONOS domain</dns_ionos>
<dns_ispconfig>ISPConfig 3.1+</dns_ispconfig>
<dns_jd>JD Cloud</dns_jd>
<dns_joker>Joker</dns_joker>
<dns_kinghost>KingHost</dns_kinghost>
<dns_knot>Knot (knsupdate)</dns_knot>
@@ -708,6 +709,15 @@
<Required>N</Required>
<default>1</default>
</dns_ispconfig_insecure>
<dns_jd_id type="TextField">
<Required>N</Required>
</dns_jd_id>
<dns_jd_region type="TextField">
<Required>N</Required>
</dns_jd_region>
<dns_jd_secret type="TextField">
<Required>N</Required>
</dns_jd_secret>
<dns_joker_username type="TextField">
<Required>N</Required>
</dns_joker_username>