mirror of
https://github.com/dredx/prole.git
synced 2026-09-23 12:03:59 +00:00
- Add build-context helper to copy Docker context safely (ignore runtime data, keep symlinks) - Update UI and core actions to use ~/.prole/build and shared copy helper - Add/adjust tests and scripts; introduce knoe ops helpers and update manifests Co-authored-by: Junie <junie@jetbrains.com>
2.4 KiB
2.4 KiB
Grafana SSO (Kerberos via Prole auth)
This repo’s first-pass Grafana SSO is implemented as:
- Users authenticate at
https://api.prole.org/auth/login.- Primary: Kerberos/SPNEGO (
/auth/spnego) - Fallback: form login (
/auth/form) only when explicitly enabled
- Primary: Kerberos/SPNEGO (
- On success,
prole-authissues a signed session cookie scoped toDomain=.prole.org. - Users access Grafana at
https://svc.prole.org/as usual. svc.prole.orgis routed to an internal Nginxprole-grafana-proxyservice.- The proxy calls
prole-auth(/auth/verify) viaauth_requeston every request. - On success it injects
X-WEBAUTH-USERand forwards to Grafana. - On failure it redirects to
https://api.prole.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.prole.org)AUTH_HOSTNAME(defaultapi.prole.org)PROLE_GRAFANA_SSO_ENABLED=1to routesvc.prole.org→prole-grafana-proxyinstead of directly to Grafana
-
Grafana chart values:
PROLE_GRAFANA_SSO_ENABLED=1enablesgrafana.ini.auth.proxyand disables the Grafana login form / anonymous access
-
prole-authservice (environment variables):PROLE_AUTH_ENABLED=truePROLE_AUTH_SESSION_SECRET(required; strong random)PROLE_AUTH_COOKIE_DOMAIN=.prole.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/prole/:
prole-auth-deployment.yaml/prole-auth-service.yamlprole-kdc-configmap.yaml(embedded KDC sidecar configuration)grafana-proxy-configmap.yaml/grafana-proxy-deployment.yaml/grafana-proxy-service.yaml
Required (provided externally):
- Secret
prole-auth-secretswith keysessionSecret - Secret
prole-auth-keytabcontaining the HTTP service keytab athttp.keytab - Secret
prole-kdc-secretswith keysmaster_passwordandadmin_password(for the embedded KDC)
Logout / session invalidation
GET /auth/logoutclears the Prole session cookie (Max-Age=0).- Grafana access is effectively revoked on the next request because the proxy calls
/auth/verifyfor every request.