security/acme-client: add support for Websupport.sk DNS API, closes #4540

This commit is contained in:
Frank Wall
2025-06-17 14:44:16 +02:00
parent 82cff66d04
commit 417ad699e2
4 changed files with 67 additions and 0 deletions
+1
View File
@@ -12,6 +12,7 @@ Plugin Changelog
Added:
* new automation to reload www/caddy (#4692)
* add support for Websupport.sk DNS API (#4540)
Changed:
* automatically resolve cron job mismatch (#4627)
@@ -1779,6 +1779,21 @@
<label>ClientSecret</label>
<type>password</type>
</field>
<field>
<label>Websupport.sk</label>
<type>header</type>
<style>table_dns table_dns_websupport</style>
</field>
<field>
<id>validation.dns_websupport_api_key</id>
<label>Identifier</label>
<type>text</type>
</field>
<field>
<id>validation.dns_websupport_api_secret</id>
<label>Secret key</label>
<type>password</type>
</field>
<field>
<label>World4You</label>
<type>header</type>
@@ -0,0 +1,44 @@
<?php
/*
* Copyright (C) 2025 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;
/**
* Websupport DNS API
* @package OPNsense\AcmeClient
*/
class DnsWebsupport extends Base implements LeValidationInterface
{
public function prepare()
{
$this->acme_env['WS_ApiKey'] = (string)$this->config->dns_websupport_api_key;
$this->acme_env['WS_ApiSecret'] = (string)$this->config->dns_websupport_api_secret;
}
}
@@ -525,6 +525,7 @@
<dns_variomedia>Variomedia.de</dns_variomedia>
<dns_vscale>Vscale</dns_vscale>
<dns_vultr>Vultr</dns_vultr>
<dns_websupport>Websupport.sk</dns_websupport>
<dns_world4you>World4You</dns_world4you>
<dns_yandex>Yandex PDD</dns_yandex>
<dns_zilore>Zilore</dns_zilore>
@@ -1247,6 +1248,12 @@
<dns_nic_secret type="TextField">
<Required>N</Required>
</dns_nic_secret>
<dns_websupport_api_key type="TextField">
<Required>N</Required>
</dns_websupport_api_key>
<dns_websupport_api_secret type="TextField">
<Required>N</Required>
</dns_websupport_api_secret>
<dns_world4you_username type="TextField">
<Required>N</Required>
</dns_world4you_username>