Security Requirements and Expectations
Headlamp is a Kubernetes web UI and desktop application that forwards user credentials to Kubernetes API servers, optionally manages Helm releases and kubeconfigs, and loads user-installed plugins. This page summarizes the security requirements and operational expectations for deploying and running Headlamp.
For vulnerability reporting and supported versions, see the Security Policy.
Deployment modes and network exposure
Headlamp has two primary deployment models with different trust boundaries:
- In-cluster (
-in-cluster): Runs as a web service inside Kubernetes. Users authenticate per request with their own credentials (bearer token, OIDC, or an authenticating proxy). Keep-enable-dynamic-clusters,-allow-kubeconfig-changes, and-enable-helmdisabled unless explicitly needed, and do not expose an unauthenticated instance to untrusted networks. - Desktop / local (
headlamp-server): Runs locally for a single user. The desktop app generates a randomHEADLAMP_BACKEND_TOKENon launch and passes it to the backend (X-HEADLAMP_BACKEND-TOKENheader or WebSocket subprotocol). When runningheadlamp-serverstandalone, bind to loopback (-listen-addr=127.0.0.1) and setHEADLAMP_BACKEND_TOKENif protected cluster, plugin, Helm, or proxy routes could be reached by other local users or processes. See Backend token protection.
Authentication and RBAC
- Per-user credentials: Headlamp relies on Kubernetes
RBAC to
enforce authorization. Configure
OIDC,
user-supplied bearer tokens, or an
identity-aware proxy (
-proxy-authonly behind a trusted proxy that strips and sets the configured headers). With-proxy-auth, identity headers only identify the user to the UI; when per-user Kubernetes authorization is required, the proxy must also forward a Kubernetes-accepted user token via-proxy-auth-token-header(defaultX-Forwarded-Id-Token), rather than relying on the pod's shared ServiceAccount. - Avoid shared service-account fallback: Do not enable
-unsafe-use-service-account-tokenin multi-user or untrusted environments; it disables per-user authentication and uses the pod's service account token for all users. - Least-privilege service account: When running in-cluster, grant the
Headlamp pod's own ServiceAccount only the permissions required for its
configured features (for example,
SelfSubjectReview/ discovery or cluster-inventory access if enabled). Note that the Helm chart binds the pod's ServiceAccount tocluster-adminby default (clusterRoleBinding.clusterRoleName); replace it with a reviewed least-privilege role before production use.
Transport security (TLS)
- Always use HTTPS in-cluster: Terminate TLS at your Ingress/Gateway or
directly at the Headlamp backend using
-tls-cert-path/-tls-key-path(HEADLAMP_CONFIG_TLS_CERT_PATH/HEADLAMP_CONFIG_TLS_KEY_PATH). See TLS and TLS pass through. - Verify upstream certificates: Never enable
-insecure-ssl,-oidc-skip-tls-verify, or-oidc-api-proxy-skip-tls-verifyin production deployments.
External proxies, Helm, and iframe embedding
- External proxy allowlist (
-proxy-urls): Keep-proxy-urlsunset or restricted to narrow, explicitly trusted external URL patterns (such ashttps://artifacthub.io/*if needed). Because this setting controls server-side fetches, never use catch-all patterns or patterns that can reach loopback, link-local/metadata, or cluster-internal services. - Helm repositories and charts: When
-enable-helmis enabled, Headlamp restricts repository URLs tohttp://andhttps://and install/upgrade requests to<repository>/<chart>from registered repositories, but does not constrain which HTTP(S) repository URLs (including internal/localhost targets) can be registered, acceptsinsecureSkipTLSverify, and allows a registered repository's index to reference arbitrary chart URLs. Register only trusted HTTPS repositories, keep repository TLS verification enabled, and review charts before installing or upgrading. - Backstage / iframe embedding (
-backstage-origin): By default, Headlamp rejects Backstagewindow.postMessageevents and does not broadcastHEADLAMP_READY. Set-backstage-origin/HEADLAMP_CONFIG_BACKSTAGE_ORIGIN(or build-timeREACT_APP_BACKSTAGE_ORIGIN) to an explicit comma-separated list of trustedhttp://orhttps://origins only when embedding Headlamp in Backstage.
Plugins and release verification
- Plugin trust: Frontend plugins run in the Headlamp browser/Electron
origin with access to the user's session and UI capabilities. Only install or
mount plugins from trusted sources, and keep
-watch-plugins-changesdisabled in production in-cluster deployments. See the Plugin development guide. - Verify releases: Verify container images, desktop installers, and Helm charts using their published signatures and SLSA provenance as described in Verifying Releases.