カスタム・パスワード暗号化の実装

WebSphere® Application Server は、カスタム・パスワード暗号化の使用をサポートします。

始める前に

インストール済み環境では、任意のパスワード暗号化アルゴリズムを選択して実装できます。

このタスクについて

カスタム・パスワード暗号化を実装するには、以下のステップを実行します。

手順

  1. カスタム・パスワード暗号化クラスを作成します。 以下はカスタム・パスワード暗号化クラスの例です。
    // CustomPasswordEncryption
    // Encryption and decryption functions
    public interface CustomPasswordEncryption {
        public EncryptedInfo encrypt(byte[] clearText) throws PasswordEncryptException;
        public byte[] decrypt(EncryptedInfo cipherTextInfo) throws PasswordEncryptException;
        public void initialize(HashMap initParameters);
    };
    // Encapsulation of cipher text and label
    public class EncryptedInfo {
        public EncryptedInfo(byte[] bytes, String keyAlias);
        public byte[] getEncryptedBytes();
        public String getKeyAlias();
    };
  2. プロパティー・ファイルのエンコード・パスワードをカスタマイズする必要がある場合は、PropFilePasswordEncoder.sh ファイルまたは PropFilePasswordEncoder.bat ファイルを手動で編集します。
    1. ファイル・エディターを使用して、PropFilePasswordEncoder.sh ファイルまたは PropFilePasswordEncoder.bat ファイルを開きます。
    2. ファイルの末尾付近にある以下の行を見つけます。
      "%JAVA_HOME%/bin/java" -Dcmd.properties.file=%TMPJAVAPROPFILE%
      "-Dwas.install.root=%WAS_HOME%" com.ibm.ws.bootstrap.WSLauncher
      com.ibm.ws.security.util.PropFilePasswordEncoder %1 %2
    3. 以下の行を呼び出しに追加します。

      PropFilePasswordEncoder がカスタム・エンコード・クラスを探して使用するために、以下のカスタム・プロパティーがコマンドに渡されます。

      -Dcom.ibm.wsspi.security.crypto.customPasswordEncryptionEnabled=true
      -Dcom.ibm.wsspi.security.crypto.customPasswordEncryptionClass=(customEncoding class file)

    更新された行は、以下の行のようになります。

    "%JAVA_HOME%/bin/java" -Dcmd.properties.file=%TMPJAVAPROPFILE%
    -Dcom.ibm.wsspi.security.crypto.customPasswordEncryptionEnabled=true
    -Dcom.ibm.wsspi.security.crypto.customPasswordEncryptionClass=(customEncoding class file)
    "-Dwas.install.root=%WAS_HOME%" com.ibm.ws.bootstrap.WSLauncher
    com.ibm.ws.security.util.PropFilePasswordEncoder %1 %2
  3. カスタム・パスワード暗号化を使用可能にします。
    1. カスタム・プロパティー com.ibm.wsspi.security.crypto.customPasswordEncryptionClass を、制御が付与されるクラスの名前に設定します。
    2. 機能を使用可能にします。 カスタム・プロパティー com.ibm.wsspi.security.crypto.customPasswordEncryptionEnabledtrue に設定します。

タスクの結果

インストール済み環境でのカスタム・パスワード暗号化が完了しました。

トピックのタイプを示すアイコン タスク・トピック



タイム・スタンプ・アイコン 最終更新: last_date
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=tsec_pwencrypt
ファイル名:tsec_pwencrypt.html