[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: How to use JLDAP to search for an entry in OpenLDAP using a binary search filter?
- To: openldap <openldap-software@OpenLDAP.org>, Marc Boorshtein <mboorshtein@gmail.com>
- Subject: Re: How to use JLDAP to search for an entry in OpenLDAP using a binary search filter?
- From: Safdar Kureishy <safdar.kureishy@gmail.com>
- Date: Mon, 19 Sep 2005 13:32:24 -0700
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:references; b=WUZDCeiOwiIbTJAv74hZurlEhYeaaQsvtNSGyjEO1QoNbhV81BvaNcTNSB6UMcMs0czaeMuopjnxCHJvoTocKtniHgx3+vG/yH43PWTgIilzJQa9nC1AX8W0k6t4SQw/TTi4Nyeit2KGD5MOelMkoGg4inC5y8p7ufqIXj566mE=
- In-reply-to: <ca5d671a05091822376f352314@mail.gmail.com>
- References: <ca5d671a050916142471e0de7f@mail.gmail.com> <800df63905091619471f0dc70b@mail.gmail.com> <ca5d671a05091822376f352314@mail.gmail.com>
Btw, should this hex encoded value be preceded with the "0x" string (e.g.
"0x\22\45\A0\33")? I'm sorry if this question is trivial, but I am unable to
try this out right now as I'm in the middle of the implementation process
... The reason I ask is that Active Directory requires a "0x" prefix
followed by the escaped hex-encoding of the individual bytes - if OpenLDAP
and AD require different prefixes for this, that'll impact my design,
otherwise I can reuse the same code for both...
Thanks,
Safdar
On 9/18/05, Safdar Kureishy <safdar.kureishy@gmail.com> wrote:
>
> Thanks Marc.
>
> On 9/16/05, Marc Boorshtein < mboorshtein@gmail.com> wrote:
> >
> > I believe you can escape the bytes in the filter with a "\". So your
> > filter would be "(byBinaryVal=\\2B\\1A)"
> >
> > Marc
> >
> > On 9/16/05, Safdar Kureishy < safdar.kureishy@gmail.com> wrote:
> > >
> > > Hi,
> > >
> > > This is a question about JLDAP and OpenLDAP, specifically about
> > > searching
> > > using binary attribute values.
> > >
> > > I'm using JLDAP to access OpenLDAP and I need to search for an entry
> > > using a
> > > binary identifier. The only posting I could find about this is at this
> > > link,
> > > but I wasn't able to understand the response:
> > > http://www.openldap.org/lists/openldap-devel/200009/msg00096.html .
> > >
> > > I was wondering if anyone could answer this question for me.
> > >
> > > I have 2 options: (1) store the binary value as a base64 encoded
> > > string to
> > > start with, so that I can query it as a string search filter, (2) to
> > > store
> > > it in binary form and query it in binary form as well. I'm trying to
> > > use
> > > option (2) if possible.
> > >
> > > For option 2, I have the binary value to search for as a byte array
> > > (byte[]). The current JLDAP apis don't seem to have an option to
> > > specify a
> > > search filter for a byte[] value.
> > >
> > > To cut the question short, to search for [binaryId =
> > > <somebinarydata>], what
> > > would the JLDAPConnection.search() method take as parameters against
> > > an
> > > OpenLDAP server?
> > >
> > > Thanks in advance,
> > > Safdar
> > >
> > >
> > >
> >
>