You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Guilherme <gu...@ati.com.br> on 2011/06/02 15:20:38 UTC

Custom partition bind is never called

Hi. 

I've created a custom partition (extending AbstractPartition), but its
bind(BindOperationContext) method is never called when I try to
bind/authenticate an user in this partition. 

I've attached a debugger to the server and added a breakpoint in the
bind method, but it's never called. The breakpoint at the
search(SearchOperationContext) works fine. 

Trying to run ldapsearch returns 

ldap_bind: Invalid credentials (49)
	additional info: INVALID_CREDENTIALS: Bind failed: ERR_333 Unexpected
exception.

Trying to connect using Eclipse Apache DS plugin gives the same error,
and the stack trace below. 

Does anybody have any suggestions about how to fix or further
investigate this problem? 

Thanks a lot in advance. 

Guilherme


javax.naming.AuthenticationException: [LDAP: error code 49 -
INVALID_CREDENTIALS: Bind failed: ERR_333 Unexpected exception.]
	at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3041)
	at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2987)
	at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2789)
	at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2703)
	at com.sun.jndi.ldap.LdapCtx.ensureOpen(LdapCtx.java:2602)
	at com.sun.jndi.ldap.LdapCtx.ensureOpen(LdapCtx.java:2576)
	at com.sun.jndi.ldap.LdapCtx.reconnect(LdapCtx.java:2572)
	at
javax.naming.ldap.InitialLdapContext.reconnect(InitialLdapContext.java:173)
	at
org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper$7.run(JNDIConnectionWrapper.java:1055)
	at
org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper.runAndMonitor(JNDIConnectionWrapper.java:1272)
	at
org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper.doBind(JNDIConnectionWrapper.java:1065)
	at
org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper.bind(JNDIConnectionWrapper.java:254)
	at
org.apache.directory.studio.connection.core.jobs.OpenConnectionsRunnable.run(OpenConnectionsRunnable.java:114)
	at
org.apache.directory.studio.connection.core.jobs.StudioConnectionJob.run(StudioConnectionJob.java:114)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)





Re: Custom partition bind is never called

Posted by Kiran Ayyagari <ka...@apache.org>.
On Thu, Jun 2, 2011 at 6:50 PM, Guilherme <gu...@ati.com.br> wrote:
> Hi.
>
> I've created a custom partition (extending AbstractPartition), but its
> bind(BindOperationContext) method is never called when I try to
> bind/authenticate an user in this partition.
>
a partition's bind operation will never be called ( unless there are
NO authenticators and there will always be authenticators in
the default setup)
curious to know why you want to implement the bind() method of
partition and use it

> I've attached a debugger to the server and added a breakpoint in the
> bind method, but it's never called. The breakpoint at the
> search(SearchOperationContext) works fine.
>
> Trying to run ldapsearch returns
>
> ldap_bind: Invalid credentials (49)
>        additional info: INVALID_CREDENTIALS: Bind failed: ERR_333 Unexpected
> exception.
>
> Trying to connect using Eclipse Apache DS plugin gives the same error,
> and the stack trace below.
>
> Does anybody have any suggestions about how to fix or further
> investigate this problem?
>
> Thanks a lot in advance.
>
> Guilherme
>
>
> javax.naming.AuthenticationException: [LDAP: error code 49 -
> INVALID_CREDENTIALS: Bind failed: ERR_333 Unexpected exception.]
>        at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3041)
>        at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2987)
>        at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2789)
>        at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2703)
>        at com.sun.jndi.ldap.LdapCtx.ensureOpen(LdapCtx.java:2602)
>        at com.sun.jndi.ldap.LdapCtx.ensureOpen(LdapCtx.java:2576)
>        at com.sun.jndi.ldap.LdapCtx.reconnect(LdapCtx.java:2572)
>        at
> javax.naming.ldap.InitialLdapContext.reconnect(InitialLdapContext.java:173)
>        at
> org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper$7.run(JNDIConnectionWrapper.java:1055)
>        at
> org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper.runAndMonitor(JNDIConnectionWrapper.java:1272)
>        at
> org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper.doBind(JNDIConnectionWrapper.java:1065)
>        at
> org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper.bind(JNDIConnectionWrapper.java:254)
>        at
> org.apache.directory.studio.connection.core.jobs.OpenConnectionsRunnable.run(OpenConnectionsRunnable.java:114)
>        at
> org.apache.directory.studio.connection.core.jobs.StudioConnectionJob.run(StudioConnectionJob.java:114)
>        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
>
>
>
>
>



-- 
Kiran Ayyagari

Re: Custom partition bind is never called

Posted by Alex Karasulu <ak...@apache.org>.
On Thu, Jun 2, 2011 at 7:55 PM, Kiran Ayyagari <ka...@apache.org> wrote:
> On Thu, Jun 2, 2011 at 9:23 PM, Rajesh <ra...@vimukti.com> wrote:
>> Hi,
>>
>> I believe the Partition does not need to have bind method at all. Bind is
>> handled at the AuthenticationInterceptor itself. So there is no need of
>> passing this to the partition.
>>
>> That method should be removed I think.
>>
> AFAIR the bind method is maintained in Partition interface to support
> virtual directory feature

Good memory. Yes this was the reason behind it but we probably need to
rethink this strategy for the future.

Regards,
Alex

Re: Custom partition bind is never called

Posted by Rajesh <ra...@vimukti.com>.
Thanks for letting me know. I never knew about that feature. I will check
about it.

Rajesh

On Thu, Jun 2, 2011 at 10:25 PM, Kiran Ayyagari <ka...@apache.org>wrote:

> On Thu, Jun 2, 2011 at 9:23 PM, Rajesh <ra...@vimukti.com> wrote:
> > Hi,
> >
> > I believe the Partition does not need to have bind method at all. Bind is
> > handled at the AuthenticationInterceptor itself. So there is no need of
> > passing this to the partition.
> >
> > That method should be removed I think.
> >
> AFAIR the bind method is maintained in Partition interface to support
> virtual directory feature
> > Rajesh
> >
> > On Thu, Jun 2, 2011 at 6:50 PM, Guilherme <gu...@ati.com.br> wrote:
> >>
> >> Hi.
> >>
> >> I've created a custom partition (extending AbstractPartition), but its
> >> bind(BindOperationContext) method is never called when I try to
> >> bind/authenticate an user in this partition.
> >>
> >> I've attached a debugger to the server and added a breakpoint in the
> >> bind method, but it's never called. The breakpoint at the
> >> search(SearchOperationContext) works fine.
> >>
> >> Trying to run ldapsearch returns
> >>
> >> ldap_bind: Invalid credentials (49)
> >>        additional info: INVALID_CREDENTIALS: Bind failed: ERR_333
> >> Unexpected
> >> exception.
> >>
> >> Trying to connect using Eclipse Apache DS plugin gives the same error,
> >> and the stack trace below.
> >>
> >> Does anybody have any suggestions about how to fix or further
> >> investigate this problem?
> >>
> >> Thanks a lot in advance.
> >>
> >> Guilherme
> >>
> >>
> >> javax.naming.AuthenticationException: [LDAP: error code 49 -
> >> INVALID_CREDENTIALS: Bind failed: ERR_333 Unexpected exception.]
> >>        at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3041)
> >>        at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2987)
> >>        at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2789)
> >>        at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2703)
> >>        at com.sun.jndi.ldap.LdapCtx.ensureOpen(LdapCtx.java:2602)
> >>        at com.sun.jndi.ldap.LdapCtx.ensureOpen(LdapCtx.java:2576)
> >>        at com.sun.jndi.ldap.LdapCtx.reconnect(LdapCtx.java:2572)
> >>        at
> >>
> >>
> javax.naming.ldap.InitialLdapContext.reconnect(InitialLdapContext.java:173)
> >>        at
> >>
> >>
> org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper$7.run(JNDIConnectionWrapper.java:1055)
> >>        at
> >>
> >>
> org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper.runAndMonitor(JNDIConnectionWrapper.java:1272)
> >>        at
> >>
> >>
> org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper.doBind(JNDIConnectionWrapper.java:1065)
> >>        at
> >>
> >>
> org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper.bind(JNDIConnectionWrapper.java:254)
> >>        at
> >>
> >>
> org.apache.directory.studio.connection.core.jobs.OpenConnectionsRunnable.run(OpenConnectionsRunnable.java:114)
> >>        at
> >>
> >>
> org.apache.directory.studio.connection.core.jobs.StudioConnectionJob.run(StudioConnectionJob.java:114)
> >>        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
> >>
> >>
> >>
> >>
> >
>
>
>
> --
> Kiran Ayyagari
>



-- 

Rajesh Akkineni
CEO, Vimukti Technologies
www.vimukti.com
Phone: +91-9989696514

Re: Custom partition bind is never called

Posted by Kiran Ayyagari <ka...@apache.org>.
On Thu, Jun 2, 2011 at 9:23 PM, Rajesh <ra...@vimukti.com> wrote:
> Hi,
>
> I believe the Partition does not need to have bind method at all. Bind is
> handled at the AuthenticationInterceptor itself. So there is no need of
> passing this to the partition.
>
> That method should be removed I think.
>
AFAIR the bind method is maintained in Partition interface to support
virtual directory feature
> Rajesh
>
> On Thu, Jun 2, 2011 at 6:50 PM, Guilherme <gu...@ati.com.br> wrote:
>>
>> Hi.
>>
>> I've created a custom partition (extending AbstractPartition), but its
>> bind(BindOperationContext) method is never called when I try to
>> bind/authenticate an user in this partition.
>>
>> I've attached a debugger to the server and added a breakpoint in the
>> bind method, but it's never called. The breakpoint at the
>> search(SearchOperationContext) works fine.
>>
>> Trying to run ldapsearch returns
>>
>> ldap_bind: Invalid credentials (49)
>>        additional info: INVALID_CREDENTIALS: Bind failed: ERR_333
>> Unexpected
>> exception.
>>
>> Trying to connect using Eclipse Apache DS plugin gives the same error,
>> and the stack trace below.
>>
>> Does anybody have any suggestions about how to fix or further
>> investigate this problem?
>>
>> Thanks a lot in advance.
>>
>> Guilherme
>>
>>
>> javax.naming.AuthenticationException: [LDAP: error code 49 -
>> INVALID_CREDENTIALS: Bind failed: ERR_333 Unexpected exception.]
>>        at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3041)
>>        at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2987)
>>        at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2789)
>>        at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2703)
>>        at com.sun.jndi.ldap.LdapCtx.ensureOpen(LdapCtx.java:2602)
>>        at com.sun.jndi.ldap.LdapCtx.ensureOpen(LdapCtx.java:2576)
>>        at com.sun.jndi.ldap.LdapCtx.reconnect(LdapCtx.java:2572)
>>        at
>>
>> javax.naming.ldap.InitialLdapContext.reconnect(InitialLdapContext.java:173)
>>        at
>>
>> org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper$7.run(JNDIConnectionWrapper.java:1055)
>>        at
>>
>> org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper.runAndMonitor(JNDIConnectionWrapper.java:1272)
>>        at
>>
>> org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper.doBind(JNDIConnectionWrapper.java:1065)
>>        at
>>
>> org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper.bind(JNDIConnectionWrapper.java:254)
>>        at
>>
>> org.apache.directory.studio.connection.core.jobs.OpenConnectionsRunnable.run(OpenConnectionsRunnable.java:114)
>>        at
>>
>> org.apache.directory.studio.connection.core.jobs.StudioConnectionJob.run(StudioConnectionJob.java:114)
>>        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
>>
>>
>>
>>
>



-- 
Kiran Ayyagari

Re: Custom partition bind is never called

Posted by Rajesh <ra...@vimukti.com>.
Hi,

I believe the Partition does not need to have bind method at all. Bind is
handled at the AuthenticationInterceptor itself. So there is no need of
passing this to the partition.

That method should be removed I think.

Rajesh

On Thu, Jun 2, 2011 at 6:50 PM, Guilherme <gu...@ati.com.br> wrote:

> Hi.
>
> I've created a custom partition (extending AbstractPartition), but its
> bind(BindOperationContext) method is never called when I try to
> bind/authenticate an user in this partition.
>
> I've attached a debugger to the server and added a breakpoint in the
> bind method, but it's never called. The breakpoint at the
> search(SearchOperationContext) works fine.
>
> Trying to run ldapsearch returns
>
> ldap_bind: Invalid credentials (49)
>        additional info: INVALID_CREDENTIALS: Bind failed: ERR_333
> Unexpected
> exception.
>
> Trying to connect using Eclipse Apache DS plugin gives the same error,
> and the stack trace below.
>
> Does anybody have any suggestions about how to fix or further
> investigate this problem?
>
> Thanks a lot in advance.
>
> Guilherme
>
>
> javax.naming.AuthenticationException: [LDAP: error code 49 -
> INVALID_CREDENTIALS: Bind failed: ERR_333 Unexpected exception.]
>        at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3041)
>        at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2987)
>        at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2789)
>        at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2703)
>        at com.sun.jndi.ldap.LdapCtx.ensureOpen(LdapCtx.java:2602)
>        at com.sun.jndi.ldap.LdapCtx.ensureOpen(LdapCtx.java:2576)
>        at com.sun.jndi.ldap.LdapCtx.reconnect(LdapCtx.java:2572)
>        at
> javax.naming.ldap.InitialLdapContext.reconnect(InitialLdapContext.java:173)
>        at
>
> org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper$7.run(JNDIConnectionWrapper.java:1055)
>        at
>
> org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper.runAndMonitor(JNDIConnectionWrapper.java:1272)
>        at
>
> org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper.doBind(JNDIConnectionWrapper.java:1065)
>        at
>
> org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper.bind(JNDIConnectionWrapper.java:254)
>        at
>
> org.apache.directory.studio.connection.core.jobs.OpenConnectionsRunnable.run(OpenConnectionsRunnable.java:114)
>        at
>
> org.apache.directory.studio.connection.core.jobs.StudioConnectionJob.run(StudioConnectionJob.java:114)
>        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
>
>
>
>
>