הגדרת TLS בין נתב לבין מעבד הודעות

Edge for Private Cloud גרסה 4.19.01

כברירת מחדל, פרוטוקול TLS מושבת בין הנתב לבין מעבד הבקשות.

כדי להפעיל הצפנת TLS בין נתב לבין מעבד בקשות:

  1. מוודאים שלנתב יש גישה ליציאה 8082 במעבד הבקשות.
  2. יוצרים את קובץ ה-JKS של מאגר המפתחות שמכיל את אישור ה-TLS והמפתח הפרטי. מידע נוסף זמין במאמר הגדרת TLS/SSL ל-Edge On Premises.
  3. מעתיקים את קובץ ה-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 הוא השם של קובץ מאגר המפתחות.

  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 הוא הסיסמה המעורפלת של מאגר המפתחות וכינוי המפתח. במאמר הגדרת TLS/SSL ל-Edge On Premises מוסבר איך ליצור סיסמה מעורפלת.

  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. ב-Router, מוחקים את כל הקבצים ב-/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 בין הנתב למעבד הבקשות, קובץ היומן של מעבד הבקשות מכיל את הודעת המידע הבאה:

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.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=
אופציונלי. סיסמה מוסתרת למאגר המפתחות. צריך להשתמש בסיסמה מעורפלת בפורמט הזה: OBF:xxxxxxxxxx
conf_message-processor-communication_local.
  http.ssl.ciphers=cipher1,cipher2
אופציונלי. כשהמדיניות מוגדרת, מותר להשתמש רק בצפנים שמופיעים ברשימה. אם לא מציינים ערך, המערכת משתמשת בכל הצפנים שנתמכים על ידי ה-JDK.