Che Plugin Broker, impossible to download vsix plugins in https
Is your enhancement related to a problem? Please describe.
Hello there we are trying to deploy a nightly of Che during workspace startup plugins vsix are not downloaded because they are stored in through a https server : 2019-08-07 14:39:14,043[aceSharedPool-0] [WARN ] [.i.k.KubernetesInternalRuntime 245] - Failed to start Kubernetes runtime of workspace workspaceyx96zzqq8nngx5cp. Cause: Plugins installation process failed. Error: Plugin broking process for workspace workspaceyx96zzqq8nngx5cp failed with error: Get https://git.../vscode-java-debug-0.19.0.vsix: x509: certificate signed by unknown authority
It seems the problem comes from che plugin broker, how can i set cert options ? or disable ssl check (--insecure ?)
Describe the solution you'd like
provide options to configure or disable certs
Describe alternatives you've considered
Additional context
copy paste of https://bugs.eclipse.org/bugs/show_bug.cgi?id=549867
@TristanFAURE which version of Che are you using? I believe this should be fixed by eclipse/che-plugin-broker#67 and #140897
+1, need this for air gap / offline plugin registry so we can use https URL for the plugin registry route.
@nickboldt but offline mode is not related to this particular issue, or I'm missing your point? https://github.com/eclipse/che/issues/14115
I'm also experiencing the same error as described. I'm using the 7.0.0-rc-5.0-SNAPSHOT version. eclipse/che-plugin-broker#67 should already be included in this version (Seeing as it was merged 11 days ago), correct? Then why am I still experiencing the issue? Please advise.
Is there any update?
I managed to bypass the issue by changing the proxy settings and allowing SSL communications on GitHub, which is where the problematic extension is being downloaded from. The error was indeed with certificates - specifically, that because my proxy was acting as a man-in-the-middle for SSL communications, my Che pod was getting the extension download from the proxy with the proxy's certificate, which the pod didn't recognize from its trustedcerts.
However, this is a temporary solution and isn't secure or possible for long-term.
cc @skabashnyuk
@AmitChameides can you provide some additional information
Che version
- [ ] latest
- [ ] nightly
- [ ] other: please specify
Steps to reproduce
Expected behavior
Runtime
- [ ] kubernetes (include output of
kubectl version) - [ ] Openshift (include output of
oc version) - [ ] minikube (include output of
minikube versionandkubectl version) - [ ] minishift (include output of
minishift versionandoc version) - [ ] docker-desktop + K8S (include output of
docker versionandkubectl version) - [ ] other: (please specify)
Screenshots
Installation method
- [ ] chectl
- [ ] che-operator
- [ ] minishift-addon
- [ ] I don't know
Environment
- [ ] my computer
- [ ] Windows
- [ ] Linux
- [ ] macOS
- [ ] Cloud
- [ ] Amazon
- [ ] Azure
- [ ] GCE
- [ ] other (please specify)
- [ ] other: please specify
Additional context
Che version
- [ ] latest
- [X] nightly
- [ ] other: please specify
Steps to reproduce
Be behind a proxy which man-in-the-middles ssl connections :)
Expected behavior
A successful, bug-free workspace setup in Eclipse Che
Runtime
- [ ] kubernetes (include output of
kubectl version) - [X] Openshift (include output of
oc version) - [ ] minikube (include output of
minikube versionandkubectl version) - [ ] minishift (include output of
minishift versionandoc version) - [ ] docker-desktop + K8S (include output of
docker versionandkubectl version) - [ ] other: (please specify)
Screenshots
Installation method
- [ ] chectl
- [X] che-operator
- [ ] minishift-addon
- [ ] I don't know
Pretty sure I used the Che operator, I used the tutorial as described here
Environment
- [ ] my computer
- [ ] Windows
- [ ] Linux
- [ ] macOS
- [ ] Cloud
- [ ] Amazon
- [ ] Azure
- [ ] GCE
- [ ] other (please specify)
- [x] other: please specify
Our OpenShift runs on a cluster of internal servers.
Additional context
The company has its own certificates, which the proxy also has. This means that whenever the Che Plugin Broker needs to install extensions for the plugins it's trying to download, the following events happen:
- The pod sends a request for some extension which is on GitHub somewhere
- The request is sent through the proxy, which acts as a man-in-the-middle for the communication session
- Because GitHub is https, the communication requires certification and as such the pod also expects to get data back in certified packets
- GitHub gets the request for extensions and sends them back to my pod through the proxy
- My pod gets the extensions, but because they passed through the proxy and have the certification of the proxy (Which, let me remind you, has the company's certificate), the pod doesn't recognize the certificate used by the proxy (It's not in the pod's certificate truststore) and the workspace setup fails
- The error shared at the beginning of the thread is shown
So it seems that we should allow the plugin broker to add additional certificates to its rootCA store, exactly like what was already done with the Openshift route self-signed certificates at line 53 of PR #67
Now the main question is how this list of additional (enterprise) root certificates in PEM format will be provided to the broker ? new argument ? optional sercret ?
@skabashnyuk any idea ?
@skabashnyuk any idea ?
none at this moment
@AmitChameides Could you please try to add self-signed cert to your Che installation. To do it you should:
- create a secret with name
self-signed-certificatewithca.crtkey where your self-signed CA will be stored; - modify your Che CR by setting
trueforselfSignedCerthttps://github.com/eclipse/che-operator/blob/master/deploy/crds/org_v1_che_cr.yaml#L35
I'm not sure that it will help since we tested it for a bit different case, but we can try =)
Hey all, I managed to find a bypass for the error, which isn't perfect but should be able to fix it for anyone under similar conditions to me (Setting up Eclipse Che multiuser in an enterprise environment using a proxy which man-in-the-middles SSL communication). It's a little complicated but it worked for me.
I describe the solution in this GitHub thread. @TristanFAURE , please try out my solution and let me know if you have any questions.
Hi. Any updates on this? I'm trying @AmitChameides workaround. Could you please detail how to add custom certificates to the Che Plugin Broker pod's truststore?
Hey @anselmov , before I continue let me just say it's been months since I've last touched this so I may be a little fuzzy on the details, and I never actually got it working all the way.
I'm going to assume you have the custom certificates handy and ready to be inserted. As I described in my solution on the other page, we want to insert these certificates into our custom local versions of the Che images. So, if you haven't already, clone the repos of those images.
You'll want to look for the Dockerfile of the images, and edit it. In order to add your certificates to the truststore, you'll need to add the following:
RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/*
COPY ./My/Secret/Directory.pem
COPY ./My/Other/Secret/And/So/On.pem
RUN update-ca-certificates
After that, you may run into further issues. Back when I did, I opened this thread. Maybe you'll find something that will help you.
Good luck!
@TristanFAURE
Self-signed certificates are propagated correctly to plugin broker as described in helm chart :
## If self-signed certificate is enabled
## then certificate from `tls.selfSignedCertSecretName` will be propagated to Che components' trust stores
useSelfSignedCerts: true
selfSignedCertSecretName: self-signed-cert
#14035 So I think that this issue can be closed.
@NM4 if you think so, I'm OK with your opinion