2015-04-08 63 views
1

首先,我已經加2個東西,在回購Alfresco\tomcat\shared\classes\alfresco\extension\subsystems\Authentication\ldap-ad\我的LDAP已經同步,但我想加2個屬性

  1. LDAP的廣告副本,我給它改名LDAP-AD1
  2. common-ldap-context.xmlAlfresco\tomcat\shared\classes\alfresco\extension\subsystems\Authentication\ldap-ad\common-ldap-context.xml

副本我加入2-條目

<property name="personAttributeMapping"> 
     <map> 
      <entry key="cm:userName"> 
       <!-- Must match the same attribute as userIdAttributeName --> 
       <value>${ldap.synchronization.userIdAttributeName}</value> 
      </entry> 
      <entry key="cm:firstName"> 
       <!-- OpenLDAP: "givenName" --> 
       <!-- Active Directory: "givenName" --> 
       <value>${ldap.synchronization.userFirstNameAttributeName}</value> 
      </entry> 
      <entry key="cm:lastName"> 
       <!-- OpenLDAP: "sn" --> 
       <!-- Active Directory: "sn" --> 
       <value>${ldap.synchronization.userLastNameAttributeName}</value> 
      </entry> 
      <entry key="cm:email"> 
       <!-- OpenLDAP: "mail" --> 
       <!-- Active Directory: "???" --> 
       <value>${ldap.synchronization.userEmailAttributeName}</value> 
      </entry> 
      <entry key="cm:organization"> 
       <!-- OpenLDAP: "o" --> 
       <!-- Active Directory: "???" --> 
       <value>${ldap.synchronization.userOrganizationalIdAttributeName}</value> 
      </entry> 
      <!-- This deprecated property has been replaced by "cm:organization". We will use the same mapping --> 
      <entry key="cm:organizationId"> 
       <!-- OpenLDAP: "o" --> 
       <!-- Active Directory: "???" --> 
       <value>${ldap.synchronization.userOrganizationalIdAttributeName}</value> 
      </entry> 
      <!-- Always use the default --> 
      <entry key="cm:homeFolderProvider"> 
       <null/> 
      </entry> 
      <entry key="cm:jobtitle"> 
       <value>${ldap.synchronization.userJobTitleAttributeName}</value> 
      </entry> 
      <entry key="cm:location"> 
       <value>${ldap.synchronization.userLocationAttributeName}</value> 
      </entry> 
     </map> 
    </property> 
    <!-- Set a default home folder provider --> 
    <!-- Defaults only apply for values above --> 
    <property name="personAttributeDefaults"> 
     <map> 
      <entry key="cm:homeFolderProvider"> 
       <value>${ldap.synchronization.defaultHomeFolderProvider}</value> 
      </entry> 
     </map> 
    </property> 

我加入

/alfresco/tomcat/shared/classes/alfresco/extension/subsystems/Authentication/ldap-ad/ldap-ad1/ldap-ad-authentication.properties 

這兩個屬性

ldap.synchronization.userJobTitleAttributeName=title 
ldap.synchronization.userLocationAttributeName=department 

這是我alfresco-global.properties文件:

############################### 
    ## Common Alfresco Properties # 
    ############################### 

    dir.root=C:/Alfresco/alf_data 

    alfresco.context=alfresco 
    alfresco.host=127.0.0.1 
    alfresco.port=8080 
    alfresco.protocol=http 

    share.context=share 
    share.host=127.0.0.1 
    share.port=8080 
    share.protocol=http 

    ### database connection properties ### 
    db.driver=org.postgresql.Driver 
    db.username=alfresco 
    db.password=admin 
    db.name=alfresco 
    db.url=jdbc:postgresql://localhost:5432/${db.name} 

    #---------------------------------------------> debut modif 


    ### E-mail site invitation setting ### 
    notification.email.siteinvite=true 
    mail.host=test2015.test.be 
    mail.port=25 
    ###mail.encoding=UTF-8 
    [email protected] 
    mail.from.enabled=true 
    ###mail.protocol=smtp 
    [email protected] 
    mail.password=testone 
    ###activities.feed.notifier.enabled=false 

    authentication.chain==ldap-ad1:ldap-ad,alfrescoNtlm1:alfrescoNtlm 

    ### LDAP Integration ### 
    synchronization.import.cron=0 0/30 9-18 ? * MON-FRI 
    synchronization.synchronizeChangesOnly=false 
    synchronization.syncWhenMissingPeopleLogIn=true 
    synchronization.authCreatePeopleOnLogin=true 
    ldap.synchronization.active=true 
    ldap.authentication.java.naming.provider.url=ldap://C2SRVDC1.test.be:389 
    [email protected]t.be 
    ldap.synchronization.java.naming.security.credentials=Henry 
    ldap.synchronization.groupSearchBase=ou\=Institut erasme,dc\=erasme,dc=be 
    ldap.synchronization.userSearchBase=ou\=Institut erasme,dc=\erasme,dc=be 


    ldap.authentication.active=true 
    ldap.authentication.userNameFormat=%[email protected] 
    ldap.authentication.java.naming.security.authentication=simple 

    ################# ATTRIBUTE MAPPING ############# 
    #### mapping to unique username in username attribute### 
    #ldap.synchronization.userLastNameAttributeName=cn 
    #ldap.synchronization.userEmailAttributeName=mail 
    #ldap.synchronization.userFirstNameAttributeName=givenName 
    ldap.synchronization.groupIdAttributeName=cn 
    #ldap.synchronization.groupType= 
    #ldap.synchronization.personType= 
    ldap.synchronization.groupMemberAttributeName=member 
    #ldap.synchronization.userOrganizationalIdAttributeName=company 

    ##-------------------------FIN DE LA MODIFICATION 

    ### FTP Server Configuration ### 
    ftp.enabled=true 
    ftp.port=21 

    ### RMI service ports ### 
    alfresco.rmi.services.port=50500 
    avm.rmi.service.port=0 
    avmsync.rmi.service.port=0 
    attribute.rmi.service.port=0 
    authentication.rmi.service.port=0 
    repo.rmi.service.port=0 
    action.rmi.service.port=0 
    deployment.rmi.service.port=0 

    ### External executable locations ### 
    ooo.exe=C:/Alfresco/libreoffice/App/libreoffice/program/soffice.exe 
    ooo.enabled=true 
    ooo.port=8100 
    img.root=C:\\Alfresco\\imagemagick 
    img.coders=${img.root}\\modules\\coders 
    img.config=${img.root}\\config 
    img.gslib=${img.root}\\lib 
    img.exe=${img.root}\\convert.exe 
    swf.exe=C:/Alfresco/swftools/pdf2swf.exe 
    swf.languagedir=C:/Alfresco/swftools/japanese 

    jodconverter.enabled=false 
    jodconverter.officeHome=C:/Alfresco/libreoffice/App/libreoffice 
    jodconverter.portNumbers=8100 

    ### Initial admin password ### 
    alfresco_user_store.adminpassword=209c6174da490caeb422f3fa5a7ae634 

    ### E-mail site invitation setting ### 
    notification.email.siteinvite=false 

    ### License location ### 
    dir.license.external=C:/Alfresco 

    ### Solr indexing ### 
    index.subsystem.name=solr 
    dir.keystore=${dir.root}/keystore 
    solr.port.ssl=8443 

    ### BPM Engine ### 
    system.workflow.engine.jbpm.enabled=false 

我的日誌在這裏

13:20:17,142 ERROR [org.springframework.extensions.webscripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 03090004 IO exception parsing request 
    org.springframework.extensions.webscripts.WebScriptException: 03090004 IO exception parsing request 
     at org.alfresco.repo.web.scripts.solr.AlfrescoModelsDiff.executeImpl(AlfrescoModelsDiff.java:51) 
     at org.springframework.extensions.webscripts.DeclarativeWebScript.executeImpl(DeclarativeWebScript.java:235) 
     at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:64) 
     at org.alfresco.repo.web.scripts.RepositoryContainer$3.execute(RepositoryContainer.java:422) 
     at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:452) 
     at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:491) 
     at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:529) 
     at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:268) 
     at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:378) 
     at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:209) 
     at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:132) 
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) 
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) 
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) 
     at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:61) 
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) 
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) 
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) 
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) 
     at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:611) 
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) 
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) 
     at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) 
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) 
     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) 
     at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023) 
     at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) 
     at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310) 
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
     at java.lang.Thread.run(Thread.java:724) 
    Caused by: java.net.SocketException: Software caused connection abort: recv failed 
     at java.net.SocketInputStream.socketRead0(Native Method) 
     at java.net.SocketInputStream.read(SocketInputStream.java:150) 
     at java.net.SocketInputStream.read(SocketInputStream.java:121) 
     at sun.security.ssl.InputRecord.readFully(InputRecord.java:442) 
     at sun.security.ssl.InputRecord.read(InputRecord.java:480) 
     at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:927) 
     at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:884) 
     at sun.security.ssl.AppInputStream.read(AppInputStream.java:102) 
     at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:532) 
     at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:501) 
     at org.apache.coyote.http11.InternalInputBuffer$InputStreamInputBuffer.doRead(InternalInputBuffer.java:563) 
     at org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityInputFilter.java:124) 
     at org.apache.coyote.http11.AbstractInputBuffer.doRead(AbstractInputBuffer.java:346) 
     at org.apache.coyote.Request.doRead(Request.java:422) 
     at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:290) 
     at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:449) 
     at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:315) 
     at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:167) 
     at org.springframework.util.FileCopyUtils.copy(FileCopyUtils.java:112) 
     at org.springframework.extensions.surf.util.InputStreamContent.getContent(InputStreamContent.java:70) 
     at org.alfresco.repo.web.scripts.solr.AlfrescoModelsDiff.buildModel(AlfrescoModelsDiff.java:78) 
     at org.alfresco.repo.web.scripts.solr.AlfrescoModelsDiff.executeImpl(AlfrescoModelsDiff.java:42) 
     ... 30 more 
    13:20:17,144 ERROR [org.springframework.extensions.webscripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 03090005 IO exception parsing request 
    org.springframework.extensions.webscripts.WebScriptException: 03090005 IO exception parsing request 
     at org.alfresco.repo.web.scripts.solr.AlfrescoModelsDiff.executeImpl(AlfrescoModelsDiff.java:51) 
     at org.springframework.extensions.webscripts.DeclarativeWebScript.executeImpl(DeclarativeWebScript.java:235) 
     at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:64) 
     at org.alfresco.repo.web.scripts.RepositoryContainer$3.execute(RepositoryContainer.java:422) 
     at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:452) 
     at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:491) 
     at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:529) 
     at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:268) 
     at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:378) 
     at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:209) 
     at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:132) 
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) 
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) 
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) 
     at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:61) 
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) 
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) 
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) 
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) 
     at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:611) 
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) 
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) 
     at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) 
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) 
     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) 
     at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023) 
     at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) 
     at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310) 
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
     at java.lang.Thread.run(Thread.java:724) 
    Caused by: java.net.SocketException: Software caused connection abort: recv failed 
     at java.net.SocketInputStream.socketRead0(Native Method) 
     at java.net.SocketInputStream.read(SocketInputStream.java:150) 
     at java.net.SocketInputStream.read(SocketInputStream.java:121) 
     at sun.security.ssl.InputRecord.readFully(InputRecord.java:442) 
     at sun.security.ssl.InputRecord.read(InputRecord.java:480) 
     at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:927) 
     at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:884) 
     at sun.security.ssl.AppInputStream.read(AppInputStream.java:102) 
     at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:532) 
     at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:501) 
     at org.apache.coyote.http11.InternalInputBuffer$InputStreamInputBuffer.doRead(InternalInputBuffer.java:563) 
     at org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityInputFilter.java:124) 
     at org.apache.coyote.http11.AbstractInputBuffer.doRead(AbstractInputBuffer.java:346) 
     at org.apache.coyote.Request.doRead(Request.java:422) 
     at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:290) 
     at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:449) 
     at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:315) 
     at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:167) 
     at org.springframework.util.FileCopyUtils.copy(FileCopyUtils.java:112) 
     at org.springframework.extensions.surf.util.InputStreamContent.getContent(InputStreamContent.java:70) 
     at org.alfresco.repo.web.scripts.solr.AlfrescoModelsDiff.buildModel(AlfrescoModelsDiff.java:78) 
     at org.alfresco.repo.web.scripts.solr.AlfrescoModelsDiff.executeImpl(AlfrescoModelsDiff.java:42) 
     ... 30 more 

我認爲我忘了什麼, 謝謝所有

回答

0

您需要映射在alfresco-global.properties的AD屬性,如:

ldap.synchronization.userLastNameAttributeName=sn 
ldap.synchronization.userEmailAttributeName=mail 
ldap.synchronization.userCompanyTelephoneAttributeName=telephone 
ladp.synchronization.userFirstNameAttributeName=givenName 
ldap.synchronisation.userIdAttributeName=uid 
ldap.synchronization.defaultHomeFolderProvider=largeHomeFolderProvider 
相關問題