安装和升级 > Windchill 安装和配置 > 高级配置 > 配置其他企业目录 > 用户和组的 LDAP 属性值映射 > Microsoft Active Directory 用户和组对象的属性映射
  
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