การกําหนดค่า TLS ระหว่างเราเตอร์และผู้ประมวลผลข้อความ

โดยค่าเริ่มต้น ระบบจะปิดใช้ TLS ระหว่างเราเตอร์กับ Message Processor

วิธีเปิดใช้การเข้ารหัส TLS ระหว่างเราเตอร์กับ Message Processor

  1. ตรวจสอบว่าเราเตอร์เข้าถึงพอร์ต 8082 ใน Message Processor ได้
  2. สร้างไฟล์ JKS คีย์สโตร์ที่มีใบรับรอง TLS และคีย์ส่วนตัว ดูข้อมูลเพิ่มเติมได้ที่ ดู การกำหนดค่า TLS/SSL สำหรับ Edge On Premises
  3. คัดลอกไฟล์ JKS คีย์สโตร์ไปยังไดเรกทอรีในเซิร์ฟเวอร์ Message Processor เช่น /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 คือชื่อไฟล์คีย์สโตร์

  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 คือไฟล์คีย์สโตร์ และ obsPword คือรหัสผ่านคีย์สโตร์และคีย์ Alias ที่มีการปกปิด

    หมายเหตุ: ค่าของ

    conf/message-processor-communication.properties+local.http.ssl.keyalias=apigee-devtest
    ต้องเหมือนกับค่าที่ระบุโดยตัวเลือก -alias สำหรับคำสั่ง keytool ซึ่งอธิบายไว้ที่ส่วนท้ายของส่วน การสร้าง ไฟล์ JKS

    ดูข้อมูลเกี่ยวกับการสร้างรหัสผ่านที่ปกปิดได้ที่ การกำหนดค่า TLS/SSL สำหรับ Edge On Premises

  7. ตรวจสอบว่าผู้ใช้ "apigee" เป็นเจ้าของไฟล์ message-processor.properties โดยใช้คำสั่งต่อไปนี้
    chown apigee:apigee /opt/apigee/customer/application/message-processor.properties
  8. หยุด Message Processor และเราเตอร์โดยใช้คำสั่งต่อไปนี้
    /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. เริ่ม Message Processor และเราเตอร์โดยใช้คำสั่งต่อไปนี้
    /opt/apigee/apigee-service/bin/apigee-service edge-message-processor start
    /opt/apigee/apigee-service/bin/apigee-service edge-router start
  11. ทำขั้นตอนนี้ซ้ำสำหรับ Message Processor แต่ละรายการ

หลังจากเปิดใช้ TLS ระหว่างเราเตอร์กับ Message Processor แล้ว ไฟล์บันทึกของ Message Processor จะมีข้อความ INFO ต่อไปนี้

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

คำสั่ง INFO นี้ยืนยันว่า TLS ทำงานระหว่างเราเตอร์กับ Message Processor

ตารางต่อไปนี้แสดงพร็อพเพอร์ตี้ทั้งหมดที่มีอยู่ใน 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 ]
ตั้งค่านี้เป็น true เพื่อเปิดใช้ TLS/SSL ค่าเริ่มต้นคือ false เมื่อเปิดใช้ TLS/SSL คุณต้องตั้งค่า local.http.ssl.keystore.path และ local.http.ssl.keyalias
conf/message-processor-communication.
  properties+local.http.ssl.keystore.path=
เส้นทางระบบไฟล์ในเครื่องไปยังคีย์สโตร์ (JKS หรือ PKCS12) ต้องระบุเมื่อ local.http.ssl=true
conf/message-processor-communication.
  properties+local.http.ssl.keyalias=
คีย์ Alias จากคีย์สโตร์ที่จะใช้สำหรับการเชื่อมต่อ TLS/SSL ต้องระบุเมื่อ local.http.ssl=true
conf/message-processor-communication.
  properties+local.http.ssl.keyalias.password=
รหัสผ่านที่ใช้เข้ารหัสคีย์ภายในคีย์สโตร์ ใช้รหัสผ่านที่ปกปิด ในรูปแบบต่อไปนี้
OBF:obsPword
conf/message-processor-communication.
  properties+local.http.ssl.keystore.type=jks
ประเภทคีย์สโตร์ ปัจจุบันรองรับเฉพาะ JKS และ PKCS12 ค่าเริ่มต้นคือ JKS
conf/message-processor-communication.
  properties+local.http.ssl.keystore.password=
ไม่บังคับ รหัสผ่านที่ปกปิดสำหรับคีย์สโตร์ ใช้รหัสผ่านที่ปกปิดในรูปแบบต่อไปนี้
OBF:obsPword
conf_message-processor-communication_local.
  http.ssl.ciphers=cipher1,cipher2
ไม่บังคับ เมื่อกำหนดค่าแล้ว ระบบจะอนุญาตเฉพาะการเข้ารหัสที่ระบุไว้เท่านั้น หากไม่ระบุ ให้ใช้การเข้ารหัสทั้งหมด ที่ JDK รองรับ