FP8.5.5.2 或更高版本

Virtual member manager 定制属性

定制属性用于配置高级设置,这些高级设置在联合存储库中提供一些其他功能。

preFetchData

添加了 preFetchData 定制属性,以针对 LDAP 存储库为用户或组实体类型支持预取和高速缓存一组属性。通过使用此属性,可定义要为特定用户或组实体类型永久预取和高速缓存的属性的列表。

信息
数据类型 字符串
有效值 包含由实体类型名称及其属性集组成的对的字符串
此属性的有效值包含由实体类型名称及其对应属性集组成的对。必须采用以下格式定义该属性的值:
EntityType1:attribute1,attribute2;EntityType2:attribute1,attribute2

如果为这些属性指定的格式或值不正确,那么可能会看到类似于下列示例的异常:

请使用 setIdMgrCustomProperty 命令在联合 LDAP 存储库中定义 preFetchData 属性。
$AdminTask setIdMgrCustomProperty {-id <ldap_repository_name> -name <property_name> -value <value>}
例如:$AdminTask setIdMgrCustomProperty {-id LDAP1 -name preFetchData -value “PersonAccount:sn,cn,givenName,displayName,preferredLanguage;Group:cn,description”}
以下样本显示具有 preFetchData 属性的 LDAP 存储库配置:
<config:repositories xsi:type="config:LdapRepositoryType" adapterClassName="com.ibm.ws.wim.adapter.ldap.LdapAdapter"
	id="LDAP1" isExtIdUnique="true" supportAsyncMode="false" supportExternalName="false"
        supportPaging="false" supportSorting="false" supportTransactions="false" certificateFilter=""
        certificateMapMode="exactdn" ldapServerType="IDS" translateRDN="false">
   <config:baseEntries name="o=ldap" nameInRepository="o=ldap"/>
   <config:loginProperties>uid</config:loginProperties>
   <config:CustomProperties name="preFetchData" value="PersonAccount:sn,cn,givenName,displayName,preferredLanguage;Group:cn,description"/>
   <config:ldapServerConfiguration primaryServerQueryTimeInterval="15" returnToPrimaryServer="true"
          sslConfiguration="">
	<config:ldapServers authentication="simple" bindDN="cn=root" bindPassword="{xor}LTAwK25tbA=="
            connectionPool="false" connectTimeout="0" derefAliases="always" referal="ignore"
            sslEnabled="false">
	    <config:connections host="localhost" port="389"/>
        </config:ldapServers>
   </config:ldapServerConfiguration>
</config:repositories>
以下是一些方案,显示基于为 preFetchData 属性配置的值的控制流:
  • 方案 1:在 preFetchData 定制属性值配置为 PersonAccount:sn;Group:cn 的情况下,以用户 user1 身份登录

    当第一次为 user1 执行操作时,还会检索到 sn 属性,并将其与该用户的登录属性一起进行高速缓存,虽然在查询期间,对于 sn,不存在任何显式请求。对于将 user1 作为成员包含的组,会高速缓存 cn 属性。对于后续调用,会先在高速缓存中查找要检索的数据,并且仅当找不到该数据时,才会针对所需属性进行 JNDI 调用。

  • 方案 2:在 preFetchData 定制属性值配置为 Group:cn 的情况下检索组

    当针对组 g1 运行搜索时,联合存储库会根据您已指定的配置检索并高速缓存组 cn。如果后续调用搜索 cndescription 属性,那么会接着从高速缓存访存 cn,并且会进行显式 JNDI 调用以访存组 description

domainNameForAutomaticDiscoveryOfLDAPServers

可使用此属性查找在运行时任何可用的 LDAP 服务器,针对特定域名,在 LDAP 存储库的 DNS 配置文件中定义了该 LDAP 服务器。

信息
数据类型 字符串
有效值 域的名称,对于该域,在 DNS 配置文件中定义了 LDAP 服务器记录

除了主服务器配置之外,还可在联合 LDAP 存储库配置中配置故障转移服务器。如果主服务器关闭,那么联合存储库会切换至故障转移服务器。如果存在大量为其定义了用户和组的 LDAP 服务器,那么在联合 LDAP 存储库配置中指定所有 LDAP 服务器名称会变得很困难。如果在 WebSphere Application Server 中配置了大量节点,并且每个节点都配置为具有多个 LDAP,那么配置会变得更困难并且要用更长时间。当存在大量 LDAP 服务器时,请使用 domainNameForAutomaticDiscoveryOfLDAPServers 属性在运行时动态查找这些 LDAP 服务器名称,不管在 LDAP 存储库中配置了哪个 LDAP 服务器。

可定义 LDAP 的域名(对于该 LDAP,在对应 DNS 配置文件中定义了以 SRV 记录形式出现的对应 LDAP 服务器),如下列示例中所示:
ldap._tcp.ibm.com 86400 IN SRV 0 0 389 bigbox.ibm.com
ldap._tcp.ibm.com 86400 IN SRV 10 20 1389 smallbox1.ibm.com
如果设置了 domainNameForAutomaticDiscoveryOfLDAPServers 属性,那么联合存储库会从 DNS 配置文件中查找 LDAP 服务器,并对该特定服务器进行后续 JNDI 调用。

可通过使用以下 setIdMgrCustomProperty 命令来设置 domainNameForAutomaticDiscoveryOfLDAPServers 属性:$AdminTask setIdMgrCustomProperty {-id <ldap_repository_name> -name <property_name> -value <value>}

例如:
$AdminTask setIdMgrCustomProperty {-id LDAP1 -name domainNameForAutomaticDiscoveryOfLDAPServers -value “dc=ibm,dc=com”}
以下样本显示具有 domainNameForAutomaticDiscoveryOfLDAPServers 属性的 LDAP 存储库配置:
<config:repositories xsi:type="config:LdapRepositoryType" adapterClassName="com.ibm.ws.wim.adapter.ldap.LdapAdapter"
        id="LDAP1" isExtIdUnique="true" supportAsyncMode="false" supportExternalName="false"
        supportPaging="false" supportSorting="false" supportTransactions="false" certificateFilter=""
        certificateMapMode="exactdn" ldapServerType="IDS" translateRDN="false">
   <config:baseEntries name="o=ldap" nameInRepository="o=ldap"/>
   <config:loginProperties>uid</config:loginProperties>
   <config:CustomProperties name="domainNameForAutomaticDiscoveryOfLDAPServers" value="dc=ibm,dc=com"/>
   <config:ldapServerConfiguration primaryServerQueryTimeInterval="15" returnToPrimaryServer="true"
          sslConfiguration="">
        <config:ldapServers authentication="simple" bindDN="cn=root" bindPassword="{xor}LTAwK25tbA=="
            connectionPool="false" connectTimeout="0" derefAliases="always" referal="ignore"
            sslEnabled="false">
            <config:connections host="localhost" port="389"/>
        </config:ldapServers>
   </config:ldapServerConfiguration>
</config:repositories>
domainNameForAutomaticDiscoveryOfLDAPServers 属性会覆盖 LDAP 存储库中设置的 LDAP 服务器配置,并从 DNS 配置文件中检索 LDAP 服务器名称和端口号。

系统会生成以下联合 LDAP 存储库 URL 并使用它来搜索 LDAP 服务器记录:ldap:///dc=ibm,dc=com

如果 JNDI 以域名形式接收到该 URL,那么会从 DNS 配置文件中检索到 LDAP 服务器。如果其中一个 LDAP 服务器关闭,那么 JNDI 会启动在该域的 DNS 配置文件中定义的另一 LDAP 服务器。

minimizeContextPoolThreadBlock

当 LDAP 服务器处于关闭状态并且尝试了从该服务器进行读操作时,系统会使用 minimizeContextPoolThreadBlock 定制属性定义线程锁定行为。当该属性的值设置为 true 时,仅会对读操作阻塞最小数目的线程,并且其余线程会立即失败而不进行等待。如果该属性设置为 false,那么会阻塞每个进行读请求的线程,直到针对所请求 LDAP 创建了上下文或上下文创建遇到超时。上下文创建的缺省时间为 120 秒。
信息
数据类型 Boolean
缺省值 True

maxThreadsToBlock

maxThreadsToBlock 属性与 minimizeContextPoolThreadBlock 属性一起使用。如果 minimizeContextPoolThreadBlock 属性设置为 true,那么 maxThreadsToBlock 会确定当执行 LDAP 读操作时必须阻塞的最大线程数。
信息
数据类型 整数
缺省值 5

bindTimeout

bindTimeout 定制属性指定用于跟踪快速绑定计数的时间,以毫秒计。如果启用了跟踪日志,那么任何所用时间超过指定时间的绑定都会添加到日志。
信息
数据类型 毫秒
缺省值 1000


使用条款 | 反馈