You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@directory.apache.org by Naveen Gangam <ng...@cloudera.com> on 2015/10/13 22:43:18 UTC

Using Apache Directory in Hive JUnit tests

Hey all,
Currently we are using UnboundID's in-memory ldap server to test an
authentication provider. The test setup starts an in-memory ldap server and
imports an ldif without defining any schema.

We are evaluating a switch to Apache Directory from UnboundID. When I first
eval'ed it before using UnboundID, I couldnt get it to work out of the box.
There were duplicate ldif files in the Apache DS jars.

Could someone please provide a working sample that starts a ldap server and
loads from an ldif file? Any help would much appreciated.

Thank you
Naveen

Re: Using Apache Directory in Hive JUnit tests

Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 14/10/15 05:11, Tobias Bocanegra a écrit :
> Hi,
> we use Apache DS in Jackrabbit Oak. See [0] and [1].
>
> Regards, Toby
>
> [0]
> https://github.com/apache/jackrabbit-oak/blob/trunk/oak-auth-ldap/src/test/java/org/apache/jackrabbit/oak/security/authentication/ldap/AbstractServer.java
> [1]
> https://github.com/apache/jackrabbit-oak/blob/trunk/oak-auth-ldap/src/test/java/org/apache/jackrabbit/oak/security/authentication/ldap/InternalLdapServer.java
>
>
> On Tue, Oct 13, 2015 at 1:43 PM, Naveen Gangam <ng...@cloudera.com> wrote:
>
>> Hey all,
>> Currently we are using UnboundID's in-memory ldap server to test an
>> authentication provider. The test setup starts an in-memory ldap server and
>> imports an ldif without defining any schema.
>>
>> We are evaluating a switch to Apache Directory from UnboundID. When I first
>> eval'ed it before using UnboundID, I couldnt get it to work out of the box.
>> There were duplicate ldif files in the Apache DS jars.
>>
>> Could someone please provide a working sample that starts a ldap server and
>> loads from an ldif file? Any help would much appreciated.
>>
>> Thank you
>> Naveen
>>
Otherwise, if it's for Unit Tests, we have a complete framework that
allows you to declare a LDAP server using annotations :

http://svn.apache.org/viewvc/directory/apacheds/tags/2.0.0-M20/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/ClientSearchRequestTest.java?revision=1676627&view=markup

You can have a look at the slides of a presentation I did last year :
http://directory.apache.org/conference-materials.data/testing-LDAP.pdf

In any case, feel free to ask if you have a problem.

Re: Using Apache Directory in Hive JUnit tests

Posted by Tobias Bocanegra <tr...@apache.org>.
Hi,
we use Apache DS in Jackrabbit Oak. See [0] and [1].

Regards, Toby

[0]
https://github.com/apache/jackrabbit-oak/blob/trunk/oak-auth-ldap/src/test/java/org/apache/jackrabbit/oak/security/authentication/ldap/AbstractServer.java
[1]
https://github.com/apache/jackrabbit-oak/blob/trunk/oak-auth-ldap/src/test/java/org/apache/jackrabbit/oak/security/authentication/ldap/InternalLdapServer.java


On Tue, Oct 13, 2015 at 1:43 PM, Naveen Gangam <ng...@cloudera.com> wrote:

> Hey all,
> Currently we are using UnboundID's in-memory ldap server to test an
> authentication provider. The test setup starts an in-memory ldap server and
> imports an ldif without defining any schema.
>
> We are evaluating a switch to Apache Directory from UnboundID. When I first
> eval'ed it before using UnboundID, I couldnt get it to work out of the box.
> There were duplicate ldif files in the Apache DS jars.
>
> Could someone please provide a working sample that starts a ldap server and
> loads from an ldif file? Any help would much appreciated.
>
> Thank you
> Naveen
>

Re: Using Apache Directory in Hive JUnit tests

Posted by Kiran Ayyagari <ka...@apache.org>.
On Wed, Oct 14, 2015 at 4:43 AM, Naveen Gangam <ng...@cloudera.com> wrote:

> Hey all,
> Currently we are using UnboundID's in-memory ldap server to test an
> authentication provider. The test setup starts an in-memory ldap server and
> imports an ldif without defining any schema.
>
> We are evaluating a switch to Apache Directory from UnboundID. When I first
> eval'ed it before using UnboundID, I couldnt get it to work out of the box.
> There were duplicate ldif files in the Apache DS jars.
>
this was most likely due to adding multiple dependencies of ApacheDS where
more than one library packaged the schema files. The solution is not to
add api-ldap-schema-data as a dependency.

>
> Could someone please provide a working sample that starts a ldap server and
> loads from an ldif file? Any help would much appreciated.
>
does this LDIF file contain custom schema attributes?

>
> Thank you
> Naveen
>



-- 
Kiran Ayyagari
http://keydap.com