Merge pull request #3359 from dmitry-sk/master

security/acme-client: Add RegRu API dns challenge type
This commit is contained in:
Frank Wall
2023-05-08 12:17:04 +02:00
committed by GitHub
4 changed files with 68 additions and 0 deletions
+1
View File
@@ -11,6 +11,7 @@ Plugin Changelog
3.16
Added:
* add RegRu DNS API
* add JD Cloud DNS API (#3315)
* new automation: deploy certificates on Palo Alto Networks Firewall (#3289)
@@ -1556,4 +1556,19 @@
<type>text</type>
<help>EX: https://hostname:2083</help>
</field>
<field>
<label>regru</label>
<type>header</type>
<style>table_dns table_dns_regru</style>
</field>
<field>
<id>validation.dns_regru_username</id>
<label>User</label>
<type>text</type>
</field>
<field>
<id>validation.dns_regru_password</id>
<label>Password</label>
<type>password</type>
</field>
</form>
@@ -0,0 +1,45 @@
<?php
/*
* Copyright (C) 2023 Dmitry Shinkaruk
* 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;
/**
* RegRu DNS API
* @package OPNsense\AcmeClient
*/
class DnsRegru extends Base implements LeValidationInterface
{
public function prepare()
{
$this->acme_env['REGRU_API_Username'] = (string)$this->config->dns_regru_username;
$this->acme_env['REGRU_API_Password'] = (string)$this->config->dns_regru_password;
}
}
@@ -491,6 +491,7 @@
<dns_pdns>PowerDNS.com</dns_pdns>
<dns_pleskxml>Plesk</dns_pleskxml>
<dns_porkbun>Porkbun</dns_porkbun>
<dns_regru>regru</dns_regru>
<dns_schlundtech>SchlundTech</dns_schlundtech>
<dns_selectel>selectel.com / selectel.ru</dns_selectel>
<dns_selfhost>Selfhost</dns_selfhost>
@@ -1126,6 +1127,12 @@
<dns_cpanel_hostname type="TextField">
<Required>N</Required>
</dns_cpanel_hostname>
<dns_regru_username type="TextField">
<Required>N</Required>
</dns_regru_username>
<dns_regru_password type="TextField">
<Required>N</Required>
</dns_regru_password>
</validation>
</validations>
<actions>