Skip to content

Commit

Permalink
security/acme-client: Added native support for Vultr DNS API (#2344)
Browse files Browse the repository at this point in the history
* Add native support for Vultr DNS API
  • Loading branch information
djh-live-apps committed May 11, 2021
1 parent 9b0806b commit 13f5596
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,21 @@
<label>API Key</label>
<type>text</type>
</field>
<field>
<label>Vultr Cloud API</label>
<type>header</type>
<style>table_dns table_dns_vultr</style>
</field>
<field>
<label>NOTE: A DNS sleep time of at least 1000 is recommended.</label>
<type>header</type>
<style>table_dns table_dns_vultr</style>
</field>
<field>
<id>validation.dns_vultr_key</id>
<label>Key</label>
<type>text</type>
</field>
<field>
<label>Yandex</label>
<type>header</type>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?php

/*
* Copyright (C) 2021 David Hughes
* 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;

/**
* Vultr DNS API
* @package OPNsense\AcmeClient
*/
class DnsVultr extends Base implements LeValidationInterface
{
public function prepare()
{
$this->acme_env['VULTR_API_KEY'] = (string)$this->config->dns_vultr_key;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@
<dns_unoeuro>UnoEuro API</dns_unoeuro>
<dns_variomedia>Variomedia.de API</dns_variomedia>
<dns_vscale>Vscale API</dns_vscale>
<dns_vultr>Vultr API</dns_vultr>
<dns_yandex>Yandex PDD API</dns_yandex>
<dns_zilore>Zilore DNS API</dns_zilore>
<dns_zonomi>zonomi.com domain API</dns_zonomi>
Expand Down Expand Up @@ -853,6 +854,9 @@
<dns_vscale_key type="TextField">
<Required>N</Required>
</dns_vscale_key>
<dns_vultr_key type="TextField">
<Required>N</Required>
</dns_vultr_key>
<dns_yandex_token type="TextField">
<Required>N</Required>
</dns_yandex_token>
Expand Down

0 comments on commit 13f5596

Please sign in to comment.