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

This commit is contained in:
Frank Wall
2024-01-11 00:27:39 +01:00
parent 2b8c1f6679
commit 6db88d7ce0
4 changed files with 67 additions and 0 deletions
+1
View File
@@ -17,6 +17,7 @@ full backup and include /var/etc/acme-client.
Added:
* add Aurora DNS API
* add ConoHa DNS API
* add Constellix DNS API
Changed:
* use a dedicated acme.sh runtime directory for every cert (#3127)
@@ -1742,4 +1742,19 @@
<label>Identity Service API</label>
<type>text</type>
</field>
<field>
<label>Constellix</label>
<type>header</type>
<style>table_dns table_dns_constellix</style>
</field>
<field>
<id>validation.dns_constellix_key</id>
<label>Key</label>
<type>text</type>
</field>
<field>
<id>validation.dns_constellix_secret</id>
<label>Secret</label>
<type>password</type>
</field>
</form>
@@ -0,0 +1,44 @@
<?php
/*
* Copyright (C) 2024 Frank Wall
*
* 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;
/**
* Constellix API
* @package OPNsense\AcmeClient
*/
class DnsConstellix extends Base implements LeValidationInterface
{
public function prepare()
{
$this->acme_env['CONSTELLIX_Key'] = (string)$this->config->dns_constellix_key;
$this->acme_env['CONSTELLIX_Secret'] = (string)$this->config->dns_constellix_secret;
}
}
@@ -436,6 +436,7 @@
<dns_cx>CloudXNS.com</dns_cx>
<dns_cn>Core-Networks</dns_cn>
<dns_conoha>ConoHa</dns_conoha>
<dns_constellix>Constellix</dns_constellix>
<dns_cpanel>cPanel</dns_cpanel>
<dns_cyon>cyon.ch</dns_cyon>
<dns_ddnss>DDNSS</dns_ddnss>
@@ -1216,6 +1217,12 @@
<Required>N</Required>
<default>https://identity.xxxx.conoha.io/v2.0</default>
</dns_conoha_idapi>
<dns_constellix_key type="TextField">
<Required>N</Required>
</dns_constellix_key>
<dns_constellix_secret type="TextField">
<Required>N</Required>
</dns_constellix_secret>
</validation>
</validations>
<actions>