Authentication, RBAC, Multi-Tenancy, and Immutable Audit Export
Faber ships optional native authentication and authorization middleware (internal/ui/auth.go), strict namespace-scoped multi-tenant RBAC and watch isolation (--watch-namespace and rbac.namespaced=true), and an immutable structured JSONL audit log (internal/observability/audit.go).
Authentication Modes (--auth-mode)
Section titled “Authentication Modes (--auth-mode)”Select the HTTP API authentication mode with --auth-mode (or FABER_AUTH_MODE, or Helm auth.mode):
| Mode | Behavior | Recommended Use |
|---|---|---|
none (default) |
Built-in auth middleware disabled. | Clusters behind trusted upstream proxy authentication (such as Pomerium, Authelia, or Tailscale). |
oidc |
Validates Authorization: Bearer <jwt> (RS256 and ES256) against OIDC Discovery / cached JWKS, verifying iss, aud, exp, and nbf. |
Multi-user clusters using Dex, Keycloak, Authentik, Okta, or cloud OIDC providers. |
k8s |
Validates Authorization: Bearer <token> via Kubernetes authentication.k8s.io/v1 TokenReview and authorizes mutations via authorization.k8s.io/v1 SubjectAccessReview. |
Clusters authenticating operators and automation directly with Kubernetes ServiceAccount or OIDC cluster tokens. |
Unauthenticated Paths
Section titled “Unauthenticated Paths”When --auth-mode is oidc or k8s:
- Health probes (
/healthz,/readyz,/api/v1/health), Prometheus/metrics, and the static SPA shell assets (/,/index.html,/favicon.svg,/theme.js,/assets/*) remain accessible so browsers and kubelet probes work cleanly. /webhooks/*remains governed by per-policy webhook HMAC or Bearer secrets.- All
/api/*(except/api/v1/health),/v1/*,/mcp, and/openapi.jsonroutes require a validAuthorization: Bearertoken and respond with HTTP401andWWW-Authenticate: Bearer realm="faber"on failure.
OIDC Mode (--auth-mode=oidc)
Section titled “OIDC Mode (--auth-mode=oidc)”Required flags (or environment variables):
--oidc-issuer-url(FABER_OIDC_ISSUER_URL): Exactissclaim and discovery base URL (/.well-known/openid-configuration).--oidc-audience(FABER_OIDC_AUDIENCE): Requiredaudclaim value.--oidc-jwks-url(FABER_OIDC_JWKS_URL, optional): Explicit JWKS endpoint overriding discovery.--oidc-username-claim(FABER_OIDC_USERNAME_CLAIM, defaultemail): Claim used for the verified principal subject (falls back tosub).
JWKS keys are cached in memory for 15 minutes and refreshed automatically (rate-limited to prevent JWKS storms) on unknown kid rotation.
Kubernetes Mode (--auth-mode=k8s)
Section titled “Kubernetes Mode (--auth-mode=k8s)”- Authentication: Every bearer token is verified through Kubernetes
TokenReview(authentication.k8s.io/v1). - Mutation Authorization: Mutating endpoints (
trigger,cancel,approve,reject,/v1/invoke/{policy}, and/mcp) perform a namespace-scoped KubernetesSubjectAccessReview(authorization.k8s.io/v1) checking whether the authenticated user and groups hold the required verb onfaberops.dev/v1alpha1remediationrunsin the target policy or run namespace. Unauthorized callers receive HTTP403. - RBAC Prerequisite: Ensure the
faber-controllerClusterRoleincludescreateonauthentication.k8s.iotokenreviewsandauthorization.k8s.iosubjectaccessreviews(configured automatically by the Helm chart whenauth.mode=k8sandrbac.namespaced=false).
Caller Identity (GET /api/v1/whoami) and Verified Approvals
Section titled “Caller Identity (GET /api/v1/whoami) and Verified Approvals”GET /api/v1/whoami returns the active auth mode and verified principal:
{ "authMode": "oidc", "authenticated": true, "groups": ["platform-admins"]}- When
authenticatedistrue, the embedded Web GUI quietly displays the authenticated subject badge in the top bar. WhenauthModeisnone, the top bar stays unchanged. - On
POST /api/v1/runs/{id}/approveand/reject, the server records the verified principal subject asdecidedBy, ignoring any self-reportedactorfield in the request body. - For trusted reverse-proxy identity headers (
auth.trustedProxy.*), per-policyOwnerACLConfig, multi-approval quorums (minApprovals),requireDistinctApprover, and opt-inValidatingAdmissionPolicyprotection forkubectl annotate, see Ownership ACLs, Multi-Approval Quorums, and Verified Identity.
Multi-Tenant Namespaced Mode (--watch-namespace and rbac.namespaced=true)
Section titled “Multi-Tenant Namespaced Mode (--watch-namespace and rbac.namespaced=true)”Faber supports dedicated per-team or per-tenant installations that require zero cluster-scoped RBAC.
Single-Namespace Install (Zero ClusterRole)
Section titled “Single-Namespace Install (Zero ClusterRole)”Set rbac.namespaced=true in Helm to render a single namespace-scoped Role and RoleBinding in the release namespace with zero ClusterRole and zero ClusterRoleBinding resources. The chart automatically passes --watch-namespace=<release namespace> unless controller.watchNamespaces is specified explicitly:
helm upgrade --install faber oci://ghcr.io/faberops/charts/faber \ --version 2.0.0 \ --namespace team-a \ --create-namespace \ --set rbac.namespaced=trueWhen you need extra read-only permissions inside the release namespace (for example cert-manager.io certificates or external-secrets.io externalsecrets), add them under rbac.extraNamespaceRules instead of rbac.extraClusterRules:
rbac: namespaced: true extraNamespaceRules: - apiGroups: - cert-manager.io resources: - certificates verbs: - get - listMulti-Namespace Watch Scope (controller.watchNamespaces)
Section titled “Multi-Namespace Watch Scope (controller.watchNamespaces)”A shared platform controller can watch a fixed subset of namespaces without watching the whole cluster by passing --watch-namespace=team-a,team-b (environment variable FABER_WATCH_NAMESPACE, or Helm controller.watchNamespaces):
helm upgrade --install faber oci://ghcr.io/faberops/charts/faber \ --version 2.0.0 \ --namespace faber \ --set 'controller.watchNamespaces={team-a,team-b}'How Watch Namespace Isolation Is Enforced
Section titled “How Watch Namespace Isolation Is Enforced”When --watch-namespace is non-empty:
- Controller Cache:
controller-runtimerestricts informer caches strictly to the configured namespaces. - Kubernetes Watch Triggers:
K8sWatchManageropens namespace-scoped dynamic informers instead of cluster-wide watches and rejects triggers targeting unwatched namespaces. - RBAC Pre-Flight (
SelfSubjectAccessReview): Policy reconciliation checksSelfSubjectAccessReviewscoped to each watched namespace rather than cluster-wide, so namespacedRolegrants pass pre-flight cleanly. - HTTP API, Webhooks,
/v1/invoke, and/mcp: List, get, trigger, cancel, approve, reject, and webhook endpoints filter and enforce the allowed namespace set, returning403or404for requests targeting namespaces outside--watch-namespace. - Auth Mode Compatibility Guard: Combining
rbac.namespaced=truewithauth.mode=k8sfails Helm template rendering because KubernetesTokenReviewandSubjectAccessReviewAPIs require cluster-scoped RBAC. Useauth.mode=oidcorauth.mode=none(behind an authenticating proxy) withrbac.namespaced=true.
Cross-Namespace Isolation and Per-Namespace Quotas
Section titled “Cross-Namespace Isolation and Per-Namespace Quotas”- Same-Namespace Isolation:
repositoryRef,secretRef, andsandbox.templateRefcannot cross namespaces by default. Set--allow-cross-namespace-refs=true(controller.allowCrossNamespaceRefs=true) only if you explicitly share a centralSandboxTemplateacross namespaces. - Per-Namespace Cost Quota: Set
--namespace-max-cost-usd-24h(controller.namespaceMaxCostUsd24h) alongside--global-max-cost-usd-24h(controller.globalMaxCostUsd24h) to bound rolling 24-hour LLM spend per tenant namespace. - Zero-Cert CRD CEL Validation:
GitOpsRepository,PolicyTemplate, andMaintenancePolicyshipx-kubernetes-validationsrules enforced directly bykube-apiserverwithout admission webhook certificates:GitOpsRepositoryrequiresspec.githuborspec.forge.MaintenancePolicyrejects any Kubernetes trigger watching corev1Secretresources.MaintenancePolicyandPolicyTemplatebounddiffPolicy.maxChangedFiles <= 1000anddiffPolicy.maxChangedLines <= 50000.MaintenancePolicyrejects setting bothspec.presetandspec.templateRefsimultaneously.
Immutable JSONL Audit Log and Export
Section titled “Immutable JSONL Audit Log and Export”Configure --audit-log-path (FABER_AUDIT_LOG_PATH or Helm controller.auditLogPath):
""(default): in-memory ring buffer (4096 events) queryable over the API.stdout: writes JSONL audit lines to stdout plus the in-memory ring buffer./data/audit.jsonl: appends to a0600append-only JSONL file (read back directly on query).
Recorded event types: trigger.accepted, trigger.dropped, diff_gate.evaluated, verifier.completed, approval.requested, approval.decided, circuit_breaker.tripped, pr.synced, pr.closed, system.paused, system.resumed, learning.proposed, authz.denied, fleet.command.queued, and fleet.command.executed.
Query or export audit events via HTTP or faberctl:
# HTTP JSONL stream (or pass Accept: application/x-ndjson)curl -H "Authorization: Bearer $FABER_TOKEN" \ "https://faber.example.com/api/v1/audit?namespace=faber&since=24h&format=jsonl"
# Operator CLI export (table, jsonl, or --json)faberctl audit export --since 24h --format jsonl > faber-audit.jsonlfaberctl audit export --policy flux-failure-fixer --type approval.decided --limit 50