為資料網格應用程式配置 TLS

[Version 2.1 and later] 透過修改或取代金鑰儲存庫及信任儲存庫,並選擇適用於配置的憑證別名,可以配置「傳輸層安全 (TLS)」。

開始之前

關於這項作業

軟體驅動裝置必須信任正在連接至資料網格的用戶端。TLS 設定適用於使用者介面和資料網格。 該設定會套用至群體中的所有軟體驅動裝置。

程序

  1. 下載作用中的信任儲存庫。 在使用者介面中,按一下軟體驅動裝置 > 設定 > 傳輸層安全 (TLS)。按下載作用中的信任儲存庫並記住您在磁碟上儲存檔案的位置,例如在 /downloads/trustStore.jks 目錄中。
  2. 必要的話,請建立憑證,並匯出公用憑證。
    1. 在金鑰儲存庫中建立私密金鑰。 下列指令會建立在其中儲存金鑰 "ogsample" 的 key.jks 金鑰儲存庫。此 key.jks 金鑰儲存庫用作 SSL 金鑰儲存庫。執行下列指令:
       keytool -genkey -alias ogsample -keystore key.jks -storetype JKS -keyalg rsa 
      -dname "CN=ogsample, U=Your Organizational Unit, O=Your Organization, L=Your City, S=Your State, C=Your Country" storepass ogpass -keypass ogpass -validity 3650
    2. 匯出公用憑證。 下列指令會擷取金鑰 "ogsample" 的公用憑證,並將該金鑰儲存在 temp.key 檔中。
      keytool -export -alias ogsample -keystore key.jks -file temp.key -storepass ogpass
  3. 將用戶端憑證新增至信任儲存庫。 執行 keytool 工具,以將用戶端公用憑證匯入信任儲存庫。
    keytool -import -noprompt -alias "ogsample" -keystore /downloads/trustStore.jks  
    -file temp.key -storepass xc10pass -storetype jks
  4. 將信任儲存庫資訊上傳至軟體驅動裝置。 在使用者介面中,按一下軟體驅動裝置 > 設定 > 傳輸層安全 (TLS)。上傳已更新的 /downloads/trustStore.jks 檔。 按一下提交 TLS 設定以儲存配置。
  5. 更新 client.properties 檔。client.properties 檔中設定下列內容。
    transportType=SSL-Required
    alias=ogsample
    contextProvider=IBMJSSE2
    protocol=TLS
    keyStoreType=JKS
    keyStore=key.jks
    keyStorePassword=ogpass
    trustStoreType=JKS
    trustStore=/downloads/trustStore.jks
    trustStorePassword=xc10pass

下一步