forked from apache/airflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9c60b19
commit 1a66df4
Showing
11 changed files
with
106 additions
and
18 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
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
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
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,16 @@ | ||
#!/usr/bin/env bash | ||
|
||
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) | ||
LDAP_DB=/tmp/ldap_db | ||
|
||
echo "Creating database directory" | ||
|
||
rm -rf ${LDAP_DB} && mkdir ${LDAP_DB} && cp /usr/share/doc/slapd/examples/DB_CONFIG ${LDAP_DB} | ||
|
||
echo "Launching OpenLDAP ..." | ||
|
||
# Start slapd with non root privileges | ||
slapd -h "ldap://127.0.0.1:3890/" -f ${DIR}/slapd.conf | ||
|
||
# Wait for LDAP to start | ||
sleep 1 |
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,6 @@ | ||
dn: dc=example,dc=com | ||
dc: example | ||
description: LDAP Example | ||
objectClass: dcObject | ||
objectClass: organization | ||
o: example |
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,3 @@ | ||
dn: cn=Manager,dc=example,dc=com | ||
cn: Manager | ||
objectClass: organizationalRole |
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,5 @@ | ||
dn: uid=user1,dc=example,dc=com | ||
objectClass: account | ||
objectClass: simpleSecurityObject | ||
uid: user1 | ||
userPassword: user1 |
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 @@ | ||
#!/usr/bin/env bash | ||
|
||
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) | ||
FIXTURES_DIR="$DIR/ldif" | ||
|
||
load_fixture () { | ||
ldapadd -x -H ldap://127.0.0.1:3890/ -D "cn=Manager,dc=example,dc=com" -w insecure -f $1 | ||
} | ||
|
||
for FIXTURE in `ls ${FIXTURES_DIR}` | ||
do | ||
load_fixture "${FIXTURES_DIR}/${FIXTURE}" | ||
done; |
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,44 @@ | ||
## | ||
# Global Directives | ||
## | ||
|
||
# Schema and objectClass definitions | ||
include /etc/ldap/schema/core.schema | ||
include /etc/ldap/schema/cosine.schema | ||
include /etc/ldap/schema/nis.schema | ||
include /etc/ldap/schema/inetorgperson.schema | ||
|
||
moduleload back_hdb | ||
|
||
disallow bind_anon | ||
|
||
## | ||
# Test DB | ||
## | ||
|
||
database hdb | ||
|
||
suffix "dc=example,dc=com" | ||
|
||
rootdn "cn=Manager,dc=example,dc=com" | ||
rootpw insecure | ||
|
||
# The database directory MUST exist prior to running slapd AND | ||
# change path as necessary | ||
directory /tmp/ldap_db/ | ||
|
||
## | ||
# ACL | ||
## | ||
|
||
# The userPassword by default can be changed | ||
# by the entry owning it if they are authenticated. | ||
# Others should not be able to see it, except the | ||
# admin entry below | ||
# These access lines apply to database #1 only | ||
access to attrs=userPassword | ||
by self write | ||
by anonymous auth | ||
by users none | ||
|
||
access to * by * read |
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
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