این بخش نحوه دریافت، نصب، و پیکربندی مؤلفههای لازم برای ادغام سرویس LDAP در Apigee Edge برای اصالتسنجی کاربر را توضیح میدهد.
پیشنیازها
- باید نصب Apigee Edge for Private Cloud 4.18.05 را داشته باشید.
- برای انجام این نصب، باید اطلاعات اعتباری سرپرست سیستم جهانی در Apigee Edge for Private Cloud داشته باشید.
- باید دایرکتوری ریشه نصب Apigee Edge for 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»، تصمیمگیری درباره اینکه آیا میخواهید از اتصال مستقیم یا غیرمستقیم استفاده کنید، رمزگذاری اطلاعات اعتباری حساس، و دیگر وظایف مرتبط میشود.
- مهم: اکنون تصمیم بگیرید که آیا قصد دارید از روش اصالتسنجی پیوند غیرمستقیم یا مستقیم استفاده کنید. این تصمیم بر برخیاز جنبههای پیکربندی تأثیر خواهد گذاشت. به اصالتسنجی خارجی مراجعه کنید.
- مهم: باید این مراحل پیکربندی را در هریک از «سرورهای مدیریت 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 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
درحال آزمودن نصب
- تأیید کنید که سرور درحال اجرا است:
/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» ازطریق سیستم LDAP خارجی باموفقیت اصالتسنجی شده است.