オプション: データ・グリッド・セキュリティーのセットアップ

データ・グリッド・セキュリティーによって、トポロジー内のすべてのサーバーが正しい資格情報を保持することが保証され、悪意のあるサーバーはデータ・グリッドに参加できなくなります。

このタスクについて

新しい構成ファイルをカタログ・サーバーおよびランタイム・サーバー内に作成するとともに、鍵ストアも作成して、データ・グリッド接続を認証します。

xs-server.properties ファイル、xs-security.xml ファイル、および鍵ストアのすべてを使用してデータ・グリッド・セキュリティーが構成されます。

詳しくは、データ・グリッド・セキュリティーを参照してください。

手順

  1. 以下の内容を含む xs-server.properties ファイルをカタログ・サーバーおよびランタイム・サーバーのサーバー構成ディレクトリーに作成します。
    securityEnabled=true
    secureTokenManagerType=autoSecret
    authenticationSecret=OurGridServersExampleSecret
    transportType=TCP/IP
    credentialAuthentication=Required
  2. カタログ・サーバー構成ディレクトリー内に、以下の内容を含む xs-security.xml ファイルを作成します。
    <?xml version="1.0" encoding="UTF-8"?>
    <securityConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
       xsi:schemaLocation="http://ibm.com/ws/objectgrid/config/security ../objectGridSecurity.xsd"
       xmlns="http://ibm.com/ws/objectgrid/config/security">
       <security securityEnabled="true">
           <authenticator className="com.ibm.websphere.objectgrid.security.plugins.builtins.KeyStoreLoginAuthenticator"/>
       </security>
    </securityConfig>
  3. ランタイム・サーバーの <WLP_USER_DIR>/servers/runtime_server_name/server.xml ファイルを開き、xs-server.properties ファイルを参照している xsServer に serverProps エレメントを追加します。
    <xsServer catalogServer="false"
    catalogServiceBootstrap="${ia.bootstrapEndpoints}"
    listenerPort="${xs.port}" 
    serverName="${ia.host}-${wlp.server.name}" transport="XIO" 
    serverProps="xs-server.properties"/>
  4. カタログの <WLP_USER_DIR>/servers/catalog_server_name/server.xml ファイルの中で、xs-server.properties ファイルを参照している xsServer に serverProps エレメントを追加し、xs-security.xml ファイルを参照します。

    例:

    <xsServer catalogServer="true" listenerPort="${xs.port}" serverName="${ia.host}-${wlp.server.name}" 
    transport="XIO" serverProps="xs-server.properties" clusterSecurityURL="file://${server.config.dir}/xs-security.xml"/>
  5. カタログ・サーバーとランタイム・サーバーの両方の <server> エレメントの中で、xs-security.xml ファイルで定義されている xsKeyStoreLoginModule を追加します。
    <library id="xslib">
       <fileset dir="${wlp.install.dir}/lib" includes="com.ibm.ws.xs.server_1.1.jar"/>
    </library>
    <jaasLoginModule id="xsKeyStoreLoginModule" 
          className="com.ibm.websphere.objectgrid.security.plugins.builtins.KeyStoreLoginModule" 
          controlFlag="REQUIRED" 
          libraryRef="xslib">
          <options keyStoreFile="${server.config.dir}/resources/security/cis-key.jks" debug="true"/>
    </jaasLoginModule>
    
    <jaasLoginContextEntry id="KeyStoreLogin" name="KeyStoreLogin" loginModuleRef="xsKeyStoreLoginModule"/>
  6. すべてのランタイム・サーバーの <server> エレメントの内部に、<ia_gateway> 構成エレメントを作成します。このエレメントの中に、以下の 3 つの属性を定義します。
    • securityEnabled="true"
    • username="<your-keystore-alias>"
    • password="<your-keystore-alias-password>"
    例:
    <ia_gateway securityEnabled="true" username="tester" password="tester"/>
  7. すべてのインバウンド・サーバーおよびアウトバウンド・サーバーの <WLP_USER_DIR>/servers/connectivity_server_name/server.xml ファイルの中で、ランタイム・サーバーで定義された <ia_connectivity> 構成エレメントにユーザーとパスワードを追加します。
    • user="<your-keystore-alias>"
    • password="<your-keystore-alias-password>"
    例:
    <ia_connectivity catalogServerEndpoint="${ia.bootstrapEndpoints}" user="tester" password="tester"/>
    securityUtil ツールまたは WDT server.xml エディターを使用して、パスワードを XOR でエンコードしたり、AES で暗号化したりすることができます。
  8. カタログ・サーバーおよびランタイム・サーバーのそれぞれに鍵ストアを作成します。
    1. JRE keytool コマンドを実行して、鍵ストアを作成します。
      例:
      keytool -genkey -alias tester -keypass tester -keyalg RSA -dname CN=tester,O=ibm,C=us -storepass tester -keystore C:¥tmp¥cis-key.jks 
      この keytool コマンドは別名とパスワードを使用する鍵を作成します。別名とパスワードはいずれも tester であり、これはクイック・スタートのセキュリティーに使用されるユーザー名およびパスワードと同じものです。
    2. 鍵ファイルをカタログ・サーバーおよびランタイム・サーバーそれぞれの resources/security ディレクトリーにコピーします。
      ${server.config.dir}/resources/security/cis-key.jks