A small repository for testing out LDAP integrations.
Install the dependencies by running
bundle install in the root directory. Then, populate a sample AD instance with
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.
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: email@example.com
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.
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.