ldapentry.xml

ldapentry.xml 檔取代了 WebSphere Commerce 舊版中所用的 ldapmap.xml 檔。請記得將您先前使用的 ldapmap.xml 檔內容轉送到 ldapentry.xml 檔中。ldapentry.xml 檔提供最常使用欄位的預設映射。 預設綱目映射中的 LDAP 屬性是根據預設使用者物件類別 (personorganizationalPersoninetOrgPersonePerson),以及預設組織實體物件類別 (organizationorganizationalUnit)而來。 這些物件類別是定義給 WebSphere Commerce 所支援的所有 LDAP 伺服器。 如果要將預設綱目映射擴充到這些物件類別之外, 請確定要先在 LDAP 伺服器上執行綱目擴充項, 之後才能將新屬性的映射置於 ldapentry.xml 檔中。 建議您不要將下列屬性持續保存在 LDAP 中:WebSphere Commerce 中內部產生的鍵值、經常變更的資料(如 USERS 表格中的 Lastsession)。

有關 LDAP 屬性的資訊,請見下列網站:www.as400.ibm.com/ldap/schema。

<?xml version="1.0"?>
<!DOCTYPE ldapentry SYSTEM "ldapentry.dtd">
<ldapentry>
    <entry entryName="User">
        <ldapsetting> 
            <ldaprdn rdnName="uid" keyAttrName="logonId" keyObjName="UserRegistry"/>
            <ldapocs objClass="top;person;organizationalPerson;inetOrgPerson"/>
            <ldapbase defaultBase="o=Default Organization,o=Root Organization" searchBase="o=Root Organization"/>
        </ldapsetting>
        <ldapmap>
            <map>
                <objectAttribute attrName="logonPassword"/>
                <ldapAttribute name="userPassword" operation="replace" flow="wcsToLdap"/>
            </map>
            <map>
                <objectAttribute attrName="lastName"/>
                <objectAttribute attrName="firstName"/>
                <objectSeparator attrSeparator="/"/>
                <ldapAttribute name="cn" operation="replace" flow="wcsToLdap"/>
            </map>
            <map>
                <objectAttribute attrName="lastName"/>
                <ldapAttribute name="sn" operation= "replace" flow="bothDirections"/>
            </map>
            <map>
                <objectAttribute attrName="firstName"/>
                <ldapAttribute name="givenName" operation="replace" flow="bothDirections"/>
            </map>
            <map>
                <objectAttribute attrName="phone1"/>
                <ldapAttribute name="homePhone" operation="replace" flow="bothDirections"/>
            </map>
            <map>
                <objectAttribute attrName="zipCode"/>
                <ldapAttribute name="postalCode" operation="replace" flow="bothDirections"/>
            </map>
            <map>
                <objectAttribute attrName="address1"/>
                <objectAttribute attrName="address2"/>
                <objectAttribute attrName="address3"/>
                <objectSeparator attrSeparator="/"/>
                <ldapAttribute name="postalAddress" operation="replace" flow="bothDirections"/>
            </map>
        </ldapmap>
    </entry>
    <entry entryName="Organization">
        <ldapsetting> 
            <ldaprdn rdnName="o" keyAttrName="orgEntityName" keyObjName="Organization"/>
            <ldapocs objClass="top;organization"/>
            <ldapbase defaultBase="o=Root Organization" searchBase="o=Root Organization"/>
        </ldapsetting>
        <ldapmap>
            <map>
                <objectAttribute attrName="businessCategory"/>
                <ldapAttribute name="businessCategory" operation="replace" flow="bothDirections"/>
            </map>
            <map>
                <objectAttribute attrName="description"/>
                <ldapAttribute name="description" operation="replace" flow="bothDirections"/>
            </map>
            <map>
                <objectAttribute attrName="address1"/>
                <objectAttribute attrName="address2"/>
                <objectAttribute attrName="address3"/>
                <objectSeparator attrSeparator="/"/>
                <ldapAttribute name="postalAddress" operation="replace" flow="bothDirections"/>
            </map>
            <map>
                <objectAttribute attrName="phone1"/>
            <ldapAttribute name="telephoneNumber" operation="replace" flow="bothDirections"/>
            </map>
        </ldapmap>
    </entry>
        <entry entryName="OrganizationalUnit">
        <ldapsetting> 
            <ldaprdn rdnName="ou" keyAttrName="orgEntityName" keyObjName="Organization"/>
            <ldapocs objClass="top;organizationalUnit"/>
            <ldapbase defaultBase="o=Root Organization" searchBase="o=Root Organization"/> 
        </ldapsetting>
        <ldapmap>
            <map>
                <objectAttribute attrName="businessCategory"/>
                <ldapAttribute name="businessCategory" operation="replace" flow="bothDirections"/>
            </map>
            <map>
                <objectAttribute attrName="description"/>
                <ldapAttribute name="description" operation="replace" flow="bothDirections"/>
            </map>
            <map>
                <objectAttribute attrName="address1"/>
                <objectAttribute attrName="address2"/>
                <objectAttribute attrName="address3"/>
                <objectSeparator attrSeparator="/"/>
                <ldapAttribute name="postalAddress" operation="replace" flow="bothDirections"/>
            </map>
            <map>
                <objectAttribute attrName="phone1"/>
                <ldapAttribute name="telephoneNumber" operation="replace" flow="bothDirections"/>
            </map>
        </ldapmap>
    </entry>
</ldapentry>

ldapentry.xml 檔的格式如下:

entry
entry 元素定義映射的成員類型。有效值為:User、Organization 或 OrganizationalUnit。
ldapsetting - ldaprdn - rdnName
指定哪一個 LDAP 屬性要作為 RDN 屬性
ldapsetting - ldaprdn - keyAttrName
指定哪一個 WebSphere Commerce 屬性要映射至 RDN 屬性。 如果是使用者,其屬性名稱要對應 UserRegistrationAdd 指令語法中記錄的內容名稱。 屬性名稱有區分大小寫。組織和組織單位也一樣,但要使用 OrgEntityAdd 指令。
ldapsetting - ldaprdn - keyObjName
指定 keyAttrName 中指定的 WebSphere Commerce 屬性可以尋找哪一個 WebSphere Commerce 存取 Bean
ldapsetting - ldapocs - objClass
指定建立 LDAP 登錄時應使用的 LDAP 物件類別
ldapsetting - ldapbase - defaultBase
指定第一個搜尋基礎 DN,當使用者以 RDN 登入時, WebSphere Commerce 要在這個 DN 下搜尋該使用者。如果是組織實體,defaultBase 會指定第一個搜尋基礎 DN,WebSphere Commerce 會在必要時,在這個 DN 下搜尋組織實體。
ldapsetting - ldapbase - searchBase
指定其餘的基礎 DN,WebSphere Commerce 會在這個 DN 下搜尋使用者和組織實體。
map -objectAttribute - attrName
WebSphere Commerce 屬性名稱。如果是使用者,其屬性名稱要對應 UserRegistrationAdd 指令語法中記錄的內容名稱。屬性名稱有區分大小寫。 組織和組織單位也一樣,但要使用 OrgEntityAdd 指令。
map -ldapAttribute - name
LDAP 屬性名稱,這個屬性要映射至 attrName 中指定的 WebSphere Commerce 屬性
map -ldapAttribute - flow
指定要從 LDAP 讀取屬性值要,或要將屬性值寫入 LDAP,或者要同時從 LDAP 讀取和寫入屬性值。有效值為:ldapToWcs、wcsToLdap 或 bothDirections。 
map -ldapAttribute - operation
指定是否要修改 LDAP 的屬性值。有效值為:replace 或 add。 值為 replace 時,會以所提供的新資訊更新目前的使用者資訊 (例如,以新的電話號碼更新現有的電話號碼)。 值為 add 時,會為使用者併入另一個登錄(例如,在目前的使用者資訊中加入一個新的電話號碼, 為使用者建立一個電話號碼清單)。 
map - objectSeparator - attrSeparator
儲存多個 WebSphere Commerce 屬性至一個 LDAP 屬性,或從 LDAP 屬性中擷取多個 WebSphere Commerce 屬性時,要使用的分隔字元。

相關概念

相關作業

相關參照(1292 個位元組)

IBM copyright