This project is a ChatOps-style system for managing an LDAP server through two interfaces:
- A Telegram bot for basic user and group management via commands.
- A Spring Boot web application (backend) for a graphical interface.
Both services communicate with an OpenLDAP server deployed via Docker.
All components run in Docker containers and are orchestrated using docker-compose.
| Service | Description | Port |
|---|---|---|
openldap |
LDAP server (Bitnami OpenLDAP image) | 1389 |
phpldapadmin |
GUI for LDAP inspection and testing | 8081 |
backend |
Java Spring Boot web app to manage LDAP | 8080 |
bot |
Telegram bot that provides ChatOps LDAP commands | 5000 |
nginx |
Reverse proxy for backend and bot services |
80 |
/list_users— list all users/add_user <uid> <password> [cn]— add a new LDAP user/del_user <uid>— delete a user from LDAP/set_role <uid> <group>— assign a user to a group
-
User-friendly web interface to:
- View LDAP users
- Add/remove users
- Assign roles
- Authenticate with LDAP
BOT_TOKEN=your_telegram_bot_token
LDAP_HOST=openldap
LDAP_PORT=1389
LDAP_ADMIN_DN=cn=admin,dc=example,dc=org
LDAP_ADMIN_PASSWORD=adminpassword
LDAP_BASE_DN=dc=example,dc=orgMake sure this file is named
.envand is mounted into thebotcontainer.
git clone
cd chatops-ldap/infracp ../bot/.env.example ../bot/.env
# Then edit with your actual Telegram bot tokencd infra
docker-compose up --buildWait until services are up. The bot will connect to Telegram, and backend will connect to LDAP.
- Telegram bot
- LDAP web interface (PHP LDAP Admin) — http://localhost:8081
- Backend app — http://localhost:8080
- Nginx entrypoint (if configured) — http://localhost
- 🐍 Python 3.9 + Aiogram (Telegram bot)
- ☕ Java 23 + Spring Boot (backend)
- 📦 OpenLDAP (Bitnami)
- 🔸 PHP LDAP Admin
- 🐳 Docker & Docker Compose
- 🔐 LDAP3 Python library
.
├── backend/ # Java Spring Boot app
├── bot/ # Telegram bot (Python)
├── infra/ # docker-compose, nginx, and LDAP schemas
│ └── docker-compose.yml
│ └── ldap/ldap.schema.ldif
│ └── nginx/nginx.conf
├── README.md
├── LICENSE
Make sure the bot is started and /started by you before using the following:
/list_users— show LDAP users/add_user john secret123 John Smith/del_user john
-
If the bot shows
invalidCredentials, verify that:LDAP_ADMIN_DNmatches your OpenLDAP config (cn=admin,dc=example,dc=org)adminpasswordmatches the one indocker-compose.yml
-
If
localhost:8080is unavailable, check logs with:
docker logs chatops-backendMIT License. See LICENSE file for more details.