diff --git a/security/acme-client/pkg-descr b/security/acme-client/pkg-descr
index 46af10d17..ff97285f0 100644
--- a/security/acme-client/pkg-descr
+++ b/security/acme-client/pkg-descr
@@ -14,12 +14,14 @@ Added:
* Add support for MyDNS.JP DNS API (#4328)
* Add support for fornex DNS API (#4389)
* Add support for OTP Code to Synology deploy hook (#4045)
+* Add support for Shared Secret to INWX DNS API (#3942)
Changed:
* Convert Synology deploy hook variables to uppercase (#4286)
Fixed:
* SFTP/SSH automation results in fatal PHP error (#4363)
+* Typo in INWX password field name
4.6
diff --git a/security/acme-client/src/opnsense/mvc/app/controllers/OPNsense/AcmeClient/forms/dialogValidation.xml b/security/acme-client/src/opnsense/mvc/app/controllers/OPNsense/AcmeClient/forms/dialogValidation.xml
index 56b38f1de..702aa67c9 100644
--- a/security/acme-client/src/opnsense/mvc/app/controllers/OPNsense/AcmeClient/forms/dialogValidation.xml
+++ b/security/acme-client/src/opnsense/mvc/app/controllers/OPNsense/AcmeClient/forms/dialogValidation.xml
@@ -690,10 +690,16 @@
text
- validation.dns_inws_password
+ validation.dns_inwx_password
password
+
+ validation.dns_inwx_shared_secret
+
+ password
+ When 2FA is enabled, the Shared Secret must be provided. Note that this feature requires the package oath-toolkit, which must be installed manually.
+
header
diff --git a/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeValidation/DnsInwx.php b/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeValidation/DnsInwx.php
index f4e0533fb..736dd0c0e 100644
--- a/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeValidation/DnsInwx.php
+++ b/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeValidation/DnsInwx.php
@@ -1,7 +1,7 @@
acme_env['INWX_User'] = (string)$this->config->dns_inwx_user;
- $this->acme_env['INWX_Password'] = (string)$this->config->dns_inws_password;
+ $this->acme_env['INWX_Password'] = (string)$this->config->dns_inwx_password;
+ if (!empty((string)$this->config->dns_inwx_shared_secret)) {
+ if ((string)$this->model->isPackageInstalled('oath-toolkit') != '1') {
+ LeUtils::log_error('Required package oath-toolkit is NOT installed. Please install the package or remove the INWX Shared Secret.');
+ return false;
+ }
+ $this->acme_env['INWX_Shared_Secret'] = (string)$this->config->dns_inwx_shared_secret;
+ }
}
}
diff --git a/security/acme-client/src/opnsense/mvc/app/models/OPNsense/AcmeClient/AcmeClient.php b/security/acme-client/src/opnsense/mvc/app/models/OPNsense/AcmeClient/AcmeClient.php
index 347cd471b..d775974d2 100644
--- a/security/acme-client/src/opnsense/mvc/app/models/OPNsense/AcmeClient/AcmeClient.php
+++ b/security/acme-client/src/opnsense/mvc/app/models/OPNsense/AcmeClient/AcmeClient.php
@@ -1,7 +1,7 @@
configdRun('firmware plugin ' . escapeshellarg($name)));
}
+
+ /**
+ * check if the specfied package is installed
+ * @param $name package name
+ * @return bool is the package installed
+ */
+ public function isPackageInstalled($name)
+ {
+ $backend = new Backend();
+ $_package_list = $backend->configdRun('firmware local');
+ if (preg_match("/^$name\|\|.*/m", $_package_list)) {
+ return 1;
+ }
+ return 0;
+ }
}
diff --git a/security/acme-client/src/opnsense/mvc/app/models/OPNsense/AcmeClient/AcmeClient.xml b/security/acme-client/src/opnsense/mvc/app/models/OPNsense/AcmeClient/AcmeClient.xml
index 93a1de578..ab94015e5 100644
--- a/security/acme-client/src/opnsense/mvc/app/models/OPNsense/AcmeClient/AcmeClient.xml
+++ b/security/acme-client/src/opnsense/mvc/app/models/OPNsense/AcmeClient/AcmeClient.xml
@@ -1,6 +1,6 @@
//OPNsense/AcmeClient
- 4.1.0
+ 4.2.0
A secure ACME Client plugin
@@ -746,9 +746,16 @@
N
+
N
+
+ N
+
+
+ N
+
N
diff --git a/security/acme-client/src/opnsense/mvc/app/models/OPNsense/AcmeClient/Migrations/M4_2_0.php b/security/acme-client/src/opnsense/mvc/app/models/OPNsense/AcmeClient/Migrations/M4_2_0.php
new file mode 100644
index 000000000..f896a8e65
--- /dev/null
+++ b/security/acme-client/src/opnsense/mvc/app/models/OPNsense/AcmeClient/Migrations/M4_2_0.php
@@ -0,0 +1,47 @@
+getNodeByReference('validations.validation')->iterateItems() as $validation) {
+ $dns_service = (string)$validation->dns_service;
+ if ($dns_service === 'dns_inwx') {
+ // Migrate data from misspelled item to new one
+ $validation->dns_inwx_password = (string)$validation->dns_inws_password;
+ }
+ }
+ }
+}