Skip to content

Authentication

Kure Monitor 2.3+ uses two separate auth mechanisms:

  • User accounts for dashboard traffic (read / write / admin roles).
  • A shared service token for agent and security-scanner traffic.

Both are wired up automatically by the Helm chart — there is nothing to configure at install time. The legacy AUTH_API_KEY / auth.apiKey single-key model was removed in 2.3.0. See the 2.2 → 2.3 migration guide for the upgrade path.

On first visit, the dashboard prompts the very first user to create the initial admin account (username + password). Once signed in, invite further users from Admin Panel → Users and assign a role:

RolePermissions
readView pod failures and security findings. No mutating actions.
writeEverything read can do, plus dismiss/resolve pods, trigger rescans, edit suppressions.
adminEverything write can do, plus user management, LLM config, notification settings.

Sessions are carried in an HttpOnly cookie called kure_session, signed with SESSION_SECRET. Login is rate-limited (5 attempts per 30 seconds).

Service-to-service (agent + security scanner)

Section titled “Service-to-service (agent + security scanner)”

Agent and scanner authenticate to the backend with a shared SERVICE_TOKEN:

  • Sent as the X-Service-Token HTTP header.
  • Sent as ?token=<value> on WebSocket connections.

The Helm chart creates a Secret named <release>-bootstrap on first install with two randomly generated keys (randAlphaNum 48):

  • service-token — mounted as SERVICE_TOKEN in backend, agent, scanner.
  • session-secret — mounted as SESSION_SECRET in the backend.

On helm upgrade, the chart uses lookup to read the existing values back, so tokens are preserved and active sessions stay valid.

Terminal window
# Edit the Secret in place
kubectl edit secret kure-monitor-bootstrap -n kure-system
# Restart the pods that read it
kubectl rollout restart \
deployment/kure-monitor-backend \
deployment/kure-monitor-security-scanner \
-n kure-system
kubectl rollout restart daemonset/kure-monitor-agent -n kure-system

Rotating session-secret invalidates all existing dashboard sessions and forces every user to log in again.

These endpoints do not require user authentication:

Ingest (require X-Service-Token):

EndpointPurpose
POST /api/pods/failedAgent reports pod failures
POST /api/pods/dismiss-deletedAgent dismisses deleted pods
POST /api/security/findingsScanner reports findings
POST /api/security/scan/clearScanner clears findings
POST /api/security/rescan-statusScanner reports rescan status
DELETE /api/security/findings/resource/*Scanner deletes resource findings
POST /api/metrics/security-scan-durationScanner reports scan duration

Always public:

EndpointPurpose
/health, /metricsLiveness / Prometheus scrape
GET /api/auth/statusCheck whether initial admin setup is needed
POST /api/auth/loginLog in with username + password
POST /api/auth/signupCreate the initial admin (one-shot, only usable when no users exist)

LLM API keys configured via the Admin panel are encrypted before storage using a Fernet key (security.encryptionKey in Helm values). If left empty, the chart auto-generates one.