security/acme-client: Add fornex API dns challenge type (#4389)

security/acme-client: Add fornex API dns challenge type
This commit is contained in:
Mihail 2024-12-17 18:39:10 +03:00 committed by GitHub
parent afa69999be
commit ee2eda08ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 58 additions and 0 deletions

View file

@ -552,6 +552,16 @@
<label>Password</label>
<type>password</type>
</field>
<field>
<label>Fornex</label>
<type>header</type>
<style>table_dns table_dns_fornex</style>
</field>
<field>
<id>validation.dns_fornex_api_key</id>
<label>ApiKey</label>
<type>password</type>
</field>
<field>
<label>Gandi LiveDNS</label>
<type>header</type>

View file

@ -0,0 +1,44 @@
<?php
/*
* Copyright (C) 2024 Mikhail Kharisov
* 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;
/**
* Fornex DNS API
* @package OPNsense\AcmeClient
*/
class DnsFornex extends Base implements LeValidationInterface
{
public function prepare()
{
$this->acme_env['FORNEX_API_KEY'] = (string)$this->config->dns_fornex_api_key;
}
}

View file

@ -461,6 +461,7 @@
<dns_easydns>EasyDNS</dns_easydns>
<dns_euserv>EUserv</dns_euserv>
<dns_exoscale>Exoscale</dns_exoscale>
<dns_fornex>Fornex</dns_fornex>
<dns_freedns>FreeDNS</dns_freedns>
<dns_gandi_livedns>Gandi LiveDNS</dns_gandi_livedns>
<dns_gd>GoDaddy.com</dns_gd>
@ -700,6 +701,9 @@
<dns_freedns_password type="TextField">
<Required>N</Required>
</dns_freedns_password>
<dns_fornex_api_key type="TextField">
<Required>N</Required>
</dns_fornex_api_key>
<dns_gandi_livedns_key type="TextField">
<Required>N</Required>
</dns_gandi_livedns_key>