Skip to content

Commit 5479604

Browse files
authored
docs(helm): document cert-manager operator mTLS setup (#4633)
* docs(helm): document operator mTLS gateway administration Signed-off-by: Taylor Mutch <taylormutch@gmail.com> * docs(helm): refresh documentation links Signed-off-by: Taylor Mutch <taylormutch@gmail.com> * docs(helm): undo optional link changes Signed-off-by: Taylor Mutch <taylormutch@gmail.com> --------- Signed-off-by: Taylor Mutch <taylormutch@gmail.com>
1 parent 0960626 commit 5479604

9 files changed

Lines changed: 172 additions & 6 deletions

File tree

‎deploy/helm/openshell/README.md‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ helm install openshell oci://quay.io/ai-openshell/charts/openshell --version <ve
196196
```
197197

198198
On OpenShift 4.22+, end-to-end TLS is supported via `BackendTLSPolicy`. See the
199-
[OpenShift install guide](https://docs.nvidia.com/openshell/latest/kubernetes/openshift#end-to-end-tls-openshift-422) for details.
199+
[OpenShift install guide](https://docs.nvidia.com/openshell/latest/kubernetes/openshift#end-to-end-tls-using-gateway-api-and-backendtlspolicy-openshift-422) for details.
200200

201201
## Available versions
202202

@@ -589,6 +589,16 @@ sandbox JWT signing Secret. This precedence applies even if
589589
external non-cert-manager TLS source manages TLS and you pre-create the sandbox
590590
JWT signing Secret.
591591

592+
Operator mTLS gives an operator application or user an administrative principal
593+
for managing the OpenShell gateway across all workspaces. Use a client
594+
certificate with exact `OU=operator` and client authentication usage, signed by
595+
a CA trusted by the gateway's configured client CA bundle. Enable authentication through
596+
`gatewayConfig["openshell.gateway.mtls_auth"].operator_enabled=true`.
597+
See [mTLS operators](https://docs.nvidia.com/openshell/latest/how-it-works/gateways/authentication#mtls-operators)
598+
for authentication requirements, or
599+
[Managing Certificates](https://docs.nvidia.com/openshell/latest/kubernetes/managing-certificates#issue-an-operator-client-certificate)
600+
for an example using cert-manager to issue and renew the certificate.
601+
592602
## SPIFFE/SPIRE provider token grants
593603

594604
Set `gatewayConfig.openshell.drivers.kubernetes.provider_spiffe_workload_api_socket_path`

‎deploy/helm/openshell/README.md.gotmpl‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ helm install openshell oci://quay.io/ai-openshell/charts/openshell --version <ve
197197
```
198198

199199
On OpenShift 4.22+, end-to-end TLS is supported via `BackendTLSPolicy`. See the
200-
[OpenShift install guide](https://docs.nvidia.com/openshell/latest/kubernetes/openshift#end-to-end-tls-openshift-422) for details.
200+
[OpenShift install guide](https://docs.nvidia.com/openshell/latest/kubernetes/openshift#end-to-end-tls-using-gateway-api-and-backendtlspolicy-openshift-422) for details.
201201

202202
## Available versions
203203

@@ -590,6 +590,16 @@ sandbox JWT signing Secret. This precedence applies even if
590590
external non-cert-manager TLS source manages TLS and you pre-create the sandbox
591591
JWT signing Secret.
592592

593+
Operator mTLS gives an operator application or user an administrative principal
594+
for managing the OpenShell gateway across all workspaces. Use a client
595+
certificate with exact `OU=operator` and client authentication usage, signed by
596+
a CA trusted by the gateway's configured client CA bundle. Enable authentication through
597+
`gatewayConfig["openshell.gateway.mtls_auth"].operator_enabled=true`.
598+
See [mTLS operators](https://docs.nvidia.com/openshell/latest/how-it-works/gateways/authentication#mtls-operators)
599+
for authentication requirements, or
600+
[Managing Certificates](https://docs.nvidia.com/openshell/latest/kubernetes/managing-certificates#issue-an-operator-client-certificate)
601+
for an example using cert-manager to issue and renew the certificate.
602+
593603
## SPIFFE/SPIRE provider token grants
594604

595605
Set `gatewayConfig.openshell.drivers.kubernetes.provider_spiffe_workload_api_socket_path`

‎docs/how-it-works/gateways/authentication.mdx‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ The connection flow:
7373

7474
### mTLS Operators
7575

76+
An operator mTLS certificate authenticates an operator application or user as
77+
an administrative principal for an OpenShell gateway. Use this identity for
78+
gateway administration, including managing workspaces, sandboxes, and providers
79+
across all workspaces. It supports both administrative automation and interactive
80+
operator access.
81+
7682
Enable `[openshell.gateway.mtls_auth] operator_enabled = true` to recognize a
7783
trusted client certificate whose organizational unit is exactly `operator`
7884
(`OU=operator`). This creates a distinct operator principal with user and
@@ -97,6 +103,10 @@ setting.
97103
See [Providers](/how-it-works/providers/overview#retrieve-runtime-credentials)
98104
for the credential retrieval contract.
99105

106+
For a Helm deployment example using cert-manager and the chart's CA issuer,
107+
see [Managing Certificates](/kubernetes/managing-certificates#issue-an-operator-client-certificate).
108+
It covers how to issue an operator client certificate using cert-manager.
109+
100110
### Inspect the API with grpcurl
101111

102112
The primary gateway listener serves the gRPC reflection v1 protocol. Reflection

‎docs/how-it-works/gateways/configuration.mdx‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,8 @@ Set `[openshell.gateway.mtls_auth] enabled = true` to map a verified client cert
506506

507507
Set `[openshell.gateway.mtls_auth] operator_enabled = true`,
508508
`--enable-operator-auth true`, or `OPENSHELL_ENABLE_OPERATOR_AUTH=true` to enable
509-
direct mTLS operators. The default is false. TLS and a client CA are required.
509+
an operator application or user to authenticate through direct mTLS as a gateway
510+
administrative principal. The default is false. TLS and a client CA are required.
510511
This setting is independent of `enabled` and OIDC. A verified certificate with
511512
the exact `OU=operator` grants user/platform-admin capabilities across all
512513
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
518519
verified operator certificate receive `Unauthenticated` unless another configured
519520
authentication mechanism accepts them or `allow_unauthenticated_users = true`.
520521

522+
On Helm deployments, set
523+
`gatewayConfig["openshell.gateway.mtls_auth"].operator_enabled=true` and use an
524+
operator client certificate signed by a trusted client CA.
525+
See [Managing Certificates](/kubernetes/managing-certificates#issue-an-operator-client-certificate)
526+
for an example using cert-manager to issue an operator client certificate.
527+
521528
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.
522529

523530
`[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.

‎docs/how-it-works/workspaces.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The CLI targets the `default` workspace unless you set `--workspace` or
1818
separate from the `/sandbox` filesystem directory inside a sandbox.
1919

2020
For Kubernetes namespace mapping and managed per-workspace namespaces, see
21-
[Workspace on Kubernetes](/kubernetes/workspaces).
21+
[Workspaces on Kubernetes](/kubernetes/workspaces).
2222

2323
## Understand the Role Model
2424

‎docs/kubernetes/managing-certificates.mdx‎

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,126 @@ The chart also runs a pre-install hook in JWT-only mode to create the gateway's
6060
sandbox JWT signing Secret. That Secret is separate from the cert-manager TLS
6161
certificate Secrets and is mounted at `/etc/openshell-jwt`.
6262

63+
## Issue an operator client certificate
64+
65+
An operator client certificate gives an operator application or user an
66+
administrative principal for managing an OpenShell gateway across all
67+
workspaces. The following example issues that identity with a standalone
68+
cert-manager `Certificate` managed outside the Helm release.
69+
70+
Save these Helm values as `operator-values.yaml`:
71+
72+
```yaml
73+
certManager:
74+
enabled: true
75+
server:
76+
disableTls: false
77+
tls:
78+
enableMtls: true
79+
80+
gatewayConfig:
81+
openshell.gateway.mtls_auth:
82+
operator_enabled: true
83+
```
84+
85+
Install or upgrade using your deployment's other values files as well:
86+
87+
```shell
88+
helm upgrade --install openshell oci://quay.io/ai-openshell/charts/openshell \
89+
--version <version> --namespace openshell \
90+
--values operator-values.yaml
91+
```
92+
93+
The gateway must trust the CA issuing the client certificate. Keep the default
94+
`certManager.clientCaFromServerTlsSecret: true` and a non-empty
95+
`server.tls.clientCaSecretName`. Alternatively, set
96+
`certManager.clientCaFromServerTlsSecret: false` and point
97+
`server.tls.clientCaSecretName` at `certManager.caSecretName`.
98+
99+
Save this standalone manifest as `operator-certificate.yaml`. It assumes a
100+
release named `openshell` in namespace `openshell`; adjust the namespace and
101+
`issuerRef.name` to match the chart's `<fullname>-ca-issuer` Issuer.
102+
103+
```yaml
104+
apiVersion: cert-manager.io/v1
105+
kind: Certificate
106+
metadata:
107+
name: openshell-operator-client
108+
namespace: openshell
109+
spec:
110+
secretName: openshell-operator-client-tls
111+
commonName: platform-operator
112+
subject:
113+
organizationalUnits:
114+
- operator
115+
duration: 168h
116+
renewBefore: 24h
117+
privateKey:
118+
algorithm: ECDSA
119+
size: 256
120+
usages:
121+
- client auth
122+
- digital signature
123+
issuerRef:
124+
name: openshell-ca-issuer
125+
kind: Issuer
126+
group: cert-manager.io
127+
```
128+
129+
Apply it and wait for issuance:
130+
131+
```shell
132+
kubectl apply -f operator-certificate.yaml
133+
kubectl -n openshell wait certificate/openshell-operator-client --for=condition=Ready --timeout=120s
134+
```
135+
136+
The exact `OU=operator` grants gateway-wide administration and access to
137+
`GetProviderCredentials` when operator authentication is enabled. Restrict
138+
access to the dedicated Secret and permission to issue certificates under the
139+
trusted client CA. See [mTLS operators](/how-it-works/gateways/authentication#mtls-operators)
140+
for the authorization and trust boundary.
141+
142+
### Verify the certificate
143+
144+
If you have `kubectl` access and want to verify that the certificate
145+
authenticates correctly, use the following example. Export the certificate,
146+
key, and server trust bundle:
147+
148+
```shell
149+
umask 077
150+
mkdir -p operator-tls
151+
kubectl -n openshell get secret openshell-operator-client-tls -o jsonpath='{.data.tls\.crt}' | base64 --decode > operator-tls/tls.crt
152+
kubectl -n openshell get secret openshell-operator-client-tls -o jsonpath='{.data.tls\.key}' | base64 --decode > operator-tls/tls.key
153+
kubectl -n openshell get secret openshell-server-tls -o jsonpath='{.data.ca\.crt}' | base64 --decode > operator-tls/ca.crt
154+
```
155+
156+
Keep a direct Service port-forward running:
157+
158+
```shell
159+
kubectl -n openshell port-forward svc/openshell 8090:8080
160+
```
161+
162+
In another terminal, use `grpcurl` to check the authenticated identity:
163+
164+
```shell
165+
grpcurl -cacert operator-tls/ca.crt \
166+
-cert operator-tls/tls.crt -key operator-tls/tls.key \
167+
-d '{}' localhost:8090 openshell.v1.OpenShell/GetCurrentUser
168+
```
169+
170+
The response should identify `platform-operator`, include the `operator` role,
171+
and report `identityProvider: "mtls"`. This confirms that the gateway recognizes
172+
the certificate as an operator identity. Send requests without an
173+
`Authorization` header, through a direct or TLS-passthrough connection.
174+
175+
If the gateway presents an external server certificate, use that issuer's server
176+
trust bundle for `ca.crt` instead of the chart CA. The operator client
177+
certificate remains signed by the chart CA in this example.
178+
179+
cert-manager renews the Kubernetes Secret according to the Certificate's
180+
`duration` and `renewBefore`. Refresh any exported certificate and key files
181+
after renewal and reconnect the application with the updated pair.
182+
63183
## Using a real Issuer for the server certificate
64184

65185
By default, cert-manager issues both the server and client certificates from

‎docs/kubernetes/setup.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ pkiInitJob:
132132
133133
The default Kubernetes driver puts all workspaces in one sandbox namespace. To
134134
have the gateway create a namespace for each workspace, follow
135-
[Workspace on Kubernetes](/kubernetes/workspaces).
135+
[Workspaces on Kubernetes](/kubernetes/workspaces).
136136
137137
### Split gateway and workspace releases
138138

‎docs/kubernetes/workspaces.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
4-
title: "Workspace on Kubernetes"
4+
title: "Workspaces on Kubernetes"
55
sidebar-title: "Workspaces"
66
description: "Configure how OpenShell workspaces map to Kubernetes namespaces, including managed per-workspace namespaces."
77
keywords: "Kubernetes, Workspaces, Namespaces, Managed Mode, Helm, RBAC"

‎skills/debug-openshell-cluster/SKILL.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -990,6 +990,15 @@ If the gateway pod is pending with `MountVolume.SetUp failed for volume
990990
`templates/certgen.yaml` output and the hook Job logs; cert-manager creates TLS
991991
Secrets but does not create the sandbox JWT signing Secret.
992992

993+
Operator certificates can be issued with a standalone cert-manager `Certificate`
994+
using the chart's existing `<fullname>-ca-issuer`. Verify exact `OU=operator`,
995+
client authentication usage, and a chain trusted by the gateway client CA.
996+
Authorization needs `gatewayConfig["openshell.gateway.mtls_auth"].operator_enabled=true`
997+
and direct mTLS. Check the standalone Certificate's Ready condition and its
998+
Secret's subject and expiry. Keep this dedicated Secret outside gateway,
999+
supervisor, and workload pods. Exported CLI certificate/key files need refreshing
1000+
after renewal. See Managing Certificates in the published Kubernetes docs.
1001+
9931002
If the gateway exits with `failed to read sandbox JWT signing key from
9941003
/etc/openshell-jwt/signing.pem`, verify that `openshell-jwt-keys` contains
9951004
`signing.pem`, `public.pem`, and `kid`, and that the gateway workload mounts the

0 commit comments

Comments
 (0)