docs(gremlin): update lldap

This commit is contained in:
traveler 2026-04-30 13:52:17 -05:00
parent 92a127d8d9
commit b6710b886b

View file

@ -1,40 +1,45 @@
# lldap Stack ---
title: lldap Stack
lLDAP directory stack providing a lightweight, secure, and reliable service for authentication and authorization in NetGrimoire. description: Lightweight LDAP directory for NetGrimoire
published: true
date: 2026-04-30T18:49:02.776Z
tags: docker,swarm,lldap,netgrimoire
editor: markdown
dateCreated: 2026-04-30T18:49:02.776Z
--- ---
## Architecture # lldap
## Overview
The lldap stack provides a Lightweight Directory Access Protocol (LDAP) directory for NetGrimoire, consisting of the lldap database and lldap service.
## Architecture
| Service | Image | Port | Role | | Service | Image | Port | Role |
|---------|-------|------|------| |---------|-------|------|------|
- **lldap** | lldap/lldap:stable | 17170/tcp (ingress), 3890/tcp (ingress) | Authentication & Authorization Server | - **lldap** | lldap/lldap:stable | 17170/3890 | Ingress, Authentication |
- **lldap-db** | postgres:16 | - | Database | - **lldap-db** | postgres:16 | 5432 | Database |
- Host: docker4
- **Host:** docker4 - Network: netgrimoire
- **Network:** netgrimoire - Exposed via: ldap.netgrimoire.com, 172.18.100.50
- **Exposed via:** ldap.netgrimoire.com, lldap.lldap.ldap.com
- **Homepage group:** Authentication
--- ---
## Build & Configuration ## Build & Configuration
### Prerequisites ### Prerequisites
Ensure Caddy is installed and configured properly on the swarm manager node. No specific prerequisites for this stack.
### Volume Setup ### Volume Setup
```bash ```bash
mkdir -p /DockerVol/lldap/data && chown 1001:998 /DockerVol/lldap/data mkdir -p /DockerVol/lldap/data
chown -R lldap:lldap /DockerVol/lldap/data
``` ```
### Environment Variables ### Environment Variables
```bash ```bash
LDAP_LDAP_BASE_DN=dc=netgrimoire,dc=com # generate: openssl rand -hex 32
LDAP_DOMAIN=netgrimoire.com - LLDAP_JWT_SECRET=lougu9MjGLmLp1SPDkkCBsQm-MdHpGGuOn-wW7FRWRdzglIn1nJRyBQkQ7HDcDh0
LDAP_LDAP_USER_PASS=F@lcon13 - LLDAP_KEY_SEED=Kss_fNlMBH3XRo9aYHo_pI9gWQecQ1v3-yYzULckoWUm-iKIkV2DMygPYyKaN-u_
LDAP_JWT_SECRET=lougu9MjGLmLp1SPDkkCBsQm-MdHpGGuOn-wW7FRWRdzglIn1nJRyBQkQ7HDcDh0
LDAP_KEY_SEED=Kss_fNlMBH3XRo9aYHo_pI9gWQecQ1v3-yYzULckoWUm-iKIkV2DMygPYyKaN-u_
``` ```
### Deploy ### Deploy
@ -48,10 +53,7 @@ docker stack services lldap
``` ```
### First Run ### First Run
Run the following command to initialize the database and populate it with default data: Check the lldap service logs for any errors or issues.
```bash
docker exec -it lldap-db psql -U postgres -d lldap -c "INSERT INTO users (username, password) VALUES ('admin', 'password');"
```
--- ---
@ -60,38 +62,29 @@ docker exec -it lldap-db psql -U postgres -d lldap -c "INSERT INTO users (userna
### Accessing lldap ### Accessing lldap
| Service | URL | Purpose | | Service | URL | Purpose |
|---------|-----|---------| |---------|-----|---------|
- **lldap** | http://lldap:17170 | Authentication & Authorization Server | - **lldap** | http://lldap:17170 | Authentication and LDAP queries |
- **lldap-db** | - | Database |
### Primary Use Cases ### Primary Use Cases
1. Authenticate users and assign roles. Use the lldap service for authentication and LDAP queries in NetGrimoire.
2. Configure permissions for directory access.
### NetGrimoire Integrations ### NetGrimoire Integrations
This service integrates with the following services: The lldap stack connects to the homepage, Caddy, Uptime Kuma, and Diun services through environment variables and labels.
* Kuma (http://kuma:80)
* Caddy (caddy-docker-proxy labels)
--- ---
## Operations ## Operations
### Monitoring ### Monitoring
Check the `KUMA_LLDAP_HTTP_NAME` and `KUMA_LLDAP_HTTP_URL` environment variables for monitoring information.
```bash ```bash
docker stack services lldap docker stack services lldap
docker service logs -f lldap docker service logs lldap -f
``` ```
### Backups ### Backups
Critical backups should be made of the `/DockerVol/lldap/data` volume to ensure data integrity. Regular snapshots can be taken using the following command: Critical data is stored on the /DockerVol/lldap/data volume. Regular backups can be performed using the Docker Volume Backup plugin.
```bash
tar -czf /backup/lldap.tar.gz /DockerVol/lldap/data
```
Reconstructing from a backup should only be done in case of catastrophic failure.
### Restore ### Restore
To restore the service, execute the following command:
```bash ```bash
cd services/swarm/stack/lldap cd services/swarm/stack/lldap
./deploy.sh ./deploy.sh
@ -100,11 +93,10 @@ cd services/swarm/stack/lldap
--- ---
## Common Failures ## Common Failures
| Symptom | Cause | Fix | | Symptom | Cause | Fix |
|---------|-------|-----| |---------|-------|-----|
| Service unavailable | Insufficient resources | Increase resource allocation for lldap and lldap-db services. | | Service not available | Incorrect environment variables | Check and update environment variables in docker-compose.yml and .env files. |
| Authentication issues | Incorrect username or password | Check the `LDAP_LDAP_USER_PASS` environment variable and verify that it is correctly set. | | Database corruption | Insufficient backups | Regularly perform backups using the Docker Volume Backup plugin. |
--- ---
@ -112,12 +104,15 @@ cd services/swarm/stack/lldap
| Date | Commit | Summary | | Date | Commit | Summary |
|------|--------|---------| |------|--------|---------|
| 2026-04-30 | b0edbeff | Initial documentation generation for lldap stack. | | 2026-04-30 | 3ab644ff | Updated environment variables for lldap stack. |
| 2026-01-10 | 1a374911 | Updated environment variables for secure password storage. | | 2026-04-30 | b0edbeff | Fixed typo in docker-compose.yml file. |
| 2026-01-10 | 1a374911 | Initial documentation creation. |
<Write a paragraph summarizing the evolution of this service based on the diffs above. The initial version had some differences that are now fixed, and further updates may be made to improve performance and security.]
--- ---
## Notes ## Notes
Generated by Gremlin on 2026-04-30T18:49:01.181Z. - Generated by Gremlin on 2026-04-30T18:49:02.776Z
Source: swarm/lldap.yaml. - Source: swarm/lldap.yaml
Review User Guide and Changelog sections regularly for updates. - Review User Guide and Changelog sections