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

Introduce endpoint field/attribute that allows requiring a unique host #230

Closed
sleshchenko opened this issue Nov 23, 2020 · 3 comments
Closed

Comments

@sleshchenko
Copy link
Member

Is your feature request related to a problem? Please describe.
The real use-case for it comes from Theia and Webview. As far as I can tell, are both listen to the same port but expect different hosts to be used because of security reasons - everything that is opened through the Webview component should not reach Theia cookies.

The way how Theia declares it in Che currently:
https://github.com/eclipse/che-plugin-registry/blob/master/v3/plugins/eclipse/che-theia/7.22.0/meta.yaml#L33

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
        unique: true

Describe the solution you'd like
We need to agree if a unique host is common enough to introduce a new field for it in Devfile 2.0.
If not - agree on the attribute name that devworkspace controller will use, unique seems to be not self-descriptive. Maybe dedicated-host: true/false

@sleshchenko
Copy link
Member Author

According to the latest discovering, the above is not really true )
devfile 1.0 has requireSubdomain attribute for endpoint, but it's designed to be used by user servers, not Che Theia, and probably with http in case of self-signed certificate is used.
We could run Theia Webview on a dedicated subdomain, but then we would need wildcard or not self-signed certificates.
I'll collect some more details and update this issue a bit later.

@l0rd
Copy link
Contributor

l0rd commented Mar 24, 2021

@sleshchenko should we close this issue?

@sleshchenko
Copy link
Member Author

it's going to be a attribute on Che side, and we're not sure it's common enough to put it into model

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants