Merge pull request #5020 from flortsch/feature/hetzner-cloud-dns

security/acme-client: add support for Hetzner Cloud DNS API
This commit is contained in:
Frank Wall 2025-11-24 15:33:21 +01:00 committed by GitHub
commit 094a8fc068
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 58 additions and 0 deletions

View File

@ -1590,6 +1590,16 @@
<label>API Token</label> <label>API Token</label>
<type>password</type> <type>password</type>
</field> </field>
<field>
<label>Hetzner Cloud DNS API</label>
<type>header</type>
<style>table_dns table_dns_hetznercloud</style>
</field>
<field>
<id>validation.dns_hetznercloud_token</id>
<label>API Token</label>
<type>password</type>
</field>
<field> <field>
<label>1984Hosting API</label> <label>1984Hosting API</label>
<type>header</type> <type>header</type>

View File

@ -0,0 +1,44 @@
<?php
/*
* Copyright (C) 2025 Florian Latifi
* 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;
/**
* Hetzner Cloud DNS API
* @package OPNsense\AcmeClient
*/
class DnsHetznercloud extends Base implements LeValidationInterface
{
public function prepare()
{
$this->acme_env['HETZNER_TOKEN'] = (string)$this->config->dns_hetznercloud_token;
}
}

View File

@ -469,6 +469,7 @@
<dns_googledomains>Google Domains</dns_googledomains> <dns_googledomains>Google Domains</dns_googledomains>
<dns_gdnsdk>GratisDNS.dk</dns_gdnsdk> <dns_gdnsdk>GratisDNS.dk</dns_gdnsdk>
<dns_hetzner>Hetzner</dns_hetzner> <dns_hetzner>Hetzner</dns_hetzner>
<dns_hetznercloud>Hetzner Cloud</dns_hetznercloud>
<dns_hexonet>hexonet.com</dns_hexonet> <dns_hexonet>hexonet.com</dns_hexonet>
<dns_hostingde>hosting.de</dns_hostingde> <dns_hostingde>hosting.de</dns_hostingde>
<dns_he>Hurricane Electric</dns_he> <dns_he>Hurricane Electric</dns_he>
@ -1177,6 +1178,9 @@
<dns_hetzner_token type="TextField"> <dns_hetzner_token type="TextField">
<Required>N</Required> <Required>N</Required>
</dns_hetzner_token> </dns_hetzner_token>
<dns_hetznercloud_token type="TextField">
<Required>N</Required>
</dns_hetznercloud_token>
<dns_hexonet_login type="TextField"> <dns_hexonet_login type="TextField">
<Required>N</Required> <Required>N</Required>
</dns_hexonet_login> </dns_hexonet_login>