این بخش نحوه دریافت، نصب، و پیکربندی مؤلفههای موردنیاز برای ادغام کردن سرویس LDAP در Apigee Edge برای اصالتسنجی کاربر را توضیح میدهد.
پیشنیازها
- باید Apigee Edge برای نصب Private Cloud 4.18.05 داشته باشید.
- برای انجام این نصب، باید اطلاعات کاربری سرپرست سامانه جهانی در Apigee Edge for Private Cloud داشته باشید.
- باید دایرکتوری ریشه نصب Apigee Edge for Private Cloud را بدانید. دایرکتوری ریشه پیشفرض
/optاست. - باید اعتبارنامه سرپرست سیستم جهانی Edge خود را به
LDAP خارجی اضافه کنید. بهخاطر داشته باشید که بهطور پیشفرض، اطلاعات کاربری سرپرست سیستم در LDAP داخلی Edge ذخیره میشود. وقتی به LDAP خارجی بروید، اعتبارنامه سرپرست سیستم شما
در آنجا اصالتسنجی خواهد شد. بنابراین، باید اعتبارنامهها را قبلاز فعال کردن اصالتسنجی خارجی در Edge، برای سیستم خارجی فراهم کنید.
برای مثال، اگر Apigee Edge را برای Private Cloud با اعتبارنامه سرپرست سامانه جهانی بهصورت زیر پیکربندی و نصب کرده باشید:
username: edgeuser@mydomain.com password: Secret123
سپس کاربر
edgeuser@mydomain.comبا گذرواژهSecret123باید در LDAP خارجی نیز وجود داشته باشد. - اگر درحال اجرای خوشه «سرور مدیریت» هستید، توجه داشته باشید که باید همه مراحل این سند را برای هر «سرور مدیریت» انجام دهید.
درحال پیکربندی اصالتسنجی خارجی
فعالیت اصلی که انجام خواهید داد پیکربندی فایل management-server.properties است.
این فعالیت شامل متوقف کردن و شروع کردن Edge Management Server، تصمیمگیری درباره اینکه میخواهید از اتصال مستقیم یا غیرمستقیم استفاده کنید، رمزگذاری کردن اطلاعات کاربری حساس، و سایر کارهای مرتبط میشود.
- مهم: اکنون تصمیم بگیرید که آیا قصد دارید از روش اصالتسنجی اتصال مستقیم یا غیرمستقیم استفاده کنید. این تصمیم بر برخیاز جنبههای پیکربندی تأثیر خواهد گذاشت. به اصالتسنجی خارجی مراجعه کنید.
- مهم: باید این مراحل پیکربندی را در هر «سرور مدیریت 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 برای 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}
نمونه پیکربندی 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 را ارائه دهید. فراخوان میانای برنامهسازی کاربردی که میخواهیم آزمایش کنیم فقط توسط سرپرست سیستم 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
- وقتی از شما خواسته شد، گذرواژهتان را وارد کنید.
اگر فرمان وضعیت ۲۰۰ و فهرستی از سازمانها را برگرداند، پیکربندی درست است. این فرمان تأیید میکند که فراخوانی میانای برنامهسازی کاربردی به Edge Management Server باموفقیت ازطریق سیستم LDAP خارجی اصالتسنجی شده است.