directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anthony Dahanne <>
Subject embedding ApacheDS for tests uisng NIS schema
Date Mon, 17 Dec 2012 22:18:47 GMT
Hello all,
Using ApacheDS for tests, I would like to simulate a scenario where the
user of our software authenticates/authorizes against a directory using the
NIS schema.
I'm using Apache DS 1.5.7 annotations, such as :

@RunWith(value = FrameworkRunner.class)
@CreateDS( allowAnonAccess=true, name="AddIT-class",
    partitions =
                name = "mycompany",
                suffix = "dc=mycompany,dc=com",
                contextEntry = @ContextEntry(
                    entryLdif =
                        "dn: dc=mycompany,dc=com\n" +
                        "dc: mycompany\n" +
                        "objectClass: top\n" +
                        "objectClass: domain\n\n" ),
                indexes =
                    @CreateIndex( attribute = "objectClass" ),
                    @CreateIndex( attribute = "dc" ),
                    @CreateIndex( attribute = "ou" )
                } )
    transports =
        @CreateTransport( protocol = "LDAP" )
@ApplyLdifs( {
    // the users organizationalUnit
    "dn: ou=users,dc=mycompany,dc=com",
    "objectClass: organizationalUnit",
    "objectClass: top",
    "ou: users",
    "description: Users",

    // the groups organizationalUnit
    "dn: ou=groups,dc=mycompany,dc=com",
    "objectClass: organizationalUnit",
    "objectClass: top",
    "ou: groups",
    "description: Groups",

    // operators group
    "dn: cn=operators,ou=groups,dc=mycompany,dc=com",
    "objectClass: groupOfNames",
    "objectClass: top",
    "cn: operators",
    "gidNumber: 43",
    "description: Operators Group",

    // admins group
    "dn: cn=admins,ou=groups,dc=mycompany,dc=com",
    "objectClass: groupOfNames",
    "objectClass: top",
    "cn: admins",
    "gidNumber: 42",
    "description: Operators Group",

See those latest groups, with gidNumber:xxx ?
well , apache ds refuses to create them with the error :
ERR_279 Required attributes [] not found within entry

which is normal because by default the NIS schema is not loaded
I know that I need to set “m-disabled” attribute of the NIS schema to
FALSE; I already did using Apache Directory Studio once.
But how can I , using the annotations configuration, set this property to
false ?
Thanks a lot in advance for your answers !

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