安装和升级 > 安装和配置指南 > 高级配置 > 配置其他企业目录 > 用户和组的 LDAP 属性值映射
  
用户和组的 LDAP 属性值映射
Windchill 使用在 Internet 标准 LDAP 方案中定义的用户和组 LDAP 属性的子集。您的目录所使用的可能不是 Windchill 在默认情况下所指定的用户和组条目的目录属性。
将企业目录用于用户或组时,可能需要修改在该目录中使用哪些属性,或修改哪些 LDAP 对象类可用于定义用户和组。这就意味着,当您配置 JNDI 适配器时,必须提供附加的属性映射属性才能将默认的 Windchill 用户和组属性映射到 LDAP 目录所使用的相应用户和组属性。
您可以使用 LDAP 条目表单的“其他特性”部分映射特性属性:
输入值将保存在指定的 JNDI 配置属性中。重新加载属性后,目录服务即会使用这些属性。
当在 JNDI 适配器中映射特性属性时,将使用以下格式来指定用户、组和组织特性属性:
承担者
属性格式
用户
<service_name>.windchill.mapping.user.<map_identifier>
<service_name>.windchill.mapping.group.<map_identifier>
组织
<service_name>.windchill.mapping.org.<map_identifier>
其中:
<service_name> 是为适配器指定的服务名称 (LDAP 属性表单中的“服务名称”字段)
<map_identifier> 是要映射的属性或值
以下情景说明了如何为用户设置对象类:
您已为 JNDI 适配器分配了服务名称 EnterpriseDirectory1
在 Windchill 中,设置对象类属性时使用的映射标识符为 objectClass
您需要为用户映射此属性,因此所指定的格式为 windchill.mapping.user
Windchill 中的默认对象类值为 "inetOrgPerson",但最好将其设置为 "organizationalPerson"。
要设置此属性,您可以在 LDAP 条目表单的“其他特性”部分中完成以下操作:
1. “特性”字段中输入:
EnterpriseDirectory1.windchill.mapping.user.objectClass
2. “值”字段中输入:
organizationalPerson
3. 单击“添加”
默认用户和组的 LDAP 属性值
以下章节列出了 Windchill 使用的默认组 LDAP 对象类和属性,以及用于其他 LDAP 目录中“组”对象的相应对象类和属性。有关 Microsoft 活动目录的指定值,请参阅“用户和组对象的 Microsoft 活动目录属性映射”一节。
用户对象 LDAP 属性值
Windchill 中分配给 LDAP 用户对象类的默认值:
Windchill 用户对象类
<map_identifier>
说明
LDAP 对象类默认值
objectClass
指定 LDAP 对象类值,该值可定义目录服务中的用户。
inetOrgPerson
下表列出了 Windchill 所识别的用户对象的默认 LDAP 值。如有必要,可使用 <map_identifier> 更改您的 LDAP 目录的相应默认属性值:
Windchill LDAP 用户属性
<map_identifier>
说明
默认值
cn
标识了保存目录服务中的用户全称 (“通用名称”) 的属性
cn
certificateType
指定在目录服务中注册的用户证书的类型。
X.509
mail
标识了保存目录服务中的用户电子邮件地址的属性。
mail
postalAddress
标识了保存目录服务中的用户的邮政地址的属性。
postalAddress
preferredLanguage
标识了保存目录服务中的用户的首选语言的属性。
preferredLanguage
sn
标识了保存目录服务中的用户的姓氏的属性。
sn
o
标识了用于存储目录服务中的用户所属组织的属性。
您也可以使用 usersOrganizationName 设置用户的初始组织名称。有关详细信息,请参阅创建和配置 JNDI 适配器中的“设置其他属性”一节。
o
uid
标识了保存目录服务中的用户的用户 ID (通常用作登录 ID) 的属性。
uid
uniqueIdAttribute
标识了唯一标识目录服务中的用户的属性。
uid
userCertificate
标识了提供目录服务中的用户的用户证书的属性。
userCertificate
telephoneNumber
标识了保存用户的主要电话号码的属性。
telephoneNumber
mobile
标识了保存用户的手机号码的属性。
mobile
facsimileTelephoneNumber
标识了保存用户的传真号码的属性。
facsimileTelephoneNumber
labledURI
标识了保存用户的 Web 站点的 URL 的属性。
labledURI
组对象 LDAP 属性值
Windchill 中分配给 LDAP 组对象类的默认值:
Windchill 组对象类
<map_identifier>
说明
默认 LDAP 对象类
objectClass
指定用于定义目录服务中的组的 LDAP 对象类值。
groupOfUniqueNames
下表列出了 Windchill 所识别的组对象的默认 LDAP 值。如有必要,可使用 <map_identifier> 更改您的 LDAP 目录的相应默认属性值:
Windchill LDAP 组属性
<map_identifier>
说明
默认值
cn
标识用于存储目录服务中组名称的属性。
cn
description
标识用于存储有关目录服务中组的描述性文本的属性。
description
filter
指定一个附加表达式,该附加表达式将添加到使用该 JNDI 适配器的查询组所使用的所有 LDAP 搜索筛选器中。默认情况下,不添加任何附加表达式。示例:(ou=Engineering)
您也可以使用现有 JNDI searchFilter 属性设置筛选器。
uniqueIdAttribute
标识用于存储目录服务中组的唯一名称的属性。
cn
uniqueMember
标识用于定义目录服务中组成员的属性。
uniqueMember
Microsoft Active Directory 用户和组对象的属性映射
要使 Windchill 能够使用 Microsoft Active Directory 用户对象,必须为 JNDI 适配器定义中的用户对象设置以下属性映射属性:
mapping.user.objectClass=user
mapping.user.o=company
mapping.user.uid=sAMAccountName
mapping.user.uniqueIdAttribute=sAMAccountName
* 
这些映射值表示映射到映射标识符的属性。例如,映射标识符 o 映射到属性 company
* 
假定 uid 是唯一的,由于它是登录到 Web 服务器时所使用的用户 ID,因此为 mapping.user.uniqueIdAttribute 指定的值应始终与为 mapping.user.uid 指定的值相同。
* 
不同的 ActiveDirectory 配置 (如 ADAM) 将不会自动索引属性。如果未创建索引,则可能会影响性能。为了降低此可能性,请确保为映射到 mapping.user.uniqueIdAttribute 的属性创建索引。
以下属性映射值均基于 Microsoft Active Directory 的预置安装。分配给这些属性映射属性的实际值会根据 Microsoft Active Directory 的安装方式不同而有所变化:
<service_name>.windchill.mapping.user.postalAddress=postalAddress
<service_name>.windchill.mapping.group.objectClass=group
<service_name>.windchill.mapping.user.uid=sAMAccountName
<service_name>.windchill.mapping.user.cn=cn
<service_name>.windchill.mapping.user.preferredLanguage=preferredLanguage
<service_name>.windchill.mapping.group.uniqueMember=member
<service_name>.windchill.mapping.user.mobile=mobile
<service_name>.windchill.mapping.group.uniqueIdAttribute=sAMAccountName
<service_name>.windchill.mapping.group.description=description
<service_name>.windchill.mapping.user.mail=mail
<service_name>.windchill.mapping.user.facsimileTelephoneNumber=facsimileTelephoneNumber
<service_name>.windchill.mapping.user.sn=sn
<service_name>.windchill.mapping.user.objectClass=user
<service_name>.windchill.mapping.user.uniqueIdAttribute=sAMAccountName
<service_name>.windchill.mapping.user.userCertificate=userCertificate
<service_name>.windchill.mapping.user.o=company
以下属性是可选的 Microsoft Active Directory 属性映射:
<service_name>.windchill.mapping.user.preferredLanguage=localeID
<service_name>.windchill.mapping.user.labeledURI=wWWHomePage
下表列出了 Microsoft Active Directory 的用户对象的默认属性,以及与之相比的 Windchill 值:
Windchill 和 Microsoft Active Directory 用户对象类
Windchill 默认 LDAP 用户对象类
Microsoft Active Directory 用户对象类
inetOrgPerson
user
* 
Microsoft Active Directory 的一些映射值根据所使用的 Active Directory 方案会有所不同,此类方案会基于所使用的 Windows 的版本级别而有所不同。
Windchill 和 Microsoft Active Directory 用户属性
Windchill 默认 LDAP 用户属性
Microsoft Active Directory 用户属性
cn
cn
mail
mail
postalAddress
Microsoft Active Directory 用户对象类支持预置的 postalAddress,但是 Microsoft Active Directory 中并未设置 postalAddress。而是使用几个单独属性:街道地址、位置、邮政编码和国家/地区。
* 
如果该属性的指定值包含 $ 字符,且特性 <jndiAdapterName>.<webAppName>.config.directoryType 设置为 ADS,则 $ 字符将被新行所取代。有关配置此特性的详细信息,请参阅 JNDI 适配器特性
要启用 Windchill 以查看 postalAddress 值,请执行以下操作之一:1) 必须将所有地址信息分配给用户对象的 postalAddress 属性,或 2) 可使用另一个属性合并所有地址信息,然后将此属性映射到 JNDI 适配器定义上的 postalAddress
preferredLanguage
预置 Microsoft Active Directory 没有用户对象可用的 preferredLanguage 属性。除非将您的 Microsoft Active Directory 安装配置为将其中一个用户对象的属性设置为首选语言值,然后将该属性映射到 JNDI 适配器定义上的 preferredLanguage,否则,Windchill 将无法显示 preferredLanguage 值。
sn
sn
uid
预置 Microsoft Active Directory 没有用户对象可用的 uid 属性。而是存在两个包含用户 ID (uid) 信息的属性:
第一个是 sAMAccountName,即用户 ID 本身。
第二个是 userPrincipalName,它是带有附加域的用户 ID (例如,user@myco.com)。
要使 Windchill 能够显示 uid 值,必须将这些属性之一映射到 JNDI 适配器定义上的 uid。使用符合 Web 服务器传递的用户 ID 格式的属性。
userPassword
Microsoft Active Directory 用户对象类支持预置的 userPassword,但是 Microsoft Active Directory 中并未设置 userPassword
除非您的 Microsoft Active Directory 安装设置了 userPassword (或对映射到 JNDI 适配器定义上的 userPassword 的其他属性进行了设置),否则 Windchill 将不显示该值。
userCertificate
userCertificate
o
Microsoft Active Directory 方案支持 o 作为用户对象类的可选属性。但是,Active Directory 通常不会设置 o。因此,默认情况下,Windchill 会将 o 映射到公司。如有必要,可以更改此映射。
telephoneNumber
telephoneNumber
facsimileTelephoneNumber
facsimileTelephoneNumber
mobile
mobile
labeledURI
预置 Microsoft Active Directory 没有用户对象可用的 labeledURI 属性。而是存在包含相同信息的 wWWHomePage 属性。要使 Windchill 能够显示 labeledURI 值,可将 wWWHomePage 映射到 JNDI 适配器定义上的 labeledURI
Microsoft Active Directory 组对象 LDAP 属性
Windchill 默认 LDAP 组对象类
Microsoft Active Directory 组对象类
groupofUniqueNames
group
Windchill 和 Microsoft Active Directory 组属性
Windchill 默认 LDAP 组属性
Microsoft Active Directory 组属性
cn
cn
description
description
uniqueMember
预置 Microsoft Active Directory 没有组对象可用的 uniqueMember 属性。相反,其中具有 member 属性。要使 Windchill 能够查看 Microsoft Active Directory 组成员,请将 member 属性映射到 JNDI 适配器定义上的 uniqueMember
要使 Windchill 与 Microsoft Active Directory 组对象和组成员配合使用,必须为 JNDI 适配器定义上的组对象设置以下属性映射属性:
mapping.group.cn=cn
mapping.group.objectClass=group
mapping.group.uniqueMember=member