https://github.com/derektamsen/ldapreporter
LDAP group membership reporting tool
https://github.com/derektamsen/ldapreporter
golang ldap ldapsearch
Last synced: 5 months ago
JSON representation
LDAP group membership reporting tool
- Host: GitHub
- URL: https://github.com/derektamsen/ldapreporter
- Owner: derektamsen
- License: mit
- Created: 2020-02-08T02:09:38.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2025-11-20T04:07:01.000Z (8 months ago)
- Last Synced: 2025-11-20T06:06:54.736Z (8 months ago)
- Topics: golang, ldap, ldapsearch
- Language: Go
- Size: 122 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# LDAPReporter
The `ldapreporter` is a tool to query ldap and fetch all groups and their members. The data is output as json.
## Usage
```shell
./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
```shell
{"admin_staff":["Hubert J. Farnsworth","Hermes Conrad"],"ship_crew":["Philip J. Fry","Turanga Leela","Bender Bending Rodríguez"]}
```
## Development
Using 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:
```shell
$ ./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:
```shell
make
```
### Testing
Testing is configured to run automatically with a circleci PR.
- If you want to run them locally:
```shell
make test
```
### Releasing
Merge the release please pr. Merging the pr will trigger the [release-please action](https://github.com/googleapis/release-please-action) to create a new release.