Skip to content

Commit 7b4fb47

Browse files
committed
security/acme-client: Add support domains.google
Adds support for Google Domains DNS-01 ACME challenge API added to latest upstream acme.sh. This is separate from the Google Cloud API. https://domains.google/learn/gts-acme/ See acmesh-official/acme.sh#4542
1 parent ec4d291 commit 7b4fb47

File tree

4 files changed

+78
-0
lines changed

4 files changed

+78
-0
lines changed

security/acme-client/pkg-descr

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ WWW: https://github.com/acmesh-official/acme.sh
77

88
Plugin Changelog
99
================
10+
3.18
11+
12+
Added:
13+
* add Google Domains DNS API
1014

1115
3.17
1216

security/acme-client/src/opnsense/mvc/app/controllers/OPNsense/AcmeClient/forms/dialogValidation.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,26 @@
556556
<label>Secret</label>
557557
<type>text</type>
558558
</field>
559+
<field>
560+
<label>Google Domains</label>
561+
<type>header</type>
562+
<style>table_dns table_dns_googledomains</style>
563+
</field>
564+
<field>
565+
<id>validation.dns_googledomains_access_token</id>
566+
<label>Access Token</label>
567+
<type>text</type>
568+
</field>
569+
<field>
570+
<id>validation.dns_googledomains_api_endpoint</id>
571+
<label>API Endpoint</label>
572+
<type>text</type>
573+
</field>
574+
<field>
575+
<id>validation.dns_googledomains_zone</id>
576+
<label>Zone</label>
577+
<type>text</type>
578+
</field>
559579
<field>
560580
<label>hosting.de</label>
561581
<type>header</type>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?php
2+
3+
/*
4+
* Redistribution and use in source and binary forms, with or without
5+
* modification, are permitted provided that the following conditions are met:
6+
*
7+
* 1. Redistributions of source code must retain the above copyright notice,
8+
* this list of conditions and the following disclaimer.
9+
*
10+
* 2. Redistributions in binary form must reproduce the above copyright
11+
* notice, this list of conditions and the following disclaimer in the
12+
* documentation and/or other materials provided with the distribution.
13+
*
14+
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
15+
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
16+
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
17+
* AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
18+
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19+
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20+
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21+
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22+
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
23+
* POSSIBILITY OF SUCH DAMAGE.
24+
*/
25+
26+
namespace OPNsense\AcmeClient\LeValidation;
27+
28+
use OPNsense\AcmeClient\LeValidationInterface;
29+
use OPNsense\Core\Config;
30+
31+
/**
32+
* Google Domains DNS API
33+
* @package OPNsense\AcmeClient
34+
*/
35+
class DnsGoogleDomains extends Base implements LeValidationInterface
36+
{
37+
public function prepare()
38+
{
39+
$this->acme_env['GOOGLEDOMAINS_API'] = (string)$this->config->dns_googledomains_api_endpoint;
40+
$this->acme_env['GOOGLEDOMAINS_ACCESS_TOKEN'] = (string)$this->config->dns_googledomains_access_token;
41+
$this->acme_env['GOOGLEDOMAINS_ZONE'] = (string)$this->config->dns_googledomains_zone;
42+
}
43+
}

security/acme-client/src/opnsense/mvc/app/models/OPNsense/AcmeClient/AcmeClient.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,7 @@
456456
<dns_gandi_livedns>Gandi LiveDNS</dns_gandi_livedns>
457457
<dns_gd>GoDaddy.com</dns_gd>
458458
<dns_gcloud>Google Cloud DNS</dns_gcloud>
459+
<dns_googledomains>Google Domains</dns_googledomains>
459460
<dns_gdnsdk>GratisDNS.dk</dns_gdnsdk>
460461
<dns_hetzner>Hetzner</dns_hetzner>
461462
<dns_hexonet>hexonet.com</dns_hexonet>
@@ -668,6 +669,16 @@
668669
<dns_gcloud_key type="TextField">
669670
<Required>N</Required>
670671
</dns_gcloud_key>
672+
<dns_googledomains_access_token type="TextField">
673+
<Required>N</Required>
674+
</dns_googledomains_access_token>
675+
<dns_googledomains_api_endpoint type="TextField">
676+
<Required>N</Required>
677+
<default>https://acmedns.googleapis.com/v1/acmeChallengeSets</default>
678+
</dns_googledomains_api_endpoint>
679+
<dns_googledomains_zone type="TextField">
680+
<Required>N</Required>
681+
</dns_googledomains_zone>
671682
<dns_gd_key type="TextField">
672683
<Required>N</Required>
673684
</dns_gd_key>

0 commit comments

Comments
 (0)