Skip to content
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

Unable to run task when using custom TLS certificate #18957

Closed
l0rd opened this issue Feb 3, 2021 · 11 comments
Closed

Unable to run task when using custom TLS certificate #18957

l0rd opened this issue Feb 3, 2021 · 11 comments
Assignees
Labels
area/plugins kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system.
Milestone

Comments

@l0rd
Copy link
Contributor

l0rd commented Feb 3, 2021

Describe the bug

I have deployed Che on minikube. I am using a custom TLS certificate for Che endpoints.

That means that I have:

When trying to run a task I get the following error:

Error launching task 'maven build': Request runTask failed with message: Failed to execute Che command: unable to verify the first certificate 

image

Che version

nightly

Steps to reproduce

Deploy Che on minikube using chectl
Configure Che to use a custom certificate as described here
Start the Java maven sample
Try to start one of the 2 tasks provided

Expected behavior

The maven build should run successfully

Runtime

minikube

minikube version: v1.17.1
commit: 043bdca07e54ab6e4fc0457e3064048f34133d7e

Installation method

$  chectl update next && \
   chectl server:deploy \
       -p minikube

Environment

macOS

@l0rd l0rd added kind/bug Outline of a bug - must adhere to the bug report template. area/editor/theia Issues related to the che-theia IDE of Che severity/P1 Has a major impact to usage or development of the system. labels Feb 3, 2021
@azatsarynnyy azatsarynnyy added area/plugins and removed area/editor/theia Issues related to the che-theia IDE of Che labels Feb 3, 2021
@azatsarynnyy
Copy link
Member

I'm labeling it as area/plugins it's related to Task Plug-in.

@ericwill ericwill mentioned this issue Feb 4, 2021
35 tasks
@ericwill ericwill added this to the 7.27 milestone Feb 8, 2021
@ericwill ericwill modified the milestones: 7.27, 7.28 Mar 2, 2021
@sunix
Copy link
Contributor

sunix commented Mar 3, 2021

I have managed to reproduce this issue.
My thoughts:

@ericwill ericwill mentioned this issue Mar 3, 2021
46 tasks
@sunix
Copy link
Contributor

sunix commented Mar 3, 2021

Maybe different cert being used here: https://github.com/eclipse/che-machine-exec/blob/master/main.go#L87

@sleshchenko
Copy link
Member

Why it is working with the origininal self-signed certificate that is generated when installing Che?

The difference I see:
https://che-incubator.github.io/2021/02/01/@mario.loriedo-using-mkcert-to-locally-trust-eclipse-che-tls-certificates-ffaafe76e5d0.html creates CA into custom-certs cert

While default certs Che operator generated, are propagated over

    spec:
      containers:
      - env:
        - name: CHE_SELF__SIGNED__CERT
          valueFrom:
            secretKeyRef:
              key: ca.crt
              name: self-signed-certificate
              optional: true
        - name: CHE_GIT_SELF__SIGNED__CERT
        - name: CHE_GIT_SELF__SIGNED__CERT__HOST

from secret self-signed-certificate
Custom certificates and Che Self-signed can be used on different ways.

@ericwill
Copy link
Contributor

ericwill commented Mar 9, 2021

What's left to be done for this ticket, @sunix can we close it?

@sunix
Copy link
Contributor

sunix commented Mar 10, 2021

Yes closing. FYI, I created #19246 to clarify our docs on how things should be configured as a che admin. And how plugins/editors/applications should consume these certificate.

@sunix sunix closed this as completed Mar 10, 2021
@l0rd
Copy link
Contributor Author

l0rd commented Mar 15, 2021

@sunix Can you provide more details? In particular what's not clear is:

  1. Have you been using a custom TLS certificate (not the auto generated one) and have Che working?
  2. Are the steps to configure Che to use a custom certificate easy to follow for an admin?

@l0rd l0rd reopened this Mar 15, 2021
@l0rd
Copy link
Contributor Author

l0rd commented Mar 16, 2021

@sunix the custom certificate is trusted by the Che server (because it's able to communicate with Keycloak), by the plugin brokers (because they are able to communicate with the registries), by Theia (because it's able to communicate with the Che server). But somehow there is a process that probably looks in the bad (old/legacy) folder for trusted certificates and running tasks fail.

@sunix
Copy link
Contributor

sunix commented Mar 16, 2021

To test: remove the certificate generated by chectl from the browser and see if terminal is working or not.

@l0rd
Copy link
Contributor Author

l0rd commented Mar 16, 2021

I have somehow missed that the issue had been solved by eclipse-che/che-theia#1019. I thought that the issue was closed in favor of a doc issue. I will verify the fix and if it works for me I will close the issue later today.

To test: remove the certificate generated by chectl from the browser and see if terminal is working or not.

I never install the certs generated by chectl anyway

@l0rd
Copy link
Contributor Author

l0rd commented Mar 17, 2021

Closing as this issue as been solved. Although I am still not able to successfully run this scenario as I have found another bug 😡

@l0rd l0rd closed this as completed Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/plugins kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

No branches or pull requests

5 participants