<?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 OpenLDAP authentication, if username already existed, both authentications are valid after sync in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/openldap-authentication-if-username-already-existed-both/m-p/53678#M19974</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have to provide authentication with&amp;nbsp;&lt;SPAN&gt;OpenLDAP&amp;nbsp;so, that after synchronization with OpenLDAP usernames from OpenLDAP, which already existed&amp;nbsp;for&amp;nbsp; &lt;SPAN style="background-color: #f6f6f6;"&gt;alfrescoNtlm authentication&lt;/SPAN&gt;, would keep all the access to&amp;nbsp;owned&amp;nbsp;documents.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;That is, we had user John with &lt;SPAN style="background-color: #f6f6f6;"&gt;alfrescoNtlm&lt;/SPAN&gt; authentication, which had long working background in repository with owned documents.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;The same user John is in OpenLDAP, but with different password.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;After&amp;nbsp;synchronization with OpenLDAP,&amp;nbsp;I have found that both user types with same username are valid. So that user John can login with both passwords, &lt;SPAN style="background-color: #f6f6f6;"&gt;alfrescoNtlm&lt;/SPAN&gt; and OpenLDAP.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It&amp;nbsp;could be even&amp;nbsp;fine, but&amp;nbsp;what&amp;nbsp;discourages is that in admin tools only one old user John is displayed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If we disable it, the OpenLDAP user still can login.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Lucene search&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;TYPE:"{http://www.alfresco.org/model/content/1.0}person"&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;also display only one user John, not two of them.&lt;/P&gt;&lt;P&gt;Is it normal situation, or we should have deleted&amp;nbsp;old user John before&amp;nbsp;synchronization with&amp;nbsp;OpenLDAP? And how about access to documents of user John in this case?&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Below is&amp;nbsp;alfresco-global.properties&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;authentication.protection.enabled=false&lt;BR /&gt;authentication.chain=alfinst:alfrescoNtlm,ldap1:ldap&lt;BR /&gt;ntlm.authentication.sso.enabled=false&lt;BR /&gt;alfresco.authentication.authenticateCIFS=false&lt;/P&gt;&lt;P&gt;ldap.authentication.active=true&lt;BR /&gt;ldap.synchronization.active=true&lt;BR /&gt;ldap.authentication.allowGuestLogin=false&lt;BR /&gt;ldap.authentication.userNameFormat=uid=%s,ou=Users,dc=some,dc=ua&lt;BR /&gt;ldap.authentication.java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory&lt;BR /&gt;ldap.authentication.java.naming.provider.url=ldap://10.0.1.15:389&lt;BR /&gt;ldap.authentication.java.naming.security.authentication=simple&lt;BR /&gt;ldap.synchronization.java.naming.security.authentication=simple&lt;BR /&gt;ldap.authentication.defaultAdministratorUserNames=Admin&lt;/P&gt;&lt;P&gt;# &lt;BR /&gt;ldap.synchronization.java.naming.security.principal=uid\=someUser,ou\=users,dc\=some,dc\=ua&lt;BR /&gt;ldap.synchronization.java.naming.security.credentials=12356&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ldap.synchronization.groupSearchBase=ou\=Users,dc\=some,dc\=ua&lt;BR /&gt;ldap.synchronization.userSearchBase=ou\=Users,dc\=some,dc\=ua&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ldap.synchronization.groupQuery=(&amp;amp;(objectclass\=posixGroup)(CN\=someGroup))&lt;BR /&gt;ldap.synchronization.groupDifferentialQuery=(&amp;amp;(objectclass\=posixGroup)(CN\=someGoup)(!(modifyTimestamp&amp;lt;\={0})))&lt;BR /&gt;ldap.synchronization.personQuery=(objectclass\=inetOrgPerson)&lt;BR /&gt;ldap.synchronization.personDifferentialQuery=(&amp;amp;(objectclass\=inetOrgPerson)(!(modifyTimestamp&amp;lt;\={0})))&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ldap.synchronization.modifyTimestampAttributeName=modifyTimestamp&lt;BR /&gt;ldap.synchronization.timestampFormat=yyyyMMddHHmmss'Z'&lt;BR /&gt;ldap.synchronization.userIdAttributeName=uid&lt;BR /&gt;ldap.synchronization.userOrganizationalIdAttributeName=o&lt;BR /&gt;ldap.synchronization.groupDisplayNameAttributeName=displayName&lt;BR /&gt;ldap.synchronization.groupType=posixGroup&lt;BR /&gt;ldap.synchronization.personType=inetOrgPerson&lt;BR /&gt;ldap.authentication.java.naming.read.timeout=0&lt;BR /&gt;ldap.synchronization.userAccountStatusProperty=ds-pwp-account-disabled&lt;BR /&gt;ldap.synchronization.disabledAccountPropertyValue=true&lt;BR /&gt;ldap.synchronization.userFirstNameAttributeName=givenName&lt;/P&gt;&lt;P&gt;ldap.synchronization.userLastNameAttributeName=sn&lt;/P&gt;&lt;P&gt;ldap.synchronization.userEmailAttributeName=mail&lt;/P&gt;&lt;P&gt;ldap.synchronization.defaultHomeFolderProvider=userHomesHomeFolderProvider&lt;/P&gt;&lt;P&gt;ldap.synchronization.groupIdAttributeName=cn&lt;/P&gt;&lt;P&gt;ldap.synchronization.groupMemberAttributeName=member&lt;/P&gt;&lt;P&gt;ldap.synchronization.enableProgressEstimation=true&lt;/P&gt;&lt;P&gt;ldap.pooling.com.sun.jndi.ldap.connect.pool.debug=fine&lt;/P&gt;&lt;P&gt;synchronization.autoCreatePeopleOnLogin=true&lt;BR /&gt;synchronization.synchronizeChangesOnly=false&lt;BR /&gt;synchronization.syncOnStartup=true&lt;BR /&gt;synchronization.syncWhenMissingPeopleLogIn=true&lt;/P&gt;&lt;P&gt;synchronization.externalUserControl=true&lt;BR /&gt;synchronization.externalUserControlSubsystemName=ldap1&lt;/P&gt;&lt;P&gt;# sync every 15 minutes&lt;BR /&gt;#synchronization.import.cron=0 0/15 * * * ?&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Another question, is it possible not to provide parameters&amp;nbsp;&lt;SPAN style="background-color: #f6f6f6;"&gt;&lt;STRONG&gt;ldap.synchronization.java.naming.security.principal&lt;/STRONG&gt; and&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;ldap.synchronization.java.naming.security.credentials&lt;/STRONG&gt;, as OpenLDAP is accessible without them?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&lt;SPAN&gt;If I simply turn them off, there is error while&amp;nbsp;synchronization with&amp;nbsp;&lt;SPAN&gt;OpenLDAP:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;2019-02-13 10:33:24,550 WARN [org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer] [localhost-startStop-1] Failed initial synchronize with user registries org.alfresco.repo.security.authentication.AuthenticationException: 01130001 Failed to authenticate, username or password is wrong. User name:cn=Manager,dc=company,dc=com Reason [LDAP: error code 49 - Invalid Credentials]&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Alfresco Community (Build: 201612)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Feb 2019 09:05:25 GMT</pubDate>
    <dc:creator>skushnerenko</dc:creator>
    <dc:date>2019-02-13T09:05:25Z</dc:date>
    <item>
      <title>OpenLDAP authentication, if username already existed, both authentications are valid after sync</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/openldap-authentication-if-username-already-existed-both/m-p/53678#M19974</link>
      <description>We have to provide authentication with&amp;nbsp;OpenLDAP&amp;nbsp;so, that after synchronization with OpenLDAP usernames from OpenLDAP, which already existed&amp;nbsp;for&amp;nbsp; alfrescoNtlm authentication, would keep all the access to&amp;nbsp;owned&amp;nbsp;documents.That is, we had user John with alfrescoNtlm authentication, which had long workin</description>
      <pubDate>Wed, 13 Feb 2019 09:05:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/openldap-authentication-if-username-already-existed-both/m-p/53678#M19974</guid>
      <dc:creator>skushnerenko</dc:creator>
      <dc:date>2019-02-13T09:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: OpenLDAP authentication, if username already existed, both authentications are valid after sync</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/openldap-authentication-if-username-already-existed-both/m-p/53679#M19975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using SQL queries I have found the difference between user created with &lt;SPAN&gt;NATIVE&lt;/SPAN&gt; Alfresco authentication and user with same username imported from LDAP.&lt;/P&gt;&lt;P&gt;So, &lt;SPAN&gt;NATIVE&lt;/SPAN&gt; user is stored in&amp;nbsp;database table&amp;nbsp;&lt;EM&gt;alf_node&lt;/EM&gt; with types &lt;EM&gt;user&lt;/EM&gt; and &lt;EM&gt;person&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;Mixed user also&amp;nbsp;has both types.&lt;/P&gt;&lt;P&gt;LDAP user&amp;nbsp;&lt;SPAN&gt;has only&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;type &lt;EM&gt;person&lt;/EM&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Besides,&amp;nbsp;with db objects &lt;EM&gt;alf_child_assoc&lt;/EM&gt; it&amp;nbsp;was found, that&amp;nbsp;NATIVE person&amp;nbsp;object is owned by&amp;nbsp;AUTH.ALF&amp;nbsp;object, while LDAP &lt;SPAN&gt;person&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;object&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;is owned by AUTH.EXT.ldap1 object.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;Mixed person object is owned by both&amp;nbsp;AUTH.ALF and AUTH.EXT.ldap1&amp;nbsp;objects.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ACL is made by db object&amp;nbsp;&lt;EM&gt;alf_authority&lt;/EM&gt; where username is stored as String.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So I hope that&amp;nbsp;ACL&amp;nbsp;made by native user will be effective for both LDAP and mixed user with same name.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The same may be true for&amp;nbsp;access to documents owned by &lt;SPAN&gt;NATIVE&lt;/SPAN&gt; user - I suppose access to these documents will be&amp;nbsp;effective for LDAP and mixed user with same username.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The only problem is that field &lt;EM&gt;authority&lt;/EM&gt; in&amp;nbsp;&lt;EM&gt;alf_authority&lt;/EM&gt;&amp;nbsp;is case sensitive while username is&amp;nbsp;case insensitive.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So in case if LDAP username and&amp;nbsp;NATIVE username have different case, there may be problem with access&amp;nbsp;of LDAP user to documetns of NATIVE user.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2019 10:23:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/openldap-authentication-if-username-already-existed-both/m-p/53679#M19975</guid>
      <dc:creator>skushnerenko</dc:creator>
      <dc:date>2019-02-21T10:23:59Z</dc:date>
    </item>
  </channel>
</rss>

