From 09a6ea55e31b312e3c8d05d2843fab12708f7e7d Mon Sep 17 00:00:00 2001 From: Taylor Mutch Date: Fri, 16 Oct 2026 12:32:06 -0700 Subject: [PATCH 1/3] docs(helm): document operator mTLS gateway administration Signed-off-by: Taylor Mutch --- deploy/helm/openshell/README.md | 10 ++ deploy/helm/openshell/README.md.gotmpl | 10 ++ docs/how-it-works/gateways/authentication.mdx | 10 ++ docs/how-it-works/gateways/configuration.mdx | 9 +- docs/how-it-works/workspaces.mdx | 2 +- docs/kubernetes/managing-certificates.mdx | 120 ++++++++++++++++++ docs/kubernetes/setup.mdx | 2 +- docs/kubernetes/workspaces.mdx | 2 +- skills/debug-openshell-cluster/SKILL.md | 9 ++ 9 files changed, 170 insertions(+), 4 deletions(-) diff --git a/deploy/helm/openshell/README.md b/deploy/helm/openshell/README.md index fa2f76cfa3..0af2b70ffc 100644 --- a/deploy/helm/openshell/README.md +++ b/deploy/helm/openshell/README.md @@ -589,6 +589,16 @@ sandbox JWT signing Secret. This precedence applies even if external non-cert-manager TLS source manages TLS and you pre-create the sandbox JWT signing Secret. +Operator mTLS gives an operator application or user an administrative principal +for managing the OpenShell gateway across all workspaces. Use a client +certificate with exact `OU=operator` and client authentication usage, signed by +a CA trusted by the gateway's configured client CA bundle. Enable authentication through +`gatewayConfig["openshell.gateway.mtls_auth"].operator_enabled=true`. +See [mTLS operators](https://docs.nvidia.com/openshell/latest/how-it-works/gateways/authentication#mtls-operators) +for authentication requirements, or +[Managing Certificates](https://docs.nvidia.com/openshell/latest/kubernetes/managing-certificates#issue-an-operator-client-certificate) +for an example using cert-manager to issue and renew the certificate. + ## SPIFFE/SPIRE provider token grants Set `gatewayConfig.openshell.drivers.kubernetes.provider_spiffe_workload_api_socket_path` diff --git a/deploy/helm/openshell/README.md.gotmpl b/deploy/helm/openshell/README.md.gotmpl index 990fa01852..7be7c4e033 100644 --- a/deploy/helm/openshell/README.md.gotmpl +++ b/deploy/helm/openshell/README.md.gotmpl @@ -590,6 +590,16 @@ sandbox JWT signing Secret. This precedence applies even if external non-cert-manager TLS source manages TLS and you pre-create the sandbox JWT signing Secret. +Operator mTLS gives an operator application or user an administrative principal +for managing the OpenShell gateway across all workspaces. Use a client +certificate with exact `OU=operator` and client authentication usage, signed by +a CA trusted by the gateway's configured client CA bundle. Enable authentication through +`gatewayConfig["openshell.gateway.mtls_auth"].operator_enabled=true`. +See [mTLS operators](https://docs.nvidia.com/openshell/latest/how-it-works/gateways/authentication#mtls-operators) +for authentication requirements, or +[Managing Certificates](https://docs.nvidia.com/openshell/latest/kubernetes/managing-certificates#issue-an-operator-client-certificate) +for an example using cert-manager to issue and renew the certificate. + ## SPIFFE/SPIRE provider token grants Set `gatewayConfig.openshell.drivers.kubernetes.provider_spiffe_workload_api_socket_path` diff --git a/docs/how-it-works/gateways/authentication.mdx b/docs/how-it-works/gateways/authentication.mdx index aad6f769cc..9c05a5bf5d 100644 --- a/docs/how-it-works/gateways/authentication.mdx +++ b/docs/how-it-works/gateways/authentication.mdx @@ -73,6 +73,12 @@ The connection flow: ### mTLS Operators +An operator mTLS certificate authenticates an operator application or user as +an administrative principal for an OpenShell gateway. Use this identity for +gateway administration, including managing workspaces, sandboxes, and providers +across all workspaces. It supports both administrative automation and interactive +operator access. + Enable `[openshell.gateway.mtls_auth] operator_enabled = true` to recognize a trusted client certificate whose organizational unit is exactly `operator` (`OU=operator`). This creates a distinct operator principal with user and @@ -97,6 +103,10 @@ setting. See [Providers](/how-it-works/providers/overview#retrieve-runtime-credentials) for the credential retrieval contract. +For a Helm deployment example using cert-manager and the chart's CA issuer, +see [Managing Certificates](/kubernetes/managing-certificates#issue-an-operator-client-certificate). +It covers how to issue an operator client certificate using cert-manager. + ### Inspect the API with grpcurl The primary gateway listener serves the gRPC reflection v1 protocol. Reflection diff --git a/docs/how-it-works/gateways/configuration.mdx b/docs/how-it-works/gateways/configuration.mdx index db461f8d66..404cbfd454 100644 --- a/docs/how-it-works/gateways/configuration.mdx +++ b/docs/how-it-works/gateways/configuration.mdx @@ -506,7 +506,8 @@ Set `[openshell.gateway.mtls_auth] enabled = true` to map a verified client cert Set `[openshell.gateway.mtls_auth] operator_enabled = true`, `--enable-operator-auth true`, or `OPENSHELL_ENABLE_OPERATOR_AUTH=true` to enable -direct mTLS operators. The default is false. TLS and a client CA are required. +an operator application or user to authenticate through direct mTLS as a gateway +administrative principal. The default is false. TLS and a client CA are required. This setting is independent of `enabled` and OIDC. A verified certificate with the exact `OU=operator` grants user/platform-admin capabilities across all workspaces and access to `GetProviderCredentials`. Do not combine an operator @@ -518,6 +519,12 @@ With operator authentication enabled and user mTLS disabled, callers without a verified operator certificate receive `Unauthenticated` unless another configured authentication mechanism accepts them or `allow_unauthenticated_users = true`. +On Helm deployments, set +`gatewayConfig["openshell.gateway.mtls_auth"].operator_enabled=true` and use an +operator client certificate signed by a trusted client CA. +See [Managing Certificates](/kubernetes/managing-certificates#issue-an-operator-client-certificate) +for an example using cert-manager to issue an operator client certificate. + The client-certificate handshake policy has no `require_client_auth` TOML field. Client certificates are optional at the transport layer; gateway RPC authorization enforces the configured user or sandbox identity. `[openshell.gateway.oidc] ca_bundle` points to a certificate-only PEM bundle for an issuer signed by a private CA. The path must resolve to a regular file no larger than 1 MiB (1,048,576 bytes). The bundle augments platform trust roots for OIDC discovery and JWKS requests only; it does not replace native CA discovery or change trust for provider refresh, token exchange, telemetry, Vault, or other gateway HTTPS clients. Set the same value with `--oidc-ca-bundle` or `OPENSHELL_OIDC_CA_BUNDLE`. For Helm deployments, `server.oidc.caConfigMapName` mounts the ConfigMap's `ca.crt` key and renders this path automatically. diff --git a/docs/how-it-works/workspaces.mdx b/docs/how-it-works/workspaces.mdx index 0b1803be62..a9753d3396 100644 --- a/docs/how-it-works/workspaces.mdx +++ b/docs/how-it-works/workspaces.mdx @@ -18,7 +18,7 @@ The CLI targets the `default` workspace unless you set `--workspace` or separate from the `/sandbox` filesystem directory inside a sandbox. For Kubernetes namespace mapping and managed per-workspace namespaces, see -[Workspace on Kubernetes](/kubernetes/workspaces). +[Workspaces on Kubernetes](/kubernetes/workspaces). ## Understand the Role Model diff --git a/docs/kubernetes/managing-certificates.mdx b/docs/kubernetes/managing-certificates.mdx index 6649e20cba..84462eb51b 100644 --- a/docs/kubernetes/managing-certificates.mdx +++ b/docs/kubernetes/managing-certificates.mdx @@ -60,6 +60,126 @@ The chart also runs a pre-install hook in JWT-only mode to create the gateway's sandbox JWT signing Secret. That Secret is separate from the cert-manager TLS certificate Secrets and is mounted at `/etc/openshell-jwt`. +## Issue an operator client certificate + +An operator client certificate gives an operator application or user an +administrative principal for managing an OpenShell gateway across all +workspaces. The following example issues that identity with a standalone +cert-manager `Certificate` managed outside the Helm release. + +Save these Helm values as `operator-values.yaml`: + +```yaml +certManager: + enabled: true +server: + disableTls: false + tls: + enableMtls: true + +gatewayConfig: + openshell.gateway.mtls_auth: + operator_enabled: true +``` + +Install or upgrade using your deployment's other values files as well: + +```shell +helm upgrade --install openshell oci://quay.io/ai-openshell/charts/openshell \ + --version --namespace openshell \ + --values operator-values.yaml +``` + +The gateway must trust the CA issuing the client certificate. Keep the default +`certManager.clientCaFromServerTlsSecret: true` and a non-empty +`server.tls.clientCaSecretName`. Alternatively, set +`certManager.clientCaFromServerTlsSecret: false` and point +`server.tls.clientCaSecretName` at `certManager.caSecretName`. + +Save this standalone manifest as `operator-certificate.yaml`. It assumes a +release named `openshell` in namespace `openshell`; adjust the namespace and +`issuerRef.name` to match the chart's `-ca-issuer` Issuer. + +```yaml +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: openshell-operator-client + namespace: openshell +spec: + secretName: openshell-operator-client-tls + commonName: platform-operator + subject: + organizationalUnits: + - operator + duration: 168h + renewBefore: 24h + privateKey: + algorithm: ECDSA + size: 256 + usages: + - client auth + - digital signature + issuerRef: + name: openshell-ca-issuer + kind: Issuer + group: cert-manager.io +``` + +Apply it and wait for issuance: + +```shell +kubectl apply -f operator-certificate.yaml +kubectl -n openshell wait certificate/openshell-operator-client --for=condition=Ready --timeout=120s +``` + +The exact `OU=operator` grants gateway-wide administration and access to +`GetProviderCredentials` when operator authentication is enabled. Restrict +access to the dedicated Secret and permission to issue certificates under the +trusted client CA. See [mTLS operators](/how-it-works/gateways/authentication#mtls-operators) +for the authorization and trust boundary. + +### Verify the certificate + +If you have `kubectl` access and want to verify that the certificate +authenticates correctly, use the following example. Export the certificate, +key, and server trust bundle: + +```shell +umask 077 +mkdir -p operator-tls +kubectl -n openshell get secret openshell-operator-client-tls -o jsonpath='{.data.tls\.crt}' | base64 --decode > operator-tls/tls.crt +kubectl -n openshell get secret openshell-operator-client-tls -o jsonpath='{.data.tls\.key}' | base64 --decode > operator-tls/tls.key +kubectl -n openshell get secret openshell-server-tls -o jsonpath='{.data.ca\.crt}' | base64 --decode > operator-tls/ca.crt +``` + +Keep a direct Service port-forward running: + +```shell +kubectl -n openshell port-forward svc/openshell 8090:8080 +``` + +In another terminal, use `grpcurl` to check the authenticated identity: + +```shell +grpcurl -cacert operator-tls/ca.crt \ + -cert operator-tls/tls.crt -key operator-tls/tls.key \ + -d '{}' localhost:8090 openshell.v1.OpenShell/GetCurrentUser +``` + +The response should identify `platform-operator`, include the `operator` role, +and report `identityProvider: "mtls"`. This confirms that the gateway recognizes +the certificate as an operator identity. Send requests without an +`Authorization` header, through a direct or TLS-passthrough connection. + +If the gateway presents an external server certificate, use that issuer's server +trust bundle for `ca.crt` instead of the chart CA. The operator client +certificate remains signed by the chart CA in this example. + +cert-manager renews the Kubernetes Secret according to the Certificate's +`duration` and `renewBefore`. Refresh any exported certificate and key files +after renewal and reconnect the application with the updated pair. + ## Using a real Issuer for the server certificate By default, cert-manager issues both the server and client certificates from diff --git a/docs/kubernetes/setup.mdx b/docs/kubernetes/setup.mdx index 854f1b644c..7739932729 100644 --- a/docs/kubernetes/setup.mdx +++ b/docs/kubernetes/setup.mdx @@ -132,7 +132,7 @@ pkiInitJob: The default Kubernetes driver puts all workspaces in one sandbox namespace. To have the gateway create a namespace for each workspace, follow -[Workspace on Kubernetes](/kubernetes/workspaces). +[Workspaces on Kubernetes](/kubernetes/workspaces). ### Split gateway and workspace releases diff --git a/docs/kubernetes/workspaces.mdx b/docs/kubernetes/workspaces.mdx index 816192fbb6..2ea0bc77ec 100644 --- a/docs/kubernetes/workspaces.mdx +++ b/docs/kubernetes/workspaces.mdx @@ -1,7 +1,7 @@ --- # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -title: "Workspace on Kubernetes" +title: "Workspaces on Kubernetes" sidebar-title: "Workspaces" description: "Configure how OpenShell workspaces map to Kubernetes namespaces, including managed per-workspace namespaces." keywords: "Kubernetes, Workspaces, Namespaces, Managed Mode, Helm, RBAC" diff --git a/skills/debug-openshell-cluster/SKILL.md b/skills/debug-openshell-cluster/SKILL.md index 029e81e7ac..9351671c0d 100644 --- a/skills/debug-openshell-cluster/SKILL.md +++ b/skills/debug-openshell-cluster/SKILL.md @@ -990,6 +990,15 @@ If the gateway pod is pending with `MountVolume.SetUp failed for volume `templates/certgen.yaml` output and the hook Job logs; cert-manager creates TLS Secrets but does not create the sandbox JWT signing Secret. +Operator certificates can be issued with a standalone cert-manager `Certificate` +using the chart's existing `-ca-issuer`. Verify exact `OU=operator`, +client authentication usage, and a chain trusted by the gateway client CA. +Authorization needs `gatewayConfig["openshell.gateway.mtls_auth"].operator_enabled=true` +and direct mTLS. Check the standalone Certificate's Ready condition and its +Secret's subject and expiry. Keep this dedicated Secret outside gateway, +supervisor, and workload pods. Exported CLI certificate/key files need refreshing +after renewal. See Managing Certificates in the published Kubernetes docs. + If the gateway exits with `failed to read sandbox JWT signing key from /etc/openshell-jwt/signing.pem`, verify that `openshell-jwt-keys` contains `signing.pem`, `public.pem`, and `kid`, and that the gateway workload mounts the From a1bc60bd1981c35754637f656ff03f115852c5a2 Mon Sep 17 00:00:00 2001 From: Taylor Mutch Date: Mon, 30 Nov 2026 14:25:42 -0800 Subject: [PATCH 2/3] docs(helm): refresh documentation links Signed-off-by: Taylor Mutch --- deploy/helm/openshell/README.md | 6 +++--- deploy/helm/openshell/README.md.gotmpl | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/deploy/helm/openshell/README.md b/deploy/helm/openshell/README.md index 0af2b70ffc..234259afa5 100644 --- a/deploy/helm/openshell/README.md +++ b/deploy/helm/openshell/README.md @@ -196,7 +196,7 @@ helm install openshell oci://quay.io/ai-openshell/charts/openshell --version Date: Mon, 30 Nov 2026 14:27:17 -0800 Subject: [PATCH 3/3] docs(helm): undo optional link changes Signed-off-by: Taylor Mutch --- deploy/helm/openshell/README.md | 4 ++-- deploy/helm/openshell/README.md.gotmpl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/deploy/helm/openshell/README.md b/deploy/helm/openshell/README.md index 234259afa5..ad4dd9ce37 100644 --- a/deploy/helm/openshell/README.md +++ b/deploy/helm/openshell/README.md @@ -504,7 +504,7 @@ later. With an older Helm, save the values with `--reset-values -f values.yaml`. `--reuse-values` keeps the previous chart version's defaults, which lack the autoscaling values, including the scale-down `behavior`, when that release predates them. For background, refer to -[Migrating Deployments and StatefulSets to horizontal autoscaling](https://kubernetes.io/docs/concepts/workloads/autoscaling/horizontal-pod-autoscale/#migrating-deployments-and-statefulsets-to-horizontal-autoscaling). +[Migrating Deployments and StatefulSets to horizontal autoscaling](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#migrating-deployments-and-statefulsets-to-horizontal-autoscaling). Disabling autoscaling renders `spec.replicas` from `replicaCount` again, which defaults to 1, so set `replicaCount` to the replica count you want in that upgrade. @@ -627,7 +627,7 @@ Set `node_local_port: 8443` instead of `endpoint` to use the gateway's local agent directly. The chart injects its node address from `status.hostIP`; the agent must expose its Broker port on that address. This path needs no Broker Service. See -[gateway configuration](https://docs.nvidia.com/openshell/latest/how-it-works/gateways/configuration#sandbox-identity-through-the-spiffe-broker-api) +[gateway configuration](https://docs.nvidia.com/openshell/how-it-works/gateways/configuration#sandbox-identity-through-the-spiffe-broker-api) for peer identity policies, multi-node registrations, and authorization. ## Values diff --git a/deploy/helm/openshell/README.md.gotmpl b/deploy/helm/openshell/README.md.gotmpl index 91378a9c2b..4441c571d3 100644 --- a/deploy/helm/openshell/README.md.gotmpl +++ b/deploy/helm/openshell/README.md.gotmpl @@ -505,7 +505,7 @@ later. With an older Helm, save the values with `--reset-values -f values.yaml`. `--reuse-values` keeps the previous chart version's defaults, which lack the autoscaling values, including the scale-down `behavior`, when that release predates them. For background, refer to -[Migrating Deployments and StatefulSets to horizontal autoscaling](https://kubernetes.io/docs/concepts/workloads/autoscaling/horizontal-pod-autoscale/#migrating-deployments-and-statefulsets-to-horizontal-autoscaling). +[Migrating Deployments and StatefulSets to horizontal autoscaling](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#migrating-deployments-and-statefulsets-to-horizontal-autoscaling). Disabling autoscaling renders `spec.replicas` from `replicaCount` again, which defaults to 1, so set `replicaCount` to the replica count you want in that upgrade. @@ -628,7 +628,7 @@ Set `node_local_port: 8443` instead of `endpoint` to use the gateway's local agent directly. The chart injects its node address from `status.hostIP`; the agent must expose its Broker port on that address. This path needs no Broker Service. See -[gateway configuration](https://docs.nvidia.com/openshell/latest/how-it-works/gateways/configuration#sandbox-identity-through-the-spiffe-broker-api) +[gateway configuration](https://docs.nvidia.com/openshell/how-it-works/gateways/configuration#sandbox-identity-through-the-spiffe-broker-api) for peer identity policies, multi-node registrations, and authorization. {{ template "chart.valuesSection" . }}