カスタム・パスワード暗号化の実装
WebSphere® Application Server は、カスタム・パスワード暗号化の使用をサポートします。
始める前に
このタスクについて
手順
- カスタム・パスワード暗号化クラスを作成します。 以下はカスタム・パスワード暗号化クラスの例です。
// 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(); };
- プロパティー・ファイルのエンコード・パスワードをカスタマイズする必要がある場合は、PropFilePasswordEncoder.sh ファイルまたは PropFilePasswordEncoder.bat ファイルを手動で編集します。
- ファイル・エディターを使用して、PropFilePasswordEncoder.sh ファイルまたは PropFilePasswordEncoder.bat ファイルを開きます。
- ファイルの末尾付近にある以下の行を見つけます。
"%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
- 以下の行を呼び出しに追加します。
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
- カスタム・パスワード暗号化を使用可能にします。
- カスタム・プロパティー com.ibm.wsspi.security.crypto.customPasswordEncryptionClass を、制御が付与されるクラスの名前に設定します。
- 機能を使用可能にします。 カスタム・プロパティー com.ibm.wsspi.security.crypto.customPasswordEncryptionEnabled を true に設定します。
タスクの結果


http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=tsec_pwencrypt
ファイル名:tsec_pwencrypt.html