1.6. sos レポートの生成と、GPG パスフレーズ暗号化によるセキュリティーの保護
この手順では、sos
レポートを生成して、パスフレーズをベースにした GPG2 対称暗号化を使用してセキュリティーを確保する方法を説明します。sos
レポートは、公共ネットワーク経由で第三者に転送する必要がある場合などに、レポートの内容をパスワードで保護することが推奨されます。
暗号化した sos
レポートを作成する場合には、ディスク領域の倍の容量を一時的に使用するため、十分な領域を確保してください。
-
sos
ユーティリティーは、暗号化されていないsos
レポートを作成します。 -
このユーティリティーは、
sos
レポートを新しいファイルとして暗号化します。 - 次に、ユーティリティーは暗号化されていないアーカイブを削除します。
前提条件
-
sos
パッケージをインストールしている。 -
root
権限がある。
手順
sos report
コマンドを実行し、--encrypt-pass
オプションでパスフレーズを指定します。--upload
オプションを追加すると、sos
レポートの生成直後にレポートを Red Hat に転送できます。[user@server1 ~]$ sudo sos report --encrypt-pass my-passphrase [sudo] password for user: sosreport (version 4.2) This command will collect diagnostic and configuration information from this Red Hat Enterprise Linux system and installed applications. An archive containing the collected information will be generated in /var/tmp/sos.6lck0myd and may be provided to a Red Hat support representative. ... Press ENTER to continue, or CTRL-C to quit.
(オプション) Red Hat でテクニカルサポートケースをすでに作成している場合には、ケース番号を入力して
sos
レポートファイルの名前に追加します。--upload
オプションを指定している場合は、対象のケースにアップロードされます。ケース番号がない場合は、このフィールドを空白にしておきます。ケース番号の入力は任意であるため、sos
ユーティリティーの動作には影響はありません。Please enter the case id that you are generating this report for []: <8-digit_case_number>
-
コンソール出力の末尾に表示されている
sos
レポートファイルの名前を書き留めておきます。
Finished running plugins Creating compressed archive... Your sosreport has been generated and saved in: /var/tmp/secured-sosreport-server1-12345678-2022-01-24-ueqijfm.tar.xz.gpg Size 17.53MiB Owner root sha256 bf303917b689b13f0c059116d9ca55e341d5fadcd3f1473bef7299c4ad2a7f4f Please send this file to your support representative.
検証手順
sos
ユーティリティーで、以下の要件を満たすアーカイブが作成されたことを確認します。-
ファイル名が
secured
で始まる。 -
ファイル名が
.gpg
拡張子で終わる。 /var/tmp/
ディレクトリーにある。[user@server1 ~]$ sudo ls -l /var/tmp/sosreport* [sudo] password for user: -rw-------. 1 root root 18381537 Jan 24 17:55 /var/tmp/secured-sosreport-server1-12345678-2022-01-24-ueqijfm.tar.xz.gpg
-
ファイル名が
アーカイブの暗号化に使用したパスフレーズと同じものを使用して、アーカイブを復号できることを確認します。
gpg
コマンドを使用して、アーカイブを復号します。[user@server1 ~]$ sudo gpg --output decrypted-sosreport.tar.gz --decrypt /var/tmp/secured-sosreport-server1-12345678-2022-01-24-ueqijfm.tar.xz.gpg
プロンプトが表示されたら、アーカイブの暗号化に使用したパスフレーズを入力します。
┌──────────────────────────────────────────────────────┐ │ Enter passphrase │ │ │ │ │ │ Passphrase: <passphrase> │ │ │ │ <OK> <Cancel> │ └──────────────────────────────────────────────────────┘
gpg
ユーティリティーが、暗号化されていない、ファイル拡張子が.tar.gz
のアーカイブを生成したことを確認します。[user@server1 ~]$ sudo ls -l decrypted-sosreport.tar.gz [sudo] password for user: -rw-r--r--. 1 root root 18381537 Jan 24 17:59 decrypted-sosreport.tar.gz