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

Edge for Private Cloud v4.18.05

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

ใช้ขั้นตอนต่อไปนี้เพื่อเปิดใช้การเข้ารหัส TLS ระหว่างเราเตอร์และข้อความ โปรเซสเซอร์:

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

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