-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[single-host] Preview view does not seem to work in a stable manner (Mixed Content - https / http) #18561
Comments
Two interesting moments here:
|
I'm not sure how the preview URLs are generated by the Ports Che Plug-in. cc @benoitf |
It generates https links on my minikube Che instance. |
URLs are generated from there https://github.com/eclipse/che-theia/blob/master/plugins/ports-plugin/src/devfile-handler-che-server-impl.ts in single host (and maybe openshift), 'user content' is deployed on http and not over https so still investigating if we computer/get a wrong url |
The ones that are working are the one getting through the port plugin. Quarkus was working because of a bug: #18512 |
@benoitf @azatsarynnyy @skabashnyuk could we assign the issue to the right team and prioritize accordingly. This is a concern for a product and SaaS - https://issues.redhat.com/browse/CRW-1451 |
We discussed this in the past and concluded that this is an inevitable consequence of running the singlehost mode. The issue is that we cannot expose the devfile-defined endpoints under a singlehost URL and be confident that it will always work - server-generated absolute URLs certainly won't, the application needs to be agnostic of the webroot, etc. So we concluded that a separate domain for the devfile-defined endpoints is a must. But that brings along the problem of needing a wildcard certificate should this endpoint be on https - because we cannot know the domain names upfront. Because we don't want to require wildcard certificates, the endpoint needs to be exposed on HTTP. But, of course, this brings in the UX issue of the preview pane not working. Given the reasoning above, we concluded that that is inevitable and we need to work in che-theia to change the UI flow in this usecase to let the user know that a separate window needs to be opened for the preview to work. |
Require no, but an option yes. |
But that option would be configured on the che server. But che-theia needs to work regardless of the option is on or off. So IMHO it really doesn't make a difference, because we need to take into account the fact that there might NOT be a wildcard cert available. |
I mean, in both cases (http or https with untrusted cert), the page won't be rendered in the preview panel. So why actually forcing http? On the other hand Theia should be smarter and open links in a new tab if it's not able to render it in the preview panel. |
We would have cases where admin would have configured a wildcard certificate. So exposing in We could save that bug in many Che installation.
The preview panel should render a nice error message with the url link (to open in a new tab). |
Ports Plug-in should check if Che-Theia is loaded from https AND a preview URL is http - then just open the URL in a dedicated tab without any additional confirmations. I'm setting |
Because with an untrusted cert, you have 1 more hoop to jump through (accepting the security exception in the browser) before you can access the app. But you're right that we should make this configurable, because encrypted traffic might be required and we would just have to sacrifice a little bit of UX for the additional security. |
The issue is reported on 7.22. Can we please get it updated to current version with clear steps to reproduce and exact setup (platform, installation, configuration, tls certificate, devfile). I wasn't able to reproduce it on openshift 4.6 with let's encrypt wildcard certificate and golang sample devfile. The endpoint was on https and loaded without any issues in the preview. |
@sparkoo you take devsandbox https://codeready-codeready-workspaces-operator.apps.sandbox.x8i5.p1.openshiftapps.com/, with any (but the quarkus one as #18512 has not been applied) get started devfile and run. Just tried with spring one. |
@sunix I don't know how devsanbox is configured. And what is exact version there? I can see |
Here is the config, it is vanilla
|
What che version is CRW 2.5.1 based on? This might be an important fix in che 7.21 #18065 |
it is based on 7.20.1 AFAIK |
Looks, like the issue, is fixed in 7.24.2 / CRW 2.6.0 |
Describe the bug
"Preview" view does not seem to work in a stable manner with single-host
Che version
7.22.0
Steps to reproduce
about:blank
, navigating to preview URL in the separate browser tab works fine:Expected behavior
Preview view works and exposes the user app corrctly
Runtime
OpenShift
Logs
Mixed Content: The page at '/dashboard/#/ide/ibuziuk/spring-boot-http-booster-tmayn' was loaded over HTTPS, but requested an insecure frame 'http://routefxwlkq62-ibuziuk-code.apps.sandbox.x8i5.p1.openshiftapps.com/'. This request has been blocked; the content must be served over HTTPS.
The text was updated successfully, but these errors were encountered: