diff --git a/security/acme-client/pkg-descr b/security/acme-client/pkg-descr index 80eefd193..63960dbe0 100644 --- a/security/acme-client/pkg-descr +++ b/security/acme-client/pkg-descr @@ -11,9 +11,10 @@ Plugin Changelog 3.12 Added: -* Add Simply.com DNS API (#2888) -* Add Active24 challenge type (#3049) -* Add support for Zone ID in Cloudflare challenge type (#2973) +* add Simply.com DNS API (#2888) +* add Active24 challenge type (#3049) +* add support for Zone ID in Cloudflare challenge type (#2973) +* new automation: upload certificate to Vault (#2796) Fixed: * Re-order function parameters due to PHP8 deprecation notice (#3043) 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 d3ecd4664..45544272c 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 @@ -274,4 +274,27 @@ text Path to the Unifi keystore file in the local filesystem, i.e. /usr/local/share/java/unifi/data/keystore. + + + header + + + + action.acme_vault_url + + text + URL of the Vault, i.e. http://vault.example.com:8200. + + + action.acme_vault_prefix + + text + This specifies the prefix path in Vault. + + + action.acme_vault_kvv2 + + checkbox + If checked version 2 of the kv store will be used, otherwise version 1. + diff --git a/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeAutomation/AcmeVault.php b/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeAutomation/AcmeVault.php new file mode 100644 index 000000000..3eab03d75 --- /dev/null +++ b/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeAutomation/AcmeVault.php @@ -0,0 +1,51 @@ +acme_env['VAULT_ADDR'] = (string)$this->config->acme_vault_url; + if (!empty((string)$this->config->acme_vault_prefix)) { + $this->acme_env['VAULT_PREFIX'] = (string)$this->config->acme_vault_prefix; + } + if ((string)$this->config->acme_vault_kvv2 == 1) { + $this->acme_env['VAULT_KV_V2'] = 1; + } + $this->acme_args[] = '--deploy-hook vault'; + return true; + } +} 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 c5c7c4a97..b1fef123b 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 @@ -1129,6 +1129,7 @@ Upload certificate via SFTP Remote Command via SSH Upload certificate to FRITZ!Box router + Upload certificate to HashiCorp Vault Upload certificate to Synology DSM Update local Unifi keystore System or Plugin Command @@ -1325,6 +1326,20 @@ /usr/local/share/java/unifi/data/keystore N + + N + /^.{1,1024}$/u + Should be a string between 1 and 1024 characters. + + + acme + N + /^.{1,1024}$/u + Should be a string between 1 and 1024 characters. + + + 1 +