הפעלת אימות חיצוני

Edge for Private Cloud גרסה 4.17.01

בקטע הזה מוסבר איך לקבל, להתקין ולהגדיר את הרכיבים הנדרשים כדי לשלב שירות LDAP חיצוני ב-Apigee Edge לאימות משתמשים.

דרישות מוקדמות

  • כדי להתקין את Cloud Private Cloud 4.17.01 צריך להתקין את Apigee Edge.
  • כדי לבצע את ההתקנה הזו, נדרשים פרטי כניסה של מנהל מערכת גלובלי ב-Apigee Edge.
  • צריך לדעת מהי ספריית הבסיס של התקנת Apigee Edge להתקנת ענן פרטי. ספריית הבסיס שמוגדרת כברירת מחדל היא /opt.
  • צריך להוסיף את פרטי הכניסה של מנהל המערכת הגלובלי של Edge ל-LDAP החיצוני. חשוב לזכור שכברירת מחדל, פרטי הכניסה ל-sysadmin נשמרים ב-LDAP הפנימי של Edge. כשתעבור ל-LDAP חיצוני, פרטי הכניסה ל-sysadmin יאומתו שם. לכן צריך להקצות את פרטי הכניסה למערכת החיצונית לפני הפעלת אימות חיצוני ב-Edge.

    לדוגמה, אם הגדרתם והתקנתם את Apigee Edge לענן פרטי עם פרטי כניסה של מנהל מערכת גלובלי כ:

    שם משתמש: edgeuser@mydomain.com
    סיסמה: Secret123

    לאחר מכן המשתמש edgeuser@mydomain.com עם הסיסמה Secret123 חייב להופיע גם ב-LDAP החיצוני.
  • אם מריצים אשכול של שרת ניהול, חשוב לזכור שצריך לבצע את כל השלבים במסמך הזה עבור כל שרת ניהול.

הגדרת אימות חיצוני

הפעילות העיקרית שתבצעו היא הגדרת הקובץ management-server.properties. הפעילות הזו כוללת עצירה והפעלה של שרת Edge Management Server, שמחליטים אם להשתמש בקישור ישיר או עקיף, בהצפנה של פרטי כניסה רגישים ובמשימות קשורות אחרות.

  1. חשוב: צריך להחליט עכשיו אם להשתמש בשיטת האימות הישירה או הישירה. ההחלטה הזו תשפיע על היבטים מסוימים של ההגדרה. למידע נוסף, ראו אימות חיצוני.
  2. חשוב: צריך לבצע את שלבי ההגדרה האלה בכל שרת ניהול של Apigee Edge (אם מפעילים יותר משרת אחד).
  3. פותחים את /opt/apigee/customer/application/management-server.properties בעורך טקסט. אם הקובץ לא קיים, יוצרים אותו.
  4. מוסיפים את השורה הבאה. הערה: חשוב לוודא שאין רווחים בסוף השורה.

    conf_security_authentication.user.store=externalized.authentication

    השורה הזו מוסיפה את תכונת האימות החיצונית להתקנה שלכם ב-Edge for Private Cloud.
  5. כדי להקל על השלב הזה, יצרנו שתי הגדרות לדוגמה טובות מאוד – אחת לאימות ישיר ואחת לאימות קישור עקיף. צריך לעיין בדוגמאות הבאות לקישור שבו רוצים להשתמש, ולהשלים את ההגדרה:

    דוגמה לתצורת BINDING DIRECT
    דוגמה של הגדרת BINDING קפדנית
  6. מפעילים מחדש את שרת הניהול:
    > /opt/apigee/apigee-service/bin/apigee-service edge-management-server הפעלה מחדש
  7. מוודאים שהשרת פועל:
    > /opt/apigee/apigee-service/bin/apigee-all status
  8. חשוב: עליך לבצע הגדרה נוספת בכל אחת מהנסיבות הבאות (או בשתיהן): (א) אם בכוונתך לבקש ממשתמשים להתחבר באמצעות שמות משתמש שאינם כתובות אימייל. במקרה כזה, משתמש ה-sysadmin צריך גם לבצע אימות באמצעות שם משתמש ו/או (ב) אם הסיסמה של חשבון המשתמש ב-sysadmin ב-LDAP החיצוני שונה מהסיסמה שהגדרתם כשהתקנתם לראשונה את Apigee Edge לענן פרטי. למידע נוסף, ראו הגדרה נדרשת עבור פרטי כניסה שונים ל-sysadmin.

דוגמה של הגדרת קישור ישיר

## 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, 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:
conf_security_externalized.authentication.user.store.user.attribute=userPrincipalName

## The LDAP attribute where the user email value is stored. For direct binding, 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}

דוגמה של הגדרה של קישור עקרוני

## 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

בדיקת ההתקנה

  1. מוודאים שהשרת פועל:
    > /opt/apigee/apigee-service/bin/apigee-all status
  2. מריצים את הפקודה הזו ומעבירים קבוצה של פרטי כניסה של מנהל מערכת גלובלי ב-Apigee Edge. רק מנהל מערכת של Edge יכול לבצע את הקריאה ל-API שאנחנו עומדים לבדוק.

    חשוב: פרטי הכניסה הזהים חייבים להיות בחשבון ה-LDAP החיצוני שלכם. אם לא, עליך להוסיף אותם עכשיו. חשוב לשים לב ששם המשתמש הוא בדרך כלל כתובת אימייל. עם זאת, הוא תלוי באופן שבו הגדרתם אימות חיצוני, כפי שהוסבר קודם במסמך הזה.
    > curl -v http://<management-server-ip>:8080/v1/o -u <Sysadmin Username>

    לדוגמה:
    > curl -v http://192.168.52.100:8080/v1/doe -
  3. מזינים את הסיסמה כשמתבקשים לעשות זאת.

    אם הפקודה מחזירה סטטוס 200 ורשימה של ארגונים, ההגדרה נכונה. הפקודה הזו מאמתת שקריאת ה-API לשרת ניהול Edge אומתה בהצלחה באמצעות מערכת ה-LDAP החיצונית.