Backup encryption (SKINS)

Version 1.531

Feature
Finished

BETA Ability to encrypt backups from all Levels. Disabled by default (0). To enable, add: allow_backup_encryption=1 to the directadmin.conf and restart directadmin. Implemented to be GDPR compliant. ================= SCRIPTS new files: /usr/local/directadmin/scripts/encrypt_file.sh /usr/local/directadmin/scripts/decrypt_file.sh the custom folder can be used if you want to make alterations, just copy the script to the custom directory, and DA will use it instead. ================= API / JSON The API cron output will include encryption_password=0|1 depending on the value, and will not include encryption_password if allow_backup_encrypt=1 is not enabled. json cron output has an important change where the "where" value, which used to be: "where": "ftp://127.0.0.1:21/May" is now: "where": { "encryption_password": "0", "path": "ftp://127.0.0.1:21/May" }, The "where" is now *always* an array, and longer just a string. This gives us more options should we need to make changes later. Like the API, if allow_backup_encrypt=1 is not enabled. then the encryption_password won't be generated at all. Applies to both CMD_ADMIN_BACKUP and CMD_USER_BACKUP If enabled, the settings array will have: allow_backup_encryption=1 and encryption_password will store the current password, used for auto-fill of encryption/decryption fields. ================= SKINS: admin/admin_backup.html reseller/backups.html admin/admin_backup_modify.html reseller/backup_modify.html Added this below the append path tr: |*if ALLOW_BACKUP_ENCRYPTION="1"| <tr> <td class=listtitle></td> <td class=listtitle> |LANG_BACKUP_ENCRYPTION| </td> </tr> <tr> <td></td> <td> <table cellpadding=0 cellspacing=1 width=100%> <tr> <td class=list align=right>|LANG_PASSWORD|:</td> <td class=list> <input type=password name='encryption_password' value="|encryption_password|" placeholder='|LANG_OMIT_NO_ENC|' autocomplete="new-password"> </td> </tr> </table> </td> </tr> |*endif| and farther down for the restore, after the |FILES|</div>, add: |*if ALLOW_BACKUP_ENCRYPTION="1"| <table width=100% cellspacing=1 cellpadding=0> <tr> <td class=listtitle> |LANG_BACKUP_DECRYPTION| </td> </tr> <tr> <td> <table cellpadding=0 cellspacing=1 width=100%> <tr> <td class=list align=right>|LANG_PASSWORD|:</td> <td class=list> <input type=password name='encryption_password' value="|encryption_password|" autocomplete="new-password"> </td> </tr> </table> </td> </tr> </table> |*endif| ==== style.css add class: .green_lock { FONT-SIZE: 12pt; color: transparent; text-shadow: 0 0 0 #009900; } as there "Where" column in the backup cron list will include the actual lock character. However, it's a special unicode character, thus cannot have it's color changed in the normal way, so we make it transparent, then shadow it with the color we want.

Interested to try DirectAdmin? Get a 30-day Free Trial!