Skip to content

lugatuic/goberus

Repository files navigation

Goberus

License: GPL v3

A minimal LDAP-backed service that exposes member lookup and provisioning workflows via /v1/member.

Status

  • GET /livez — liveness endpoint (always returns 200 OK with {"status":"ok"})
  • GET /readyz — readiness endpoint (returns 200 if LDAP is reachable, 503 otherwise)
  • GET /v1/member?username=<value> — resolves a user by UPN or sAMAccountName and returns normalized attributes via server.UserClient backed by ldaps.Client in production and fakes in tests.
  • POST /v1/member — sanitizes the JSON payload (trim + lowercase for username/OrganizationalUnit) with handlers.SanitizeUser before invoking ldaps.Client.AddUser.
  • DELETE /v1/member — TODO: expose member removal once LDAP delete semantics and authorization are finalized.
  • PATCH /v1/member — TODO: introduce attribute updates once LDAP modify flows are defined.

Development & testing

See docs/dev-setup.md for the quick-start instructions, environment variables, Docker guidance, troubleshooting tips, and the testing commands (go test ./...).

Next steps

See TODO.md for a complete list of planned features and improvements.

Key upcoming features:

  • Implement DELETE /v1/member and PATCH /v1/member endpoints
  • Add API authentication and rate limiting
  • Publish as GitHub package (deferred until DELETE and PATCH are complete)
  • Implement connection pooling/reconnect semantics

Project layout

.
├── cmd/
│   └── goberus/         # application entrypoint and process lifecycle
├── config/              # configuration loading and validation
├── internal/
│   └── httpserver/      # server composition, route wiring, JSON helpers
├── ldaps/               # LDAP client, models, helpers
├── middleware/          # HTTP middleware (RequestID, Recover, Logger)
├── server/              # HTTP handlers and server-facing types
├── handlers/            # auxiliary handler helpers used in tests/CLI
├── tests/
│   └── integration/     # end-to-end integration tests with Samba AD
├── docs/                # developer and operational documentation
├── ADR/                 # Architecture Decision Records
├── docker-compose.yml   # local test environment (Samba AD + Goberus)
├── Dockerfile
├── Makefile
└── README.md

License

Goberus is open-source software distributed under the terms of the GNU General Public License v3. See LICENSE for the full text and warranty disclaimer.

About

A port of cerberus written in Go.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •