บทนำ
Oracle Internet Directory เป็น Lightweight Directory Access Protocol (LDAP) server ซึ่งใช้ external oracle database เพื่อจัดเก็บข้อมูลและ提供 single sign-on solutions สำหรับ Oracle Applications
• OID ให้ประสิทธิภาพสูงสำหรับแอปพลิเคชันขนาดใหญ่
• OID เป็นบริการไดเรกทอรีที่ปลอดภัยที่สุด ให้ความปลอดภัยในทุกระดับ จากข้อมูลระหว่างทาง ไปจนถึงการจัดเก็บหรือสำรอง
• ให้บริการ Storage และ Synchronization Oracle Unified Directory เป็นโซลูชันไดเรกทอรีรุ่นต่อไปของ Oracle ที่ครบครันในหนึ่งเดียว มีความสามารถในการจัดเก็บ proxy, synchronizing และ virtualization LDAP server นี้เขียนด้วย JAVA ทั้งหมด รองรับการปรับใช้ที่ scalable ให้ประสิทธิภาพสูง
คุณสามารถใช้ OUD สำหรับสิ่งต่อไปนี้
• LDAP Directory server เพื่อจัดเก็บข้อมูล
• เป็น Proxy server interface ระหว่าง client และ directory server
• Replication gateway ระหว่าง Oracle Unified Directory และ Oracle Directory Server Enterprise Edition มีสองแนวทางสำหรับการย้ายจาก OID ไป OUD:
Synchronizing OUD กับ OID โดยใช้ DIP
Schemasync
1. Synchronizing OUD กับ OID โดยใช้ DIP
Pre Step
คุณต้องเปิดใช้งาน External change log เป็นขั้นตอนก่อนเพื่อดำเนินการย้าย External Change log (ECL) พร้อมใช้งานโดย default บน server instance ใดๆ ที่รวมทั้ง Directory server และ Replication server ECL จะเปิดใช้งานเมื่อ directory server ถูกกำหนดค่าเป็นส่วนหนึ่งของ replication topology ระหว่างการติดตั้ง หรือคุณสามารถกำหนดค่า replication โดยรันคำสั่ง dereplication
$ dsreplication enable-changelog -h localhost -p 4444 -D "cn=directory manager" -j
pwd-file -r 8989 -b dc=example,dc=com -X -n
ตรวจสอบว่า change log เปิดใช้งานแล้ว โดยรันคำสั่งด้านล่าง
ldapsearch -h <HOSTNAME> -p <PORT> -D "cn=<DM_ADMIN>" -w <PASSWORD> -s base -b ""
"objectclass=*" namingContexts
version: 1
dn:
namingContexts: cn=changelog
namingContexts: <SUFFIX_DN>
DIP และ OID ถูกกำหนดค่าและ deploy แล้ว
เปิดใช้งาน SSL บน OID
DIP-OID synchronization เป็นไปได้กับ SSL mode เท่านั้น คุณต้องสร้าง OID wallet เพื่ออนุญาตให้ bind ไปยัง OID ใน SSL mode ต้องการ self-signed wallet สร้างโดยใช้ Enterprise manager และคัดลอกไปยัง Oracle wallet โดยใช้ขั้นตอนต่อไปนี้
ขั้นตอนสร้าง OID Self signed Certificate:
Export Trusted certificate และคัดลอกไปยัง Oracle Wallet manager
Create OID Wallet จาก OWM และคัดลอก trusted certificate ไปยัง wallet
Bind ไปยัง OID1 ใน SSL mode โดยใช้คำสั่งด้านล่าง
ldapbind -h <OID_HOSTNAME> -p <OID_PORT> -D "cn=<OID_ADMIN>" -w <PASSWORD> -U 2
-W "file:/home/oracle/oid1_client_wallet" -P "<PASSWORD>"
bind successful
DIP Configuration Steps
สร้าง keystore โดยใช้ Keytool พร้อม OID self-signed certificate
keytool -importcert -trustcacerts -file /home/oracle/certificates_base/
oid1_selfsigned_cert.txt -keystore $HOME/dip_keystore
Enter keystore password:
Re-enter new password:
Trust this certificate? [no]: yes
Certificate was added to keystore
อัปเดต DIP Config เพื่อชี้ keystore location
$ORACLE_HOME/bin/manageDIPServerConfig set -attribute keystorelocation -h
<OID_HOSTNAME> -p <WLS_PORT> -D <WL_ADMIN> -value $HOME/dip_keystore <wls admin
user password>
Connection parameters initialized.
Connected successfully.
The attribute keystorelocation is successfully changed to value /home/oracle/dip_keystore.
กำหนดค่า DIP ใน SSL V2 mode โดยใช้คำสั่งด้านล่าง
$ORACLE_HOME/bin/manageDIPServerConfig set -attribute sslmode -h <OID_HOSTNAME> -p
<WLS_PORT> -D <WLS_ADMIN> -value 2 <wls admin user password>
Connection parameters initialized.
Connected successfully.
The attribute sslmode is successfully changed to a value of 2.
อัปเดต Java Key store โดยใช้ wlst.sh และ restart OID และ DIP services เพื่อให้การเปลี่ยนแปลงนี้มีผล
wlst.sh
connect('<WLS_ADMIN>','<PASSWORD>','t3://localhost:<EM_PORT>')
createCred(map="dip",key="jksKey", user="<JKS_USER>",password="<PASSWORD>")
disconnect()
Synchronization profile OUD และ OID
คุณต้องสร้าง Suffix_dn entry ใน OID เพื่อ populate OUD data มันสำคัญมากที่จะเลือก suffix ที่จะสร้าง และจะถูกใช้โดยตรงระหว่าง synchronization profile management เลือก parent directory ตามภาพถ่ายต่อไปนี้
สร้าง Synchronization profile
ไปที่ Menu > เลือก OID ใน Identity and Access > OID Administration และเลือก Synchronization profile ตามภาพต่อไปนี้
สร้างดังนี้ 2 Synchronization profiles
OUD > OID: OUDImport OID > OUD: OUDExport
คุณต้องตัดสินใจว่า OID ควรใช้เป็น source หรือ destination ขณะสร้าง synchronization profile
ใช้ host name และ port เป็น OID hostname และ port number เนื่องจาก OID ถูกใช้เป็น source เมื่อ mapping เสร็จแล้ว OUDImport /OUDExport จะ map “ou=people, dc=people,dc=com” ทั้งสองข้าง ตามที่สะท้อนในภาพถ่ายต่อไปนี้
เมื่อ mapping เปิดใช้งาน โดย default attributes ต่อไปนี้จะได้ mapped อัตโนมัติ
Bootstrapping data จาก OID ไป OUD
เพิ่ม OID ACI เพื่ออนุญาตให้ DIP เข้าถึง suffix DN เพื่อทำ syncProfileBootstrap
เพิ่ม OID ACI โดยใช้คำสั่งต่อไปนี้
cat aci_oudimport.ldif
dn: ou=People,dc=people,dc=com
changetype :modify
add: orclaci
orclaci:access to entry by dn="orclodipagentname=OUDImport,cn=subscriber profile,
cn=changelog subscriber,cn=oracle internet directory" (browse,add,delete)
orclaci: access to attr=(*) by group="orclodipagentname=OUDImport,cn=subscriber
profile,cn=changelog subscriber,cn=oracle internet directory"
(read,search,write, selfwrite,compare)
รันคำสั่ง ldapmodify เพื่อเพิ่ม ACI
ldapmodify -h <OID_HOSTNAME> -p <OID_PORT> -D cn=<OID_ADMIN> -w <PASSWORD> -f
aci_oudimport.ldif
รันคำสั่งต่อไปนี้เพื่อ bootstrap data จาก OID ไป OUD
syncProfileBootstrap -h <OID_HOSTNAME> -p <WLS_PORT> -D <WLS_ADMIN> -pf OUDImport
Connection parameters initialized.
Connecting at <OID_HOSTNAME>:<WLS_PORT>, with userid "<WLS_ADMIN>".
Connected successfully.
The bootstrap operation completed, the operation results are:
entries read in bootstrap operation: 1907
entries filtered in bootstrap operation: 0
entries ignored in bootstrap operation: 0
entries processed in bootstrap operation: 1906
entries failed in bootstrap operaton: 1
ตอนนี้คุณจะเห็น suffix data ที่ OUD side
ou=people,dc=people,dc=com
Schemasync
Schemasync utility ช่วยให้สามารถซิงค์ schema attributes และ object classes ระหว่าง OID และ third party LDAP Directory อื่นๆ
Syntax for Schemasync:
schemasync -srchost hostname -srcport port -srcdn bindDN -srcpwd password -dsthost
hostname -dstport port -dstdn bindDN -dstpwd password [-ldap]
-srchost – Host name of source directory server.
-srcport – Source directory source LDAP listening port
-srcdn – The DN of the user used to bind to the source directory.
-srcpwd – The user password used to bind to the source directory.
-dsthost – Host name of Destination directory server.
-destport – LDAP listening port for Destination directory server.
-dstdn – DN of the user used to bind to the destination directory server.
-ldap – When we use LDAP, Schema changes are applied directly from the source LDAP
to destination LDAP.
schemasync -srchost srchost.domain.com -srcport 3060 -srcdn "cn=orcladmin" \
-dsthost dsthost.domain.com -dstport 3060 \
-dstdn "uid=superuser,ou=people,dc=people,dc=com" -ldap
หลังจากรันคำสั่งข้างต้นแล้ว ให้ตรวจสอบรายละเอียด DN ใน destination directory server
สรุป
วิธีที่แสดงในโพสต์นี้เพื่อย้าย OID store ที่มีอยู่ไป OUD เพื่อรองรับแอปพลิเคชันขนาดใหญ่ เพื่อให้ได้ single sign-on solutions OUD ให้ประสิทธิภาพสูงในกระบวนการยืนยันตัวตนของผู้ใช้ เนื่องจาก LDAP server จัดเก็บข้อมูล ขั้นตอนการย้ายตรงไปตรงมา สามารถนำไปใช้ในแอปพลิเคชันทุกประเภทได้
ใช้แท็บ Feedback เพื่อแสดงความคิดเห็นหรือถามคำถาม คุณยังสามารถเริ่มสนทนากับเราได้