diff --git a/security/acme-client/Makefile b/security/acme-client/Makefile index 9d6b4ec8e..088f0bab4 100644 --- a/security/acme-client/Makefile +++ b/security/acme-client/Makefile @@ -1,5 +1,5 @@ PLUGIN_NAME= acme-client -PLUGIN_VERSION= 4.15 +PLUGIN_VERSION= 4.16 PLUGIN_COMMENT= ACME Client PLUGIN_MAINTAINER= opnsense@moov.de PLUGIN_DEPENDS= acme.sh py${PLUGIN_PYTHON}-dns-lexicon diff --git a/security/acme-client/pkg-descr b/security/acme-client/pkg-descr index dfa6ce841..1210efbde 100644 --- a/security/acme-client/pkg-descr +++ b/security/acme-client/pkg-descr @@ -8,6 +8,11 @@ WWW: https://github.com/acmesh-official/acme.sh Plugin Changelog ================ +4.16 + +Fixed: +* fix incorrect naming scheme of TrueNAS WS automation + 4.15 Added: diff --git a/security/acme-client/src/opnsense/mvc/app/controllers/OPNsense/AcmeClient/forms/dialogAction.xml b/security/acme-client/src/opnsense/mvc/app/controllers/OPNsense/AcmeClient/forms/dialogAction.xml index 477443587..b03e6f89c 100644 --- a/security/acme-client/src/opnsense/mvc/app/controllers/OPNsense/AcmeClient/forms/dialogAction.xml +++ b/security/acme-client/src/opnsense/mvc/app/controllers/OPNsense/AcmeClient/forms/dialogAction.xml @@ -398,22 +398,22 @@ header - + - action.acme_truenasws_apikey + action.acme_truenas_ws_apikey text API key generated in the TrueNAS web UI. - action.acme_truenasws_hostname + action.acme_truenas_ws_hostname text Hostname or IP address of TrueNAS Server. - action.acme_truenasws_protocol + action.acme_truenas_ws_protocol dropdown Connection scheme that will be used when uploading certificates to TrueNAS Server. diff --git a/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeAutomation/AcmeTruenasWS.php b/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeAutomation/AcmeTruenasWs.php similarity index 96% rename from security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeAutomation/AcmeTruenasWS.php rename to security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeAutomation/AcmeTruenasWs.php index 1a5fdb9ca..91ced0c0b 100644 --- a/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeAutomation/AcmeTruenasWS.php +++ b/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeAutomation/AcmeTruenasWs.php @@ -35,7 +35,7 @@ use OPNsense\AcmeClient\LeAutomationInterface; * Run acme.sh deploy hook truenas_ws * @package OPNsense\AcmeClient */ -class AcmeTruenasWS extends Base implements LeAutomationInterface +class AcmeTruenasWs extends Base implements LeAutomationInterface { public function prepare() { 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 a9cf430fa..40359e945 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.3.1 + 4.4.0 A secure ACME Client plugin @@ -1431,7 +1431,7 @@ Upload certificate to HashiCorp Vault Upload certificate to Synology DSM Upload certificate to TrueNAS Server (deprecated API) - Upload certificate to TrueNAS Server (Websocket API) + Upload certificate to TrueNAS Server (Websocket API) Upload certificate to Zyxel GS1900 series switches Update local Unifi keystore System or Plugin Command @@ -1745,6 +1745,26 @@ HTTPS + + N + /^.{1,1024}$/u + Should be a string between 1 and 1024 characters. + + + localhost + N + /^.{1,1024}$/u + Should be a string between 1 and 1024 characters. + + + ws + N + + ws [default] + wss + + + N /^.{1,1024}$/u diff --git a/security/acme-client/src/opnsense/mvc/app/models/OPNsense/AcmeClient/Migrations/M4_4_0.php b/security/acme-client/src/opnsense/mvc/app/models/OPNsense/AcmeClient/Migrations/M4_4_0.php new file mode 100644 index 000000000..5df32bf20 --- /dev/null +++ b/security/acme-client/src/opnsense/mvc/app/models/OPNsense/AcmeClient/Migrations/M4_4_0.php @@ -0,0 +1,50 @@ +getNodeByReference('actions.action')->iterateItems() as $action) { + $action_type = (string)$action->type; + if ($action_type === 'acme_truenasws') { + // Migrate data from misspelled item to new one + $action->type = 'acme_truenas_ws'; + $action->acme_truenas_ws_apikey = (string)$action->acme_truenasws_apikey; + $action->acme_truenas_ws_hostname = (string)$action->acme_truenasws_hostname; + $action->acme_truenas_ws_protocol = (string)$action->acme_truenasws_protocol; + } + } + } +}