Ya hemos logrado que se integre. Ahora mi duda viene porque la lista de roles y los usuarios los muestra. Es decir, vas a Administración --> Usuarios y se puede observar que ha cargado el directorio activo. El problema esta a la hora del login. Si quiero loguearme con un usuario del directorio activo aunque este pertenezca a ROLE_ADMIN o ROLE_USER no me deja, me sale Authentication Error. Hay que dar algun tipo de permiso o activar algo?
El fichero que he configurado ha sido el OpenKM.xml y el apartado de Administración --> config.
Resultados del DEBUG, se ha intentado conectar con un ususario que en LDAP es miembro de ROLE_ADMIN y además de AUTHENTICATION FAILED se obtiene la siguiente traza de debug:
Code: Select all2013-04-24 09:16:13,281 [http-bio-0.0.0.0-8080-exec-7] DEBUG org.springframework.security.web.util.AntPathRequestMatcher - Checking match of request : '/j_spring_security_check'; against '/services/**'
2013-04-24 09:16:13,281 [http-bio-0.0.0.0-8080-exec-7] DEBUG org.springframework.security.web.util.AntPathRequestMatcher - Checking match of request : '/j_spring_security_check'; against '/status'
2013-04-24 09:16:13,281 [http-bio-0.0.0.0-8080-exec-7] DEBUG org.springframework.security.web.util.AntPathRequestMatcher - Checking match of request : '/j_spring_security_check'; against '/download'
2013-04-24 09:16:13,281 [http-bio-0.0.0.0-8080-exec-7] DEBUG org.springframework.security.web.util.AntPathRequestMatcher - Checking match of request : '/j_spring_security_check'; against '/workflow-register'
2013-04-24 09:16:13,281 [http-bio-0.0.0.0-8080-exec-7] DEBUG org.springframework.security.web.util.AntPathRequestMatcher - Checking match of request : '/j_spring_security_check'; against '/webdav/**'
2013-04-24 09:16:13,281 [http-bio-0.0.0.0-8080-exec-7] DEBUG org.springframework.security.web.util.AntPathRequestMatcher - Checking match of request : '/j_spring_security_check'; against '/feed/**'
2013-04-24 09:16:13,282 [http-bio-0.0.0.0-8080-exec-7] DEBUG org.springframework.security.web.FilterChainProxy - /j_spring_security_check at position 1 of 8 in additional filter chain; firing Filter: 'SecurityContextPersistenceFilter'
2013-04-24 09:16:13,282 [http-bio-0.0.0.0-8080-exec-7] DEBUG org.springframework.security.web.context.HttpSessionSecurityContextRepository - HttpSession returned null object for SPRING_SECURITY_CONTEXT
2013-04-24 09:16:13,282 [http-bio-0.0.0.0-8080-exec-7] DEBUG org.springframework.security.web.context.HttpSessionSecurityContextRepository - No SecurityContext was available from the HttpSession: org.apache.catalina.session.StandardSessionFacade@58eff866. A new one will be created.
2013-04-24 09:16:13,282 [http-bio-0.0.0.0-8080-exec-7] DEBUG org.springframework.security.web.FilterChainProxy - /j_spring_security_check at position 2 of 8 in additional filter chain; firing Filter: 'UsernamePasswordAuthenticationFilter'
2013-04-24 09:16:13,282 [http-bio-0.0.0.0-8080-exec-7] DEBUG org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter - Request is to process authentication
2013-04-24 09:16:13,283 [http-bio-0.0.0.0-8080-exec-7] DEBUG org.springframework.security.authentication.ProviderManager - Authentication attempt using org.springframework.security.authentication.dao.DaoAuthenticationProvider
2013-04-24 09:16:13,312 [http-bio-0.0.0.0-8080-exec-7] DEBUG org.springframework.security.provisioning.JdbcUserDetailsManager - Query returned no results for user 'dgutierrez'
2013-04-24 09:16:13,317 [http-bio-0.0.0.0-8080-exec-7] DEBUG org.springframework.security.authentication.dao.DaoAuthenticationProvider - User 'dgutierrez' not found
2013-04-24 09:16:13,318 [http-bio-0.0.0.0-8080-exec-7] DEBUG org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter - Authentication request failed: org.springframework.security.authentication.BadCredentialsException: Bad credentials
2013-04-24 09:16:13,318 [http-bio-0.0.0.0-8080-exec-7] DEBUG org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter - Updated SecurityContextHolder to contain null Authentication
2013-04-24 09:16:13,318 [http-bio-0.0.0.0-8080-exec-7] DEBUG org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter - Delegating to authentication failure handlerorg.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler@39ee7088
2013-04-24 09:16:13,318 [http-bio-0.0.0.0-8080-exec-7] DEBUG org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler - Redirecting to /login.jsp?error=1
2013-04-24 09:16:13,318 [http-bio-0.0.0.0-8080-exec-7] DEBUG org.springframework.security.web.DefaultRedirectStrategy - Redirecting to '/OpenKM/login.jsp?error=1'
2013-04-24 09:16:13,318 [http-bio-0.0.0.0-8080-exec-7] DEBUG org.springframework.security.web.context.HttpSessionSecurityContextRepository - SecurityContext is empty or contents are anonymous - context will not be stored in HttpSession.
2013-04-24 09:16:13,318 [http-bio-0.0.0.0-8080-exec-7] DEBUG org.springframework.security.web.context.SecurityContextPersistenceFilter - SecurityContextHolder now cleared, as request processing completed
2013-04-24 09:16:13,356 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.util.AntPathRequestMatcher - Checking match of request : '/login.jsp'; against '/services/**'
2013-04-24 09:16:13,356 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.util.AntPathRequestMatcher - Checking match of request : '/login.jsp'; against '/status'
2013-04-24 09:16:13,356 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.util.AntPathRequestMatcher - Checking match of request : '/login.jsp'; against '/download'
2013-04-24 09:16:13,356 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.util.AntPathRequestMatcher - Checking match of request : '/login.jsp'; against '/workflow-register'
2013-04-24 09:16:13,356 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.util.AntPathRequestMatcher - Checking match of request : '/login.jsp'; against '/webdav/**'
2013-04-24 09:16:13,356 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.util.AntPathRequestMatcher - Checking match of request : '/login.jsp'; against '/feed/**'
2013-04-24 09:16:13,356 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.FilterChainProxy - /login.jsp?error=1 at position 1 of 8 in additional filter chain; firing Filter: 'SecurityContextPersistenceFilter'
2013-04-24 09:16:13,356 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.context.HttpSessionSecurityContextRepository - HttpSession returned null object for SPRING_SECURITY_CONTEXT
2013-04-24 09:16:13,356 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.context.HttpSessionSecurityContextRepository - No SecurityContext was available from the HttpSession: org.apache.catalina.session.StandardSessionFacade@58eff866. A new one will be created.
2013-04-24 09:16:13,356 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.FilterChainProxy - /login.jsp?error=1 at position 2 of 8 in additional filter chain; firing Filter: 'UsernamePasswordAuthenticationFilter'
2013-04-24 09:16:13,356 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.FilterChainProxy - /login.jsp?error=1 at position 3 of 8 in additional filter chain; firing Filter: 'RequestCacheAwareFilter'
2013-04-24 09:16:13,356 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.savedrequest.DefaultSavedRequest - pathInfo: both null (property equals)
2013-04-24 09:16:13,356 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.savedrequest.DefaultSavedRequest - queryString: arg1=null; arg2=error=1 (property not equals)
2013-04-24 09:16:13,356 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.savedrequest.HttpSessionRequestCache - saved request doesn't match
2013-04-24 09:16:13,356 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.FilterChainProxy - /login.jsp?error=1 at position 4 of 8 in additional filter chain; firing Filter: 'SecurityContextHolderAwareRequestFilter'
2013-04-24 09:16:13,357 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.FilterChainProxy - /login.jsp?error=1 at position 5 of 8 in additional filter chain; firing Filter: 'AnonymousAuthenticationFilter'
2013-04-24 09:16:13,357 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.authentication.AnonymousAuthenticationFilter - Populated SecurityContextHolder with anonymous token: 'org.springframework.security.authentication.AnonymousAuthenticationToken@905571d8: Principal: anonymousUser; Credentials: [PROTECTED]; Authenticated: true; Details: org.springframework.security.web.authentication.WebAuthenticationDetails@0: RemoteIpAddress: 172.17.2.35; SessionId: CF897847E241ABBB3F36D0D58DA11E11; Granted Authorities: ROLE_ANONYMOUS'
2013-04-24 09:16:13,357 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.FilterChainProxy - /login.jsp?error=1 at position 6 of 8 in additional filter chain; firing Filter: 'SessionManagementFilter'
2013-04-24 09:16:13,357 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.FilterChainProxy - /login.jsp?error=1 at position 7 of 8 in additional filter chain; firing Filter: 'ExceptionTranslationFilter'
2013-04-24 09:16:13,357 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.FilterChainProxy - /login.jsp?error=1 at position 8 of 8 in additional filter chain; firing Filter: 'FilterSecurityInterceptor'
2013-04-24 09:16:13,357 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.util.AntPathRequestMatcher - Checking match of request : '/login.jsp'; against '/frontend/**'
2013-04-24 09:16:13,357 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.util.AntPathRequestMatcher - Checking match of request : '/login.jsp'; against '/login.jsp'
2013-04-24 09:16:13,357 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.access.intercept.FilterSecurityInterceptor - Secure object: FilterInvocation: URL: /login.jsp?error=1; Attributes: [IS_AUTHENTICATED_ANONYMOUSLY]
true; Details: org.springframework.security.web.authentication.WebAuthenticationDetails@0: RemoteIpAddress: 172.17.2.35; SessionId: CF897847E241ABBB3F36D0D58DA11E11; Granted Authorities: ROLE_ANONYMOUS
2013-04-24 09:16:13,357 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.access.vote.AffirmativeBased - Voter: org.springframework.security.access.vote.RoleVoter@7f001ba5, returned: 0
2013-04-24 09:16:13,357 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.access.vote.AffirmativeBased - Voter: org.springframework.security.access.vote.AuthenticatedVoter@60172ec6, returned: 1
2013-04-24 09:16:13,357 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.access.intercept.FilterSecurityInterceptor - Authorization successful
2013-04-24 09:16:13,357 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.access.intercept.FilterSecurityInterceptor - RunAsManager did not change Authentication object
2013-04-24 09:16:13,357 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.FilterChainProxy - /login.jsp?error=1 reached end of additional filter chain; proceeding with original chain
2013-04-24 09:16:13,399 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.access.ExceptionTranslationFilter - Chain processed normally
2013-04-24 09:16:13,399 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.context.HttpSessionSecurityContextRepository - SecurityContext is empty or contents are anonymous - context will not be stored in HttpSession.
2013-04-24 09:16:13,399 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.context.SecurityContextPersistenceFilter - SecurityContextHolder now cleared, as request processing completed
2013-04-24 09:16:13,553 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.util.AntPathRequestMatcher - Checking match of request : '/logo/login'; against '/services/**'
2013-04-24 09:16:13,553 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.util.AntPathRequestMatcher - Checking match of request : '/logo/login'; against '/status'
2013-04-24 09:16:13,553 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.util.AntPathRequestMatcher - Checking match of request : '/logo/login'; against '/download'
2013-04-24 09:16:13,553 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.util.AntPathRequestMatcher - Checking match of request : '/logo/login'; against '/workflow-register'
2013-04-24 09:16:13,553 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.util.AntPathRequestMatcher - Checking match of request : '/logo/login'; against '/webdav/**'
2013-04-24 09:16:13,553 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.util.AntPathRequestMatcher - Checking match of request : '/logo/login'; against '/feed/**'
2013-04-24 09:16:13,553 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.FilterChainProxy - /logo/login at position 1 of 8 in additional filter chain; firing Filter: 'SecurityContextPersistenceFilter'
2013-04-24 09:16:13,553 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.context.HttpSessionSecurityContextRepository - HttpSession returned null object for SPRING_SECURITY_CONTEXT
2013-04-24 09:16:13,553 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.context.HttpSessionSecurityContextRepository - No SecurityContext was available from the HttpSession: org.apache.catalina.session.StandardSessionFacade@58eff866. A new one will be created.
2013-04-24 09:16:13,553 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.FilterChainProxy - /logo/login at position 2 of 8 in additional filter chain; firing Filter: 'UsernamePasswordAuthenticationFilter'
2013-04-24 09:16:13,554 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.FilterChainProxy - /logo/login at position 3 of 8 in additional filter chain; firing Filter: 'RequestCacheAwareFilter'
2013-04-24 09:16:13,554 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.savedrequest.DefaultSavedRequest - pathInfo: arg1=null; arg2=/login (property not equals)
2013-04-24 09:16:13,554 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.savedrequest.HttpSessionRequestCache - saved request doesn't match
2013-04-24 09:16:13,554 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.FilterChainProxy - /logo/login at position 4 of 8 in additional filter chain; firing Filter: 'SecurityContextHolderAwareRequestFilter'
2013-04-24 09:16:13,554 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.FilterChainProxy - /logo/login at position 5 of 8 in additional filter chain; firing Filter: 'AnonymousAuthenticationFilter'
2013-04-24 09:16:13,554 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.authentication.AnonymousAuthenticationFilter - Populated SecurityContextHolder with anonymous token: 'org.springframework.security.authentication.AnonymousAuthenticationToken@905571d8: Principal: anonymousUser; Credentials: [PROTECTED]; Authenticated: true; Details: org.springframework.security.web.authentication.WebAuthenticationDetails@0: RemoteIpAddress: 172.17.2.35; SessionId: CF897847E241ABBB3F36D0D58DA11E11; Granted Authorities: ROLE_ANONYMOUS'
2013-04-24 09:16:13,554 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.FilterChainProxy - /logo/login at position 6 of 8 in additional filter chain; firing Filter: 'SessionManagementFilter'
2013-04-24 09:16:13,554 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.FilterChainProxy - /logo/login at position 7 of 8 in additional filter chain; firing Filter: 'ExceptionTranslationFilter'
2013-04-24 09:16:13,554 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.FilterChainProxy - /logo/login at position 8 of 8 in additional filter chain; firing Filter: 'FilterSecurityInterceptor'
2013-04-24 09:16:13,554 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.util.AntPathRequestMatcher - Checking match of request : '/logo/login'; against '/frontend/**'
2013-04-24 09:16:13,554 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.util.AntPathRequestMatcher - Checking match of request : '/logo/login'; against '/login.jsp'
2013-04-24 09:16:13,554 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.util.AntPathRequestMatcher - Checking match of request : '/logo/login'; against '/admin/**'
2013-04-24 09:16:13,554 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.util.AntPathRequestMatcher - Checking match of request : '/logo/login'; against '/mobile/**'
2013-04-24 09:16:13,554 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.util.AntPathRequestMatcher - Checking match of request : '/logo/login'; against '/repositorystartup'
2013-04-24 09:16:13,554 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.util.AntPathRequestMatcher - Checking match of request : '/logo/login'; against '/texttospeech'
2013-04-24 09:16:13,555 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.util.AntPathRequestMatcher - Checking match of request : '/logo/login'; against '/htmlpreview'
2013-04-24 09:16:13,555 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.util.AntPathRequestMatcher - Checking match of request : '/logo/login'; against '/syntaxhighlighter'
2013-04-24 09:16:13,555 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.util.AntPathRequestMatcher - Checking match of request : '/logo/login'; against '/test'
2013-04-24 09:16:13,555 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.util.AntPathRequestMatcher - Checking match of request : '/logo/login'; against '/extension/zohofileupload'
2013-04-24 09:16:13,555 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.util.AntPathRequestMatcher - Checking match of request : '/logo/login'; against '/extension/**'
2013-04-24 09:16:13,555 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.access.intercept.FilterSecurityInterceptor - Public object - authentication not attempted
2013-04-24 09:16:13,555 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.FilterChainProxy - /logo/login reached end of additional filter chain; proceeding with original chain
2013-04-24 09:16:13,557 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.access.ExceptionTranslationFilter - Chain processed normally
2013-04-24 09:16:13,557 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.context.HttpSessionSecurityContextRepository - SecurityContext is empty or contents are anonymous - context will not be stored in HttpSession.
2013-04-24 09:16:13,557 [http-bio-0.0.0.0-8080-exec-8] DEBUG org.springframework.security.web.context.SecurityContextPersistenceFilter - SecurityContextHolder now cleared, as request processing completed
No se porque pero creo que se le conceden permisos de ROLE_ANONYMOUS, pero ese ROLE yo no lo tengo en mi LDAP.
Te dejo los ficheros, pero yo supongo que falta algo, porque por ejemplo el usuario okmAdmin tiene diferente pass en el LDAP que la que le asigne en OpenKM y me deja entrar con la de OpenKM y la del LDAP no. Me da la sensación que a la hora del login ignora al LDAP.
Parece que empiezan a llegar los progresos.
De antemano, gracias por su ayuda.