| パスワードが間違っていると復号に失敗します
Error: Decryption failed. Please check your password
|
- パスワードが間違っています
- 暗号化されたファイルが破損しています
- 暗号化に別のパスワードが使用されています
|
- 正しいパスワードを使用して再試行するか、パスワードマネージャを確認します。
- ファイルが破損していないかを確認します。
# 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
inputs.groovy プレーンテキストファイルのバックアップがある場合は、バックアップリカバリを実行します。
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
inputs.groovy ファイルを再作成します。
# 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
|
| 操作後に再暗号化が失敗すると、次のエラーメッセージが表示されます。
WARNING: Re-encryption failed after 3 attempts. SECURITY RISK: Plaintext inputs.groovy remains on disk!
|
- 再暗号化中のパスワード不一致
- 暗号化中の OpenSSL エラー
|
-
ファイルのステータスを確認します。
ls -la inputs.groovy*
# You'll see both files:
# -rw------- inputs.groovy (plaintext - security risk!)
# -rw------- inputs.groovy.enc (old encrypted version)
-
手動で再暗号化します。
#' 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
-
暗号化を検証します。
# Only encrypted file should remain
ls -la inputs.groovy*
# -rw------- inputs.groovy.enc
-
復号化を検証します。
# Test decryption
./synthetic-processor/bin/encrypt-file.sh decrypt inputs.groovy.enc inputs.groovy.test
# Should succeed with correct password
rm inputs.groovy.test
|
| インストーラに「許可が拒否される」エラーが表示されます。
Permission denied: inputs.groovy.enc
|
- ファイルは別のユーザーによって所有されています
- 不十分な許可
|
-
所有権を確認します。
ls -l inputs.groovy.enc
# -rw------- 1 otheruser group 1234 Dec 16 10:30 inputs.groovy.enc
-
権限を修正します(所有者またはルートとして)。
# Change ownership
sudo chown $USER:$USER inputs.groovy.enc
# Set correct permissions
chmod 600 inputs.groovy.enc
-
正しいユーザーとして実行します。
# Switch to installation user
su - installuser
./unix/deploy.sh update
|
inputs.groovy ファイルと inputs.groovy.enc ファイルが一緒に存在します |
- |
診断を実行します。
# 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
|
| 暗号化スクリプトが見つかりません。
Error: Encryption script not found at /path/to/encrypt-file.sh
|
- インストールパッケージが不完全です
- ファイルが移動されるか削除されました
- 誤ったディレクトリから実行しています
|
-
インストール構成を検証します。
# Unix
ls -la synthetic-processor/bin/encrypt-file.sh
# Windows
dir synthetic-processor\bin\encrypt-file.bat
-
実行権限を確認します(Unix)。
chmod +x synthetic-processor/bin/encrypt-file.sh
-
正しいディレクトリから実行します。
# Must run from synthetic-installer directory
cd /path/to/synthetic-installer
./unix/deploy.sh update
-
スクリプトが欠落している場合は、再インストールします。
-
新しいインストールパッケージを展開します。
-
欠落しているスクリプトを新しいパッケージからコピーします。
|
- 暗号化は成功しましたが、復号に失敗しました
- パスワードに関する動作が一貫していません
|
この問題は次の場合に発生することがあります。
- パスワードに特殊文字が含まれている
- シェルが特殊文字を解釈またはエンコードできない
|
暗号化には単純なパスワードを使用してください。
- 次の文字は使用しないでください。
$、 `、"、 '、 !
- 次の文字が推奨されます。英字、数字、基本記号(
@、 #、 %、 &、 -、 _)
|
| 暗号化の問題のデバッグ |
- |
-
OpenSSL の詳細出力を有効にします。
# 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
-
暗号化を手動でテストします。
# 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
|
| プレーンテキストから暗号化への移行 |
セキュリティ確保のため、既存のプレーンテキストファイルを暗号化する必要があります。 |
プレーンテキストを暗号化します。
-
ファイルの暗号化:
./synthetic-processor/bin/encrypt-file.sh encrypt inputs.groovy inputs.groovy.enc
-
確認:
# 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
-
-
テスト操作:
# Ensure encrypted version works
./unix/deploy.sh start
# Should prompt for password and work normally
|
| パスワードを忘れた場合の回復 |
- |
パスワードを完全に紛失した場合は、ログイン情報を再作成してください。
-
サンプルから新しい inputs.groovy ファイルを作成します。
cp inputs.groovy.sample inputs.groovy
- ログイン情報の取得元:
- データベースサーバー(ユーザーまたはパスワードを確認)
- コントローラ(API ログイン情報を確認)
- 構成のバックアップ
- チームのドキュメント
-
-
接続を手動でテストします。
mysql -h $db_host -u $db_username -p$db_user_pwd
-
新しいパスワードで暗号化します。
./synthetic-processor/bin/encrypt-file.sh encrypt inputs.groovy inputs.groovy.enc
-
新しいパスワードを安全に保管します。
-
古い暗号化ファイルとプレーンテキストを削除します。
rm inputs.groovy.enc.old inputs.groovy
|