Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/rocketgraph/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: rocketgraph
description: Rocketgraph Mission Control with xGT
icon: https://rocketgraph.com/wp-content/uploads/2025/02/R-logo-color.png
version: 0.5.0
version: 0.5.1
appVersion: "2.7.0"
37 changes: 36 additions & 1 deletion charts/rocketgraph/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ By default, the chart generates configuration in a ConfigMap, mounts license/TLS
```yaml
xgt:
hostname: demo-xgt-prod
auth:
pam:
enabled: false # The supplied example configuration uses OpenShift OAuth.
files:
existingClaim: xgt-files
subPath: xgt-prod
Expand Down Expand Up @@ -820,6 +823,29 @@ The test release's Mission Control can connect to all three endpoints. Set its `

`missionControl.enabled=false` suppresses frontend/backend workloads and their resources, but does not disable MongoDB automatically. xGT-only releases still honor `backend.oidc.caCertExistingSecret` or `backend.oidc.caCert` for the shared OIDC CA mount. All normal `xgt.*` settings continue to apply.

### PAM and Basic Authentication Policy

The standard XGT images use `pam_permit.so`, which accepts arbitrary usernames and passwords. Configuring OIDC, Kerberos, or certificate authentication in XGT does not disable that independent PAM login path. Restrict it for deployments that require token authentication:

```yaml
xgt:
auth:
pam:
enabled: false
```

The chart mounts a read-only `pam_deny.so` policy at `/etc/pam.d/xgtd`. It blocks all authentication paths that use PAM: basic/password login (including LDAP/SSSD), custom PKI, and trusted-proxy login. The independent token authentication path remains available. This requires no root startup command and works with `restricted-v2`, existing configuration ConfigMaps, and files PVCs. It does not disable independently configured Kerberos or standard PKI authentication.

The default `true` preserves the image's or administrator's PAM policy. An omitted setting or `null` also preserves that policy. The chart does not infer authentication policy from OIDC settings, existing configuration ConfigMaps, files PVCs, or custom commands, arguments, environment variables, or mounts. Set `false` explicitly for deployments that require token authentication.

The setting is named `pam` because the rejecting policy applies to every PAM-based method; it cannot disable only username/password login while retaining custom PKI or trusted-proxy login. Replace the preliminary `xgt.auth.basic.enabled` name with `xgt.auth.pam.enabled`; the old name is rejected by values validation.

With `xgt.auth.pam.enabled: true`, configure and review the active PAM policy; preserving it does **not** make `pam_permit.so` secure. For direct LDAP, `xgt.ldap.enabled` starts the image's SSSD integration and changes PAM to `pam_sss.so`; it requires PAM to remain enabled. When reusing host SSSD, supply the appropriate PAM configuration as well as the sockets. If both OIDC and PAM are intentionally allowed, ensure PAM validates credentials instead of using `pam_permit.so`.

When PAM is preserved, an administrator-managed policy can use an extra volume named `xgt-pam`; the chart reserves that name only when it mounts its own rejecting policy. With PAM blocked, extra mounts cannot replace `/etc/pam.d/xgtd` or a parent directory. Mount paths are normalized for collision checks, so alternate spellings such as `/etc//pam.d` do not bypass the restriction.

If you used the preliminary automatic policy, set `xgt.auth.pam.enabled: false` before upgrading to retain PAM rejection; `null` no longer selects a policy automatically. Helm changes to this setting roll the XGT pod. For token-only deployments, verify that the intended token login succeeds and that `xgt.BasicAuth("xgtd", "")` is rejected; authentication and TLS are separate requirements.

### LDAP Authentication

xGT supports LDAP authentication via PAM/SSSD. When enabled, the chart mounts an SSSD
Expand Down Expand Up @@ -944,11 +970,13 @@ and `MC_OIDC_*` configuration names for both integrations.

To enable OIDC login, set `backend.env.XGT_AUTH_TYPES` and configure `xgt.extraConfig.security.oidc`. The backend discovers the issuer, client ID, and scopes from xGT when the issuer or client ID is unset. Supply confidential-client secrets and private CA certificates separately. Override the client ID when Mission Control has its own client; override `frontendUrl` only when the derived public URL is wrong.

Set `xgt.auth.pam.enabled: false` to reject the container's independent PAM/basic login path. Choosing `XGT_AUTH_TYPES` changes Mission Control's login choices; it does not restrict direct Python connections. See [PAM and Basic Authentication Policy](#pam-and-basic-authentication-policy).

See the [OIDC configuration guide](../../doc/oidc_configuration.md) for how the redirect URI is derived, the full environment-variable reference, and the security allowlists (`MC_XGT_ALLOWED_HOSTS`, `MC_OIDC_ALLOWED_ORIGINS`) — that guide includes Kubernetes and OpenShift examples, such as the wildcard patterns needed for StatefulSet pod hostnames and cluster subdomains.

#### Keycloak

For screenshots, token mappers, Python login scripts and optional LDAP/CA setup, follow [Keycloak Setup for xGT](../../doc/keycloak_setup/README.md). Its Helm examples require chart **0.5.0**; the [Mission Control page](../../doc/keycloak_setup/mission_control.md) includes the client registration, Secret, values and Route manifests.
For screenshots, token mappers, Python login scripts and optional LDAP/CA setup, follow [Keycloak Setup for xGT](../../doc/keycloak_setup/README.md). Its Helm examples require chart **0.5.1**; the [Mission Control page](../../doc/keycloak_setup/mission_control.md) includes the client registration, Secret, values and Route manifests.

Register a confidential client named `mission-control` with Standard flow enabled and callback `https://mc.example.com/api/login/oidc/callback`. Store its secret in `mission-control-oidc` under key `MC_OIDC_CLIENT_SECRET`. Keep the Python browser client `xgtd-client` public with PKCE `S256` and callback `http://127.0.0.1:8765/callback`. Mission Control 2.7.0 does not send PKCE, so do not require it on the confidential client.

Expand All @@ -962,6 +990,9 @@ backend:
existingSecret: mission-control-oidc

xgt:
auth:
pam:
enabled: false
extraConfig:
security.oidc:
validation_mode: jwt
Expand Down Expand Up @@ -1000,6 +1031,9 @@ backend:
frontendUrl: https://mc.apps.cluster.example.com

xgt:
auth:
pam:
enabled: false
extraConfig:
security.oidc:
issuer: https://oauth-openshift.apps.cluster.example.com
Expand Down Expand Up @@ -1270,6 +1304,7 @@ The Ingress routes to the frontend service on port 80. The ingress controller te
| Parameter | Description | Default |
|-----------------------------|--------------------------------------|----------------|
| `xgt.enabled` | Deploy xGT as part of the release | `true` |
| `xgt.auth.pam.enabled` | `false`: block all PAM-based login (password/LDAP, custom PKI, trusted proxy); `true`, omitted, or `null`: preserve the image/admin PAM policy without automatic detection | `true` |
| `xgt.hostname` | Fixed container OS hostname for licensing; does not change the pod or Service name | `""` |
| `xgt.oidc.caCert` | Inline CA PEM for xGT OIDC HTTPS requests; creates an xGT CA Secret | `""` |
| `xgt.oidc.caCertExistingSecret` | Existing xGT OIDC CA Secret; preferred over inline CA. Uses legacy backend CA settings if both xGT sources are empty | `""` |
Expand Down
3 changes: 3 additions & 0 deletions charts/rocketgraph/examples/xgt_existing_files.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ openshift:
fips:
enabled: true
xgt:
auth:
pam:
enabled: false # The supplied example configuration uses OpenShift OAuth.
hostname: demo-xgt-prod
image:
tag: 2.7.1
Expand Down
3 changes: 3 additions & 0 deletions charts/rocketgraph/examples/xgt_files_separate_data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ openshift:
fips:
enabled: true
xgt:
auth:
pam:
enabled: false # The supplied example configuration uses OpenShift OAuth.
hostname: demo-xgt-prod
image:
tag: 2.7.1
Expand Down
3 changes: 3 additions & 0 deletions charts/rocketgraph/examples/xgt_openshift_restricted.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ openshift:
fips:
enabled: true
xgt:
auth:
pam:
enabled: false
hostname: demo-xgt-test
image:
tag: 2.7.1
Expand Down
5 changes: 5 additions & 0 deletions charts/rocketgraph/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ WARNING: Mission Control is disabled but MongoDB is still enabled. Set mongodb.e

{{ if .Values.xgt.enabled }}
xGT Service: {{ include "rocketgraph.fullname.xgt" . }}:{{ .Values.xgt.port }}
{{- if eq (include "rocketgraph.xgtPamAuthEnabled" .) "true" }}
WARNING: xGT PAM authentication preserves the image/admin PAM policy. Standard images use pam_permit.so and accept arbitrary credentials. Set xgt.auth.pam.enabled=false for token authentication, or configure PAM to validate users.
{{- else }}
xGT PAM authentication: BLOCKED. This includes password/LDAP, custom PKI, and trusted-proxy login. Independent authentication mechanisms require their own server configuration.
{{- end }}
{{- with .Values.xgt.hostname }}
xGT container hostname: {{ . }} (the pod name is generated by the Deployment).
{{- end }}
Expand Down
11 changes: 11 additions & 0 deletions charts/rocketgraph/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,17 @@ Backend OIDC CA cert secret name
{{- .Values.backend.oidc.caCertExistingSecret | default (printf "%s-backend-oidc-ca" .Release.Name) }}
{{- end }}

{{/* Only an explicit false installs the chart's rejecting PAM policy. */}}
{{- define "rocketgraph.xgtPamAuthEnabled" -}}
{{- $auth := .Values.xgt.auth | default dict -}}
{{- $pam := $auth.pam | default dict -}}
{{- if kindIs "bool" $pam.enabled -}}
{{- $pam.enabled -}}
{{- else -}}
true
{{- end -}}
{{- end -}}

{{/* xGT owns its OIDC CA; backend settings remain a legacy fallback. */}}
{{- define "rocketgraph.xgtOidcCa" -}}
{{- $oidc := .Values.xgt.oidc | default dict -}}
Expand Down
13 changes: 11 additions & 2 deletions charts/rocketgraph/templates/_validation.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ Call via: {{- include "rocketgraph.validate" . }}
{{- end }}

{{- if .Values.xgt.enabled }}
{{- $pamAuth := eq (include "rocketgraph.xgtPamAuthEnabled" .) "true" }}
{{- if and (not $pamAuth) .Values.xgt.ldap.enabled }}
{{- fail "PAM/SSSD LDAP requires xgt.auth.pam.enabled=true; disable xgt.ldap.enabled for token-only authentication" }}
{{- end }}
{{- if .Values.xgt.files.existingClaim }}
{{- if or .Values.xgt.config.existingConfigMap .Values.xgt.config.grouplabelCsv .Values.xgt.config.labelCsv .Values.xgt.config.proxyList .Values.xgt.extraConfig }}
{{- fail "xgt.files.existingClaim uses configuration files on the PVC; remove xgt.config overrides and xgt.extraConfig and edit the PVC files instead" }}
Expand All @@ -68,6 +72,7 @@ Call via: {{- include "rocketgraph.validate" . }}
{{- fail "xgt.files.subPath requires xgt.files.existingClaim" }}
{{- end }}
{{- $volumeNames := list "xgt-config" "xgt-data" "xgt-log" "xgt-tls" "xgt-license" "sssd-config" "oidc-ca-cert" "xgt-files" }}
{{- if not $pamAuth }}{{- $volumeNames = append $volumeNames "xgt-pam" }}{{- end }}
{{- range .Values.xgt.extraVolumes }}
{{- if or (not .name) (has .name $volumeNames) }}{{- fail "xgt.extraVolumes names must be unique and must not replace chart volume names" }}{{- end }}
{{- $volumeNames = append $volumeNames .name }}
Expand All @@ -83,8 +88,12 @@ Call via: {{- include "rocketgraph.validate" . }}
{{- if .Values.xgt.config.proxyList }}{{- $mountPaths = append $mountPaths "/conf/proxy_list" }}{{- end }}
{{- end }}
{{- range .Values.xgt.extraVolumeMounts }}
{{- if or (not .mountPath) (has .mountPath $mountPaths) }}{{- fail "xgt.extraVolumeMounts must use unique mount paths and must not replace chart mounts" }}{{- end }}
{{- $mountPaths = append $mountPaths .mountPath }}
{{- $mountPath := clean (.mountPath | default "") }}
{{- if and (not $pamAuth) (has $mountPath (list "/" "/etc" "/etc/pam.d" "/etc/pam.d/xgtd")) }}
{{- fail "xgt.extraVolumeMounts must not replace /etc/pam.d/xgtd or a parent directory when PAM authentication is blocked" }}
{{- end }}
{{- if or (not .mountPath) (has $mountPath $mountPaths) }}{{- fail "xgt.extraVolumeMounts must use unique mount paths and must not replace chart mounts" }}{{- end }}
{{- $mountPaths = append $mountPaths $mountPath }}
{{- end }}
{{- end }}

Expand Down
16 changes: 16 additions & 0 deletions charts/rocketgraph/templates/xgt-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{{- if .Values.xgt.enabled }}
{{- $tlsKeys := include "rocketgraph.xgtTlsKeys" . | fromYaml }}
{{- $oidcCa := include "rocketgraph.xgtOidcCa" . | fromYaml }}
{{- $pamAuth := eq (include "rocketgraph.xgtPamAuthEnabled" .) "true" }}
{{- $restricted := and .Values.openshift.enabled (eq .Values.openshift.scc "restricted-v2") }}
{{- $files := .Values.xgt.files.existingClaim }}
{{- $direct := or $restricted $files }}
Expand All @@ -25,6 +26,9 @@ spec:
app: xgt
app.kubernetes.io/instance: {{ .Release.Name }}
annotations:
{{- if not $pamAuth }}
checksum/pam: {{ include (print $.Template.BasePath "/xgt-pam-configmap.yaml") . | sha256sum }}
{{- end }}
{{- if not (or $files .Values.xgt.config.existingConfigMap) }}
checksum/config: {{ include (print $.Template.BasePath "/xgt-configmap.yaml") . | sha256sum }}
{{- end }}
Expand Down Expand Up @@ -186,6 +190,12 @@ spec:
subPath: {{ $oidcCa.key | quote }}
readOnly: true
{{- end }}
{{- if not $pamAuth }}
- name: xgt-pam
mountPath: /etc/pam.d/xgtd
subPath: xgtd
readOnly: true
{{- end }}
{{- with .Values.xgt.extraVolumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
Expand All @@ -203,6 +213,12 @@ spec:
{{- end }}
restartPolicy: Always
volumes:
{{- if not $pamAuth }}
- name: xgt-pam
configMap:
name: {{ include "rocketgraph.fullname.xgt" . }}-pam
defaultMode: 0444
{{- end }}
{{- if $files }}
- name: xgt-files
persistentVolumeClaim:
Expand Down
15 changes: 15 additions & 0 deletions charts/rocketgraph/templates/xgt-pam-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{{- if and .Values.xgt.enabled (ne (include "rocketgraph.xgtPamAuthEnabled" .) "true") }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "rocketgraph.fullname.xgt" . }}-pam
labels:
app: xgt
{{- include "rocketgraph.labels" . | nindent 4 }}
data:
xgtd: |
# Token authentication is independent of the PAM login path.
auth requisite pam_deny.so
account requisite pam_deny.so
session requisite pam_deny.so
{{- end }}
34 changes: 17 additions & 17 deletions charts/rocketgraph/tests/snapshots/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: NetworkPolicy
metadata:
name: test-release-frontend
labels:
helm.sh/chart: rocketgraph-0.5.0
helm.sh/chart: rocketgraph-0.5.1
app.kubernetes.io/name: rocketgraph
app.kubernetes.io/version: "2.7.0"
app.kubernetes.io/managed-by: Helm
Expand All @@ -31,7 +31,7 @@ kind: NetworkPolicy
metadata:
name: test-release-backend
labels:
helm.sh/chart: rocketgraph-0.5.0
helm.sh/chart: rocketgraph-0.5.1
app.kubernetes.io/name: rocketgraph
app.kubernetes.io/version: "2.7.0"
app.kubernetes.io/managed-by: Helm
Expand Down Expand Up @@ -60,7 +60,7 @@ kind: NetworkPolicy
metadata:
name: test-release-xgt
labels:
helm.sh/chart: rocketgraph-0.5.0
helm.sh/chart: rocketgraph-0.5.1
app.kubernetes.io/name: rocketgraph
app.kubernetes.io/version: "2.7.0"
app.kubernetes.io/managed-by: Helm
Expand All @@ -84,7 +84,7 @@ kind: NetworkPolicy
metadata:
name: test-release-mongodb
labels:
helm.sh/chart: rocketgraph-0.5.0
helm.sh/chart: rocketgraph-0.5.1
app.kubernetes.io/name: rocketgraph
app.kubernetes.io/version: "2.7.0"
app.kubernetes.io/managed-by: Helm
Expand Down Expand Up @@ -121,7 +121,7 @@ metadata:
name: test-release-xgt-config
labels:
app: xgt
helm.sh/chart: rocketgraph-0.5.0
helm.sh/chart: rocketgraph-0.5.1
app.kubernetes.io/name: rocketgraph
app.kubernetes.io/version: "2.7.0"
app.kubernetes.io/managed-by: Helm
Expand Down Expand Up @@ -177,7 +177,7 @@ metadata:
name: test-release-mongodb-data
labels:
app: mongodb
helm.sh/chart: rocketgraph-0.5.0
helm.sh/chart: rocketgraph-0.5.1
app.kubernetes.io/name: rocketgraph
app.kubernetes.io/version: "2.7.0"
app.kubernetes.io/managed-by: Helm
Expand All @@ -197,7 +197,7 @@ metadata:
name: test-release-xgt-data
labels:
app: xgt
helm.sh/chart: rocketgraph-0.5.0
helm.sh/chart: rocketgraph-0.5.1
app.kubernetes.io/name: rocketgraph
app.kubernetes.io/version: "2.7.0"
app.kubernetes.io/managed-by: Helm
Expand All @@ -217,7 +217,7 @@ metadata:
name: test-release-xgt-log
labels:
app: xgt
helm.sh/chart: rocketgraph-0.5.0
helm.sh/chart: rocketgraph-0.5.1
app.kubernetes.io/name: rocketgraph
app.kubernetes.io/version: "2.7.0"
app.kubernetes.io/managed-by: Helm
Expand All @@ -237,7 +237,7 @@ metadata:
name: test-release-backend
labels:
app: backend
helm.sh/chart: rocketgraph-0.5.0
helm.sh/chart: rocketgraph-0.5.1
app.kubernetes.io/name: rocketgraph
app.kubernetes.io/version: "2.7.0"
app.kubernetes.io/managed-by: Helm
Expand All @@ -261,7 +261,7 @@ metadata:
name: test-release-frontend
labels:
app: frontend
helm.sh/chart: rocketgraph-0.5.0
helm.sh/chart: rocketgraph-0.5.1
app.kubernetes.io/name: rocketgraph
app.kubernetes.io/version: "2.7.0"
app.kubernetes.io/managed-by: Helm
Expand All @@ -287,7 +287,7 @@ metadata:
name: test-release-mongodb
labels:
app: mongodb
helm.sh/chart: rocketgraph-0.5.0
helm.sh/chart: rocketgraph-0.5.1
app.kubernetes.io/name: rocketgraph
app.kubernetes.io/version: "2.7.0"
app.kubernetes.io/managed-by: Helm
Expand All @@ -310,7 +310,7 @@ metadata:
name: test-release-xgt
labels:
app: xgt
helm.sh/chart: rocketgraph-0.5.0
helm.sh/chart: rocketgraph-0.5.1
app.kubernetes.io/name: rocketgraph
app.kubernetes.io/version: "2.7.0"
app.kubernetes.io/managed-by: Helm
Expand All @@ -334,7 +334,7 @@ metadata:
name: test-release-backend
labels:
app: backend
helm.sh/chart: rocketgraph-0.5.0
helm.sh/chart: rocketgraph-0.5.1
app.kubernetes.io/name: rocketgraph
app.kubernetes.io/version: "2.7.0"
app.kubernetes.io/managed-by: Helm
Expand Down Expand Up @@ -413,7 +413,7 @@ metadata:
name: test-release-frontend
labels:
app: frontend
helm.sh/chart: rocketgraph-0.5.0
helm.sh/chart: rocketgraph-0.5.1
app.kubernetes.io/name: rocketgraph
app.kubernetes.io/version: "2.7.0"
app.kubernetes.io/managed-by: Helm
Expand Down Expand Up @@ -473,7 +473,7 @@ metadata:
name: test-release-mongodb
labels:
app: mongodb
helm.sh/chart: rocketgraph-0.5.0
helm.sh/chart: rocketgraph-0.5.1
app.kubernetes.io/name: rocketgraph
app.kubernetes.io/version: "2.7.0"
app.kubernetes.io/managed-by: Helm
Expand Down Expand Up @@ -546,7 +546,7 @@ metadata:
name: test-release-xgt
labels:
app: xgt
helm.sh/chart: rocketgraph-0.5.0
helm.sh/chart: rocketgraph-0.5.1
app.kubernetes.io/name: rocketgraph
app.kubernetes.io/version: "2.7.0"
app.kubernetes.io/managed-by: Helm
Expand All @@ -565,7 +565,7 @@ spec:
app: xgt
app.kubernetes.io/instance: test-release
annotations:
checksum/config: 6bb7e1d27b1c13562f26a8f28a0e3045f6859565b4a2b1bc6208f724212614af
checksum/config: e7988daa3df7e5009b4bb441c4cfc757b0a4608f49751284e6a96710b4d1a834
spec:
containers:
- name: xgt
Expand Down
Loading
Loading