Commit Graph

29 Commits (51bb0bb13f3f7b63bcb46d9bdcd4390bcbfc7291)

Author SHA1 Message Date
Mykola Morhun 3e8585c220
[Workspace Loader] Add missing async keyword (#15154)
Signed-off-by: Mykola Morhun <mmorhun@redhat.com>
2019-11-11 10:01:10 +02:00
Mykola Morhun a1bc6e18da
[Workspace Loader] Add strict checks for typescript (#15147)
* [Workspace Loader] Add strict checks for typescript

Signed-off-by: Mykola Morhun <mmorhun@redhat.com>
2019-11-08 15:26:55 +02:00
Oleksii Kurinnyi 87a0ad308d
prevent workspace restarting if user intentionally stopped it (#14728)
* prevent workspace restarting if user intentionally stopped it

Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>

* fixup! prevent workspace restarting if user intentionally stopped it
2019-10-09 11:18:40 +03:00
Oleksii Kurinnyi 208c4fb918
Fix handling of error status of a workspace (#13804)
* fixed handling of error status of a workspace after it has been started.

Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>

* workaround for devserver proxy to replace header 'origin' with target host

Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>

* use string interpolation instead of concatenation

Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
2019-09-05 12:59:49 +03:00
Oleksii Kurinnyi 46345a9448 Revert "fixed handling of error status of a workspace after it has been started." (#13699)
This reverts commit edfda1398c.
2019-07-04 14:48:01 +03:00
Oleksii Kurinnyi edfda1398c fixed handling of error status of a workspace after it has been started.
Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
2019-07-02 16:46:57 +03:00
Oleksii Kurinnyi 462b06b25d
Apply TS formatter and linter to workspace-loader (#13532)
* Added linter and formatter for Typescript.

Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>

* Fixed linting warnings.

Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>

* Fixed formatting.

Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
2019-06-21 10:14:10 +03:00
Oleksandr Andriienko 9a4678ea98
CHE-12063: Fix WorkspaceLoader hanging when Che Server is unreachable (#13282)
* CHE-12063: Fix WorkspaceLoader hanging when Che Server is unreachable

Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>

* Fix formatting.

Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>

* Small fix up.

Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
2019-05-08 12:55:47 +03:00
Oleksandr Andriienko 80162ea6d2
Notify user about workspace 'stopped event' if previous state was 'starting.' (#13192)
* Workspace loader notify user about workspace 'stopped event' if previous state was 'starting.'

Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>

* Simplify error message.

Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
2019-04-25 10:19:12 +03:00
Vitaliy Gulyy 27a5f27394
Don't restart workspace in case of errors (#12860)
Signed-off-by: Vitaliy Gulyy <vgulyy@redhat.com>
2019-03-13 12:31:57 +02:00
Yevhen Vydolob 734230b07f
Try to fix loader (#12802)
* #11773 try to fix loader

Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
2019-03-04 16:42:57 +02:00
Masaki Muranaka ef600e2c6c Fix a potentially bug. (#12043)
Signed-off-by: Masaki Muranaka <monaka@monami-ya.com>
2019-02-20 09:28:13 +02:00
Masaki Muranaka f02d8af1e5 Fix browser crashing issues on workspace loader. (#12421)
* Use `const` instead of `let` if it can.

Signed-off-by: Masaki Muranaka <monaka@monami-ya.com>

* Use updated authentication tokens always (refs #12042).

Signed-off-by: Masaki Muranaka <monaka@monami-ya.com>

* Wait for the reconnection established. (refs #11893)

Signed-off-by: Masaki Muranaka <monaka@monami-ya.com>

* Catch the unhandled Promise.reject().

Signed-off-by: Masaki Muranaka <monaka@monami-ya.com>
2019-01-28 10:31:41 +02:00
Sergii Leshchenko 83f7236354
CHE-11572 Make Workspace Loader listen to installer output and print it (#12064) 2018-11-28 17:14:39 +02:00
David Festal 9560a437ab
Reuse the Dashboard Keycloak instance in IDE frames when possible (#11794)
* Reuse the Dashboard Keycloak instance in IDE frames when possible

This avoids one or 2 authentication flows between the real IDE loading,
and decrease the overall IDE loading process by 5 seconds or more.

(5-6 seconds out of 10-12s in my case)

Signed-off-by: David Festal <dfestal@redhat.com>
2018-11-05 12:13:20 +01:00
David Festal 534a961e84
Provide better compatibility with alternate OIDC providers (#11090)
Currently in Che there are still a number of requirements in upstream that are not required by the OIDC specification, so that Che still cannot be used with a number of OIDC compliant providers.
For example, in order to have Che working with the [`node-oidc-provider`](https://github.com/panva/node-oidc-provider), the following changes were necessary:

- Remove the requirement to have the email as a claim in the JWT access
token: this is not required the specification and is not supported by a
number of OIDC providers. Normally, the Id token contains such claims.

  So now if the email is not in the JWT token the first time the user connects to Che, ten the email is retrieved from the OIDC provider through its `user-profile` endpoint.

- Explicitely specify the the `openid email profile` scope when requesting the access token. Because OIDC providers, when answering to the `userInfo` endpoint, are expected to return claims that corresponds to the scopes of the access token. So if an access token has the `openid` scope only, the `userinfo` might return no claim at all (according to the specification).

  Until now it was working since keycloak allows adding claims to the returned tokens anyway.

- Allow supporting fixed redirect Uris: most OIDC providers support having a list of redirect URIs to come back to after the authorization step.  But these authorized Uris don't necessarily support wildcards or prefix. Che doesn't support this currently, and these changes introduce 2 fixed callback HTML pages that redirect to the Dashboard / IDE URL of the final page we want to come back to after authentication. This makes Che compatible with more OIDC providers

  We introduced a new boolean property to enable / disable fixed redirect URLs:
  `che.keycloak.use_fixed_redirect_urls` 
  whose default value is `false`

- The previous points required some light changes in the Keycloak Javascript adapter file, that we will submit as a PR to the Keycloak project. I, the meantime the `OIDCKeycloak.js` file is still used, but has been updated to be now based on the `keycloak.js` file of the last `4.5.0-final` Keycloak release. This will make this Keycloak PR easier to get accepted.

  Please keep in mind that this version upgrade only impacts the alternate OIDC provider case: when using a real Keycloak server, Che *always uses the `keycloak.js` file provided by the Keycloak server*. 


Signed-off-by: David Festal <dfestal@redhat.com>
2018-10-10 20:52:35 +02:00
Sergii Leshchenko a11bd54bbc Make Workspace Loader listen to runtime log instead of machine log 2018-10-04 21:12:36 +03:00
Oleksii Kurinnyi 960c390b66
CHE-10687: fix log message, add check for runtime in running workspace (#10734)
Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
2018-08-10 16:10:02 +03:00
Oleksii Kurinnyi 8bf02a9f5d
CHE-10540: stop workspace loading progress on websocket error (#10688)
* code clean-up

Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>

* CHE-10540: stop workspace loading progress on websocket error

Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>

* fixup! CHE-10540: stop workspace loading progress on websocket error
2018-08-08 13:10:03 +03:00
Oleksii Kurinnyi b03be67f04
CHE-10538: improves workspace loader (#10642)
* CHE-10538: update workspace loading flow

Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>

* update licenses

Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>

* fixup! CHE-10538: update workspace loading flow
2018-08-07 13:18:10 +03:00
Mykhailo Kuznietsov 07263f1e30
Fix license header text (#10629) 2018-08-02 11:18:04 +03:00
Oleksii Kurinnyi 0e49d6c2b3
CHE-10365: Add websocket reconnection feature to workspace loader app (#10533)
* CHE-10365: Add websocket reconnection feature to workspace loader app

Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>

* fixup! CHE-10365: Add websocket reconnection feature to workspace loader app
2018-07-31 14:49:33 +03:00
Mykhailo Kuznietsov 15d23edc91
Update license to EPL 2.0 (#10531) 2018-07-31 11:24:36 +03:00
Anna Shumilova 2f7a5a4ed1
Change the loading flow by always wait the runtime before open IDE (#10263)
* Change the loading flow by always wait the runtime before open IDE and add error handling

Signed-off-by: Anna Shumilova <ashumilo@redhat.com>
2018-07-09 11:57:24 +03:00
Sun Tan fe6bc263f6 Fix workspace loader which should pass its query strings to the underlying alternate IDE
Signed-off-by: Sun Tan <sutan@redhat.com>
2018-04-12 11:40:24 +02:00
David Festal ff3459d2d3
Support alternate OIDC providers, to prepare for the switch from Keycloak to `fabric8_auth` (#8650)
Allow switching to an alternate OIDC provider (provided that it emits access tokens as JWT tokens).

This is the implementation required in upstream Che, for issues
redhat-developer/rh-che#502 and
redhat-developer/rh-che#525

Signed-off-by: David Festal <dfestal@redhat.com>
2018-03-23 14:44:23 +01:00
Vitaliy Guliy 8f041d8db6
Unable to open Theia IDE (#9073)
* Fix hanging the browser when too much console outputs

* Fix hanging the browser
2018-03-13 16:01:49 +02:00
Oleksii Kurinnyi 16a8419a90
CHE-9024: fix ability to start a workspace from Dashboard (#9034)
* CHE-9024: fix ability to start a workspace from Dashboard

Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>

* fixup! CHE-9024: fix ability to start a workspace from Dashboard
2018-03-07 11:01:34 +02:00
Vitaliy Guliy 3da13d54b5 Workspace loader (#8838)
Adding workspace loader application.
2018-03-05 14:04:49 +02:00