Merge pull request #4492 from ybayart/master

security/acme-client: Add support for Scaleway DNS challenge
This commit is contained in:
Frank Wall 2025-02-19 11:08:20 +01:00 committed by GitHub
commit 6a7e13a5fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 58 additions and 0 deletions

View file

@ -1924,4 +1924,14 @@
<label>Token</label>
<type>password</type>
</field>
<field>
<label>scaleway</label>
<type>header</type>
<style>table_dns table_dns_scaleway</style>
</field>
<field>
<id>validation.dns_scaleway_token</id>
<label>API Key</label>
<type>text</type>
</field>
</form>

View file

@ -0,0 +1,44 @@
<?php
/*
* Copyright (C) 2025 Yann Bayart
* 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;
/**
* scaleway DNS API
* @package OPNsense\AcmeClient
*/
class DnsScaleway extends Base implements LeValidationInterface
{
public function prepare()
{
$this->acme_env['SCALEWAY_API_TOKEN'] = (string)$this->config->dns_scaleway_token;
}
}

View file

@ -513,6 +513,7 @@
<dns_rackspace>Rackspace</dns_rackspace>
<dns_rage4>rage4</dns_rage4>
<dns_regru>RegRu</dns_regru>
<dns_scaleway>Scaleway</dns_scaleway>
<dns_schlundtech>SchlundTech</dns_schlundtech>
<dns_selectel>selectel.com / selectel.ru</dns_selectel>
<dns_selfhost>Selfhost</dns_selfhost>
@ -1307,6 +1308,9 @@
<dns_rage4_user type="TextField">
<Required>N</Required>
</dns_rage4_user>
<dns_scaleway_token type="TextField">
<Required>N</Required>
</dns_scaleway_token>
</validation>
</validations>
<actions>