π‘οΈ Enterprise Active Directory, LDAP & RBAC
Gubernator provides enterprise-grade identity federation and Role-Based Access Control (RBAC), enabling organization-wide single sign-on (SSO) with Microsoft Active Directory and OpenLDAP, alongside an emergency Local Administrator fallback.
πΈ Visual Showcase
Modern Login Screen & Domain Selector

Security & Active Directory Management Dashboard

π Architecture & Security Model
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β GUBERNATOR WEB UI β
β - Modern Login Screen with Domain / AD Selector β
β - Profile & Role Badge: π Admin | β‘ Ops | ποΈ View β
ββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββ
β (REST /api/auth/login)
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β GUBERNATOR CORE AUTH ENGINE β
β - Local Emergency Admin (admin / admin fallback) β
β - Multi-Server Active Directory / OpenLDAP Dialers β
β - LDAPS (Port 636) & StartTLS (Port 389) Handshake β
β - Dynamic Group DN -> RBAC Role Resolution β
β - Cryptographic HMAC-SHA256 JWT Token Signing β
βββββββββββββββ¬βββββββββββββββββββββββββββββ¬ββββββββββββββ
β β
βΌ βΌ
βββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββ
β Primary Active Directory β β Secondary LDAP Server β
β dc1.corporate.local β β dc2.dr-site.local β
βββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββ
π₯ Role-Based Access Control (RBAC) Matrix
| Capability | π Admin | β‘ Operator | ποΈ Read-Only |
|---|---|---|---|
| Overview Dashboard & Telemetry | β Full | β Full | β Full |
Deploy Stacks (docker-compose.yml) |
β Full | β Full | β Restricted |
| Redeploy & Duplicate Stacks | β Full | β Full | β Restricted |
| Delete Stacks | β Full | β Restricted | β Restricted |
| Task Lifecycle (Start / Stop / Restart) | β Full | β Full | β Restricted |
| Container & Node Terminal Shell | β Full | β Full | β Restricted |
| Centurions Management (Drain / Activate / Leave) | β Full | β Restricted | β Restricted |
| Caddy TLS Lifecycle & Certificate Upload | β Full | β Restricted | β Restricted |
| CoreDNS Forwarders & Custom Records | β Full | β Restricted | β Restricted |
| Active Directory & LDAP Directory Settings | β Full | β Restricted | β Restricted |
| Grafana, Jaeger & Weave Scope Dashboards | β Full | β Full | β Full |
βοΈ Active Directory Configuration Guide
1. Web UI Configuration
Navigate to Seguridad & AD in the sidebar:
1. Click AΓ±adir Servidor AD / LDAP.
2. Configure your server parameters:
- Nombre Descriptivo: Corporate Active Directory
- Host / Puerto: dc1.empresa.local : 636 (LDAPS / TLS) o 389 (StartTLS).
- Base DN (Search Base): DC=empresa,DC=local.
- Service Account Bind DN: CN=svc_gubernator,OU=ServiceAccounts,DC=empresa,DC=local.
- Bind Password: β’β’β’β’β’β’β’β’.
- User Filter: (&(objectClass=user)(sAMAccountName=%s)).
- Mapeo de Grupos a Roles RBAC:
- π Admin Group: CN=Gubernator_Admins,OU=Groups,DC=empresa,DC=local
- β‘ Operator Group: CN=Gubernator_Operators,OU=Groups,DC=empresa,DC=local
- ποΈ Read-Only Group: CN=Gubernator_Viewers,OU=Groups,DC=empresa,DC=local
- Default Role: readonly (asignado si el usuario no pertenece a ningΓΊn grupo especΓfico).
3. Click Test Connection para validar la conectividad TCP, negociaciΓ³n TLS, autenticaciΓ³n del Bind y resoluciΓ³n de atributos de usuario y grupos en tiempo real.
4. Click Guardar.
π REST API Specification
1. List Auth Providers
Response:{
"providers": [
{"id": "local", "name": "Local Administrator", "type": "local"},
{"id": "ad-corp-primary", "name": "Corporate Active Directory", "type": "ldap"}
]
}
2. User Authentication (Login)
POST /api/auth/login
Content-Type: application/json
{
"username": "mario.ezquerro",
"password": "CorporatePassword123!",
"provider": "ad-corp-primary"
}
{
"token": "eyJhbGciOiJIUzI1NiIsIn...",
"user": {
"username": "mario.ezquerro",
"display_name": "Mario Ezquerro",
"email": "mario.ezquerro@empresa.local",
"role": "admin",
"provider": "ldap:ad-corp-primary",
"permissions": {
"can_deploy_stacks": true,
"can_delete_stacks": true,
"can_restart_tasks": true,
"can_delete_tasks": true,
"can_execute_shell": true,
"can_manage_nodes": true,
"can_manage_caddy": true,
"can_manage_coredns": true,
"can_manage_security": true,
"can_view_observability": true
},
"expires_at": "2026-08-18T08:00:00Z"
}
}
3. Verify Active Session
4. LDAP Configuration Management (admin only)
GET /api/auth/ldap: List configured LDAP servers (passwords masked asβ’β’β’β’β’β’β’β’).POST /api/auth/ldap: Create or update LDAP configuration.DELETE /api/auth/ldap/:id: Remove LDAP directory connection.POST /api/auth/ldap/test: Live connection test and diagnostic analyzer.
π Emergency Local Administrator Access
If the Active Directory domain controllers are offline or during disaster recovery, Gubernator always maintains an emergency local administrator account configured via environment variables:
In the login screen, choose Local Administrator (or click "Acceso RΓ‘pido Local") to authenticate immediately without LDAP dependencies.