security/acme-client: Add support for mijn.host DNS challenge (#4446)

* Add support for mijn.host DNS challenge.
This commit is contained in:
Peter
2025-11-30 22:34:50 +01:00
committed by GitHub
parent fafe14b7bd
commit ce2dfe7705
3 changed files with 57 additions and 0 deletions
@@ -1950,6 +1950,15 @@
<type>password</type>
</field>
<field>
<label>mijn.host</label>
<type>header</type>
<style>table_dns table_dns_mijnhost</style>
</field>
<field>
<id>validation.dns_mijnhost_api_key</id>
<label>API Key</label>
<type>text</type>
<help><![CDATA[Please refer to the <a href="https://mijn.host/api/doc/">API documentation</a> for further information.]]></help>
<label>scaleway</label>
<type>header</type>
<style>table_dns table_dns_scaleway</style>
@@ -0,0 +1,44 @@
<?php
/*
* Copyright (C) 2025 Peter Vos
* 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;
/**
* mijn.host DNS API
* @package OPNsense\AcmeClient
*/
class DnsMijnhost extends Base implements LeValidationInterface
{
public function prepare()
{
$this->acme_env['MIJNHOST_API_KEY'] = (string)$this->config->dns_mijnhost_api_key;
}
}
@@ -492,6 +492,7 @@
<dns_loopia>Loopia</dns_loopia>
<dns_lua>LuaDNS.com</dns_lua>
<dns_miab>MailinaBox</dns_miab>
<dns_mijnhost>mijn.host</dns_mijnhost>
<dns_mydnsjp>MyDNS.JP</dns_mydnsjp>
<dns_mythic_beasts>Mythic Beasts</dns_mythic_beasts>
<dns_namecom>Name.com</dns_namecom>
@@ -1319,6 +1320,9 @@
<dns_rage4_user type="TextField">
<Required>N</Required>
</dns_rage4_user>
<dns_mijnhost_api_key type="TextField">
<Required>N</Required>
</dns_mijnhost_api_key>
<dns_scaleway_token type="TextField">
<Required>N</Required>
</dns_scaleway_token>