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

This commit is contained in:
Frank Wall
2024-01-11 00:27:39 +01:00
parent b76b978fe7
commit 0da8174c36
4 changed files with 67 additions and 0 deletions
+1
View File
@@ -21,6 +21,7 @@ Added:
* add Exoscale DNS API
* add internetbs.net DNS API
* add PointHQ DNS API
* add Rackspace DNS API
Changed:
* use a dedicated acme.sh runtime directory for every cert (#3127)
@@ -1802,4 +1802,19 @@
<label>E-Mail</label>
<type>text</type>
</field>
<field>
<label>Rackspace</label>
<type>header</type>
<style>table_dns table_dns_rackspace</style>
</field>
<field>
<id>validation.dns_rackspace_user</id>
<label>Username</label>
<type>text</type>
</field>
<field>
<id>validation.dns_rackspace_key</id>
<label>API Key</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;
/**
* Rackspace API
* @package OPNsense\AcmeClient
*/
class DnsRackspace extends Base implements LeValidationInterface
{
public function prepare()
{
$this->acme_env['RACKSPACE_Username'] = (string)$this->config->dns_rackspace_user;
$this->acme_env['RACKSPACE_Apikey'] = (string)$this->config->dns_rackspace_key;
}
}
@@ -504,6 +504,7 @@
<dns_pleskxml>Plesk</dns_pleskxml>
<dns_pointhq>PointHQ</dns_pointhq>
<dns_porkbun>Porkbun</dns_porkbun>
<dns_rackspace>Rackspace</dns_rackspace>
<dns_regru>RegRu</dns_regru>
<dns_schlundtech>SchlundTech</dns_schlundtech>
<dns_selectel>selectel.com / selectel.ru</dns_selectel>
@@ -1244,6 +1245,12 @@
<dns_pointhq_email type="TextField">
<Required>N</Required>
</dns_pointhq_email>
<dns_rackspace_user type="TextField">
<Required>N</Required>
</dns_rackspace_user>
<dns_rackspace_key type="TextField">
<Required>N</Required>
</dns_rackspace_key>
</validation>
</validations>
<actions>