使用 SSL 中的 retrieveSigners 指令,讓伺服器彼此信任

您可以在伺服器的 trust.p12 檔中新增簽章者憑證,讓該伺服器能與另一部伺服器進行安全通訊。其作法是變更 ssl.client.props 檔之後,使用 retrieveSigners 指令,將簽章者新增至伺服器的 trust.p12 檔。

開始之前

必須先識別將以用戶端身分通訊的伺服器,才能建立伺服器之間的信任。您將變更 ssl.client.props 檔,並對以用戶端身分通訊的伺服器執行 retrieveSigners 指令。如果這兩部伺服器都將扮演用戶端,則需對這兩部伺服器執行這些步驟。

關於這項作業

依預設,會設定 ssl.client.props 檔,以便為用戶端配置 Secure Socket Layer (SSL) 通訊。如此就會對 profile_root/etc 目錄中的用戶端 trust.p12 檔和 key.p12 檔,執行 retrieveSigners 指令的預設行為。您可以在伺服器 trust.p12 檔中新增簽章者憑證,讓該伺服器以用戶端身分與另一部伺服器通訊。如果要使用 retrieveSigners 指令,將簽章者新增至伺服器的 trust.p12 檔,必須變更 ssl.client.props 檔的內容。

程序

  1. 開啟 ssl.client.props 檔。 ssl.client.props 檔位於 profile_root/properties 目錄。
  2. 解除註解 ssl.client.props 中開頭是 com.ibm.ssl.alias=AnotherSSLSettings 內容的區段。
  3. 解除註解 ssl.client.props 中開頭是 com.ibm.ssl.trustStoreName=AnotherTrustStore 內容的區段。
  4. 輸入應新增簽章者的信任儲存庫的位置。 如果您使用的是部署管理程式的伺服器信任儲存庫,則其位於 profile_root/config/cells/cell name/trust.p12。如果您使用的是應用程式伺服器的信任儲存庫,則其位於 profile_root/config/cells/cell name/nodes/node name/trust.p12
  5. 以所要使用之信任儲存庫相關聯的值,來更新這個區段中的其餘內容。 這些內容的說明可在 ssl.client.props 用戶端配置檔中找到。
  6. 選擇性的: 解除註解並更新開頭是 com.ibm.ssl.trustStoreName=AnotherKeyStore 內容的區段。 就大部分實務來說,只需要將簽章者新增至信任儲存庫。本範例只將簽章者新增至信任儲存庫,但是您也可以將簽章者新增至金鑰儲存庫,按照您在步驟 3 到 5 中對信任儲存庫的作法,來更新內容。
  7. 儲存您對 ssl.client.props 所做的變更。
  8. 執行 retrieveSigners 指令。 如需相關資訊,請參閱 retrieveSigners 指令的相關頁面。
    retrieveSigners NodeDefaultTrustStore AnotherTrustStore -host ademyers.austin.ibm.com -port 8879

    輸出範例:
    CWPKI0308I: 正在新增簽章者別名 "default_1" 至本端金鑰儲存庫
                         "AnotherTrustStore" 的 SHA 摘要如下:
                         F4:71:97:79:3E:C1:DC:E7:9F:8F:3D:F0:A0:15:1E:D1:44:73:2C:06

結果

在順利完成步驟之後,扮演用戶端的伺服器即具有另一部伺服器的簽署憑證。這可讓該伺服器與另一部伺服器之間建立 SSL 連線。

範例

範例顯示 ssl.client.props 檔的已修改區段,並且假設正在使用伺服器的 trust.p12 檔。您可以使用任何現有的信任儲存庫,但前提是有提供該信任儲存庫的內容。
#-------------------------------------------------------------------------
com.ibm.ssl.alias=AnotherSSLSettings
com.ibm.ssl.protocol=SSL_TLS
com.ibm.ssl.securityLevel=HIGH
com.ibm.ssl.trustManager=IbmX509
com.ibm.ssl.keyManager=IbmX509
com.ibm.ssl.contextProvider=IBMJSSE2
com.ibm.ssl.enableSignerExchangePrompt=true
#com.ibm.ssl.keyStoreClientAlias=default
#com.ibm.ssl.customTrustManagers=
#com.ibm.ssl.customKeyManager=
#com.ibm.ssl.dynamicSelectionInfo=
#com.ibm.ssl.enabledCipherSuites=

# KeyStore information
#com.ibm.ssl.keyStoreName=AnotherKeyStore
#com.ibm.ssl.keyStore=${user.root}/etc/key.p12
#com.ibm.ssl.keyStorePassword={xor}CDo9Hgw=
#com.ibm.ssl.keyStoreType=PKCS12
#com.ibm.ssl.keyStoreProvider=IBMJCE
#com.ibm.ssl.keyStoreFileBased=true

# TrustStore information
com.ibm.ssl.trustStoreName=AnotherTrustStore
com.ibm.ssl.trustStore=${user.root}/config/cells/localhostCell01/trust.p12
com.ibm.ssl.trustStorePassword={xor}CDo9Hgw=
com.ibm.ssl.trustStoreType=PKCS12
com.ibm.ssl.trustStoreProvider=IBMJCE
com.ibm.ssl.trustStoreFileBased=true

下一步

新增簽章者之後,請編輯 ssl.client.props 檔,以註銷用來新增簽章者憑證的那些區段。

指出主題類型的圖示 作業主題



時間戳記圖示 前次更新: last_date
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=tsec_retrievesigners_servertrust
檔名:tsec_retrievesigners_servertrust.html