Skip to content

πŸ›‘οΈ 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

Login Screen

Security & Active Directory Management Dashboard

Security & AD Management


πŸ› 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

GET /api/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"
}
Response:
{
  "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

GET /api/auth/me
Authorization: Bearer <jwt-token>

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:

export GBNT_WEB_USER="admin"
export GBNT_WEB_PASSWORD="YourStrongLocalPassword"

In the login screen, choose Local Administrator (or click "Acceso RΓ‘pido Local") to authenticate immediately without LDAP dependencies.