تفعيل المصادقة الخارجية

Edge for Private Cloud الإصدار 4.19.01

يوضّح هذا القسم طريقة الحصول على المكوّنات المطلوبة وتثبيتها وإعدادها لدمج خدمة LDAP في Apigee Edge لمصادقة المستخدم.

المتطلبات الأساسية

  • يجب أن يتوفّر لديك Apigee Edge لتثبيت الإصدار 4.18.05 من Private Cloud.
  • يجب أن تكون لديك بيانات اعتماد مشرف النظام العام في Apigee Edge كي تتمكّن من إجراء هذا التثبيت.
  • عليك معرفة الدليل الجذري لتطبيق Apigee Edge الخاص بتثبيت Private Cloud. الدليل الجذر التلقائي هو /opt.
  • يجب إضافة بيانات اعتماد مشرف النظام العام في Edge إلى بروتوكول LDAP الخارجي. تذكر أنه يتم تخزين بيانات اعتماد مسؤول إدارة النظم افتراضيًا في LDAP الداخلي في Edge. بعد التبديل إلى بروتوكول LDAP الخارجي، ستتم مصادقة بيانات اعتماد مشرف النظم هناك بدلاً من ذلك. لذلك، يجب توفير بيانات الاعتماد للنظام الخارجي قبل تفعيل المصادقة الخارجية في Edge.

    على سبيل المثال، في حال ضبط Apigee Edge for Private Cloud وتثبيتها باستخدام بيانات اعتماد مشرف النظام العامة على النحو التالي:

    username: edgeuser@mydomain.com
    password: Secret123

    بعد ذلك، يجب أن يتوفّر أيضًا المستخدم edgeuser@mydomain.com الذي يحمل كلمة المرور Secret123 في بروتوكول LDAP الخارجي.

  • إذا كنت تشغّل مجموعة خادم الإدارة، لاحظ أنه يجب تنفيذ جميع الخطوات في هذا المستند لكل خادم إدارة.

تهيئة مصادقة خارجية

النشاط الرئيسي الذي ستنفّذه هو ضبط ملف "management-server.properties". يتضمن هذا النشاط إيقاف خادم إدارة Edge وتشغيله، وتحديد ما إذا كنت تريد استخدام الربط المباشر أو غير المباشر، وتشفير بيانات الاعتماد الحساسة، وغيرها من المهام ذات الصلة.

  1. ملاحظة مهمة: حدِّد الآن ما إذا كنت تنوي استخدام طريقة المصادقة المرتبطة غير المباشرة أو المباشرة. سيؤثر هذا القرار في بعض جوانب الإعداد. راجِع المصادقة الخارجية.
  2. ملاحظة مُهمّة: يجب تنفيذ خطوات الإعداد هذه على كل خادم من خوادم إدارة Apigee Edge (إذا كنت تشغِّل أكثر من خادم).
  3. افتح /opt/apigee/customer/application/management-server.properties في محرِّر نصوص. إذا لم يكن الملف موجودًا، فأنشئه.
  4. أضِف السطر التالي:
    conf_security_authentication.user.store=externalized.authentication

    يضيف هذا السطر ميزة المصادقة الخارجية إلى متصفّح Edge الخاص بتثبيت Cloud الخاص.

  5. لتسهيل هذه الخطوة، أنشأنا نموذجَين من الإعدادات التي تم تقييمها جيدًا، إحداهما للإعداد المباشر والأخرى لمصادقة الربط غير المباشرة. يمكنك الاطّلاع على النماذج أدناه لمعرفة الربط الذي تريد استخدامه وإكمال عملية الضبط:
  6. أعِد تشغيل خادم الإدارة:
    /opt/apigee/apigee-service/bin/apigee-service edge-management-server restart
  7. تأكَّد من أنّ الخادم يعمل:
    /opt/apigee/apigee-service/bin/apigee-all status
  8. ملاحظة مهمة: يجب إجراء عملية ضبط إضافية في إحدى الحالات التالية (أو كليهما):
    1. إذا كنت تنوي تسجيل دخول المستخدمين باستخدام أسماء مستخدمين ليست عناوين بريد إلكتروني. في هذه الحالة، على مستخدم مسؤول إدارة النظم أيضًا المصادقة باستخدام اسم مستخدم.

      و/أو

    2. إذا كانت كلمة المرور لحساب مستخدم مشرف النظام في بروتوكول LDAP الخارجي مختلفة عن كلمة المرور التي ضبطتها عند تثبيت Apigee Edge لأول مرة في Private Cloud. راجع الضبط مطلوب لبيانات اعتماد مشرف النظم المختلفة.

نموذج ضبط الربط المباشر

## 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.
    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 وقائمة بالمؤسسات، تكون الإعدادات صحيحة. يتحقّق هذا الأمر من أنّه تمت المصادقة على طلب البيانات من واجهة برمجة التطبيقات إلى خادم إدارة Edge من خلال نظام LDAP الخارجي.