tabernarious / f5-automated-backup-iapp

F5 iApp for automated backups to the local device and to network locations.
35 stars 26 forks source link

Unable to decrypt text of length (4338) which exceeds the max of (4048) #12

Open phillyPDX opened 6 years ago

phillyPDX commented 6 years ago

With version 3.1.2 of the iAPP, error message "Unable to decrypt text of length (4338) which exceeds the max of (4048)" comes up when using a 4096 bit RSA key. To reproduce:

  1. Generate a 4096 bit RSA key on the BIG-IP: 'ssh-keygen -t rsa -b 4096' a. file saved to /root/.ssh/id_rsa b. passphrase left blank
  2. Copy the RSA public key from BIG-IP to SCP/SFTP/SSH server a. cat .ssh/id_rsa.pub | ssh root@server 'cat >> .ssh/authorized_keys'
  3. Within the iAPP for the 'Copy/Paste the SSH private key to be used for passwordless authentication' setting, place the 4096 bit RSA private key, then click the Finished button. a. No error message is seen at this point
  4. Reconfigure the iApp, then adjust the backup time setting, then click the Finished button. a. Error message is seen at this point

In looking at /var/log/ltm & /var/tmp/scriptd.out, no log entries are created when this fails.

tabernarious commented 6 years ago

This could be a bug/limitation in iApp fields designated as type "password" (which I use to encrypt the value in the configuration). I'll poke around a bit.

tabernarious commented 5 years ago

One idea I have to work around this assumed limitation would be to allow a key-length selection box which when 4096 or higher is selected, a second key field appears. The key would have to be pasted in two parts which the script would recombine and use.