Authentication
Built-in username/password authentication with role-based access control. No external identity provider required.
Overview
KubeBolt ships with a built-in auth system that supports three roles: Admin, Editor, and Viewer. Auth is enabled by default and uses BoltDB for user storage — no external database needed. Sessions use a short-lived JWT access token plus a refresh token in an httpOnly cookie.
The open-source edition authenticates with local usernames and passwords only — there is no OIDC, OAuth or SSO login. Users belong to a single default team. OAuth sign-in, organizations and teams are part of KubeBolt Cloud. For machine access, use API tokens.
First boot: A default admin user is seeded automatically on first startup. The generated password is printed once to the server logs and, when KubeBolt runs in-cluster, persisted to a Secret in its own namespace (kubebolt-admin-password, key password). An existing Secret of that name is never overwritten — if you manage the password yourself via auth.existingSecret, KubeBolt leaves it alone. Change the password after first login, and see Forgotten admin password if you never caught either copy.
Roles
KubeBolt enforces three roles with increasing levels of access:
| Action | Viewer | Editor | Admin |
|---|---|---|---|
| View resources, metrics, topology, insights | Yes | Yes | Yes |
| View pod logs | Yes | Yes | Yes |
| Chat with Kobi Copilot | Yes | Yes | Yes |
| Execute a Kobi proposal | No | Yes | Yes |
| Pod terminal (exec) | No | Yes | Yes |
| Edit YAML / Apply changes | No | Yes | Yes |
| Restart / Scale / roll back workloads, cordon, evict | No | Yes | Yes |
| Mute an insight | No | Yes | Yes |
| Port forwarding | No | Yes | Yes |
| Delete resources | No | No | Yes |
| Drain a node | No | No | Yes |
| Switch clusters | Yes | Yes | Yes |
| Add / rename / delete clusters | No | No | Yes |
| Manage users, API tokens and agent tokens | No | No | Yes |
| Change settings (auth, AI, notifications, insight rules) | No | No | Yes |
Read the audit trail (GET /api/v1/admin/actions) | No | No | Yes |
See Actions & Governance for the full action list and the role each one needs.
Session Management
- On login the API returns a JWT access token, which the UI keeps in memory (never in localStorage) and sends as
Authorization: Bearer - The refresh token lives in the
kb_refreshhttpOnly,SameSite=Strictcookie, is stored hashed server-side and rotates on every refresh - Expiry is configurable:
KUBEBOLT_JWT_EXPIRY(access, default15m) andKUBEBOLT_JWT_REFRESH_EXPIRY(refresh, default168h, 7 days) - Tokens are validated on every API request via auth middleware
- Logout invalidates the refresh token server-side and clears the cookie
Storage
User accounts are stored in a local BoltDB file. By default, the database is written to ./data/kubebolt.db. Use the KUBEBOLT_DATA_DIR environment variable to customize the storage path. In Kubernetes deployments, mount a PersistentVolume to this path for durability.
Environment Variables
| Variable | Default | Description |
|---|---|---|
KUBEBOLT_AUTH_ENABLED | true | Enable or disable authentication. Set to false to allow anonymous access. |
KUBEBOLT_ADMIN_PASSWORD | auto-generated | Override the default admin password on first boot. Ignored if admin user already exists. |
KUBEBOLT_JWT_SECRET | auto-generated | Secret key for signing JWT tokens, at least 32 bytes. Auto-generated and persisted in BoltDB if not set. It also derives the key that encrypts provider keys saved from the UI. |
KUBEBOLT_JWT_EXPIRY | 15m | Access-token lifetime. |
KUBEBOLT_JWT_REFRESH_EXPIRY | 168h | Refresh-token lifetime. |
KUBEBOLT_DATA_DIR | ./data | Directory for BoltDB storage file. |
KUBEBOLT_RESET_ADMIN_PASSWORD | unset | Recovery hatch: when set, the API resets the admin password to this value at startup and then boots normally. The chart sets it from auth.resetAdminPassword. Clear it once you have logged in. |
Helm Configuration
When deploying via Helm, configure auth through values:
# values.yaml
auth:
enabled: true
adminPassword: "my-secure-password"
# Or use an existing Kubernetes secret
auth:
enabled: true
existingSecret: "kubebolt-auth-secret"
# Secret must contain keys: admin-password, jwt-secret
# Install with inline password
helm install kubebolt \
oci://ghcr.io/clm-cloud-solutions/kubebolt/helm/kubebolt \
--set auth.adminPassword="my-secure-password"
# Install with existing secret
helm install kubebolt \
oci://ghcr.io/clm-cloud-solutions/kubebolt/helm/kubebolt \
--set auth.existingSecret=kubebolt-auth-secret
Forgotten admin password
The first-boot log line prints once and the first-boot Secret does not track
later password changes, so KubeBolt ships two recovery paths. Both reset the
admin user’s password hash and log the reset to the API log, so the action is
auditable. Minimum length is 8 characters.
Path A — helm upgrade. Sets KUBEBOLT_RESET_ADMIN_PASSWORD on the
deployment; the API resets the password at next pod start and then continues its
normal boot. The chart’s strategy: Recreate guarantees the old pod is gone —
and the BoltDB lock released — before the new one runs the reset.
helm upgrade kubebolt oci://ghcr.io/clm-cloud-solutions/kubebolt/helm/kubebolt \
--reuse-values --set auth.resetAdminPassword=NEWPASS
# log in with NEWPASS, change to your real password from the Account menu, then
# clear the value so it doesn't sit in your release values:
helm upgrade kubebolt oci://ghcr.io/clm-cloud-solutions/kubebolt/helm/kubebolt \
--reuse-values --set auth.resetAdminPassword=
Path B — a one-shot Job, for runbooks or installs not managed by Helm. BoltDB is single-writer, so the API has to be scaled to zero first:
NS=kubebolt # your release namespace
IMAGE=$(kubectl -n $NS get deploy/kubebolt-api -o jsonpath='{.spec.template.spec.containers[0].image}')
kubectl -n $NS scale deploy/kubebolt-api --replicas=0
kubectl -n $NS apply -f - <<EOF
apiVersion: batch/v1
kind: Job
metadata: { name: kubebolt-pw-reset }
spec:
ttlSecondsAfterFinished: 60
template:
spec:
restartPolicy: Never
containers:
- name: reset
image: $IMAGE
command: ["kubebolt-api", "--reset-admin-password=NEWPASS"]
env: [{ name: KUBEBOLT_DATA_DIR, value: /data }]
volumeMounts: [{ name: data, mountPath: /data }]
volumes:
- name: data
persistentVolumeClaim: { claimName: kubebolt-data }
EOF
kubectl -n $NS wait --for=condition=Complete job/kubebolt-pw-reset --timeout=60s
kubectl -n $NS scale deploy/kubebolt-api --replicas=1
The same flag works on the single binary — kubebolt --reset-admin-password=NEWPASS
resets the password and exits without starting a server.
Disabling Authentication
To run KubeBolt without authentication (e.g., behind a VPN or for local development):
# Local development
KUBEBOLT_AUTH_ENABLED=false go run cmd/server/main.go --kubeconfig ~/.kube/config
# Docker Compose (set in deploy/.env)
KUBEBOLT_AUTH_ENABLED=false
# Helm
helm install kubebolt \
oci://ghcr.io/clm-cloud-solutions/kubebolt/helm/kubebolt \
--set auth.enabled=false
Warning: Disabling auth exposes full cluster management capabilities to anyone who can reach the KubeBolt UI. Only disable auth when access is already restricted at the network level.