-
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
Make Che Theia webviews work in Che #15283
Comments
Could you please also check that this feature also works on single-host mode. |
I will try. But last time I had issues with deploying single-host mode, so @skabashnyuk could you please provide precise steps how I can deploy Che multiuser with TLS (self signed cert is ok) single-host instance. Let's suppose that the first step is |
@mmorhun is it correct to assume that extensions that work in VS Code will work with the new code in Theia? Do we know the places we need to fix in che-theia? How can we tell when our code is broken? |
@tsmaeder yes VSCode extensions with webview should work in Eclipse Theia in case of using localhost (Otherwise https is required see this comment). |
For now we are going to set |
We might stick to an upstream commit before rewrite of webview support if it takes more than one day to handle problem. |
Note that we need that reworked welcome support for Quarkus tooling: #15113. So working around is ok for the moment, but we'll need a solution in the near future. |
After merging of eclipse-che/che-theia#563 webviews are working again (on the same domain, so no separation (security issue), but this is how it was before) but with new requirement to have Che Theia deployed using SSL (htttps protocol is required). |
@skabashnyuk could you please provide step by step instruction how to deploy Che in single host mode with SSL? Otherwise I am blocked with single host problem. |
I believe we should create docs for this stuff to share it with everyone... |
To accomplish host separation, I've added another endpoint into Theia editor yaml (in my test environment) which points to the same port: ...
spec:
endpoints:
- name: "theia"
public: true
targetPort: 3100
attributes:
protocol: http
type: ide
secure: true
cookiesAuthEnabled: true
discoverable: false
- name: "webviews"
public: true
targetPort: 3100
attributes:
protocol: http
type: webview
secure: true
cookiesAuthEnabled: true
discoverable: false
... but Che Master creates only one route for it. In other words, in workspace configuration I see two servers which has identical url, which makes impossible described above approach with separation of Che Theia and webviews hosts. So we need a way to say Che Mater to have two routes to the same target port in workspace pod. |
cc: @skabashnyuk ^^ |
…te per public endpoint instead of merging the endpoints by port and only creating ingresses/routes per exposed port. Signed-off-by: Lukas Krejci <lkrejci@redhat.com>
I faced new problem in separating webviews from Che-Theia. Beside #15430 we have problem with workspace loader. To explain the problem I must elaborate on some routes details first. Each route in workspace has attributes. Let's consider attributes related to security. They are In case of webviews which are hosted on another from Che-Theia route we have problem with loader (which implements setting the auth cookie). If we have set @skabashnyuk have I missed something? Do you have an idea what we can do here? |
Also forgot to mention, if open webviews route manually in browser, it will set the auth cookie and after Che-Theia page refresh webviews are working. |
I'm closing it as Theia WebViews are working in Che Theia, on the same origin. |
Fixes #15283. Introduce a new server config attribute - "unique" - to require the server be exposed on a unique location, separate from the other endpoints sharing the same port. Signed-off-by: Lukas Krejci <lkrejci@redhat.com>
There is a PR in Eclipse Theia which reworks completely webview mechanism.
Some plugins are using webviews (like the Che-Theia welcome page, dependency analytics plugin and many others) and they will be broken (webview content will be empty) once the PR is merged.
According to the new model each webview will have a separate host (usually subdomain of main instance). We need to adapt Che Theia to this changes to make new webviews work in Che.
The text was updated successfully, but these errors were encountered: