You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Nick Faiz <ni...@atlassian.com> on 2005/06/15 03:40:04 UTC

auth exception - new spring layer

Hi,
    I've just updated my source and rebuilt. Suddenly I'm encountering 
an auth. exception when logging in as 'uid=admin,ou=system', using the 
password 'secret'.

    I'm not really set up with IDEA to go to far into it. Is anyone else 
seeing the same problem?

Cheers,
Nick
 
Error opening connection:
[LDAP: error code 49 - Bind failure:
org.apache.ldap.common.exception.LdapAuthenticationException
    at 
org.apache.ldap.server.authn.AuthenticationService.process(AuthenticationService.java:246)
    at 
org.apache.ldap.server.interceptor.InterceptorChain$3.process(InterceptorChain.java:560)
    at 
org.apache.ldap.server.interceptor.BaseInterceptor.process(BaseInterceptor.java:185)
    at 
org.apache.ldap.server.normalization.NormalizationService.process(NormalizationService.java:162)
    at 
org.apache.ldap.server.interceptor.BaseInterceptor.process(BaseInterceptor.java:101)
    at 
org.apache.ldap.server.interceptor.InterceptorChain.process(InterceptorChain.java:460)
    at 
org.apache.ldap.server.jndi.DefaultContextFactoryContext.invoke(DefaultContextFactoryContext.java:289)
    at 
org.apache.ldap.server.jndi.RootNexusProxy.hasEntry(RootNexusProxy.java:116)
    at 
org.apache.ldap.server.jndi.ServerContext.<init>(ServerContext.java:118)
    at 
org.apache.ldap.server.jndi.ServerDirContext.<init>(ServerDirContext.java:61)
    at 
org.apache.ldap.server.jndi.ServerLdapContext.<init>(ServerLdapContext.java:56)
    at 
org.apache.ldap.server.jndi.DefaultContextFactoryContext.getJndiContext(DefaultContextFactoryContext.java:170)
    at 
org.apache.ldap.server.jndi.AbstractContextFactory.getInitialContext(AbstractContextFactory.java:132)
    at 
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
    at 
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
    at javax.naming.InitialContext.init(InitialContext.java:219)
    at 
javax.naming.ldap.InitialLdapContext.<init>(InitialLdapContext.java:133)
    at 
org.apache.ldap.server.protocol.BindHandler.messageReceived(BindHandler.java:134)
    at 
org.apache.mina.protocol.handler.DemuxingProtocolHandler.messageReceived(DemuxingProtocolHandler.java:69)
    at 
org.apache.mina.protocol.AbstractProtocolFilterChain$2.messageReceived(AbstractProtocolFilterChain.java:149)
    at 
org.apache.mina.protocol.AbstractProtocolFilterChain.callNextMessageReceived(AbstractProtocolFilterChain.java:363)
    at 
org.apache.mina.protocol.AbstractProtocolFilterChain.access$1000(AbstractProtocolFilterChain.java:50)
    at 
org.apache.mina.protocol.AbstractProtocolFilterChain$Entry$1.messageReceived(AbstractProtocolFilterChain.java:522)
    at 
org.apache.mina.protocol.AbstractProtocolFilterChain$1.messageReceived(AbstractProtocolFilterChain.java:99)
    at 
org.apache.mina.protocol.AbstractProtocolFilterChain.callNextMessageReceived(AbstractProtocolFilterChain.java:363)
    at 
org.apache.mina.protocol.AbstractProtocolFilterChain.messageReceived(AbstractProtocolFilterChain.java:354)
    at 
org.apache.mina.protocol.ProtocolSessionManagerFilterChain$1.messageReceived(ProtocolSessionManagerFilterChain.java:77)
    at 
org.apache.mina.protocol.AbstractProtocolFilterChain.callNextMessageReceived(AbstractProtocolFilterChain.java:363)
    at 
org.apache.mina.protocol.AbstractProtocolFilterChain.access$1000(AbstractProtocolFilterChain.java:50)
    at 
org.apache.mina.protocol.AbstractProtocolFilterChain$Entry$1.messageReceived(AbstractProtocolFilterChain.java:522)
    at 
org.apache.mina.protocol.filter.ProtocolThreadPoolFilter.processEvent(ProtocolThreadPoolFilter.java:96)
    at 
org.apache.mina.util.BaseThreadPool$Worker.processEvents(BaseThreadPool.java:340)
    at 
org.apache.mina.util.BaseThreadPool$Worker.run(BaseThreadPool.java:279)


BindRequest =
org.apache.ldap.common.message.BindRequestImpl@943dc4]

-- 
ATLASSIAN - http://www.atlassian.com/    

Confluence - the enterprise wiki - tried it yet?
http://www.atlassian.com/confluence/
--


Re: auth exception - new spring layer

Posted by Nick Faiz <ni...@atlassian.com>.
Hey Trustin,
    Your fix worked. Thanks for the quick response. :)

Nick  

Trustin Lee wrote:

> Hi Nick,
>  
> 2005/6/15, Nick Faiz nick@atlassian.com <ma...@atlassian.com>:
>
>        *However*, when authenticating with a client the credential seems
>     more like a hashcode for a byte array: [ B@cf710e  . If I had time I'd
>     look into how the credential is being set in the context for external,
>     simple authentication.
>
>  
> Thank you for your hint.  I checked in the fix.  Could you please try 
> again?
>  
> Trustin
> -- 
> what we call human nature is actually human habit
> --
> http://gleamynode.net/



-- 
ATLASSIAN - http://www.atlassian.com/    

Confluence - the enterprise wiki - tried it yet?
http://www.atlassian.com/confluence/
--


Re: auth exception - new spring layer

Posted by Trustin Lee <tr...@gmail.com>.
Hi Nick,
 2005/6/15, Nick Faiz nick@atlassian.com: 
> 
> *However*, when authenticating with a client the credential seems
> more like a hashcode for a byte array: [B@cf710e . If I had time I'd
> look into how the credential is being set in the context for external,
> simple authentication.

  Thank you for your hint. I checked in the fix. Could you please try again?
 Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/

Re: auth exception - new spring layer

Posted by Nick Faiz <ni...@atlassian.com>.
Hi,
    Just an update on this. I rolled back to a previous version of DS to 
get on with my own work but it thought it might be of use to someone to 
note that the Credential returned by SimpleAuthenticator isn't what Im 
sending through in my client (jxplorer).

    It looks as though the server has to authenticate every once in a 
while, using the SimpleAuthenticator in which case it does so 
successfully using the 'secret' password:

    public LdapPrincipal authenticate( ServerContext ctx ) throws 
NamingException
    {
        // ---- extract password from JNDI environment

        Object creds = ctx.getEnvironment().get( 
Context.SECURITY_CREDENTIALS );
        System.out.println((String) creds);

    //...

    For internal auth. the output is 'secret'.

    *However*, when authenticating with a client the credential seems 
more like a hashcode for a byte array: [B@cf710e  . If I had time I'd 
look into how the credential is being set in the context for external, 
simple authentication.

Cheers,
Nick
 


Nick Faiz wrote:

> Hi,
>    I've just updated my source and rebuilt. Suddenly I'm encountering 
> an auth. exception when logging in as 'uid=admin,ou=system', using the 
> password 'secret'.
>
>    I'm not really set up with IDEA to go to far into it. Is anyone 
> else seeing the same problem?
>
> Cheers,
> Nick
>
> Error opening connection:
> [LDAP: error code 49 - Bind failure:
> org.apache.ldap.common.exception.LdapAuthenticationException
>    at 
> org.apache.ldap.server.authn.AuthenticationService.process(AuthenticationService.java:246) 
>
>    at 
> org.apache.ldap.server.interceptor.InterceptorChain$3.process(InterceptorChain.java:560) 
>
>    at 
> org.apache.ldap.server.interceptor.BaseInterceptor.process(BaseInterceptor.java:185) 
>
>    at 
> org.apache.ldap.server.normalization.NormalizationService.process(NormalizationService.java:162) 
>
>    at 
> org.apache.ldap.server.interceptor.BaseInterceptor.process(BaseInterceptor.java:101) 
>
>    at 
> org.apache.ldap.server.interceptor.InterceptorChain.process(InterceptorChain.java:460) 
>
>    at 
> org.apache.ldap.server.jndi.DefaultContextFactoryContext.invoke(DefaultContextFactoryContext.java:289) 
>
>    at 
> org.apache.ldap.server.jndi.RootNexusProxy.hasEntry(RootNexusProxy.java:116) 
>
>    at 
> org.apache.ldap.server.jndi.ServerContext.<init>(ServerContext.java:118)
>    at 
> org.apache.ldap.server.jndi.ServerDirContext.<init>(ServerDirContext.java:61) 
>
>    at 
> org.apache.ldap.server.jndi.ServerLdapContext.<init>(ServerLdapContext.java:56) 
>
>    at 
> org.apache.ldap.server.jndi.DefaultContextFactoryContext.getJndiContext(DefaultContextFactoryContext.java:170) 
>
>    at 
> org.apache.ldap.server.jndi.AbstractContextFactory.getInitialContext(AbstractContextFactory.java:132) 
>
>    at 
> javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
>    at 
> javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
>    at javax.naming.InitialContext.init(InitialContext.java:219)
>    at 
> javax.naming.ldap.InitialLdapContext.<init>(InitialLdapContext.java:133)
>    at 
> org.apache.ldap.server.protocol.BindHandler.messageReceived(BindHandler.java:134) 
>
>    at 
> org.apache.mina.protocol.handler.DemuxingProtocolHandler.messageReceived(DemuxingProtocolHandler.java:69) 
>
>    at 
> org.apache.mina.protocol.AbstractProtocolFilterChain$2.messageReceived(AbstractProtocolFilterChain.java:149) 
>
>    at 
> org.apache.mina.protocol.AbstractProtocolFilterChain.callNextMessageReceived(AbstractProtocolFilterChain.java:363) 
>
>    at 
> org.apache.mina.protocol.AbstractProtocolFilterChain.access$1000(AbstractProtocolFilterChain.java:50) 
>
>    at 
> org.apache.mina.protocol.AbstractProtocolFilterChain$Entry$1.messageReceived(AbstractProtocolFilterChain.java:522) 
>
>    at 
> org.apache.mina.protocol.AbstractProtocolFilterChain$1.messageReceived(AbstractProtocolFilterChain.java:99) 
>
>    at 
> org.apache.mina.protocol.AbstractProtocolFilterChain.callNextMessageReceived(AbstractProtocolFilterChain.java:363) 
>
>    at 
> org.apache.mina.protocol.AbstractProtocolFilterChain.messageReceived(AbstractProtocolFilterChain.java:354) 
>
>    at 
> org.apache.mina.protocol.ProtocolSessionManagerFilterChain$1.messageReceived(ProtocolSessionManagerFilterChain.java:77) 
>
>    at 
> org.apache.mina.protocol.AbstractProtocolFilterChain.callNextMessageReceived(AbstractProtocolFilterChain.java:363) 
>
>    at 
> org.apache.mina.protocol.AbstractProtocolFilterChain.access$1000(AbstractProtocolFilterChain.java:50) 
>
>    at 
> org.apache.mina.protocol.AbstractProtocolFilterChain$Entry$1.messageReceived(AbstractProtocolFilterChain.java:522) 
>
>    at 
> org.apache.mina.protocol.filter.ProtocolThreadPoolFilter.processEvent(ProtocolThreadPoolFilter.java:96) 
>
>    at 
> org.apache.mina.util.BaseThreadPool$Worker.processEvents(BaseThreadPool.java:340) 
>
>    at 
> org.apache.mina.util.BaseThreadPool$Worker.run(BaseThreadPool.java:279)
>
>
> BindRequest =
> org.apache.ldap.common.message.BindRequestImpl@943dc4]
>


-- 
ATLASSIAN - http://www.atlassian.com/    

Confluence - the enterprise wiki - tried it yet?
http://www.atlassian.com/confluence/
--