設定路由器和訊息處理器之間的傳輸層安全標準 (TLS)

根據預設,路由器和訊息處理器之間的傳輸層安全標準 (TLS) 會停用。

啟用路由器和訊息處理器的傳輸層安全標準 (TLS) 加密功能:

  1. 確保路由器可以存取 Message Processor 中的通訊埠 8082。
  2. 產生包含傳輸層安全標準 (TLS) 憑證和私密金鑰的 KeyStore JKS 檔案。詳情請參閱「設定邊緣端的傳輸層安全標準 (TLS)/SSL」。
  3. 將 KeyStore JKS 檔案複製到訊息處理器伺服器中的目錄,例如 /opt/apigee/customer/application
  4. 變更 JKS 檔案的權限和擁有權:
    chown apigee:apigee /opt/apigee/customer/application/keystore.jks
    chmod 600 /opt/apigee/customer/application/keystore.jks

    其中 keystore.jks 是您的 KeyStore 檔案名稱。

  5. 編輯 /opt/apigee/customer/application/message-processor.properties 檔案。如果檔案不存在,請建立檔案。
  6. message-processor.properties 檔案中設定下列屬性:
    conf_message-processor-communication_local.http.ssl=true
    conf/message-processor-communication.properties+local.http.port=8443
    conf/message-processor-communication.properties+local.http.ssl.keystore.type=jks
    conf/message-processor-communication.properties+local.http.ssl.keystore.path=/opt/apigee/customer/application/keystore.jks
    conf/message-processor-communication.properties+local.http.ssl.keyalias=apigee-devtest
    # Enter the obfuscated keystore password below.
    conf/message-processor-communication.properties+local.http.ssl.keystore.password=OBF:obsPword

    其中 keystore.jks 是您的 KeyStore 檔案,而 obsPword 是經過模糊處理的 KeyStore 和 Keyalias 密碼。如要瞭解如何產生模糊化的密碼,請參閱設定邊緣端的傳輸層安全標準 (TLS)/SSL

  7. 確保 message-processor.properties 檔案為「Apigee」使用者:
    chown apigee:apigee /opt/apigee/customer/application/message-processor.properties
  8. 停止訊息處理器和路由器:
    /opt/apigee/apigee-service/bin/apigee-service edge-message-processor stop
    /opt/apigee/apigee-service/bin/apigee-service edge-router stop
  9. 在路由器上,刪除 /opt/nginx/conf.d 目錄中的任何檔案:
    rm -f /opt/nginx/conf.d/*
  10. 啟動訊息處理器和路由器:
    /opt/apigee/apigee-service/bin/apigee-service edge-message-processor start
    /opt/apigee/apigee-service/bin/apigee-service edge-router start
  11. 為每個「訊息處理器」重複此程序。

啟用路由器和訊息處理器之間的傳輸層安全標準 (TLS) 後,「訊息處理工具」記錄檔會包含以下 INFO 訊息:

MessageProcessorHttpSkeletonFactory.configureSSL() : Instantiating Keystore of type: jks

這個 INFO 陳述式用於確認傳輸層安全標準 (TLS) 可在路由器和訊息處理工具之間運作。

下表列出 message-processor.properties 的所有可用屬性:

屬性 說明
conf_message-processor-communication_local.
  http.host=localhost_or_IP_address
(選填) 監聽路由器連線的主機名稱。這會覆寫註冊時設定的主機名稱。
conf/message-processor-communication.
  properties+local.http.port=8998
(選填) 可監聽路由器連線的通訊埠。預設值為 8998。
conf_message-processor-communication_local.
  http.ssl=[ false | true ]
如要設為啟用傳輸層安全標準 (TLS)/SSL,請將這個值設為 true。預設值為 false。啟用傳輸層安全標準 (TLS)/安全資料傳輸層 (SSL) 時,您必須設定 local.http.ssl.keystore.pathlocal.http.ssl.keyalias
conf/message-processor-communication.
  properties+local.http.ssl.keystore.path=
KeyStore (JKS 或 PKCS12) 的本機檔案系統路徑。必須提供 local.http.ssl=true
conf/message-processor-communication.
  properties+local.http.ssl.keyalias=
來自 KeyStore 的金鑰別名,用於傳輸層安全標準 (TLS)/安全資料傳輸層 (SSL) 連線。必須提供 local.http.ssl=true
conf/message-processor-communication.
  properties+local.http.ssl.keyalias.password=
在 KeyStore 中加密金鑰時使用的密碼。請採用下列格式將經過模糊處理的密碼處理:
OBF:obsPword
conf/message-processor-communication.
  properties+local.http.ssl.keystore.type=jks
KeyStore 類型。目前僅支援 JKS 和 PKCS12。預設值為 JKS。
conf/message-processor-communication.
  properties+local.http.ssl.keystore.password=
(選填) KeyStore 的模糊處理密碼。請採用下列格式的模糊化密碼:
OBF:obsPword
conf_message-processor-communication_local.
  http.ssl.ciphers=cipher1,cipher2
(選填) 設定時只能使用允許的加密機制。如果省略,請使用 JDK 支援的所有加密。