Edge for Private Cloud v. 4.17.05
این بخش نحوه دریافت، نصب، و پیکربندی مؤلفههای لازم برای ادغام سرویس LDAP خارجی در Apigee Edge برای اصالتسنجی کاربر را توضیح میدهد.
پیشنیازها
- باید نصب Apigee Edge for Private Cloud 4.17.05 داشته باشید.
- برای انجام این نصب، باید اطلاعات اعتباری سرپرست سیستم جهانی در Apigee Edge for Private Cloud داشته باشید.
- باید دایرکتوری ریشه نصب Apigee Edge for Private Cloud را بدانید. دایرکتوری ریشه پیشفرض /opt است.
- باید اعتبارنامه سرپرست سیستم جهانی Edge را به
LDAP خارجی اضافه کنید. بهخاطر داشته باشید که بهطور پیشفرض، اطلاعات اعتباری سرپرست سیستم در LDAP داخلی Edge ذخیره میشود. پساز اینکه به LDAP خارجی تغییر دادید، اطلاعات اعتباری سرپرست سیستم شما
در آنجا اصالتسنجی خواهد شد. بنابراین، باید اعتبارنامه را برای سیستم خارجی قبلاز فعال کردن اصالتسنجی خارجی در Edge آماده کنید.
برای مثال، اگر Apigee Edge for Private Cloud را با اطلاعات اعتباری سرپرست سیستم سراسری پیکربندی و نصب کردهاید:
نام کاربری: edgeuser@mydomain.com
گذرواژه: Secret123
سپس کاربر edgeuser@mydomain.com با گذرواژه Secret123 باید در «پروتکل دسترسی به دایرکتوری خارجی» نیز حضور داشته باشد. - اگر درحال اجرای خوشه «سرور مدیریت» هستید، توجه داشته باشید که باید همه مراحل این سند را برای هریک از «سرورهای مدیریت» انجام دهید.
درحال پیکربندی اصالتسنجی خارجی
فعالیت اصلی که انجام خواهید داد پیکربندی فایل 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 - مهم: باید پیکربندی اضافهای را تحت یکی (یا هر دو) از شرایط زیر انجام دهید: (الف) اگر قصد دارید کاربران بااستفاده از نامهای کاربری که نشانی ایمیل نیستند به سیستم وارد شوند. در این حالت، کاربر سرپرست سیستم شما باید با نام کاربری و/یا (ب) اگر گذرواژه حساب کاربری سرپرست سیستم شما در LDAP خارجی با گذرواژهای که هنگام نصب اولیه Apigee Edge for 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, 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 "Indirect binding only: Encrypting the external LDAP user’s password". 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را ارائه دهید. فراخوان میانای برنامهسازی کاربردی که میخواهیم آزمایش کنیم فقط میتواند توسط سرپرست سیستم Edge اجرا شود.
مهم: اطلاعات اعتباری یکسان باید در حساب LDAP خارجی شما وجود داشته باشد. اگر نه، باید آنها را اکنون اضافه کنید. توجه داشته باشید که نام کاربری معمولاً نشانی ایمیل است؛ بااینحال، این موضوع به نحوه پیکربندی اصالتسنجی خارجی بستگی دارد، همانطور که قبلاً در این سند توضیح داده شد.
> 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 - وقتی از شما خواسته شد، گذرواژهتان را وارد کنید.
اگر فرمان وضعیت ۲۰۰ و فهرستی از سازمانها را برگرداند، پیکربندی صحیح است. این فرمان تأیید میکند که تماس با «میانای برنامهسازی کاربردی» با «سرور مدیریت Edge» ازطریق سیستم LDAP خارجی باموفقیت اصالتسنجی شده است.