A small repository for testing out LDAP integrations
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
config
lib
test
.gitignore
.rubocop.yml
.travis.yml
Gemfile
README.md
Rakefile

README.md

LDAP Playground

Build Status

A small repository for testing out LDAP integrations.

Getting started

Install the dependencies by running bundle install in the root directory. Then, populate a sample AD instance with bin/populate.

Start the LDAP server with bin/server. This will start a new LDAP server on localhost:1389. You can then scrape the new server by running bin/scrape from the root directory.

Data store

By default, the LDAP server pulls in its data from the config/data_store.yml file. You can edit this file while the server is not running to have it boot in that state.

You can use basic LDAP command line tools to manipulate the data store while the server is running. An example using ldapadd looks like:

$ ldapadd -x -H ldap://127.0.0.1:1389/
dn: cn=Fred Flintstone,dc=example,dc=com
cn: Fred Flintstone
sn: Flintstone
mail: fred@bedrock.org

An example using ldapsearch looks like:

$ ldapsearch -x -H ldap://127.0.0.1:1389/ -b "dc=example,dc=com" -s base "(objectclass=*)"

You can also use tools like Apache Directory Studio to connect to the running LDAP server and view/manipulate its contents using that UI.

When you quit the server process, it will write out the current value of its data store to the config/data_store.yml file in YAML format. In this way you can see your progress from the previous run.

Scraping

By default, the scraper will read from the config/scraper_config.yml file. This contains some basic metadata about the LDAP server to which to connect, as well as a hash of attributes.

The attribute keys represent attributes stored in the LDAP server. The attribute values represent attributes stored in the mapped result. The scraper will search the LDAP server for the respective attributes and output the found results.