directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kiran Ayyagari <kayyag...@apache.org>
Subject Re: getClientAddress() does not provide remote connection info for anonymous connections
Date Mon, 22 Jul 2013 11:22:41 GMT
On Mon, Jul 22, 2013 at 4:38 PM, Ado Dao <adodao@hotmail.de> wrote:

> When I search anonymous, e.g. with MS Outlook or so
>
> ldapsearch -h <host> -p 389 -x -b "dc=foo,dc=com" "mail=test@mail.loc"
>
> IOSession is null
>
> with authentication
>
> ldapsearch -h <host> -p 389 -w secret -D "uid=admin,ou=system"  -x -b
> "dc=foo,dc=com" "mail=test@mail.loc"
>
> IOSession is != null
>
> you are right, in anonymous case we are not storing the IoSession in the
CoreSession

>
> I Used the embedded sample from:
>
> https://svn.apache.org/repos/asf/directory/sandbox/kayyagari/embedded-sample-trunk/src/main/java/org/apache/directory/seserver/EmbeddedADSVerTrunk.java
>
> Is there any possibility to get the Client-IP address with anonymous bind.
>
> --
> Regards
> Ado
>
>
>
>
>
> > Date: Sat, 20 Jul 2013 06:03:56 +0200
> > From: elecharny@gmail.com
> > To: users@directory.apache.org
> > Subject: Re: getClientAddress() does not provide remote connection info
> for anonymous connections
> >
> > Le 7/20/13 2:22 AM, Ado Dao a écrit :
> > > Hi Emmanuel,
> > > thanks for your answer.
> > >
> > > From DefaultCoreSession.java:
> > > ...
> > > public SocketAddress getClientAddress()
> > > {
> > >  if ( ioSession != null )
> > >  {
> > >     return ioSession.getRemoteAddress();
> > >  } else     {
> > >     return null;
> > >  }
> > > }
> > > ...
> > >
> > >
> > > In Anonymous Mode is the IOSession == null. Only in Authentication
> Mode is the IOSession != null.
> >
> > You are doing a search without a bind, I guess ?
> >
> >
> > --
> > Regards,
> > Cordialement,
> > Emmanuel Lécharny
> > www.iktek.com
> >
>
>



-- 
Kiran Ayyagari
http://keydap.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message