security/acme-client: Add support for Njalla DNS API (#2446)

* Add Njalla API support
This commit is contained in:
Nim G
2021-07-09 11:28:32 +02:00
committed by GitHub
parent c4ae96d6a5
commit 2236c55c1f
3 changed files with 58 additions and 0 deletions
@@ -812,6 +812,16 @@
<label>API Password</label>
<type>text</type>
</field>
<field>
<label>Njalla</label>
<type>header</type>
<style>table_dns table_dns_njalla</style>
</field>
<field>
<id>validation.dns_njalla_token</id>
<label>API Token</label>
<type>text</type>
</field>
<field>
<label>NS1.com</label>
<type>header</type>
@@ -0,0 +1,44 @@
<?php
/*
* Copyright (C) 2020 Frank Wall
* 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;
/**
* Njalla API
* @package OPNsense\AcmeClient
*/
class DnsNjalla extends Base implements LeValidationInterface
{
public function prepare()
{
$this->acme_env['NJALLA_Token'] = (string)$this->config->dns_njalla_token;
}
}
@@ -424,6 +424,7 @@
<dns_namesilo>Namesilo.com API</dns_namesilo>
<dns_nederhost>Nederhost API</dns_nederhost>
<dns_netcup>netcup DNS API</dns_netcup>
<dns_njalla>Njalla API</dns_njalla>
<dns_nsone>NS1.com API</dns_nsone>
<dns_nsupdate>nsupdate (RFC 2136)</dns_nsupdate>
<dns_opnsense>OPNsense BIND Plugin</dns_opnsense>
@@ -784,6 +785,9 @@
<dns_netcup_pw type="TextField">
<Required>N</Required>
</dns_netcup_pw>
<dns_njalla_token type="TextField">
<Required>N</Required>
</dns_njalla_token>
<dns_nsone_key type="TextField">
<Required>N</Required>
</dns_nsone_key>