mirror of
https://github.com/dredx/prole.git
synced 2026-09-23 12:03:59 +00:00
2.3 KiB
2.3 KiB
Grafana SSO (Kerberos via Knoe auth)
This repo’s first-pass Grafana SSO is implemented as:
- Users authenticate at
https://api.knoe.org/auth/login.- Primary: Kerberos/SPNEGO (
/auth/spnego) - Fallback: form login (
/auth/form) only when explicitly enabled
- Primary: Kerberos/SPNEGO (
- On success,
knoe-authissues a signed session cookie scoped toDomain=.knoe.org. - Users access Grafana at
https://svc.knoe.org/as usual. svc.knoe.orgis routed to an internal Nginxknoe-grafana-proxyservice.- The proxy calls
knoe-auth(/auth/verify) viaauth_requeston every request. - On success it injects
X-WEBAUTH-USERand forwards to Grafana. - On failure it redirects to
https://api.knoe.org/auth/login?next=...(fail-closed).
- The proxy calls
- Grafana is configured with
auth.proxyto trustX-WEBAUTH-USER.
Key configuration knobs
-
Kong routing + TLS:
SERVICE_HOSTNAME(defaultsvc.knoe.org)AUTH_HOSTNAME(defaultapi.knoe.org)PROLE_GRAFANA_SSO_ENABLED=1to routesvc.knoe.org→knoe-grafana-proxyinstead of directly to Grafana
-
Grafana chart values:
PROLE_GRAFANA_SSO_ENABLED=1enablesgrafana.ini.auth.proxyand disables the Grafana login form / anonymous access
-
knoe-authservice (environment variables):PROLE_AUTH_ENABLED=truePROLE_AUTH_SESSION_SECRET(required; strong random)PROLE_AUTH_COOKIE_DOMAIN=.knoe.orgPROLE_KERBEROS_SERVICE_PRINCIPAL(required for SPNEGO)PROLE_KERBEROS_KEYTAB_PATH(required for SPNEGO)PROLE_AUTH_FORM_ENABLED=true(optional; enables password fallback)
Kubernetes resources
Manifests are under deploy/opentofu/k3s/manifests/knoe/:
knoe-auth-deployment.yaml/knoe-auth-service.yamlknoe-kdc-configmap.yaml(embedded KDC sidecar configuration)grafana-proxy-configmap.yaml/grafana-proxy-deployment.yaml/grafana-proxy-service.yaml
Required (provided externally):
- Secret
knoe-auth-secretswith keysessionSecret - Secret
knoe-auth-keytabcontaining the HTTP service keytab athttp.keytab - Secret
knoe-kdc-secretswith keysmaster_passwordandadmin_password(for the embedded KDC)
Logout / session invalidation
GET /auth/logoutclears the Knoe session cookie (Max-Age=0).- Grafana access is effectively revoked on the next request because the proxy calls
/auth/verifyfor every request.