Pangolin supports two distinct operational modes: Auth Mode (Production) and No-Auth Mode (Development). This guide details how to configure, access, and manage identity in both scenarios.
| Feature | Auth Mode (Default) | No-Auth Mode |
|---|---|---|
| Use Case | Production, Multi-Tenancy, Public Internet | Local Dev, CI/CD, Rapid Prototyping |
| Security | Enforced via JWT Tokens | Disabled (Open Access) |
| Identity | Users must log in; Identity is verified | Requests default to admin; Password checks bypassed |
| Setup | Requires PANGOLIN_JWT_SECRET |
Requires PANGOLIN_NO_AUTH=true |
| Tenant Context | Strict isolation; Users belong to 1 Tenant | Default Tenant used automatically if unspecified |
The Root User is the system superadmin. These credentials are used to bootstrap the system (create the first tenant).
Auth Mode:
# Secure credentials for production
export PANGOLIN_ROOT_USER="super_admin"
export PANGOLIN_ROOT_PASSWORD="Start123!ComplexPassword"
export PANGOLIN_JWT_SECRET="<random-32-char-string>"No-Auth Mode:
# Credentials are ignored, but variables can still be set
export PANGOLIN_NO_AUTH="true"The Management UI adapts its login form based on the detected mode.
- Standard Login (Root): By default, the "Tenant-specific login" checkbox is unchecked.
- Entering just a Username/Password sends a
nullTenant ID. - This triggers the Root Authentication flow (checking
PANGOLIN_ROOT_USER).
- Entering just a Username/Password sends a
- Tenant User Login: Accessing a specific tenant requires:
- Checking the "Tenant-specific login" box.
- Entering the Tenant ID (UUID).
- Entering Username/Password.
- Behavior: Invalid credentials return a 401 error. Session expires when the JWT expires.
- Auto-Detection: The UI detects
NO_AUTHstate on load. - Root Access (Bypass): To view the Root Dashboard (System Admin view), use these specific credentials:
- Username:
root - Password:
root - Note: This is a client-side convenience bypass that gives you full UI access without needing a server token.
- Username:
- Tenant Admin Access: The UI may auto-login as the default admin, or you can use the credentials below.
The Root User's primary job is System bootstrapping. They generally do not query data.
When Pangolin starts in No-Auth Mode (PANGOLIN_NO_AUTH=true), it automatically:
- Creates a default Tenant (
00000000-0000-0000-0000-000000000000). - Creates a default Tenant Admin with:
- Username:
tenant_admin - Password:
password123
- Username:
- Allows Anonymous API Access: Requests with no Authorization header are automatically treated as this
tenant_admin.
Via API (cURL):
# Auth Mode: Must provide correct password & null tenant-id
curl -X POST http://localhost:8080/api/v1/users/login \
-d '{"username":"super_admin", "password":"...", "tenant-id":null}'Only the Root user can create tenants.
1. Create Tenant:
# Requires Root Token
POST /api/v1/tenants
{
"name": "acme-corp"
}
# Response: Returns { "id": "uuid-for-acme", ... }2. Create Tenant Admin:
# Requires Root Token
# Note: You are creating a user *inside* the new tenant
POST /api/v1/users
{
"username": "acme_admin",
"password": "temporary_password",
"tenant_id": "uuid-for-acme", # Critical: Links user to tenant
"role": "TenantAdmin"
}Authentication tokens (JWTs) act as your API keys for all operations.
Endpoint: POST /api/v1/tokens (Requires Admin privileges) or POST /api/v1/users/login (Self-service).
Payload:
{
"username": "data_engineer",
"password": "secure_password",
"tenant_id": "uuid-for-acme"
}Response:
{
"token": "eyJhbGciOiJIUzI1Ni...",
"expires_in": 86400,
"tenant_id": "uuid-for-acme"
}Pass it in the HTTP Header:
Authorization: Bearer eyJhbGciOiJIUzI1Ni...Pangolin employs a strict hierarchy. Here is what each user type can access.
| Resource | Root User | Tenant Admin | Tenant User |
|---|---|---|---|
| Manage Tenants | ✅ Create/Delete | ❌ No Access | ❌ No Access |
| Manage Users | ✅ (Global) | ✅ (Own Tenant Only) | ❌ No Access |
| Create Warehouses | ❌ (Out of Scope) | ✅ Full Control | ❌ No Access |
| Create Catalogs | ❌ (Out of Scope) | ✅ Full Control | ❌ No Access |
| Manage Roles | ❌ (Out of Scope) | ✅ Full Control | ❌ No Access |
| Query Data | ❌ No Access* | ✅ Full Access | |
| View Audit Logs | ✅ (System Wide) | ✅ (Own Tenant Only) | ❌ No Access |
*Note on Root Data Access: By design, the Root user cannot query data (tables/views) directly. They must authenticate as a Tenant Admin or specific User to modify actual data. This enforcement ensures "System Administrators" cannot casually browse sensitive data "Business Data".
A standard Tenant User starts with ZERO permissions. They cannot see Catalogs or query Tables until granted a Role:
- Reader Role: Can
SELECTfrom tables. - Writer Role: Can
INSERT/UPDATE/DELETE. - Discovery Role: Can search for assets but not query contents.
See Permissions Management for how to assign these granular rights.