Edge for Private Cloud v4.18.05
בקטע הזה מוסבר איך להשיג, להתקין ולהגדיר את הרכיבים שנדרשים כדי לשלב שירות LDAP ב-Apigee Edge לצורך אימות משתמשים.
דרישות מוקדמות
- צריך להתקין את Apigee Edge for Private Cloud בגרסה 4.18.05.
- כדי לבצע את ההתקנה, אתם צריכים פרטי כניסה של אדמין מערכת גלובלי ב-Apigee Edge for Private Cloud.
- אתם צריכים לדעת מהי תיקיית השורש של ההתקנה של Apigee Edge for Private Cloud. תיקיית השורש שמוגדרת כברירת מחדל היא
/opt. - צריך להוסיף את פרטי הכניסה של מנהל המערכת הגלובלי של Edge ל-LDAP החיצוני. חשוב לזכור שכברירת מחדל, פרטי הכניסה של sysadmin מאוחסנים ב-LDAP הפנימי של Edge. אחרי שעוברים ל-LDAP חיצוני, פרטי הכניסה של ה-sysadmin מאומתים שם. לכן, צריך להקצות את פרטי הכניסה למערכת החיצונית לפני שמפעילים אימות חיצוני ב-Edge.
לדוגמה, אם הגדרתם והתקנתם את Apigee Edge for Private Cloud עם פרטי כניסה של אדמין מערכת גלובלי:
username: edgeuser@mydomain.com password: Secret123
אז המשתמש
edgeuser@mydomain.comעם הסיסמהSecret123חייב להיות גם ב-LDAP החיצוני. - אם אתם מפעילים אשכול של שרתי ניהול, שימו לב שאתם צריכים לבצע את כל השלבים שמפורטים במסמך הזה בכל אחד משרתי הניהול.
הגדרת אימות חיצוני
הפעילות העיקרית שתבצעו היא הגדרת הקובץ management-server.properties.
הפעילות הזו כוללת עצירה והפעלה של שרת הניהול של Edge, החלטה אם להשתמש בקישור ישיר או עקיף, הצפנה של פרטי כניסה רגישים ומשימות קשורות אחרות.
- חשוב: החליטו עכשיו אם אתם מתכוונים להשתמש בשיטת האימות של קישור עקיף או ישיר. ההחלטה הזו תשפיע על חלק מההיבטים של ההגדרה. אימות חיצוני
- חשוב: צריך לבצע את שלבי ההגדרה האלה בכל שרת ניהול של Apigee Edge (אם אתם מפעילים יותר מאחד).
- פותחים את
/opt/apigee/customer/application/management-server.propertiesבכלי לעריכת טקסט. אם הקובץ לא קיים, יוצרים אותו. - מוסיפים את השורה הבאה:
conf_security_authentication.user.store=externalized.authentication
השורה הזו מוסיפה את תכונת האימות החיצוני להתקנה של Edge for Private Cloud.
- כדי להקל על השלב הזה, יצרנו שתי הגדרות לדוגמה עם הערות מפורטות – אחת לאימות קישור ישיר ואחת לאימות קישור עקיף. בוחרים את הקישור שרוצים להשתמש בו מבין הדוגמאות הבאות, ומשלימים את ההגדרה:
- מפעילים מחדש את שרת הניהול:
/opt/apigee/apigee-service/bin/apigee-service edge-management-server restart
- מוודאים שהשרת פועל:
/opt/apigee/apigee-service/bin/apigee-all status
- חשוב: צריך לבצע הגדרה נוספת באחד מהמקרים הבאים (או בשניהם):
- אם אתם מתכוונים לאפשר למשתמשים להתחבר באמצעות שמות משתמשים שהם לא כתובות אימייל. במקרה כזה, משתמש ה-sysadmin צריך גם לבצע אימות באמצעות שם משתמש.
וגם/או
- אם הסיסמה של חשבון המשתמש של ה-sysadmin ב-LDAP החיצוני שונה מהסיסמה שהגדרתם כשהתקנתם את Apigee Edge for Private Cloud בפעם הראשונה. ההגדרות הנדרשות לפרטי כניסה שונים של sysadmin
- אם אתם מתכוונים לאפשר למשתמשים להתחבר באמצעות שמות משתמשים שהם לא כתובות אימייל. במקרה כזה, משתמש ה-sysadmin צריך גם לבצע אימות באמצעות שם משתמש.
דוגמה להגדרות של DIRECT BINDING
## The first property is always required to enable the external authorization feature. ## Do not change it. conf_security_externalized.authentication.implementation.class=com.apigee.rbac.impl.LdapAuthenticatorImpl ## Identify the type of binding: ## Set to "true" for direct binding ## Set to "false" for indirect binding. conf_security_externalized.authentication.bind.direct.type=true ## The next seven properties are needed regardless of direct or indirect binding. You need to ## configure these per your external authentication installation. ## The IP or domain for your external LDAP instance. conf_security_externalized.authentication.server.url=ldap://localhost:389 ## Your external LDAP server version. conf_security_externalized.authentication.server.version=3 ## The server timeout in milliseconds. conf_security_externalized.authentication.server.conn.timeout=50000 ## Change these baseDN values to match your external LDAP service. This attribute value will be ## provided by your external LDAP administrator, and may have more or fewer dc elements depending ## on your setup. conf_security_externalized.authentication.user.store.baseDN=dc=apigee,dc=com ## Do not change this search string. It is used internally. conf_security_externalized.authentication.user.store.search.query=(&(${userAttribute}=${userId})) ## Identifies the external LDAP property you want to bind against for Authentication. For ## example if you are binding against an email address in Microsoft Active Directory, this would be ## the userPrincipalName property in your external LDAP instance. Alternatively if you are binding ## against the user's ID, this would typically be in the sAMAccountName property: conf_security_externalized.authentication.user.store.user.attribute=userPrincipalName ## The LDAP attribute where the user email value is stored. For direct binding with AD, set it to ## userPrincipalName. conf_security_externalized.authentication.user.store.user.email.attribute=userPrincipalName ## ONLY needed for DIRECT binding. ## The direct.bind.user.directDN property defines the string that is used for the bind against the ## external authentication service. Ensure it is set as follows: conf_security_externalized.authentication.direct.bind.user.directDN=${userDN}
דוגמה להגדרת INDIRECT BINDING
## Required to enable the external authorization feature. Do not change it. conf_security_externalized.authentication.implementation.class=com.apigee.rbac.impl.LdapAuthenticatorImpl ## Identifies the type of binding: ## Set to "true" for direct binding ## Set to "false" for indirect binding. conf_security_externalized.authentication.bind.direct.type=false ## The next seven properties are needed regardless of direct or indirect binding. You need to ## configure these per your external LDAP installation. ## The IP or domain for your external LDAP instance. conf_security_externalized.authentication.server.url=ldap://localhost:389 ## Replace with your external LDAP server version. conf_security_externalized.authentication.server.version=3 ## Set the server timeout in milliseconds. conf_security_externalized.authentication.server.conn.timeout=50000 ## Change these baseDN values to match your external LDAP service. This attribute value will be # provided by your external LDAP administrator, and may have more or fewer dc elements # depending on your setup. conf_security_externalized.authentication.user.store.baseDN=dc=apigee,dc=com ## Do not change this search string. It is used internally. conf_security_externalized.authentication.user.store.search.query=(&(${userAttribute}=${userId})) ## Identifies the external LDAP property you want to bind against for Authentication. For example ## if you are binding against an email address, this would typically be in the ## userPrincipalName property in your external LDAP instance. Alternatively if you are binding ## against the user's ID, this would typically be in the sAMAccountName property. ## See also "Configuration required for different sysadmin credentials". conf_security_externalized.authentication.user.store.user.attribute=userPrincipalName ## Used by Apigee to perform the Authorization step and currently, Apigee only supports email ## address for Authorization. Make sure to set it to the attribute in your external LDAP that ## stores the user's email address. Typically this will be in the userPrincipalName property. conf_security_externalized.authentication.user.store.user.email.attribute=userPrincipalName ## The external LDAP username (for a user with search privileges on the external LDAP) and ## password and whether the password is encrypted. You must also set the attribute ## externalized.authentication.bind.direct.type to false. ## The password attribute can be encrypted or in plain text. See ## "Indirect binding only: Encrypting the external LDAP user's password" ## for encryption instructions. Set the password.encrypted attribute to "true" if the password is ## encrypted. Set it to "false" if the password is in plain text. conf_security_externalized.authentication.indirect.bind.server.admin.dn=myExtLdapUsername conf_security_externalized.authentication.indirect.bind.server.admin.password=myExtLdapPassword conf_security_externalized.authentication.indirect.bind.server.admin.password.encrypted=true
בדיקת ההטמעה
- מוודאים שהשרת פועל:
/opt/apigee/apigee-service/bin/apigee-all status
- מריצים את הפקודה הזו ומספקים קבוצה של פרטי כניסה של אדמין מערכת גלובלי ב-Apigee Edge. רק sysadmin ב-Edge יכול לבצע את הקריאה ל-API שאנחנו הולכים לבדוק.
curl -v http://management-server-IP:8080/v1/o -u sysadmin_username
לדוגמה:
curl -v http://192.168.52.100:8080/v1/o -u jdoe@mydomain.com
- מזינים את הסיסמה כשמוצגת בקשה לעשות זאת.
אם הפקודה מחזירה סטטוס 200 ורשימה של ארגונים, סימן שההגדרה נכונה. הפקודה הזו מאמתת שהקריאה ל-API לשרת הניהול של Edge אומתה בהצלחה דרך מערכת ה-LDAP החיצונית.