security/acme-client: add support for ArtFiles DNS API

This commit is contained in:
Michael Klein
2024-03-21 12:26:28 +01:00
parent cf4fa70cd2
commit e18f0ef182
3 changed files with 67 additions and 0 deletions
@@ -1483,6 +1483,21 @@
<label>API Token</label>
<type>password</type>
</field>
<field>
<label>ArtFiles DNS API</label>
<type>header</type>
<style>table_dns table_dns_artfiles</style>
</field>
<field>
<id>validation.dns_artfiles_username</id>
<label>API Username</label>
<type>text</type>
</field>
<field>
<id>validation.dns_artfiles_password</id>
<label>API Password</label>
<type>password</type>
</field>
<field>
<label>Hetzner DNS API</label>
<type>header</type>
@@ -0,0 +1,45 @@
<?php
/*
* Copyright (C) 2024 MVZ Labor Ludwigsburg GbR
* 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;
/**
* Artfiles DNS API
* @package OPNsense\AcmeClient
*/
class DnsArtfiles extends Base implements LeValidationInterface
{
public function prepare()
{
$this->acme_env['AF_API_USERNAME'] = (string)$this->config->dns_artfiles_username;
$this->acme_env['AF_API_PASSWORD'] = (string)$this->config->dns_artfiles_password;
}
}
@@ -426,6 +426,7 @@
<dns_ali>aliyun.com</dns_ali>
<dns_kas>All-Inkl.com</dns_kas>
<dns_arvan>ArvanCloud</dns_arvan>
<dns_artfiles>ArtFiles</dns_artfiles>
<dns_aurora>Aurora (PCextreme/Versio)</dns_aurora>
<dns_autodns>AutoDNS (InterNetX)</dns_autodns>
<dns_aws>AWS Route 53</dns_aws>
@@ -1123,6 +1124,12 @@
<dns_arvan_token type="TextField">
<Required>N</Required>
</dns_arvan_token>
<dns_artfiles_username type="TextField">
<Required>N</Required>
</dns_artfiles_username>
<dns_artfiles_password type="TextField">
<Required>N</Required>
</dns_artfiles_password>
<dns_hetzner_token type="TextField">
<Required>N</Required>
</dns_hetzner_token>