Skip to content
This repository has been archived by the owner on Dec 17, 2023. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:grove-mountain/docker-ldap-server
Browse files Browse the repository at this point in the history
  • Loading branch information
grove-mountain committed Jul 17, 2020
2 parents 1ca654f + 30d5301 commit 0f8f519
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,58 @@
# LDAP Docker Server for local LDAP development

This is a basic extension of: https://github.com/osixia/docker-openldap
This is a basic extension of [https://github.com/osixia/docker-openldap](https://github.com/osixia/docker-openldap)

This is a quick and dirty localized LDAP server for using in demonstrations. One of the nicer benefits of using the OTS OpenLDAP server is that it automatically sets up the memberOf overlay. This can help you troubleshoot LDAP connectivity issues customers may be having.

For the most part, you really don't have to do anything.

BE CAREFUL OPENING THIS TO THE WORLD! It's designed for local development and shouldn't be a vector for attack, but be careful as the passwords are published on the internet.
BE CAREFUL OPENING THIS TO THE WORLD! It's designed for local development and shouldn't be a vector for attack, but be careful as the passwords are published on the internet.

## Run it

To run the tool using Docker directly, use launch_ldap.sh
```

``` bash
./launch_ldap.sh
```

When you're done just kill docker:
```

``` bash
docker kill openldap
```

## Customize it

This repo ships with some pre-canned LDIF files to bootstrap the server when it comes up. You can customize this by editing the *ldif_feed.yaml* file and running:

```
``` bash
./create_ldif.sh
```

Alternately, you can just create another LDIF feed file and set the LDIF_FEED environment variable

```
``` bash
LDIF_FEED=ourcorp_ldif_feed.yaml
./create_ldif.sh
```

Make sure that the LDAP_DOMAIN and LDAP_HOSTNAME environment variables match your new environment as well.
```

``` bash
LDAP_DOMAIN=ourcorp.com
LDAP_HOSTNAME=ldap.ourcorp.com
./launch_ldap.sh
```

## Test it

The passwords below are defaults sourced form the env.sh file, feel free to customize however you'd like.
The passwords below are defaults sourced form the env.sh file, feel free to customize however you'd like.

Example ldapsearch
Get all the things:
```

``` bash
# It's from a mac, add Windows instructions please!
export IP_ADDRESS=$(ipconfig getifaddr en0)

Expand All @@ -56,7 +61,8 @@ ldapsearch -x -H ldap://${IP_ADDRESS} -b dc=ourcorp,dc=com \
```

Search for any user DNs that belong to cn=solutions_engineers,ou=group,dc=ourcorp,dc=com using memberOf overlay
```

``` bash
ldapsearch -LLL -x -H ldap://${IP_ADDRESS} -b dc=ourcorp,dc=com \
-D "cn=read-only,dc=ourcorp,dc=com" -w ${LDAP_READONLY_USER_PASSWORD} \
'(memberOf=cn=rockstars,ou=um_group,dc=ourcorp,dc=com)' dn
Expand Down

0 comments on commit 0f8f519

Please sign in to comment.