ldapreporter

command module
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2026 License: MIT Imports: 6 Imported by: 0

README

LDAPReporter

The ldapreporter is a tool to query ldap and fetch all groups and their members. The data is output as json.

Usage

./ldapreporter -h
Usage of ./ldapreporter:
  -basedn string
        LDAP base DN. Ex: dc=planetexpress,dc=com (default "dc=planetexpress,dc=com")
  -loglevel string
        Logging level (default "WARN")
  -password string
        LDAP Bind Password. Ex: GoodNewsEveryone
  -searchfilter string
        LDAP search filter (default "(&(objectclass=Group))")
  -server string
        LDAP Server. Ex: ldap://localhost:389
  -user string
        LDAP Bind User. Ex: cn=admin,dc=planetexpress,dc=com
  -version
        version of ldapreporter

Export Format

{"admin_staff":["Hubert J. Farnsworth","Hermes Conrad"],"ship_crew":["Philip J. Fry","Turanga Leela","Bender Bending Rodríguez"]}

Development

Using https://github.com/rroemhild/docker-test-openldap as a local ldap test host. This can be run locally with docker-compose up and is available at ldap://localhost:8389 and ldaps://localhost:8636. You can use make dev to start a development environment that you can run ldapreporter against.

You can use make run to connect to the local ldap instance. Make run uses the following connection details:

$ ./ldapreporter \
  -server "ldap://localhost:8389" \
  -user "cn=admin,dc=planetexpress,dc=com" \
  -password "GoodNewsEveryone" \
  -basedn "dc=planetexpress,dc=com" \
  -searchfilter "(&(objectclass=Group))"
Building

Builds are setup in circleci and will run automatically with a PR

  • If you want to build locally:
make
Testing

Testing is configured to run automatically with a circleci PR.

  • If you want to run them locally:
make test
Releasing

Merge the release please pr. Merging the pr will trigger the release-please action to create a new release.

Documentation

Overview

ldapreporter is a tool to list all of the members of an ldap group 1. connect to ldap server using bind account 2. query to list all groups 3. marshal results from query into json object

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL