-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enh(389ds): add ldap container with test data
Signed-off-by: Arthur Schiwon <[email protected]>
- Loading branch information
Showing
3 changed files
with
107 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM quay.io/389ds/dirsrv:latest | ||
|
||
ENV DS_DM_PASSWORD admin | ||
ENV DS_SUFFIX_NAME dc=idptestbed | ||
|
||
ADD conf/* /var/opt/ | ||
|
||
RUN rm -Rf /data/* | ||
RUN /usr/libexec/dirsrv/dscontainer -r & \ | ||
sleep 60; \ | ||
WAIT_TIME=60; \ | ||
while : ; do \ | ||
if /usr/libexec/dirsrv/dscontainer -H; then \ | ||
break; \ | ||
fi; \ | ||
sleep 5; \ | ||
WAIT_TIME=$((WAIT_TIME + 5)); \ | ||
if [ ${WAIT_TIME} -gt 180 ]; then \ | ||
echo "dirsrv not ready – giving up checking after 3min"; \ | ||
exit 3 ;\ | ||
fi; \ | ||
done; \ | ||
dsconf localhost backend create --suffix dc=idptestbed --be-name ci_root; \ | ||
mv /var/opt/98nextcloud-schema.ldif /etc/dirsrv/slapd-localhost/schema/; \ | ||
dsconf localhost schema reload; \ | ||
dsconf localhost backend import "dc=idptestbed" /var/opt/entries.ldif; \ | ||
rm /var/opt/entries.ldif; | ||
|
||
EXPOSE 3389 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
dn: cn=schema | ||
objectClass: top | ||
objectClass: ldapSubentry | ||
objectClass: subschema | ||
cn: schema | ||
aci: (target="ldap:///cn=schema")(targetattr !="aci")(version 3.0;acl "anonymous, no acis"; allow (read, search, compare) userdn = "ldap:///anyone";) | ||
modifiersName: cn=Directory Manager | ||
modifyTimestamp: 20230412120423Z | ||
objectClasses: ( 1.3.6.1.4.1.49213.1.2.1 NAME 'nextcloudUser' AUXILIARY MUST cn MAY (nextcloudEnabled $ nextcloudQuota ) X-ORIGIN 'user defined' ) | ||
objectClasses: ( 1.3.6.1.4.1.49213.1.2.2 NAME 'nextcloudGroup' AUXILIARY MUST cn MAY nextcloudEnabled X-ORIGIN 'user defined' ) | ||
attributeTypes: ( 1.3.6.1.4.1.49213.1.1.1 NAME 'nextcloudEnabled' DESC 'whether user or group should be available in Nextcloud' SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE X-ORIGIN 'user defined' ) | ||
attributeTypes: ( 1.3.6.1.4.1.49213.1.1.2 NAME 'nextcloudQuota' DESC 'defines how much disk space is available for the user (e.g. 2 GB)' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'user defined' ) | ||
nsSchemaCSN: 64369e47000000000000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
|
||
dn: dc=idptestbed | ||
objectClass: top | ||
objectClass: domain | ||
dc: idptestbed | ||
description: dc=idptestbed | ||
aci: (targetattr = *) (targetfilter = "(objectclass=*)") (version 3.0; acl "Any read"; allow (search, read, compare) (userdn = "ldap:///anyone" );) | ||
|
||
dn: cn=admin,dc=idptestbed | ||
objectClass: simpleSecurityObject | ||
objectClass: organizationalRole | ||
cn: admin | ||
userPassword: password | ||
description: LDAP administrator | ||
|
||
dn: ou=Groups,dc=idptestbed | ||
objectClass: top | ||
objectClass: organizationalunit | ||
ou: Groups | ||
|
||
dn: ou=People,dc=idptestbed | ||
objectClass: top | ||
objectClass: organizationalunit | ||
ou: People | ||
|
||
dn: uid=student1,ou=People,dc=idptestbed | ||
objectClass: organizationalPerson | ||
objectClass: person | ||
objectClass: top | ||
objectClass: inetOrgPerson | ||
objectClass: nextcloudUser | ||
givenName: Stud | ||
uid: student1 | ||
sn: Ent | ||
cn: Stud Ent | ||
mail: [email protected] | ||
userPassword: password | ||
nextcloudQuota: 200 MB | ||
|
||
dn: uid=student2,ou=People,dc=idptestbed | ||
objectClass: organizationalPerson | ||
objectClass: person | ||
objectClass: top | ||
objectClass: inetOrgPerson | ||
objectClass: nextcloudUser | ||
givenName: Stud | ||
uid: student2 | ||
sn: Ent2 | ||
cn: Stud Ent2 | ||
mail: [email protected] | ||
userPassword: password | ||
nextcloudQuota: 1 GB | ||
|
||
dn: uid=staff1,ou=People,dc=idptestbed | ||
objectClass: organizationalPerson | ||
objectClass: person | ||
objectClass: top | ||
objectClass: inetOrgPerson | ||
objectClass: nextcloudUser | ||
givenName: St | ||
uid: staff1 | ||
sn: aff | ||
cn: St aff | ||
mail: [email protected] | ||
userPassword: password |