Managing Certificates
Configure the OpenShell Helm chart to use cert-manager for mTLS certificate issuance and automatic renewal.
The OpenShell gateway uses TLS for transport to sandbox supervisors. Supervisor Pods receive the gateway CA, not a client certificate or private key, and authenticate RPCs with sandbox JWTs. The generated client certificate can authenticate user clients when gateway mTLS user authentication is enabled; shared deployments can instead configure OIDC or a trusted access proxy. The Helm chart supports two ways to provision and manage the certificate bundle:
| Mode | When to use |
|---|---|
Built-in pkiInitJob (default) |
The default path. A pre-install Kubernetes Job generates a self-signed CA and certificates during installation. No additional dependencies. |
| cert-manager | Production deployments that need automatic certificate rotation managed by a running controller. |
The rest of this page covers switching to cert-manager. The built-in mode requires no configuration.
Install cert-manager
Section titled “Install cert-manager”Install cert-manager from the OCI registry with CRD support enabled:
helm upgrade --install cert-manager oci://quay.io/jetstack/charts/cert-manager \ --version v1.20.3 \ --namespace cert-manager \ --create-namespace \ --set crds.enabled=true \ --waitVerify the cert-manager pods are running:
kubectl -n cert-manager get podsInstall OpenShell with cert-manager PKI
Section titled “Install OpenShell with cert-manager PKI”Pass the cert-manager values override when installing or upgrading the chart:
helm upgrade --install openshell \ oci://quay.io/ai-openshell/charts/openshell \ --version <version> \ --namespace openshell \ --set certManager.enabled=trueThe chart creates a self-signed CA, issues server and client certificates from it, and cert-manager handles renewal before expiry.
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
Section titled “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:
certManager: enabled: trueserver: disableTls: false tls: enableMtls: true
gatewayConfig: openshell.gateway.mtls_auth: operator_enabled: trueInstall or upgrade using your deployment’s other values files as well:
helm upgrade --install openshell oci://quay.io/ai-openshell/charts/openshell \ --version <version> --namespace openshell \ --values operator-values.yamlThe 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 <fullname>-ca-issuer Issuer.
apiVersion: cert-manager.io/v1kind: Certificatemetadata: name: openshell-operator-client namespace: openshellspec: 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.ioApply it and wait for issuance:
kubectl apply -f operator-certificate.yamlkubectl -n openshell wait certificate/openshell-operator-client --for=condition=Ready --timeout=120sThe 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
for the authorization and trust boundary.
Verify the certificate
Section titled “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:
umask 077mkdir -p operator-tlskubectl -n openshell get secret openshell-operator-client-tls -o jsonpath='{.data.tls\.crt}' | base64 --decode > operator-tls/tls.crtkubectl -n openshell get secret openshell-operator-client-tls -o jsonpath='{.data.tls\.key}' | base64 --decode > operator-tls/tls.keykubectl -n openshell get secret openshell-server-tls -o jsonpath='{.data.ca\.crt}' | base64 --decode > operator-tls/ca.crtKeep a direct Service port-forward running:
kubectl -n openshell port-forward svc/openshell 8090:8080In another terminal, use grpcurl to check the authenticated identity:
grpcurl -cacert operator-tls/ca.crt \ -cert operator-tls/tls.crt -key operator-tls/tls.key \ -d '{}' localhost:8090 openshell.v1.OpenShell/GetCurrentUserThe 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
Section titled “Using a real Issuer for the server certificate”By default, cert-manager issues both the server and client certificates from
a self-signed CA the chart creates — this rotates automatically, but the
server certificate is still not publicly trusted. certManager.serverIssuerRef
overrides the issuerRef on the server Certificate resource to point at a
real Issuer or ClusterIssuer instead, for example a LetsEncrypt/ACME issuer:
helm upgrade --install openshell \ oci://quay.io/ai-openshell/charts/openshell \ --version <version> \ --namespace openshell \ --set certManager.enabled=true \ --set certManager.serverIssuerRef.name=letsencrypt-prod \ --set certManager.serverIssuerRef.kind=ClusterIssuer \ --set certManager.serverDnsNames[0]=openshell.example.comDual certificate architecture
Section titled “Dual certificate architecture”When serverIssuerRef is set, the chart creates two server certificates:
- Internal certificate (
openshell-server-tls): signed by the chart CA with internal SANs (*.svc.cluster.local,localhost, etc.). - External certificate (
openshell-server-external-tls): signed by the configured issuer (e.g. ACME) with only the hostnames fromcertManager.serverDnsNames.
The gateway uses SNI to select which certificate to present: supervisors connect via internal service names and receive the internal certificate (verified against the chart CA they already trust), while CLI users connecting through a Route or ingress use the external hostname and receive the ACME certificate. This keeps supervisor trust pinned to only the operator’s chart CA — no WebPKI root trust is needed.
The default clientCaFromServerTlsSecret=true is correct even when
serverIssuerRef is set: the internal server certificate is always signed
by the chart CA (the same CA that signs the client certificate), so its
ca.crt is the right trust anchor for mTLS verification.
Next Steps
Section titled “Next Steps”Return to Setup to complete the installation. For exposing the gateway externally on OpenShift with a real certificate, see OpenShift.
We are a Cloud Native Computing Foundation sandbox project.
Copyright OpenShell a Series of LF Projects, LLC
For website terms of use, trademark policy and other project policies please see lfprojects.org/policies/.