Difference between revisions of "Documentation/Administration Guide/LDAP Access"

From Apache OpenOffice Wiki
Jump to: navigation, search
(To Configure {{OOo}} to Access User Profiles From an LDAP Repository (up to {{OOo}} 3.2.x))
(To Configure {{OOo}} to Access User Profiles From an LDAP Repository (for {{OOo}} 3.3 and higher))
Line 79: Line 79:
  
 
====To Configure {{OOo}} to Access User Profiles From an LDAP Repository (for {{OOo}} 3.3 and higher)====
 
====To Configure {{OOo}} to Access User Profiles From an LDAP Repository (for {{OOo}} 3.3 and higher)====
 +
<ol>
 +
<li>In a text editor, create an XML configuration file with the name <tt>oo-ldap.xcd</tt>.
  
 +
{{Documentation/Note|A sample <tt>oo-ldap.xcd</tt> file is provided at <tt>basis/share/registry/oo-ldap.xcd.sample</tt>.}}
 +
 +
The structure of the <tt>oo-ldap.xcd.sample</tt> file is:
 +
 +
<source lang="xml">
 +
<oor:data xmlns:oor="http://openoffice.org/2001/registry">
 +
  <dependency file="main"/>
 +
  <oor:component-data oor:package="org.openoffice" oor:name="LDAP">
 +
    <node oor:name="UserDirectory">
 +
      <prop oor:name="SearchUser">
 +
        <!-- CUSTOMIZE, activate unless anonymous access is possible:
 +
        <value>MyUserLogin</value> -->
 +
      </prop>
 +
      <prop oor:name="SearchPassword">
 +
        <!-- CUSTOMIZE, activate unless anonymous access is possible:
 +
        <value>MyPassword</value> -->
 +
      </prop>
 +
      <prop oor:name="UserObjectClass">
 +
        <!-- CUSTOMIZE --><value>inetorgperson</value>
 +
      </prop>
 +
      <prop oor:name="UserUniqueAttribute">
 +
        <!-- CUSTOMIZE --><value>uid</value>
 +
      </prop>
 +
      <node oor:name="ServerDefinition">
 +
        <prop oor:name="Server">
 +
          <!-- CUSTOMIZE --><value>ldapserver.mycorp.com</value>
 +
        </prop>
 +
        <prop oor:name="Port">
 +
          <!-- CUSTOMIZE --><value>389</value>
 +
        </prop>
 +
        <prop oor:name="BaseDN">
 +
          <!-- CUSTOMIZE --><value>dc=mycorp,dc=com</value>
 +
        </prop>
 +
      </node>
 +
    </node>
 +
  </oor:component-data>
 +
  <oor:component-data oor:package="org.openoffice" oor:name="UserProfile">
 +
    <node oor:name="Data">
 +
      <prop oor:name="o">
 +
        <value oor:external=
 +
    "com.sun.star.configuration.backend.LdapUserProfileBe o,organizationName"/>
 +
      </prop>
 +
      <prop oor:name="givenname">
 +
        <value oor:external=
 +
            "com.sun.star.configuration.backend.LdapUserProfileBe givenname"/>
 +
      </prop>
 +
      <prop oor:name="sn">
 +
        <value oor:external=
 +
            "com.sun.star.configuration.backend.LdapUserProfileBe sn"/>
 +
      </prop>
 +
      <prop oor:name="initials">
 +
        <value oor:external=
 +
            "com.sun.star.configuration.backend.LdapUserProfileBe initials"/>
 +
      </prop>
 +
      <prop oor:name="street">
 +
        <value oor:external="com.sun.star.configuration.backend.LdapUserProfileBe street,postalAddress,streetAddress"/>
 +
      </prop>
 +
      <prop oor:name="l">
 +
        <value oor:external=
 +
            "com.sun.star.configuration.backend.LdapUserProfileBe l"/>
 +
      </prop>
 +
      <prop oor:name="st">
 +
        <value oor:external=
 +
            "com.sun.star.configuration.backend.LdapUserProfileBe st"/>
 +
      </prop>
 +
      <prop oor:name="postalcode">
 +
        <value oor:external=
 +
            "com.sun.star.configuration.backend.LdapUserProfileBe postalcode"/>
 +
      </prop>
 +
      <!--
 +
      <prop oor:name="c">
 +
        <value oor:external=
 +
            "com.sun.star.configuration.backend.LdapUserProfileBe ..."/>
 +
      </prop>
 +
      -->
 +
      <prop oor:name="title">
 +
        <value oor:external=
 +
            "com.sun.star.configuration.backend.LdapUserProfileBe title"/>
 +
      </prop>
 +
      <prop oor:name="position">
 +
        <value oor:external=
 +
            "com.sun.star.configuration.backend.LdapUserProfileBe position"/>
 +
      </prop>
 +
      <prop oor:name="homephone">
 +
        <value oor:external=
 +
            "com.sun.star.configuration.backend.LdapUserProfileBe homephone"/>
 +
      </prop>
 +
      <prop oor:name="telephonenumber">
 +
        <value oor:external=
 +
        "com.sun.star.configuration.backend.LdapUserProfileBe telephonenumber"/>
 +
      </prop>
 +
      <prop oor:name="facsimiletelephonenumber">
 +
        <value oor:external="com.sun.star.configuration.backend.LdapUserProfileBe facsimiletelephonenumber,officeFax"/>
 +
      </prop>
 +
      <prop oor:name="mail">
 +
        <value oor:external=
 +
            "com.sun.star.configuration.backend.LdapUserProfileBe mail"/>
 +
      </prop>
 +
      <!--
 +
      <prop oor:name="fathersname">
 +
        <value oor:external=
 +
            "com.sun.star.configuration.backend.LdapUserProfileBe ..."/>
 +
      </prop>
 +
      -->
 +
      <!--
 +
      <prop oor:name="apartment">
 +
        <value oor:external=
 +
            "com.sun.star.configuration.backend.LdapUserProfileBe ..."/>
 +
      </prop>
 +
      -->
 +
    </node>
 +
  </oor:component-data>
 +
</oor:data>
 +
</source>
 +
</li>
 +
</ol>
  
 
===Mapping LDAP User Profiles===
 
===Mapping LDAP User Profiles===

Revision as of 08:13, 23 September 2010


Apache OpenOffice can use an LDAP User Profile Back End to access user profiles, such as first name, last name, and address, on an LDAP server. As a result, you do not need to manually enter user profiles when you install Apache OpenOffice on a network.

To retrieve user profiles for Apache OpenOffice from an LDAP repository, you need to provide the LDAP User Profile Back End with the following information:

  • Location of the LDAP repository
  • Mapping file that identifies the attributes in the LDAP repository that are required to generate an Apache OpenOffice user profile

Configuring Apache OpenOffice to Retrieve User Profiles From an LDAP Repository

You specify the settings for the LDAP User Profile Back End in LDAP.xcu, an XML file. Apache OpenOffice loads these settings during startup. The structure of the LDAP.xcu file is defined by the configuration schema for the org.openoffice.LDAP component. The schema is located in install-dir/share/registry/schema/org/openoffice/LDAP.xcs.

To Configure Apache OpenOffice to Access User Profiles From an LDAP Repository (up to Apache OpenOffice 3.2.x)

  1. In a text editor, create an XML configuration file with the name LDAP.xcu. Template:Documentation/Note The structure of the LDAP.xcu.sample file is:
     <oor:component-data oor:name="LDAP" oor:package="org.openoffice" 
     xmlns:oor="http://openoffice.org/2001/registry" 
     xmlns:xs="http://www.w3.org/2001/XMLSchema" 
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <node oor:name="UserDirectory">
       <node oor:name="ServerDefinition">
         <prop oor:name="Server" oor:type="xs:string">
           <value>ldapserver.mycorp.com</value>
         </prop>
         <prop oor:name="BaseDN" oor:type="xs:string">
           <value>dc=mycorp,dc=com</value>
         </prop>
         <prop oor:name="Port" oor:type="xs:int">
           <value>389</value>
         </prop>
       </node>
       <!-- The following settings should be omitted if anonymous access is possible -->
         <prop oor:name="SearchUser" oor:type="xs:string"> 
            <value>MyUserLogin</value>
         </prop> 
         <prop oor:name="SearchPassword" oor:type="xs:string"> 
            <value>MyPassword</value> 
         </prop> 
       <!-- End of strings that should be omitted if anonymous access is possible -->
       <prop oor:name="UserObjectClass" oor:type="xs:string">
         <value>inetorgperson</value>
       </prop>
       <prop oor:name="UserUniqueAttribute" oor:type="xs:string">
         <value>uid</value>
       </prop>
       <prop oor:name="Mapping" oor:type="xs:string">
         <value>oo-ldap</value>
       </prop>
     </node>
     </oor:component-data>
  2. Server
    Host name of the LDAP Server.
    BaseDN
    Root entry of the enterprise directory.
    Port
    Port number of the LDAP Server. The default port number is 389.
    SearchUser
    Distinguished Name (DN) of an existing user with read-only access to the LDAP repository.

    Template:Documentation/Note

    SearchPassword
    Password of SearchUser.

    Template:Documentation/Note

    UserObjectClass
    Object class that identifies user entities.
    For example, the user entity for an OpenDS Server might be inetOrgPerson. To find the DN of a user, you need to use this entity in conjunction with the UserUniqueAttribute attribute.
    UserUniqueAttribute
    Attribute that identifies user entities.
    For example, the UserUniqueAttribute for an LDAP repository that is on an OpenDS server might be uid. To find the DN of a user, you need to use this attribute in conjunction with the UserObjectClass. The server compares the value of this attribute to the login user name for the operating system.
    Mapping
    String that indicates a named mapping file, that is, $(Mapping)-attr.map.
    For example, if the LDAP repository is an OpenDS server, then the mapping entry is oo-ldap. This entry tells the LDAP User Profile Back End to use oo-ldap-attr.map as the mapping file. Alternatively, if the LDAP repository is an Active Directory, then the Mapping entry is oo-ad-ldap. This entry tells the LDAP User Profile Back End to use oo-ad-ldap-attr.map as the mapping file.
  3. Replace the value placeholders in the LDAP.xcu file with the mandatory settings for your LDAP server.
  4. Copy the LDAP.xcu file to install-dir/share/registry/data/org/openoffice/.

To Configure Apache OpenOffice to Access User Profiles From an LDAP Repository (for Apache OpenOffice 3.3 and higher)

  1. In a text editor, create an XML configuration file with the name oo-ldap.xcd. Template:Documentation/Note The structure of the oo-ldap.xcd.sample file is:
    <oor:data xmlns:oor="http://openoffice.org/2001/registry">
      <dependency file="main"/>
      <oor:component-data oor:package="org.openoffice" oor:name="LDAP">
        <node oor:name="UserDirectory">
          <prop oor:name="SearchUser">
            <!-- CUSTOMIZE, activate unless anonymous access is possible:
            <value>MyUserLogin</value> -->
          </prop>
          <prop oor:name="SearchPassword">
            <!-- CUSTOMIZE, activate unless anonymous access is possible:
            <value>MyPassword</value> -->
          </prop>
          <prop oor:name="UserObjectClass">
            <!-- CUSTOMIZE --><value>inetorgperson</value>
          </prop>
          <prop oor:name="UserUniqueAttribute">
            <!-- CUSTOMIZE --><value>uid</value>
          </prop>
          <node oor:name="ServerDefinition">
            <prop oor:name="Server">
              <!-- CUSTOMIZE --><value>ldapserver.mycorp.com</value>
            </prop>
            <prop oor:name="Port">
              <!-- CUSTOMIZE --><value>389</value>
            </prop>
            <prop oor:name="BaseDN">
              <!-- CUSTOMIZE --><value>dc=mycorp,dc=com</value>
            </prop>
          </node>
        </node>
      </oor:component-data>
      <oor:component-data oor:package="org.openoffice" oor:name="UserProfile">
        <node oor:name="Data">
          <prop oor:name="o">
            <value oor:external=
         "com.sun.star.configuration.backend.LdapUserProfileBe o,organizationName"/>
          </prop>
          <prop oor:name="givenname">
            <value oor:external=
                "com.sun.star.configuration.backend.LdapUserProfileBe givenname"/>
          </prop>
          <prop oor:name="sn">
            <value oor:external=
                "com.sun.star.configuration.backend.LdapUserProfileBe sn"/>
          </prop>
          <prop oor:name="initials">
            <value oor:external=
                "com.sun.star.configuration.backend.LdapUserProfileBe initials"/>
          </prop>
          <prop oor:name="street">
            <value oor:external="com.sun.star.configuration.backend.LdapUserProfileBe street,postalAddress,streetAddress"/>
          </prop>
          <prop oor:name="l">
            <value oor:external=
                "com.sun.star.configuration.backend.LdapUserProfileBe l"/>
          </prop>
          <prop oor:name="st">
            <value oor:external=
                "com.sun.star.configuration.backend.LdapUserProfileBe st"/>
          </prop>
          <prop oor:name="postalcode">
            <value oor:external=
                "com.sun.star.configuration.backend.LdapUserProfileBe postalcode"/>
          </prop>
          <!--
          <prop oor:name="c">
            <value oor:external=
                "com.sun.star.configuration.backend.LdapUserProfileBe ..."/>
          </prop>
          -->
          <prop oor:name="title">
            <value oor:external=
                "com.sun.star.configuration.backend.LdapUserProfileBe title"/>
          </prop>
          <prop oor:name="position">
            <value oor:external=
                "com.sun.star.configuration.backend.LdapUserProfileBe position"/>
          </prop>
          <prop oor:name="homephone">
            <value oor:external=
                "com.sun.star.configuration.backend.LdapUserProfileBe homephone"/>
          </prop>
          <prop oor:name="telephonenumber">
            <value oor:external=
            "com.sun.star.configuration.backend.LdapUserProfileBe telephonenumber"/>
          </prop>
          <prop oor:name="facsimiletelephonenumber">
            <value oor:external="com.sun.star.configuration.backend.LdapUserProfileBe facsimiletelephonenumber,officeFax"/>
          </prop>
          <prop oor:name="mail">
            <value oor:external=
                "com.sun.star.configuration.backend.LdapUserProfileBe mail"/>
          </prop>
          <!--
          <prop oor:name="fathersname">
            <value oor:external=
                "com.sun.star.configuration.backend.LdapUserProfileBe ..."/>
          </prop>
          -->
          <!--
          <prop oor:name="apartment">
            <value oor:external=
                "com.sun.star.configuration.backend.LdapUserProfileBe ..."/>
          </prop>
          -->
        </node>
      </oor:component-data>
    </oor:data>

Mapping LDAP User Profiles

By default, an Apache OpenOffice installation includes two meta-configuration mapping files that map Apache OpenOffice user profile attributes to LDAP attributes. The LDAP User Profile Back End uses the install-dir/share/registry/ldap/oo-ldap-attr.map mapping file for a Sun Java System Directory Server and the install-dir/share/registry/ldap/oo-ad-ldap-attr.map mapping file for a Windows Active Directory Server. The Mapping entry in the LDAP.xcu file indicates which mapping file to use. For example, oo-ldap indicates the oo-ldap-attr.map file.

Template:Documentation/Note

You can also create a custom user profile mapping file for an alternative LDAP server.

To Create a Custom User Profile Mapping File

  1. Create a text file with the name oo-ldap-server-type-attr.map. Template:Documentation/Tip
  2. Type the mapping information.
    Each line in the file must have the following format: user-profile-attribut=LDAP-attribute1,LDAP-attribute2,...,LDAP-attribute-n.
    You can only map user profile attributes that are present in the Apache OpenOffice configuration schema. The file name path for this schema is install-dir/share/registry/schema/org/openoffice/UserProfile.xcs. You can edit the list of corresponding LDAP attributes to show which attributes in the user entries hold the personal data. The LDAP server sequentially queries each LDAP attribute in the list.
  3. Copy the mapping file to the install-dir/share/registry/ldap/ directory. Template:Documentation/Note
  4. In the install-dir/share/registry/data/org/openoffice/LDAP.xcu file, change the value of the Mapping property to the string that appears before the -attr.map in the name of the mapping file.
    For example, the value of the Mapping property for the file.
Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages