我正在尝试在Phabricator中配置LDAP身份验证.
/ config/group/ldap /上的设置已完成.但是,当尝试使用LDAP登录时,phabricator正在回答以下错误:
>>> UNRECOVERABLE FATAL ERROR <<<
Call to undefined function ldap_connect()
/sfrphabricator/phabricator/src/applications/auth/ldap/PhabricatorLDAPProvider.php:110
??? ? ¯\_(?)_/¯ ? ???
是否有针对phabricator的ldap验证的配置技巧?
我一直在处理我们使用LDAP获取用户详细信息的应用程序.有时需要更多时间来获取用户详细信息.我想在获取详细信息的方法上实现超时,以便在最坏的情况下我们可以避免在服务器中挂起事务.
这里我们使用LdapUtil的是已配置LdapTemplate类的类来获取所需的详细信息.
我们如何在LDAP方法上实现超时?
(在这种情况下的ldapTemplate.search(...)方法)
public class LdapUtil {
    @Autowired(required = true)
    @Qualifier(value = "ldapTemplateApp")
    LdapTemplate ldapTemplate;
    public Set < ProductGroup > findProducts(String UserId) {
        final Set < ProductGroup > products = newHashSet();
        // Lookup the user         
        String usrFilter = String.format(USERID_FILTER, globalUserId);
        ldapTemplate.search("ou=Members", usrFilter, // note this line
        new NameClassPairCallbackHandler() {
            public void handleNameClassPair(NameClassPair nameClassPair) {
                SearchResult result = (SearchResult) nameClassPair;
                String user = result.getNameInNamespace();
                String GrpFilter = String.format(GROUP_FILTER, user);
                List …我使用unboundid ldap sdk来执行ldap查询.我在运行ldap搜索查询时遇到了一个奇怪的问题.当我对包含50k条目的组运行查询时,我收到异常.我的例外:
LDAPException(resultCode=4 (size limit exceeded), errorMessage='size limit exceeded')
at com.unboundid.ldap.sdk.migrate.ldapjdk.LDAPSearchResults.nextElement(LDAPSearchResults.java:254)
at com.unboundid.ldap.sdk.migrate.ldapjdk.LDAPSearchResults.next(LDAPSearchResults.java:279)
现在奇怪的是我已经在搜索约束中将maxResultSize设置为100k,而不是我收到此错误的原因?我的代码是
     ld = new LDAPConnection();
    ld.connect(ldapServer, 389);
    LDAPSearchConstraints ldsc = new LDAPSearchConstraints();
    ldsc.setMaxResults(100000);
    ld.setSearchConstraints(ldsc);
有人有什么想法吗?
我正在尝试使用端口 636 连接到 LDAP,但出现错误“服务器无法运行”,但如果我尝试连接到端口 389,则它可以正常连接并获取数据
这是我正在使用的代码
DirectoryEntry entry = new DirectoryEntry("LDAP://ldap.domain.com:636/ou=**,ou=**,dc=**,dc=**", "uid=user,OU=**,OU=**,DC=**,DC=**", "password", AuthenticationTypes.None);
有了这个,如果我尝试连接,我会收到错误“服务器无法运行”
但是如果我把代码改成这个
DirectoryEntry entry = new DirectoryEntry("LDAP://ldap.domain.com:389/ou=**,ou=**,dc=**,dc=**", "uid=user,OU=**,OU=**,DC=**,DC=**", "password", AuthenticationTypes.None);
或者甚至删除端口(默认情况下我认为使用 389 端口)
DirectoryEntry entry = new DirectoryEntry("LDAP://ldap.domain.com/ou=**,ou=**,dc=**,dc=**", "uid=user,OU=**,OU=**,DC=**,DC=**", "password", AuthenticationTypes.None);
然后它正常连接并获取数据。
任何人都可以帮我通过 636 端口连接 LDAP,因为在测试服务器环境中我需要通过 636 连接不能使用 389。