Edge for Private Cloud v4.19.01
ส่วนนี้จะอธิบายวิธีรับ ติดตั้ง และกำหนดค่าคอมโพเนนต์ที่จำเป็นในการผสานรวมบริการ LDAP เข้ากับ Apigee Edge สำหรับการตรวจสอบสิทธิ์ผู้ใช้
ข้อกำหนดเบื้องต้น
- คุณต้องติดตั้ง Apigee Edge สำหรับ Private Cloud 4.18.05
- คุณต้องมีข้อมูลเข้าสู่ระบบของผู้ดูแลระบบส่วนกลางใน Apigee Edge สำหรับ Private Cloud เพื่อทำการติดตั้งนี้
- คุณจำเป็นต้องทราบไดเรกทอรีรากของ Apigee Edge สำหรับการติดตั้ง Private Cloud ไดเรกทอรีรากเริ่มต้นคือ
/opt - คุณต้องเพิ่มข้อมูลเข้าสู่ระบบของผู้ดูแลระบบ Edge Global System ลงใน 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 แต่ละเซิร์ฟเวอร์ (หากคุณใช้งานมากกว่า 1 เซิร์ฟเวอร์)
- เปิด
/opt/apigee/customer/application/management-server.propertiesในเครื่องมือแก้ไขข้อความ หากไม่มีไฟล์ ให้สร้างไฟล์ - เพิ่มบรรทัดต่อไปนี้
conf_security_authentication.user.store=externalized.authentication
บรรทัดนี้จะเพิ่มฟีเจอร์การตรวจสอบสิทธิ์ภายนอกลงในการติดตั้ง Edge สำหรับ Private Cloud
- เพื่อให้ขั้นตอนนี้ง่ายขึ้น เราได้สร้างการกำหนดค่าตัวอย่างที่มีความคิดเห็นอย่างละเอียด 2 รายการ ได้แก่ การกำหนดค่าสำหรับการตรวจสอบสิทธิ์การเชื่อมโยงโดยตรงและการกำหนดค่าสำหรับการตรวจสอบสิทธิ์การเชื่อมโยงโดยอ้อม ดูตัวอย่างด้านล่างสำหรับการเชื่อมโยงที่คุณต้องการใช้ และทำการกำหนดค่าให้เสร็จสมบูรณ์
- รีสตาร์ทเซิร์ฟเวอร์การจัดการโดยทำดังนี้
/opt/apigee/apigee-service/bin/apigee-service edge-management-server restart
- ตรวจสอบว่าเซิร์ฟเวอร์ทำงานอยู่โดยทำดังนี้
/opt/apigee/apigee-service/bin/apigee-all status
- สำคัญ: คุณต้องกำหนดค่าเพิ่มเติมในกรณีใดกรณีหนึ่ง (หรือทั้ง 2 กรณี) ต่อไปนี้
- หากคุณต้องการให้ผู้ใช้เข้าสู่ระบบโดยใช้ชื่อผู้ใช้ที่ไม่ใช่อีเมล ในกรณีนี้ ผู้ใช้ที่เป็นผู้ดูแลระบบต้องตรวจสอบสิทธิ์ด้วยชื่อผู้ใช้ด้วย
และ/หรือ
- หากรหัสผ่านสำหรับบัญชีผู้ใช้ sysadmin ใน LDAP ภายนอกแตกต่างจากรหัสผ่านที่คุณกำหนดค่าไว้เมื่อติดตั้ง Apigee Edge สำหรับ Private Cloud เป็นครั้งแรก ดูการกำหนดค่าที่จำเป็นสำหรับข้อมูลเข้าสู่ระบบของผู้ดูแลระบบที่แตกต่างกัน
- หากคุณต้องการให้ผู้ใช้เข้าสู่ระบบโดยใช้ชื่อผู้ใช้ที่ไม่ใช่อีเมล ในกรณีนี้ ผู้ใช้ที่เป็นผู้ดูแลระบบต้องตรวจสอบสิทธิ์ด้วยชื่อผู้ใช้ด้วย
ตัวอย่างการกำหนดค่า DIRECT BINDING
## 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 การเรียก API ที่เราจะทดสอบสามารถดำเนินการได้โดยผู้ดูแลระบบ 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
- ป้อนรหัสผ่านเมื่อได้รับข้อความแจ้ง
หากคำสั่งแสดงสถานะ 200 และรายชื่อองค์กร แสดงว่าการกำหนดค่าถูกต้อง คำสั่งนี้จะยืนยันว่าการเรียก API ไปยัง Edge Management Server ได้รับการตรวจสอบสิทธิ์ผ่านระบบ LDAP ภายนอกเรียบร้อยแล้ว