Back to index

moin  1.9.0~rc2
ldap_testdata.py
Go to the documentation of this file.
00001 BASEDN = "ou=testing,dc=example,dc=org"
00002 ROOTDN = "cn=root,%s" % BASEDN
00003 ROOTPW = "secret"
00004 
00005 SLAPD_CONFIG = """\
00006 # See slapd.conf(5) for details on configuration options.
00007 
00008 include              %(schema_dir)s/core.schema
00009 include              %(schema_dir)s/cosine.schema
00010 include              %(schema_dir)s/inetorgperson.schema
00011 #include      %(schema_dir)s/misc.schema
00012 
00013 moduleload    back_bdb.la
00014 
00015 threads 2
00016 
00017 # Global access control ###############################################
00018 
00019 # Root DSE: allow anyone to read it
00020 access to dn.base="" by * read
00021 # Subschema (sub)entry DSE: allow anyone to read it
00022 access to dn.base="cn=Subschema" by * read
00023 
00024 # we don't need restrictive ACLs for tests:
00025 access to * by * read
00026 
00027 allow bind_anon_dn
00028 
00029 # Test-Datenbank ou=testing,dc=example,dc=org ################
00030 
00031 database      bdb
00032 
00033 directory     %(ldap_db_dir)s
00034 suffix        "%(basedn)s"
00035 rootdn        "%(rootdn)s"
00036 rootpw        %(rootpw)s
00037 lastmod              on
00038 
00039 index         uid eq
00040 
00041 checkpoint 200 5
00042 
00043 # Entries to cache in memory
00044 cachesize 500
00045 # Search results to cache in memory
00046 idlcachesize 50
00047 
00048 sizelimit     -1
00049 """
00050 
00051 LDIF_CONTENT = """\
00052 ########################################################################
00053 # regression testing
00054 ########################################################################
00055 version: 1
00056 
00057 dn: ou=testing,dc=example,dc=org
00058 objectClass: organizationalUnit
00059 ou: testing
00060 
00061 dn: ou=Groups,ou=testing,dc=example,dc=org
00062 objectClass: organizationalUnit
00063 ou: Groups
00064 
00065 dn: ou=Users,ou=testing,dc=example,dc=org
00066 objectClass: organizationalUnit
00067 ou: Users
00068 
00069 dn: ou=Unit A,ou=Users,ou=testing,dc=example,dc=org
00070 objectClass: organizationalUnit
00071 ou: Unit A
00072 
00073 dn: ou=Unit B,ou=Users,ou=testing,dc=example,dc=org
00074 objectClass: organizationalUnit
00075 ou: Unit B
00076 
00077 dn: uid=usera,ou=Unit A,ou=Users,ou=testing,dc=example,dc=org
00078 objectClass: account
00079 objectClass: simpleSecurityObject
00080 uid: usera
00081 # this is md5 encoded 'usera' for password
00082 userPassword: {MD5}aXqgOSc5gSW7YoLi9BSmvg==
00083 
00084 dn: uid=userb,ou=Unit B,ou=Users,ou=testing,dc=example,dc=org
00085 cn: Vorname Nachname
00086 objectClass: inetOrgPerson
00087 sn: Nachname
00088 uid: userb
00089 # this is md5 encoded 'userb' for password
00090 userPassword: {MD5}ThvfQsM7OQFjqSUQOX2XsA==
00091 
00092 dn: cn=Group A,ou=Groups,ou=testing,dc=example,dc=org
00093 cn: Group A
00094 member: cn=dummy
00095 member: uid=usera,ou=Unit A,ou=Users,ou=testing,dc=example,dc=org
00096 objectClass: groupOfNames
00097 
00098 dn: cn=Group B,ou=Groups,ou=testing,dc=example,dc=org
00099 cn: Group B
00100 objectClass: groupOfUniqueNames
00101 uniqueMember: cn=dummy
00102 uniqueMember: uid=userb,ou=Unit B,ou=Users,ou=testing,dc=example,dc=org
00103 
00104 dn: cn=Group C,ou=Groups,ou=testing,dc=example,dc=org
00105 cn: Group C
00106 description: Nested group!
00107 member: cn=dummy
00108 member: cn=Group A,ou=Groups,ou=testing,dc=example,dc=org
00109 objectClass: groupOfNames
00110 """
00111