使用JAAS時,是否有任何方式指定由角色(組)搜索查詢返回的屬性?在Jetty中指定LDAP組搜索屬性LdapLoginModule
返回的羣組在uniqueMember
屬性中包含大約100k個條目,該屬性正在使應用服務器和OpenLDAP之間的鏈接飽和。由於該查詢只需要cn
屬性,因此我想告訴容器僅在執行搜索時請求該容器。
目前,查詢並未設置要返回的任何屬性,它將返回所有屬性。
的DEV(碼頭)java.security.auth.login.config
看起來像這樣
devldap {
org.eclipse.jetty.plus.jaas.spi.LdapLoginModule required
debug="true"
contextFactory="com.sun.jndi.ldap.LdapCtxFactory"
hostname="ldap-dev.example.com"
port="389"
bindDn="cn=Manager,dc=example,dc=com"
bindPassword="xxxx"
authenticationMethod="simple"
forceBindingLogin="true"
userBaseDn="ou=users,dc=example,dc=com"
userRdnAttribute="uid"
userIdAttribute="uid"
userPasswordAttribute="userPassword"
userObjectClass="inetOrgPerson"
roleBaseDn="ou=groups,dc=example,dc=com"
roleNameAttribute="cn"
roleMemberAttribute="uniqueMember"
roleObjectClass="groupOfUniqueNames";
};
+1非常棒。這是什麼讓堆棧偉大。 – millhouse
謝謝。 Bug創建 - http://jira.codehaus.org/browse/JETTY-1530 – Phil
固定在主,並將很快合併到碼頭-8 ...也爲未來的臭蟲日食類錯誤應該打開在bugs.eclipse.org在RT/Jetty –