Author Topic: [SOLVED] zentyal 3.0 & subsonic  (Read 3784 times)

Barrydocks

  • Zen Warrior
  • ***
  • Posts: 145
  • Karma: +4/-0
    • View Profile
[SOLVED] zentyal 3.0 & subsonic
« on: December 14, 2012, 05:10:32 pm »
I have successfully managed to get subsonic to authenicate against zentyal 2.0 ldap directory by using this guide:
http://trac.zentyal.org/wiki/Documentation/Community/HowTo/Subsonic

I can't get it to work with zentyal 3.0

Any suggestions?
Thanks
« Last Edit: December 14, 2012, 09:13:12 pm by Barrydocks »

christian

  • Guest
Re: zentyal 3.0 & subsonic
« Reply #1 on: December 14, 2012, 05:39:15 pm »
change LDAP port from 389 to 390.
Everything else should be similar (although I didn't read this link)

Barrydocks

  • Zen Warrior
  • ***
  • Posts: 145
  • Karma: +4/-0
    • View Profile
Re: zentyal 3.0 & subsonic
« Reply #2 on: December 14, 2012, 07:11:55 pm »
change LDAP port from 389 to 390.
Everything else should be similar (although I didn't read this link)
This was the first thing I tried
Any other suggestions?

Barrydocks

  • Zen Warrior
  • ***
  • Posts: 145
  • Karma: +4/-0
    • View Profile
Re: zentyal 3.0 & subsonic
« Reply #3 on: December 14, 2012, 08:18:46 pm »
her's the subsonic log:
Code: [Select]
[2012-12-14 19:16:54,231] INFO SubsonicLdapBindAuthenticator - Failed to authenticate user 'natalie' in LDAP.
org.acegisecurity.ldap.LdapDataAccessException: LdapCallback;[LDAP: error code 32 - No Such Object]; nested exception is javax.naming.NameNotFoundException: [LDAP: error code 32 - No Such Object]; remaining name ''
at org.acegisecurity.ldap.LdapTemplate$LdapExceptionTranslator.translate(LdapTemplate.java:295)
at org.acegisecurity.ldap.LdapTemplate.execute(LdapTemplate.java:128)
at org.acegisecurity.ldap.LdapTemplate.searchForSingleEntry(LdapTemplate.java:246)
at org.acegisecurity.ldap.search.FilterBasedLdapUserSearch.searchForUser(FilterBasedLdapUserSearch.java:119)
at org.acegisecurity.providers.ldap.authenticator.BindAuthenticator.authenticate(BindAuthenticator.java:71)
at net.sourceforge.subsonic.ldap.SubsonicLdapBindAuthenticator.authenticate(SubsonicLdapBindAuthenticator.java:72)
at org.acegisecurity.providers.ldap.LdapAuthenticationProvider.retrieveUser(LdapAuthenticationProvider.java:233)
at org.acegisecurity.providers.dao.AbstractUserDetailsAuthenticationProvider.authenticate(AbstractUserDetailsAuthenticationProvider.java:119)
at org.acegisecurity.providers.ProviderManager.doAuthentication(ProviderManager.java:195)
at org.acegisecurity.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.java:45)
at org.acegisecurity.ui.webapp.AuthenticationProcessingFilter.attemptAuthentication(AuthenticationProcessingFilter.java:71)
at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:252)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:110)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at net.sourceforge.subsonic.filter.RequestEncodingFilter.doFilter(RequestEncodingFilter.java:43)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at net.sourceforge.subsonic.filter.ParameterDecodingFilter.doFilter(ParameterDecodingFilter.java:54)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at net.sourceforge.subsonic.filter.BootstrapVerificationFilter.doFilter(BootstrapVerificationFilter.java:54)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:313)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:844)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
Caused by: javax.naming.NameNotFoundException: [LDAP: error code 32 - No Such Object]; remaining name ''
at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3057)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2978)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2785)
at com.sun.jndi.ldap.LdapCtx.searchAux(LdapCtx.java:1839)
at com.sun.jndi.ldap.LdapCtx.c_search(LdapCtx.java:1762)
at com.sun.jndi.ldap.LdapCtx.c_search(LdapCtx.java:1779)
at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_search(ComponentDirContext.java:412)
at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:394)
at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:376)
at javax.naming.directory.InitialDirContext.search(InitialDirContext.java:284)
at org.acegisecurity.ldap.LdapTemplate$3.doInDirContext(LdapTemplate.java:249)
at org.acegisecurity.ldap.LdapTemplate.execute(LdapTemplate.java:126)
... 38 more

Barrydocks

  • Zen Warrior
  • ***
  • Posts: 145
  • Karma: +4/-0
    • View Profile
Re: zentyal 3.0 & subsonic
« Reply #4 on: December 14, 2012, 09:12:55 pm »
OK managed to fix this;  you will need to use the following settings:
On the zentyal admin page browse to Users and Groups > LDAP settings
On the advanced page of the subsonic settings you need to have the following from the zentyal LDAP settings:
LDAP URL: ldap://localhost:390/<Base DN values>
LDAP search filter: (uid={0})
LDAP manager DN: <Root DN values>
Password: zentyal LDAP password

The key is getting the password from the zentyal admin interface, I discovered that if you simply cut & paste it an additional [space] gets added at the end, I used the value from the webmin ldap interface but you could simply paste it into a text document first.

You will need to open the port used by subsonic on the zentyal firewall

christian

  • Guest
Re: [SOLVED] zentyal 3.0 & subsonic
« Reply #5 on: December 15, 2012, 12:26:06 am »
behaviour is exactly the same with 2.2  ;)
What I found strange in yo log was rather the LDAP err 32 which means access to non-existing DN.

Barrydocks

  • Zen Warrior
  • ***
  • Posts: 145
  • Karma: +4/-0
    • View Profile
Re: [SOLVED] zentyal 3.0 & subsonic
« Reply #6 on: December 15, 2012, 01:03:38 pm »
behaviour is exactly the same with 2.2  ;)
Yeah, you're right.  I went back to my old server and took a look at the settings - the guide doesn't mention having to specify the LDAP manger and password  ::) , but it was the issue with the extra blank space when cutting and pasting the password from the zentyal admin page was the killer