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

Edge for Private Cloud גרסה 4.19.01

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

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

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

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

    username: edgeuser@mydomain.com
    password: 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 לצורך התקנה של ענן פרטי.

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

      וגם

    2. אם הסיסמה של חשבון המשתמש ב-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 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}

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

## 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 שאנחנו עומדים לבדוק.
    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
  3. מזינים את הסיסמה כשמתבקשים לעשות זאת.

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