| Decryption fails with wrong password
Error: Decryption failed. Please check your password
|
- Incorrect password
- Encrypted file corrupted
- Different password used for encryption
|
- Try again with the correct password or check password manager.
- Check if the file is corrupted:
# Unix - check file integrity
file inputs.groovy.enc
# Should show: "openssl enc'd data with salted password"
# Check file size (should be > 0)
ls -lh inputs.groovy.enc
- Perform a backup recovery if you have a backup of
inputs.groovy plaintext file:
cp /backup/path/inputs.groovy .
# Re-encrypt with known password
./synthetic-processor/bin/encrypt-file.sh encrypt inputs.groovy inputs.groovy.enc
rm inputs.groovy
- Recreate the
inputs.groovy file:
# Create new inputs.groovy from sample
cp inputs.groovy.sample inputs.groovy
# Edit with correct credentials
vim inputs.groovy
# Encrypt with new password
./synthetic-processor/bin/encrypt-file.sh encrypt inputs.groovy inputs.groovy.enc
rm inputs.groovy
|
| Re-encryption fails after operation and gives the following error message:
WARNING: Re-encryption failed after 3 attempts. SECURITY RISK: Plaintext inputs.groovy remains on disk!
|
- Password mismatch during re-encryption
- OpenSSL error during encryption
|
-
Check the file status:
ls -la inputs.groovy*
# You'll see both files:
# -rw------- inputs.groovy (plaintext - security risk!)
# -rw------- inputs.groovy.enc (old encrypted version)
-
Re-encrypt manually:
#' Unix
./synthetic-processor/bin/encrypt-file.sh encrypt inputs.groovy inputs.groovy.enc
# Enter password carefully
# Verify success
echo $? # Should be 0
# Delete plaintext
rm inputs.groovy
-
Verify the encryption:
# Only encrypted file should remain
ls -la inputs.groovy*
# -rw------- inputs.groovy.enc
-
Verify the decryption:
# Test decryption
./synthetic-processor/bin/encrypt-file.sh decrypt inputs.groovy.enc inputs.groovy.test
# Should succeed with correct password
rm inputs.groovy.test
|
| Installer displays permission denied errors:
Permission denied: inputs.groovy.enc
|
- File is owned by a different user
- Insufficient permissions
|
-
Check ownership:
ls -l inputs.groovy.enc
# -rw------- 1 otheruser group 1234 Dec 16 10:30 inputs.groovy.enc
-
Fix the permissions (as owner or root):
# Change ownership
sudo chown $USER:$USER inputs.groovy.enc
# Set correct permissions
chmod 600 inputs.groovy.enc
-
Run as correct user:
# Switch to installation user
su - installuser
./unix/deploy.sh update
|
The inputs.groovy and inputs.groovy.enc files exist together |
- |
Run a Diagnosis:
# Check modification times
ls -lt inputs.groovy*
# -rw------- inputs.groovy.enc (newer)
# -rw------- inputs.groovy (older)
# Verify they match
./synthetic-processor/bin/encrypt-file.sh decrypt inputs.groovy.enc inputs.groovy.test
diff inputs.groovy inputs.groovy.test
# If output is empty, they match
rm inputs.groovy.test
Resolution:
# If encrypted version is current:
rm inputs.groovy # Delete plaintext
# If plaintext was recently edited:
# Re-encrypt to update encrypted version
./synthetic-processor/bin/encrypt-file.sh encrypt inputs.groovy inputs.groovy.enc
rm inputs.groovy
|
| Encryption script not found:
Error: Encryption script not found at /path/to/encrypt-file.sh
|
- Incomplete installation package
- Files moved or deleted
- Running from a wrong directory
|
-
Verify the installation structure:
# Unix
ls -la synthetic-processor/bin/encrypt-file.sh
# Windows
dir synthetic-processor\bin\encrypt-file.bat
-
Check execution permissions (Unix):
chmod +x synthetic-processor/bin/encrypt-file.sh
-
Run from the correct directory:
# Must run from synthetic-installer directory
cd /path/to/synthetic-installer
./unix/deploy.sh update
-
Reinstall if the script is missing:
-
Extract the fresh installation package.
-
Copy the missing scripts from the new package.
|
- Encryption is successful but decryption fails
- Inconsistent behavior with password
|
This issue can occur if:
- the password contains special characters
- there are Shell interpretation or encoding issues with special characters
|
Use simple passwords for encryption:
- Avoid these characters:
$, `,", ', !
- Preferred characters: letters, numbers, basic symbols (
@, #, %, &, -, _)
|
| Debugging encryption issues |
- |
-
Enable verbose OpenSSL output:
# Temporarily edit encrypt-file.sh
# Remove the '2>/dev/null' redirects to see full OpenSSL errors
# Line 51 - Encryption:
openssl enc -aes-256-cbc -salt -pbkdf2 -iter 100000 \
-in "$input_file" \
-out "$output_file"
# (Remove: 2>/dev/null)
# Line 77 - Decryption:
openssl enc -aes-256-cbc -d -pbkdf2 -iter 100000 \
-in "$input_file" \
-out "$output_file"
# (Remove: 2>/dev/null)
# Run operation to see detailed error
./unix/deploy.sh update
-
Test encryption manually:
# Create test file
echo "test content" > test.txt
# Encrypt
openssl enc -aes-256-cbc -salt -pbkdf2 -iter 100000 \
-in test.txt -out test.enc
# Decrypt
openssl enc -aes-256-cbc -d -pbkdf2 -iter 100000 \
-in test.enc -out test.dec
# Compare
diff test.txt test.dec
# Should be identical
# Cleanup
rm test.txt test.enc test.dec
|
| Migration from plaintext to encrypted |
The existing plaintext file must be encrypted for security. |
Migrate from plaintext to encrypted:
-
Encrypt the file:
./synthetic-processor/bin/encrypt-file.sh encrypt inputs.groovy inputs.groovy.enc
-
Verify:
# Test decryption
./synthetic-processor/bin/encrypt-file.sh decrypt inputs.groovy.enc inputs.groovy.test
diff inputs.groovy inputs.groovy.test
# Should be identical
rm inputs.groovy.test
-
Delete the plaintext file:
-
Test operations:
# Ensure encrypted version works
./unix/deploy.sh start
# Should prompt for password and work normally
|
| Forgotten Password Recovery |
- |
Recreate credentials if the password is lost permanently:
-
Create a new inputs.groovy file from sample:
cp inputs.groovy.sample inputs.groovy
- Retrieve the credentials from:
- Database server (check user or password)
- Controller (check API credentials)
- Configuration backups
- Team documentation
-
Edit with correct values:
-
Test connectivity manually:
mysql -h $db_host -u $db_username -p$db_user_pwd
-
Encrypt with the new password:
./synthetic-processor/bin/encrypt-file.sh encrypt inputs.groovy inputs.groovy.enc
-
Store the new password securely.
-
Delete the old encrypted file and plaintext:
rm inputs.groovy.enc.old inputs.groovy
|