ja:documentation:pandorafms:technical_annexes:08_password_encryption

パスワード暗号化

Pandora FMS はデータベース上のパスワードの暗号化に対応しています。暗号化キーは、ユーザが用意するパスフレーズから生成され、(キーやパスフレーズも含め)データベースには保存されません。これにより、データベースのダンプからパスワードを再現することはできません。パスフレーズを設定すると、暗号化がユーザに透過的に動作します。

If you lose the password given by the user, you will not be able to recover the password stored in Pandora FMS Database. Save this password in a safe place and make a backup of: config.php and pandora_server.conf files.

パスフレーズを無くすと、Pandora FMS データベースに保存されたパスワードは利用できなくなります。安全な場所に置くか、config.php および pandora_server.conf をバックアップしてください。

Passwords are encrypted using the Rijndael encryption with 128 bit blocks in ECB mode. A 256 bit key is generated at startup from the password MD5.

パスワードは、128bit の Rijndael cipher の ECB モードを使って暗号化しています。パスフレーズの MD5 から、最初に 256bit のキーが生成されます。

To enable password encryption, the password must be configured in both Pandora FMS Server and Pandora FMS Console.

パスワード暗号化を有効化するには、Pandora FMS サーバと Pandora FMS コンソール双方でパスフレーズを設定する必要があります。

The steps for encryption are the following:

暗号化の手順は次の通りです。

  • Stop both Metaconsole and node servers.
  • メタコンソールノードサーバの両方を停止します。
  • Update encryption_passphrase in /etc/pandora/pandora_server.conf and /var/www/html/pandora_console/include/config.php both in the node and Metaconsole.
  • /etc/pandora/pandora_server.conf 内の encryption_passphrase および、ノード および メタコンソール 双方の /var/www/html/pandora_console/include/config.php を更新します。
$config["encryption_passphrase"]="あなたの暗号化パスフレーズ";
  • Launch the encryption script both in the node and Metaconsole.
  • ノード および メタコンソール 両方の暗号化スクリプトを起動します。
/usr/bin/pandora_encrypt_db /etc/pandora/pandora_server.conf

Do not forget to restart Pandora FMS Server after saving the changes and launching the script.

設定変更後は、Pandora FMS サーバを忘れずに再起動してください。

This section is only relevant if you wish to update from version 743 to version 744. If that is not the case, encrypt it as if it were new.

この章は、バージョン 743 からバージョン 744 に更新する場合にのみです。それ以外の場合は、新規の暗号化です。

Configure password encryption following the steps required for a newly installed Pandora FMS. At this point, any new passwords configured in the Pandora FMS Console will be stored in the database encrypted, but already existing passwords must be encrypted too. To that end, follow these steps:

新規インストールの Pandora FMS の手順に従って暗号化パスワード設定をします。ここで、Pandora FMS コンソールで任意の新たなパスワードが設定され、データベースに暗号化したものが保存されます。ただし、既存のパスワードも暗号化する必要があります。そのためには、次の手順を実行します。

  • Stop both the Metaconsole and node servers.
  • メタコンソールノード 双方を停止します。
  • Launch the decryption script both in the Metaconsole as well as the node
  • メタコンソール および ノード の復号化スクリプトを実行します。
/usr/bin/pandora_encrypt_db -d -m /etc/pandora/pandora_server.conf
  • Launch the encryption script both in the node and the Metaconsole:
  • ノード および メタコンソール 双方の暗号化スクリプトを実行します。
/usr/bin/pandora_encrypt_db /etc/pandora/pandora_server.conf
  • Restart the Metaconsole and node servers.
  • メタコンソールおよびノードサーバを再起動します。

The script cannot be executed twice, otherwise passwords would get corrupted.

スクリプトは 2回実行できません。2回実行するとパスワードが破損します。

It is important to keep in mind that the -m parameter must be added to decrypt only old passwords. If that parameter is not added to previously encrypted databases, passwords will be lost.

古いパスワードを復号化するときのみ、-m パラメータを追加する必要があることに注意してください。暗号化されたデータベースにこのパラメータが追加されない場合、パスワードが失われます

Changing the encryption password is possible in case it gets compromised. First, passwords stored within the database must be decrypted:

暗号化パスワードは、漏えいしてしまった場合などは変更することができます。最初に、データベース内のパスワードを復号化する必要があります。

/usr/bin/pandora_encrypt_db -d /etc/pandora/pandora_server.conf

Then, after changing the encryption password (as described in the configuration in a newly installed Pandora FMS section), they can be encrypted again:

そして、(新規 Pandora FMS インストール時の設定で説明した方法で)パスワードを変更後、再度暗号化します。

/usr/bin/pandora_encrypt_db /etc/pandora/pandora_server.conf

From 7.0NG.739 onwards, safe credential management is included.

7.0NG 739 以降には、安全な認証管理が含まれています。

Credential manager:

認証情報管理:

In case of having an encrypted database available, to be able to keep using the credential manager without losing data, decrypt everything except for the table tcredential_store

暗号化データベースがある場合、データを失うことなく認証情報管理を使い続けることができるようにするには、tcredential_store テーブルを除いてすべての暗号を解除します。

For that purpose, execute the following commands:

そのためには、以下のコマンドを実行します。

/usr/bin/pandora_encrypt_db -d -c /etc/pandora/pandora_server.conf

Leave everything decrypted.

全ての暗号化が解除されます。

Once decrypted, encrypt it again:

暗号化を解除したら、再度暗号化を行います。

/usr/bin/pandora_encrypt_db /etc/pandora/pandora_server.conf

If you only wish to encrypt from scratch, just execute the last command.

初回の暗号化では、最後のコマンドを実行します。

It is recommended to keep the whole password stored in Pandora FMS encrypted.

Pandora FMS に保存されているパスワードは、全体を暗号化しておくことをお勧めします。

  • Stop the server, both in Metaconsole and node.
  • Comment encryption_passphrase in /etc/pandora/pandora_server.conf and /var/www/html/pandora_console/include/config.php tode in node and Metaconsole.
  • メタコンソールノード 双方のサーバを停止します。
  • メタコンソールノード 双方の /etc/pandora/pandora_server.conf および /var/www/html/pandora_console/include/config.phpencryption_passphrase をコメントアウトします。
# $config["encryption_passphrase"]="your encryption passphrase";
  • Launch the decryption script both in node and Metaconsole.
  • ノード および メタコンソール で復号化スクリプトを実行します。
/usr/bin/pandora_encrypt_db -d -e /etc/pandora/pandora_server.conf


Rmember to restart Pandora FMS server after making the changes and launching the script.


変更を加えてスクリプトを実行した後は、Pandora FMS サーバを再起動することを忘れないでください。

Pandora FMS ドキュメント一覧に戻る

  • ja/documentation/pandorafms/technical_annexes/08_password_encryption.txt
  • 最終更新: 2023/12/13 07:16
  • by 127.0.0.1