-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issues with self-signed
certificates
#9518
Conversation
certificates
self-signed
certificates
d98d9c4
to
da2c5ad
Compare
/werft run 👍 started the job as gitpod-build-tar-etc-empty-mounts.7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works really well. It also works when using the ca-issuer-ca
, which is the internal CA that's used to create all the internal certs.
This PR includes temporary fixes to get `Certificate` option working with `self-signed` certificates. Currently, Whenever the `Certificate` config option is set to a specific secret, we seem to assume **by default** that they are publicly signed. This currently has the following issues when they are `self-signed` : - Due to the usage of `Certificate` in internal facing services like `registry-facade`, Internal clients fail to communicate as the self-signed CA is not in their trust store. (Fix: Update `registry-facade` to use `builtin-registry-facade-cert`, generated by `cert-manager`) - Due to the fact that internal `registry` communication also flows through the `proxy`, This communication fails as the `proxy` cert is self-signed as its not available in the trust store. (Fix: Update the `registry-facade` daemonset to also include `crt` of `Certificate` in its trust store). This PR also fixes an issue with `image-builder-mk3` when the `customCACert` option is set, by removing `InternalVolumeCAMount` as it makes the `etc/ssl/certs` empty and readOnly (which prevents from mounting the customCACert cert into `etc/ssl/certs` This is not needed as the directory probably exists, or we don't need to mount it specifically. Individually cert files can be attached directly into the folder while keeping the existing files the same. Signed-off-by: Tarun Pothulapati <tarun@gitpod.io>
da2c5ad
to
3a49f72
Compare
This PR broken preview environment, because this self-signed cert is doesn't trust by k3s(contained), it cause the image pull failed CC @Pothulapati |
@iQQBot This is weird, as we pass the same CA cert is loaded into kubelets by the same registry-facade daemonset! Wondering why that cert is not being used! 🤔 |
I haven't looked into why it wasn't loaded correctly into containerd, but it's easy to verify, just open a branch and build with |
gitpod/install/installer/pkg/components/registry-facade/daemonset.go Lines 189 to 194 in f5778fa
maybe it is because here In the preview environment, we will randomly specify the port of registry-facad, this replacement is processed in the post-process installer, most likely not processed to this (guess, not yet verified) But by the way, in the harvester test environment, there is no need for random ports anymore |
Description
This PR includes temporary fixes to get
Certificate
option working withself-signed
certificates.Currently, Whenever the
Certificate
config option is set to a specific secret, we seem to assume by defaultthat they are publicly signed. This currently has the following issues when they are
self-signed
:Certificate
in internal facing services likeregistry-facade
, Internal clients fail to communicate as the self-signed CA is not in their trust store. (Fix: Updateregistry-facade
to usebuiltin-registry-facade-cert
, generated bycert-manager
)registry
communication also flows through theproxy
, This communication fails as theproxy
cert is self-signed as its not available in the trust store. (Fix: Update theregistry-facade
daemonset to also inclduecrt
ofCertificate
in its trust store).This PR also fixes an issue with
image-builder-mk3
when thecustomCACert
option is set, by removingInternalVolumeCAMount
as it makes theetc/ssl/certs
empty and readOnly (which prevents from ounting the customCACert cert intoetc/ssl/certs
Related Issue(s)
Part of #9074
How to test
Generate a CA, and self-signed SSL by following https://gist.github.com/Pothulapati/a7c68e073cdbf8573f12b64320711ce5 (or any other online tutorial for that matter)
Release Notes
Documentation