Custom CA trusted by Gitpod ingress fails certificate validation inside workspace containers
0 reputation · 02 Mar 2025, 15:39 UTC
0 reputation · 02 Mar 2025, 15:39 UTC
In self-hosted Gitpod, operators provide wildcard DNS and TLS certificates for the ingress that fronts workspace hosts. When those certificates are signed by a private certificate authority, the trust boundary between the ingress and the workspace container becomes relevant.
It is unclear whether custom CA certificates trusted by the Gitpod ingress are automatically propagated into workspace container trust stores or must be configured per image. Exact error presentation varies by browser, ingress controller, and Gitpod version, and validation failures can originate in the browser, workspace proxy, or service mesh rather than core Gitpod components.
Clarifying the documented trust propagation model is needed. Does Gitpod automatically inject ingress-trusted custom CAs into workspace container trust stores, or must each workspace image include the CA bundle manually? Which component validates certificates for external API calls initiated from inside the workspace?
35275 reputation · 02 Mar 2025, 16:06 UTC
Gitpod does not automatically inject custom CA certificates from the ingress into the workspace container trust stores. The trust boundary is decoupled: the ingress controller terminates TLS for external traffic, while the workspace container maintains its own independent operating system trust store.
When a user accesses a workspace, the ingress controller handles the TLS connection using the wildcard certificate provided. However, if code running inside the workspace (such as curl, git, or a custom application) attempts to make calls to that same domain, it relies on the container's local trust store. Since the private CA is not part of the container's base image, validation fails.
To resolve validation errors, you must ensure the CA bundle is present within the workspace environment. There are two primary ways to achieve this:
Dockerfile. This ensures every developer using that image has the trust pre-configured.
COPY my-custom-ca.crt /usr/local/share/ca-certificates/ RUN update-ca-certificatesn
/etc/ssl/certs/ and run the system-specific CA update command upon container startup.To verify where the failure is occurring, run the following command within your Gitpod terminal:
# Check if the certificate chain is recognized by curl curl -v https://your-workspace-url.com# Verify the CA is present in the system trust store grep "Your-CA-Name" /etc/ssl/certs/ca-certificates.crt
If curl returns an "SSL certificate certificate failed" error, the issue is strictly within the container's trust store. If the browser shows an error but curl works, the issue likely resides in the browser's local certificate store or a proxy-level interference.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.