security/acme-client: add OTP Code for Synology, refs #4045

This commit is contained in:
Frank Wall
2024-12-17 17:22:20 +01:00
parent 675f682aeb
commit 911bdce8b4
4 changed files with 16 additions and 1 deletions
+2 -1
View File
@@ -13,9 +13,10 @@ Plugin Changelog
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)
Changed:
* Convert synology_dsm deploy hook variables to uppercase (#4286)
* Convert Synology deploy hook variables to uppercase (#4286)
Fixed:
* SFTP/SSH automation results in fatal PHP error (#4363)
@@ -225,6 +225,12 @@
<type>text</type>
<help>If Synology DSM has OTP enabled, then the device name has to be provided so that no OTP is required when running the automation.</help>
</field>
<field>
<id>action.acme_synology_dsm_otpcode</id>
<label>OTP Code</label>
<type>text</type>
<help>If Synology DSM has OTP enabled, then a OTP may be required.</help>
</field>
<field>
<id>action.acme_synology_dsm_create</id>
<label>Create certificates</label>
@@ -53,6 +53,9 @@ class AcmeSynologyDsm extends Base implements LeAutomationInterface
if (!empty((string)$this->config->acme_synology_dsm_devicename)) {
$this->acme_env['SYNO_DEVICE_NAME'] = (string)$this->config->acme_synology_dsm_devicename;
}
if (!empty((string)$this->config->acme_synology_dsm_otpcode)) {
$this->acme_env['SYNO_OTP_CODE'] = (string)$this->config->acme_synology_dsm_otpcode;
}
$this->acme_args[] = '--deploy-hook synology_dsm';
return true;
}
@@ -1506,6 +1506,11 @@
<mask>/^.{1,1024}$/u</mask>
<ValidationMessage>Should be a string between 1 and 1024 characters.</ValidationMessage>
</acme_synology_dsm_devicename>
<acme_synology_dsm_otpcode type="TextField">
<Required>N</Required>
<mask>/^.{1,1024}$/u</mask>
<ValidationMessage>Should be a string between 1 and 1024 characters.</ValidationMessage>
</acme_synology_dsm_otpcode>
<acme_fritzbox_url type="TextField">
<Required>N</Required>
<mask>/^.{1,1024}$/u</mask>