security/acme-client: Add support for MyDNS.JP DNS API (#4328)

Added support for mydns.jp to acme client's WebGUI.
This commit is contained in:
W516 2024-12-18 00:33:29 +09:00 committed by GitHub
parent 5bcbe9adc7
commit 83dee33e3a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 63 additions and 0 deletions

View file

@ -935,6 +935,21 @@
<type>text</type>
<help>MailinaBox Server FQDN</help>
</field>
<field>
<label>MyDNS.JP</label>
<type>header</type>
<style>table_dns table_dns_mydnsjp</style>
</field>
<field>
<id>validation.dns_mydnsjp_masterid</id>
<label>Master ID</label>
<type>text</type>
</field>
<field>
<id>validation.dns_mydnsjp_password</id>
<label>Password</label>
<type>password</type>
</field>
<field>
<label>Mythic Beasts</label>
<type>header</type>

View file

@ -0,0 +1,41 @@
<?php
/*
* Copyright (C) 2024 W516
*
* 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;
class DnsMydnsjp extends Base implements LeValidationInterface
{
public function prepare()
{
$this->acme_env['MYDNSJP_MasterID'] = (string)$this->config->dns_mydnsjp_masterid;
$this->acme_env['MYDNSJP_Password'] = (string)$this->config->dns_mydnsjp_password;
}
}

View file

@ -490,6 +490,7 @@
<dns_loopia>Loopia</dns_loopia>
<dns_lua>LuaDNS.com</dns_lua>
<dns_miab>MailinaBox</dns_miab>
<dns_mydnsjp>MyDNS.JP</dns_mydnsjp>
<dns_mythic_beasts>Mythic Beasts</dns_mythic_beasts>
<dns_namecom>Name.com</dns_namecom>
<dns_namecheap>Namecheap</dns_namecheap>
@ -906,6 +907,12 @@
<dns_me_secret type="TextField">
<Required>N</Required>
</dns_me_secret>
<dns_mydnsjp_masterid type="TextField">
<Required>N</Required>
</dns_mydnsjp_masterid>
<dns_mydnsjp_password type="TextField">
<Required>N</Required>
</dns_mydnsjp_password>
<dns_mythic_beasts_key type="TextField">
<Required>N</Required>
</dns_mythic_beasts_key>