Login in Alfresco mittels Active Directory und SSO

cancel
Showing results for 
Search instead for 
Did you mean: 
biok2
Member II

Login in Alfresco mittels Active Directory und SSO

Hallo zusammen,
wir habe folgenden Anwendungsfall:

Alle User einer bestimmten Gruppe aus dem Active Directory sollen sich am Alfresco mittels SSO anmelden können. Dies funktioniert soweit auch wunderbar.
Ich möchte aber auch dass alle anderen Benutzer, die nicht Mitglied dieser Gruppe sind, als Gast angemeldet werden.

Das Problem ist das die Benutzer dieser AD-Gruppe sich erfolgreich anmelden können, alle anderen Benutzer aus dem Active Directory aber auch!  Smiley Sad  Smiley Surprised  :cry:  :?:  :?:  :?:  :?:
Ich verstehe nicht warum sich andere Benutzer aus dem AD anmelden können!

SSO habe ich mittels passthru + ldap-ad hinbekommen.

Bestimmen nicht diese zwei Einstellungen dass NUR die Mitglieder dieser Gruppe sich am Alfresco anmelden können?


ldap.synchronization.personQuery=(&(objectclass\=user)(memberOf\=cn\=Alfresco,ou\=Applications,ou\=globale Gruppen,dc\=domain,dc\=de)(userAccountControl\:1.2.840.113556.1.4.803\:\=512))
ldap.synchronization.personDifferentialQuery=(&(objectclass\=user)(memberOf\=cn\=Alfresco,ou\=Applications,ou\=globale Gruppen,dc\=domain,dc\=de)(userAccountControl\:1.2.840.113556.1.4.803\:\=512)(!(modifyTimestamp<\={0})))

Daran verzweifle ich gerade und hoffe das mir hier jemand helfen kann.

Zur Version: wir nutzen die Community Version in der aktuellsten Version auf Windows Server 2003.

Vielen Dank.
6 Replies
afaust
Master

Re: Login in Alfresco mittels Active Directory und SSO

Hallo,

wie ist denn die Einstellung zu "createMissingPeople"? Wenn diese Einstellung auf "true" steht, dann werden alle Personen, die sich per SSO anmelden, dynamisch im Alfresco angelegt, auch wenn die Synchronisierung diese nicht beachtet. Im Standard ist diese Einstellung nämlich identisch zum Flag für "server.transaction.allow-writes" und damit "true".

Die Konfiguration findet sich in authentication-services-context.xml in der Bean "personService". Mit einer custom-context könnte man hier ein "false" setzen um das Verhalten wie gewünscht zu erhalten.

Gruß
Axel Faust
biok2
Member II

Re: Login in Alfresco mittels Active Directory und SSO

Guten Morgen,

danke für die Antwort. Nachdem ich dies jetzt getan habe kommt folgender Fehler

HTTP Status 500 - 

——————————————————————————–

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

net.sf.acegisecurity.AuthenticationServiceException: General error; nested exception is org.alfresco.repo.security.authentication.AuthenticationException: 05090003 User "st310" does not exist in Alfresco
   org.alfresco.repo.security.authentication.ntlm.NTLMAuthenticationComponentImpl.authenticatePassthru(NTLMAuthenticationComponentImpl.java:936)
   org.alfresco.repo.security.authentication.ntlm.NTLMAuthenticationComponentImpl.authenticate(NTLMAuthenticationComponentImpl.java:554)
   sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   java.lang.reflect.Method.invoke(Method.java:597)
   org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
   org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
   org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
   org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
   org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   $Proxy197.authenticate(Unknown Source)
   org.alfresco.repo.webdav.auth.BaseNTLMAuthenticationFilter.processType3(BaseNTLMAuthenticationFilter.java:532)
   org.alfresco.repo.webdav.auth.BaseNTLMAuthenticationFilter.authenticateRequest(BaseNTLMAuthenticationFilter.java:285)
   org.alfresco.repo.webdav.auth.BaseSSOAuthenticationFilter.doFilter(BaseSSOAuthenticationFilter.java:132)
   sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   java.lang.reflect.Method.invoke(Method.java:597)
   org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:103)
   org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   $Proxy201.doFilter(Unknown Source)
   org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:82)
   org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:58)


root cause

org.alfresco.repo.security.authentication.AuthenticationException: 05090003 User "st310" does not exist in Alfresco
   org.alfresco.repo.security.authentication.AbstractAuthenticationComponent$FixCurrentUserCallback$1.doWork(AbstractAuthenticationComponent.java:533)
   org.alfresco.repo.security.authentication.AbstractAuthenticationComponent$FixCurrentUserCallback$1.doWork(AbstractAuthenticationComponent.java:517)
   org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:508)
   org.alfresco.repo.security.authentication.AbstractAuthenticationComponent$FixCurrentUserCallback.execute(AbstractAuthenticationComponent.java:516)
   org.alfresco.repo.security.authentication.AbstractAuthenticationComponent$FixCurrentUserCallback.execute(AbstractAuthenticationComponent.java:505)
   org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:381)
   org.alfresco.repo.security.authentication.AbstractAuthenticationComponent.setCurrentUser(AbstractAuthenticationComponent.java:216)
   org.alfresco.repo.security.authentication.AbstractAuthenticationComponent.setCurrentUser(AbstractAuthenticationComponent.java:190)
   org.alfresco.repo.security.authentication.ntlm.NTLMAuthenticationComponentImpl.authenticatePassthru(NTLMAuthenticationComponentImpl.java:867)
   org.alfresco.repo.security.authentication.ntlm.NTLMAuthenticationComponentImpl.authenticate(NTLMAuthenticationComponentImpl.java:554)
   sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   java.lang.reflect.Method.invoke(Method.java:597)
   org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
   org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
   org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
   org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
   org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   $Proxy197.authenticate(Unknown Source)
   org.alfresco.repo.webdav.auth.BaseNTLMAuthenticationFilter.processType3(BaseNTLMAuthenticationFilter.java:532)
   org.alfresco.repo.webdav.auth.BaseNTLMAuthenticationFilter.authenticateRequest(BaseNTLMAuthenticationFilter.java:285)
   org.alfresco.repo.webdav.auth.BaseSSOAuthenticationFilter.doFilter(BaseSSOAuthenticationFilter.java:132)
   sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   java.lang.reflect.Method.invoke(Method.java:597)
   org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:103)
   org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   $Proxy201.doFilter(Unknown Source)
   org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:82)
   org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:58)


note The full stack trace of the root cause is available in the Apache Tomcat/6.0.26 logs.


——————————————————————————–

Apache Tomcat/6.0.26


Stimmt ja auch, dieser Benutzer existiert nicht und soll somit als Guest angemeldet werden. Das macht er aber nicht!

Gruß
afaust
Master

Re: Login in Alfresco mittels Active Directory und SSO

Hallo,

das ist wieder eine Stelle, bei der ich leicht frustriert feststellen muss, dass Alfresco zwar (fast) alle Konfigurationsmöglichkeiten hat, diese aber nicht immer logisch in der Kombination zusammen arbeiten.

Das Problem, was jetzt besteht ist, dass Alfresco korrekt feststellt, dass diese Person nicht existiert und dann versucht, diesen Umstand zu beheben. Dabei geht es zur LDAP/AD Komponente, versucht einen Synch durchzuführen und die Person im Anschluss zu finden. Man kann diesen Synch mit der Einstellung "syncWhenMissingPeopleLogIn" zwar abstellen, aber leider sorgt die implementierte Logik dann trotzdem dafür, dass die angeführte Exception geworfen wird - welche leider die falsche ist, denn die "Login als Gast" Logik braucht eine "NoSuchPersonException".
Das traurige ist, dass diese Exception nicht geworfen werden müsste / dürfte - das direkt folgende Statement sorgt für die korrekte "NoSuchPersonException".

Für mich ist dies ganz klar ein Bug. Es müsste das Statement in Zeile
org.alfresco.repo.security.authentication.AbstractAuthenticationComponent$FixCurrentUserCallback$1.doWork(AbstractAuthenticationComponent.java:533)
ersatzlos gestrichen werden.

Übrigens ist mir dabei noch die Einstellung "autoCreatePeopleOnLogin" aufgefallen, welche eine saubere Alternative zu der Einstellung aus meinem ersten Post darstellt. Aus irgendeinem Grund habe ich die gestern nicht sofort wieder gefunden.

Gruß
Axel Faust
biok2
Member II

Re: Login in Alfresco mittels Active Directory und SSO

Hi,

danke erstmal für die Unterstützung.

Also wenn ich folgende Einstellungen setze:

synchronization.autoCreatePeopleOnLogin=false
synchronization.synchronizeChangesOnly=true
synchronization.syncOnStartup=true
synchronization.syncWhenMissingPeopleLogIn=true

kommt ebenfalls folgender Fehler:

net.sf.acegisecurity.AuthenticationServiceException: General error; nested exception is org.alfresco.repo.security.authentication.AuthenticationException: 05090001 User "st310" does not exist in Alfresco
verursacht durch:
org.alfresco.repo.security.authentication.AuthenticationException: 05090001 User "st310" does not exist in Alfresco

Details ausblenden

net.sf.acegisecurity.AuthenticationServiceException: General error; nested exception is org.alfresco.repo.security.authentication.AuthenticationException: 05090001 User "st310" does not exist in Alfresco
at org.alfresco.repo.security.authentication.ntlm.NTLMAuthenticationComponentImpl.authenticatePassthru(NTLMAuthenticationComponentImpl.java:936)
at org.alfresco.repo.security.authentication.ntlm.NTLMAuthenticationComponentImpl.authenticate(NTLMAuthenticationComponentImpl.java:554)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy197.authenticate(Unknown Source)
at org.alfresco.repo.webdav.auth.BaseNTLMAuthenticationFilter.processType3(BaseNTLMAuthenticationFilter.java:532)
at org.alfresco.repo.webdav.auth.BaseNTLMAuthenticationFilter.authenticateRequest(BaseNTLMAuthenticationFilter.java:285)
at org.alfresco.repo.webdav.auth.BaseSSOAuthenticationFilter.doFilter(BaseSSOAuthenticationFilter.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:103)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy201.doFilter(Unknown Source)
at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:82)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:58)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.alfresco.repo.security.authentication.AuthenticationException: 05090001 User "st310" does not exist in Alfresco
at org.alfresco.repo.security.authentication.AbstractAuthenticationComponent$FixCurrentUserCallback$1.doWork(AbstractAuthenticationComponent.java:533)
at org.alfresco.repo.security.authentication.AbstractAuthenticationComponent$FixCurrentUserCallback$1.doWork(AbstractAuthenticationComponent.java:517)
at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:508)
at org.alfresco.repo.security.authentication.AbstractAuthenticationComponent$FixCurrentUserCallback.execute(AbstractAuthenticationComponent.java:516)
at org.alfresco.repo.security.authentication.AbstractAuthenticationComponent$FixCurrentUserCallback.execute(AbstractAuthenticationComponent.java:505)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:381)
at org.alfresco.repo.security.authentication.AbstractAuthenticationComponent.setCurrentUser(AbstractAuthenticationComponent.java:216)
at org.alfresco.repo.security.authentication.AbstractAuthenticationComponent.setCurrentUser(AbstractAuthenticationComponent.java:190)
at org.alfresco.repo.security.authentication.ntlm.NTLMAuthenticationComponentImpl.authenticatePassthru(NTLMAuthenticationComponentImpl.java:867)
… 39 more

Zurück zur Anwendung
Mein Inhalt
Logout

Setze ich
synchronization.syncWhenMissingPeopleLogIn=false
laufe ich ebenfalls in diesen Fehlercode…

:cry:  :cry:  :cry:  :cry:

Gibt es noch weitere Lösungsansätze? Das muss doch irgendwie lösbar sein?
afaust
Master

Re: Login in Alfresco mittels Active Directory und SSO

Hallo,

nach dem aktuellen Code-Stand, den ich von der 3.4 hier vorliegen habe (Enterprise 3.4.0) sehe ich keine Möglichkeit per Konfiguration diesen Anwendungsfall abzudecken. Erst muss der benannte Bug behoben werden - entweder durch Alfresco oder lokal durch einen eigenen Entwickler.

Gruß
Axel Faust
biok2
Member II

Re: Login in Alfresco mittels Active Directory und SSO

Alles klar. Schade.

Vielen Dank für die Info.