<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic LDAP: error code 50 in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/ldap-error-code-50/m-p/225563#M178693</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if you need to authenticate against an ldap server in the situation where the uid is not in the DN, alfresco will search the DN making a query filterde with (&amp;amp;(objectclass=inetOrgPerson)(uid=entered_username))&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To make this query succeeding, your ldap server has to permit the "principal" user in alfresco to query ALL attributes.&amp;nbsp; In a welldown ldap environment, only the attributes you really need should be available, so you get &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;javax.naming.NoPermissionException: [LDAP: error code 50 - Search not permitted for any attribute]; remaining name 'o=organization, c=be' &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i think the code in LDAPUserRegistry.java should be modify to avoid this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;line 874 in method resolveDistinguishedName(String userId)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; userSearchCtls.setReturningAttributes(new String[] {});&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;should replaced with&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; userSearchCtls.setReturningAttributes(new String[] {"uid"});&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Bernard&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Jul 2010 08:34:31 GMT</pubDate>
    <dc:creator>bparis</dc:creator>
    <dc:date>2010-07-14T08:34:31Z</dc:date>
    <item>
      <title>LDAP: error code 50</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/ldap-error-code-50/m-p/225563#M178693</link>
      <description>Hi,if you need to authenticate against an ldap server in the situation where the uid is not in the DN, alfresco will search the DN making a query filterde with (&amp;amp;(objectclass=inetOrgPerson)(uid=entered_username))To make this query succeeding, your ldap server has to permit the "principal" user i</description>
      <pubDate>Wed, 14 Jul 2010 08:34:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/ldap-error-code-50/m-p/225563#M178693</guid>
      <dc:creator>bparis</dc:creator>
      <dc:date>2010-07-14T08:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: LDAP: error code 50</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/ldap-error-code-50/m-p/225564#M178694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;userSearchCtls.setReturningAttributes(new String[] {});&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;states that we don't want any attributes in our search result. We don't need the uid - we already have it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jul 2010 09:18:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/ldap-error-code-50/m-p/225564#M178694</guid>
      <dc:creator>dward</dc:creator>
      <dc:date>2010-07-14T09:18:17Z</dc:date>
    </item>
    <item>
      <title>Re: LDAP: error code 50</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/ldap-error-code-50/m-p/225565#M178695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I know we already have the uid….&amp;nbsp; the idea is simply to ask an attribute we can read (anyone, but uid is certainly readable) instead of ALL attributes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I just tested that we even could simply comment out the line &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;userSearchCtls.setReturningAttributes(new String[] {});&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;to avoid the ldap -50 error&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;B&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jul 2010 09:34:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/ldap-error-code-50/m-p/225565#M178695</guid>
      <dc:creator>bparis</dc:creator>
      <dc:date>2010-07-14T09:34:23Z</dc:date>
    </item>
    <item>
      <title>Re: LDAP: error code 50</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/ldap-error-code-50/m-p/225566#M178696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The javadoc for SearchControls says this&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /**&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * Specifies the attributes that will be returned as part of the search.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *&amp;lt;p&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * null indicates that all attributes will be returned.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * An empty array indicates no attributes are returned.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * @param attrs An array of attribute ids identifying the attributes that&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; will be returned. Can be null.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * @see #getReturningAttributes&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;What LDAP server are you using?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jul 2010 13:01:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/ldap-error-code-50/m-p/225566#M178696</guid>
      <dc:creator>dward</dc:creator>
      <dc:date>2010-07-14T13:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: LDAP: error code 50</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/ldap-error-code-50/m-p/225567#M178697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;well, … strange !&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Our server is Sun Directory Server (version 5.2p6) &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;b&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jul 2010 13:20:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/ldap-error-code-50/m-p/225567#M178697</guid>
      <dc:creator>bparis</dc:creator>
      <dc:date>2010-07-14T13:20:16Z</dc:date>
    </item>
    <item>
      <title>Re: LDAP: error code 50</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/ldap-error-code-50/m-p/225568#M178698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Well it looks like maybe the bug is in Sun Directory Server. But if your workaround helps us interoperate better with it we should probably add it. I don't see how it could break other directory servers. I have logged &lt;/SPAN&gt;&lt;A href="http://issues.alfresco.com/jira/browse/ALF-3868" rel="nofollow noopener noreferrer"&gt;http://issues.alfresco.com/jira/browse/ALF-3868&lt;/A&gt;&lt;SPAN&gt; .&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jul 2010 14:17:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/ldap-error-code-50/m-p/225568#M178698</guid>
      <dc:creator>dward</dc:creator>
      <dc:date>2010-07-14T14:17:37Z</dc:date>
    </item>
    <item>
      <title>Re: LDAP: error code 50</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/ldap-error-code-50/m-p/225569#M178699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;from strange to very strange:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;doing this&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;userSearchCtls.setReturningAttributes(null);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;makes the search successfull !&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;b&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jul 2010 15:06:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/ldap-error-code-50/m-p/225569#M178699</guid>
      <dc:creator>bparis</dc:creator>
      <dc:date>2010-07-14T15:06:17Z</dc:date>
    </item>
  </channel>
</rss>

