כברירת מחדל, פרוטוקול TLS בין הנתב למעבד ההודעות מושבת.
כדי להפעיל הצפנת TLS בין נתב למעבד הודעות:
- מוודאים שיש לנתב גישה ליציאה 8082 במעבד ההודעות.
- יוצרים את קובץ ה-JKS של מאגר המפתחות שמכיל את אישור ה-TLS והמפתח הפרטי. מידע נוסף זמין במאמר הגדרת TLS/SSL ל-Edge On Premises.
- מעתיקים את קובץ ה-JKS של מאגר המפתחות לספרייה בשרת של מעבד הבקשות, למשל
/opt/apigee/customer/application. - משנים את ההרשאות והבעלות על קובץ ה-JKS:
chown apigee:apigee /opt/apigee/customer/application/keystore.jks
chmod 600 /opt/apigee/customer/application/keystore.jksכאשר
keystore.jksהוא השם של קובץ מאגר המפתחות. - עורכים את הקובץ
/opt/apigee/customer/application/message-processor.properties. אם הקובץ לא קיים, יוצרים אותו. - מגדירים את המאפיינים הבאים בקובץ
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 הוא הסיסמה של מאגר המפתחות ושל כינוי המפתח שעברו טשטוש.הערה: הערך של
צריך להיות זהה לערך שצוין באפשרותconf/message-processor-communication.properties+local.http.ssl.keyalias=apigee-devtest
-aliasבפקודהkeytool, שמתוארת בסוף הקטע יצירת קובץ JKS.במאמר הגדרת TLS/SSL ל-Edge On Premises מוסבר איך ליצור סיסמה מעורפלת.
- מוודאים שהקובץ
message-processor.propertiesנמצא בבעלות המשתמש apigee:chown apigee:apigee /opt/apigee/customer/application/message-processor.properties
- עוצרים את מעבדי הבקשות והנתבים:
/opt/apigee/apigee-service/bin/apigee-service edge-message-processor stop
/opt/apigee/apigee-service/bin/apigee-service edge-router stop - ב-Router, מוחקים את כל הקבצים בספרייה
/opt/nginx/conf.d:rm -f /opt/nginx/conf.d/*
- מפעילים את המעבדים והנתבים של ההודעות:
/opt/apigee/apigee-service/bin/apigee-service edge-message-processor start
/opt/apigee/apigee-service/bin/apigee-service edge-router start - חוזרים על התהליך הזה לכל מעבד הודעות.
אחרי שמפעילים את 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.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: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= |
אופציונלי. סיסמה מוסתרת למאגר המפתחות. צריך להשתמש בסיסמה מוצפנת בפורמט הבא:
OBF:obsPword |
conf_message-processor-communication_local. http.ssl.ciphers=cipher1,cipher2 |
אופציונלי. אם מגדירים את האפשרות הזו, מותר להשתמש רק בצפנים שמופיעים ברשימה. אם לא מציינים ערך, המערכת משתמשת בכל הצפנים שנתמכים על ידי ה-JDK. |