Commit Graph

402 Commits (c2dfd5557f3697c1393c80e8748d7f997dce6bb2)

Author SHA1 Message Date
Roman Iuvshyn 0abdc77ea0
RELEASE: Set next development version (#12922) 2019-03-19 15:56:30 +02:00
Sergii Kabashniuk 315767ea5d
NopTracer is used if tracing is not enabled (#12897)
* NopTracer is used in tracing is not enabled

Signed-off-by: Sergii Kabashniuk <skabashniuk@redhat.com>
2019-03-19 09:44:49 +02:00
Sergii Leshchenko cc62030126
Fix search stacks query (#12833)
Signed-off-by: Sergii Leshchenko <sleshche@redhat.com>
2019-03-06 18:21:09 +02:00
Roman Iuvshyn 0881493644
RELEASE: Set next development version (#12777) 2019-02-27 16:02:33 +02:00
Roman Iuvshyn 3778f01220
RELEASE: Set next development version (#12768) 2019-02-27 11:50:40 +02:00
Mykhailo Kuznietsov 3bef71020f
Adding tracing tags to workspace related operations (#12652)
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
2019-02-25 12:11:25 +02:00
Mykola Morhun e2991cd050
Allow to change preferences with machine token (#12637) 2019-02-12 14:05:26 +02:00
Lukas Krejci 081f5d7f36 Bind the workspace activity checker also in the multiuser environment (#12640)
Bind the workspace activity checker also in the multiuser environment (#12640)

Signed-off-by: Lukas Krejci <lkrejci@redhat.com>
2019-02-11 12:28:20 +02:00
Sergii Leshchenko 83f56ac324
Catch IntegrityConstraintViolationException to avoid throwing ServerException with db error message (#12539)
Signed-off-by: Sergii Leshchenko <sleshche@redhat.com>
2019-02-07 16:07:34 +02:00
Roman Iuvshyn a694c4f971
RELEASE: Set next development version (#12596) 2019-02-06 18:22:35 +02:00
Lukas Krejci 5520a29fc9 Removed unused fields and make the @BeforeMethod public as per convention.
Signed-off-by: Lukas Krejci <lkrejci@redhat.com>
2019-01-23 14:30:13 +01:00
Lukas Krejci c47c5aa81a Extract the activity record validity checking into a separate class
to reduce the LOC in the WorkspaceActivityManager.

Signed-off-by: Lukas Krejci <lkrejci@redhat.com>
2019-01-23 14:30:13 +01:00
Lukas Krejci 3b4c6a7030 Added a periodical check to reset the activity records of workspaces that
may run out of sync (circumstances are not 100% clear, but we've seen it
happening).

Signed-off-by: Lukas Krejci <lkrejci@redhat.com>
2019-01-23 14:30:13 +01:00
Thomas Mäder e4055918de
Detect Simple Java Projects on Import (#12041)
Signed-off-by: Thomas Mäder <tmader@redhat.com>
2019-01-16 14:58:44 +01:00
Roman Iuvshyn 4ad10f2218
RELEASE: Set next development version (#12441) 2019-01-16 11:51:02 +02:00
Max Shaposhnik cea3f482db
Factory support of devfile 2018-12-26 16:20:28 +02:00
Roman Iuvshyn b872b317cb
RELEASE: Set next development version (#12277) 2018-12-26 13:04:51 +02:00
Lukas Krejci 90903645ee Add an ability to get workspaces ids by status and threshold timestamp (#12177)
It includes:
- reworking Workspace Activity API to store timestamps of each status changes;
- add REST API endpoint to get workspaces ids by status and threshold timestamp;
2018-12-22 17:19:38 +02:00
Mykhailo Kuznietsov b7e1918e32
Upgrade dependencies (#11944) 2018-12-11 11:34:48 +02:00
Max Shaposhnik 3a14bacda1
Devfile local features implenentation with schema validation and automated model build. 2018-12-06 16:19:21 +02:00
Roman Iuvshyn 45490d2a3b
RELEASE: Set next development version (#12115) 2018-12-05 18:33:02 +02:00
Lukas Krejci 9109cf37c5 Workspace tracing (#11924)
* Adding support for @Traced annotation to enable whole method tracing
* Trace the creation and removal of workspace
* Trace the start of async start of the workspace
Note that this does not actually trace the async operations but merely
the "kick off" of those. For tracing the async operations, we need to
introduce support for propagating the span ids over the thread boundaries
using opentracing-concurrent.
* Enable tracing across the thread boundaries by augmenting the
WorkspaceSharedPool threadpool with tracing support.
Note that this does not add any new traces, merely enables the async
tracing.
* Add support for adding tags to @Traced methods.
The interceptor also reports the actual invoked class and method
(cleansed of Guice subclass name garbage)
* Trace the startup of pods during workspace startup.
* Trace stop of a workspace
* Introduce utility methods for tracing parts of methods.
* Trace provisioning of k8s objects (in both Kubernetes and Openshift
infrastructures).
* Create a common set of tags and enable strongly typed tags
* Apply the standard tags instead of hardcoded strings.
* Adding @Beta annotations for the tracing-related classes.
This needs to stabilize first.
* Replacing the "Traces" machinery with just annotated package private methods.
This way the code is easier to ready while we also keep all the flexibility
needed for the tag definitions.
* Rename CheTags to more descriptive TracingTags.
* Evaluate the tag values lazily.
This will reduce the load when tracing is switched off.
* Simplify the machine startup tracing logic and distinguish between
true error and mere cancellation due to prior errors.
* Trivial - applying formatting.
* Use getContext().getEnvironment().getMachines().size() to get the precise
number of machines that will be starting up.
* Trivial - change the name of the machine creation tag
* Use a formatted message instead of string concat.
* Update to the latest parent so that che-core-commons-tracing is correctly
incorporated into the full build.
* Fix tracing of the asynchronous stop of a workspace.
* Don't fall over when tracing is not available.
2018-11-22 21:51:12 +02:00
Oleksandr Garagatyi aaa8f424cd
Make a workspace run without any user env (#11890)
Allows running Che 7 workspace without any user environment but with Che 7 tooling set.
Workspace without environment has an empty list of environments and null value in `defaultEnv` field.
Field `activeEnv` is supposed to be `null` too.
What is changed:
- Migration of DB
- make defaultEnv nullable
- remove env_name from runtimes primary key
- make env_name in runtimes nullable
- Make code respect the fact that there are workspaces with no env
- settings API that returns the list of supported environment types returns no-environment type that - indicates that infrastructure support workspace with no environment at all.
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2018-11-21 16:39:54 +02:00
Roman Iuvshyn 99afaef87f
RELEASE: Set next development version (#11930) 2018-11-14 12:29:03 +02:00
Roman Iuvshyn 365d25f275
RELEASE: Set next development version (#11710) 2018-10-24 16:38:03 +03:00
Mykhailo Kuznietsov 56973d2169
Fix exception handling in permissions DAO (#11684) 2018-10-24 09:58:37 +03:00
Thomas Mäder 979b419dca Simplify jdtls pr (#10984)
* Restore jdt ui dependencies
* Undo spurious copyright changes

Signed-off-by: Thomas Mäder <tmader@redhat.com>
2018-10-17 15:05:02 +02:00
Anatoliy Bazko b5c20363c5 Fix after rebasing
Signed-off-by: Anatoliy Bazko <abazko@redhat.com>
2018-10-17 15:05:02 +02:00
Anatoliy Bazko 78b8898e37 Fix after che release
Signed-off-by: Anatoliy Bazko <abazko@redhat.com>
2018-10-17 15:05:02 +02:00
Anatoliy Bazko 97d1b951cb Set license header (#8268)
Signed-off-by: Anatoliy Bazko <abazko@redhat.com>
2018-10-17 15:05:02 +02:00
Sergii Leshchenko a4629c2e4d Move recovering of runtimes out of PostConstruct phase (PR #11592) 2018-10-13 17:33:26 +03: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 Kabashniuk 65bd65e23b Upgrade to new dependency mockito-testng (#10647) 2018-10-10 13:58:33 +03:00
Max Shaposhnik aa8d0fa57d
Merge mysql sql schema into common bundle 2018-10-05 12:08:41 +03:00
Sergii Leshchenko a222971865 Replace MachineLogEvent with more abstract RuntimeLogEvent 2018-10-04 21:12:36 +03:00
Sergii Leshchenko 6abb78a189 Add RuntimeId to plugin broker events instead of workspace id field 2018-10-04 21:12:36 +03:00
Roman Iuvshyn 63b389c2fe
RELEASE: Set next development version (#11434)
* RELEASE: Set next development version
2018-10-04 18:25:39 +03:00
Max Shaposhnik 89041db8d1
Provide support for MySQL & add integration tests 2018-10-01 18:08:02 +03:00
Max Shaposhnik a0412fffdc
Make methods accessible with machine token configurable 2018-10-01 10:13:44 +03:00
Sergii Leshchenko d9c210bd2a Make BrokerEvent suitable to be used for STARTED status event 2018-09-27 17:49:35 +03:00
Max Shaposhnik f838ea5a60
Add extra workspace existence check before creating keypair 2018-09-19 16:59:22 +03:00
Max Shaposhnik 01d9fc73da
Limit scope of the machine token signed requests 2018-09-18 17:23:59 +03:00
Roman Iuvshyn ea410c3340
RELEASE: Set next development version (#11169) 2018-09-12 11:53:42 +03:00
Sergii Leshchenko 2a2b722cde
Add authorization checks for all factory service's methods (#11156)
Signed-off-by: Sergii Leshchenko <sleshche@redhat.com>
2018-09-11 10:31:44 +03:00
Sergii Leshchenko 6a6c7f7e79
CHE-11080 Add authorization checks for BrokerService's JSON RPC methods (#11092) 2018-09-07 07:06:16 +03:00
Sergii Leshchenko e62dbb72cb CHE-10861 Add permissions check for organization related remote subscriptions 2018-09-04 11:07:00 +03:00
Sergii Leshchenko dfb5852da8 CHE-10861 Add permissions check for system related remote subscriptions 2018-09-04 11:07:00 +03:00
Sergii Leshchenko f8e0440e87 CHE-10861 Add permissions check for workspaces related remote subscriptions 2018-09-04 11:07:00 +03:00
Sergii Leshchenko 194e2c5eff CHE-10861 Add an ability to register permissions check for remote subscription 2018-09-04 11:07:00 +03:00
Sergii Leshchenko 6f125e8fc1 CHE-10861 Add permissions filter for installer json rpc methods 2018-09-04 11:07:00 +03:00
Sergii Leshchenko 6a55994f07 Fix scope of test dependencies
It allows to build a project without tests compiling
2018-09-04 11:07:00 +03:00
Oleksandr Garagatyi 27bed82d5c
CHE-10561: Rework WS.NEXT flow to latest concept of plugin broker (#10740)
* Move wsnext flow in Kubernetes infra implementation

Now we need to start a broker and pass meta.yaml files to it.
Starting a broker is infra-specific stuff, so it has to be done
on the infra implementation side because we don't have a part
in the infra SPI that would allow us to start a broker.
Passing Meta files using InternalEnvironment object is more
invasive than passing only attributes. So, this commit applies
less invasive scheme.

* CHE-10202,10561: Add fetching of Che editor, plugins meta from the registry

Add fetching of Che editor ID from workspace attributes.
Add fetching of Che plugins IDs from workspace attributes.
Use colon sign for separating editor/plugin ID and version
instead of the slash.
Remove old Workspace.Next model objects.

* CHE-10561: Share WS.NEXT between k8s and OS infras

Use WS.NEXT in both k8s and OS infrastructure implementations.

* CHE-10561: fix fetching meta.yaml files from che-plugin-registry

* CHE-10561: Fix sidecar model serialization

Fixes the fact that some fields in workspace sidecar tooling model
POJOs were incorrectly named or required custom serialization of
fields.

* CHE-10561: Add listening of che-plugin-broker

Add code that allows listening for events from Che plugin broker.
An event might contain workspace tooling config as a result if the broker
finished successfully or error otherwise.

* CHE-10561: Add PluginBrokerManager to control broker lifecycle

Adds PluginBrokerManager that configures/starts/waits Che plugin
broker.

Remove unused code.
Remove notion of Workspace next.

* Align plugin registry property between different components

* Fix extra  path in che plugin registry URL

Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2018-09-03 08:57:32 +03:00
Sergii Leshchenko f39f9b6280 CHE-10861 Add storing of Che Subject into http session in MachineLogin filters 2018-08-30 10:17:04 +03:00
Sergii Leshchenko 2c7bfd4ff9 Move exclude of OIDCKeycloak.js to mapping instead of Filter class 2018-08-30 10:16:43 +03:00
Max Shaposhnik 409c389eb4
Show meaningful message when we cannot authenticate user (due to absend email or other error) (#10889) 2018-08-24 08:39:35 +03:00
Roman Iuvshyn d99b2ed73d
RELEASE: Set next development version (#10867)
* RELEASE: Set next development version
2018-08-22 12:06:38 +03:00
Max Shaposhnik 47b8ed328b
Make machine token signing key per-workspace & renew them after each ws restart 2018-08-20 09:51:04 +03:00
Sergii Leshchenko de1459c52b Add attributes field to workspace config object 2018-08-10 14:06:41 +03:00
Anatoliy Bazko 4169b8d746
Fix build after applying new formatter (#10695)
Signed-off-by: Anatoliy Bazko <abazko@redhat.com>
2018-08-08 08:21:35 +00:00
Victor V. Rubezhny 57c43ac8cd Update fmt plugin to latest to enable skipping check #10554 (#10667)
The files are reformatted in order to suit the requirements of coveo maven fmt plug-in of v.2.5.1

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
2018-08-08 07:20:05 +00:00
Sergii Leshchenko 3ce288dd25 CHE-10536 Do not expose workspace runtime for user if he does not have `use` permission 2018-08-08 08:46:32 +03:00
Sergii Leshchenko 4be32e2e15 Remove outdated MachineService's methods from WorkspacePermissionsFilter 2018-08-08 08:46:32 +03:00
Sergii Leshchenko 5ca81b7592 Fix binding of UnavailableResourceInMultiUserFilter for ProfileService's methods
Previously, it banned only update profile attributes of the specified user
(PUT /profile/{USER_ID}/attributes) but methods related to current user
were still available (DELETE /profile/attributes and PUT
/profile/attributes)
2018-08-07 09:02:28 +03:00
Sergii Leshchenko a69162da89 CHE-10620 Add an ability to remove user when third-party user management service is configured 2018-08-07 09:02:28 +03:00
Roman Iuvshyn 60da580c92
RELEASE: Set next development version (#10603) 2018-08-02 12:38:48 +03:00
Mykhailo Kuznietsov 07263f1e30
Fix license header text (#10629) 2018-08-02 11:18:04 +03:00
Mykhailo Kuznietsov 15d23edc91
Update license to EPL 2.0 (#10531) 2018-07-31 11:24:36 +03:00
Max Shaposhnik 1471003ae4
Add exclusions mechanism into jwtproxy config builder & exlude liveness probes from auth 2018-07-24 18:18:26 +03:00
Roman Iuvshyn 985d368f2d
RELEASE: Set next development version (#10345)
* RELEASE: Set next development version
2018-07-10 15:56:52 +03:00
Sergii Leshchenko fef7cc44e6
Fix scope of test dependencies (#10254) 2018-07-04 11:23:20 +03:00
Max Shaposhnik e7866c5b92
Make Authorization header value more uniform and use 'Bearer' prefix (#10197) 2018-06-27 09:52:44 +03:00
Roman Iuvshyn d7e1c73cf8
RELEASE: Set next development version (#10110) 2018-06-19 17:24:50 +03:00
Sergii Leshchenko e3fb7e3634 CHE-5918 Add an ability to interrupt Kubernetes/OpenShift runtime start
Signed-off-by: Sergii Leshchenko <sleshche@redhat.com>
2018-06-06 15:17:10 +03:00
i300543 34e6ab326f Improve wsmaster OpenIdConnect configurability, and helm deployment scripts (#9826)
* Improve wsmaster OpenIdConnect configurability, and helm deployment scripts
- Make username claim configurable  in cases
  Oidc provider does not support the default claim (default is "preferred_user")
- Introduce fallback for username (issuer+subject) if the username claim is not present
  in the token
- Extend helm scripts to take customOidcProvider and customOidcUsernameClaim
  parameters into account when deploying che master.
- Introduce cheDedicatedKeycloak global param, conditioning if dedicated che
  keycloak server should be deployed, and waited on by the master.
- default value for cheDedicatedKeycloak (if not defined) is true
  if the cheDedicatedKeycloak parameter is defined and is false,
  customOidcProvicer must be supplied, when using multiuser mode.

Signed-off-by: Sergey Kuperman <sergey.kuperman@sap.com>

* Code review fixes

Remove the extra if condition in configmap.yaml
Remove extra line in requirements.yaml
fix typo in deployment.yaml

* Add che.keycloak.username_claim property as NULL into multiuser.properties

* Simplify helm conditions, when deploying che master with or without keycloak

if multiuser = true, and .Values.customOidcProvider was supplied, assumption is that
we work with no keycloak (no waiting in deployment)

global.cheDedicatedKeycloak is still needed as separate variable for requirements.yaml to determine whether keycloak chart should be installed

so for keycloak deployment, no parameters need to be passed beside global.multiuser=true,
for custom OIDC :
.Values.customOidcProvider=http://url, and global.cheDedicatedKeycloak=false
both need to be set
2018-06-06 10:35:04 +03:00
Oleksandr Garagatyi f6b639d0f7 CHE-8265: Apply workspace next features in WorkspaceRuntimes
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2018-06-04 17:17:44 +03:00
Roman Iuvshyn 7231585f4b
RELEASE: Set next development version (#9862) 2018-05-30 12:01:54 +03:00
David Festal e0890235fa
Allow creating OpenShift objects under the current user account on OCP (#9577)
* Support identity provider token retrieval in both JSON or URL formats.

That's required because some identity providers (such a `openshift-v3`)
correctly return the token information in JSON, as expected. So
switching to the url-based syntax should only used when the returned
json is invalid.

Signed-off-by: David Festal <dfestal@redhat.com>

* Introduce an `OpenShiftClientConfigFactory` to allow customizing the OpenShift config returned according to the current context (workspace ID, current user)

Signed-off-by: David Festal <dfestal@redhat.com>

* Openshift Infra + Multi-user => allow using OpenShift identity provider to connect to openshift with the OS oauth token of the current Che user.

This introduces a new property:

`che.infra.openshift.oauth_identity_provider`

Signed-off-by: David Festal <dfestal@redhat.com>

* Notify the user when a workspace cannot be started from the nav bar.

Signed-off-by: David Festal <dfestal@redhat.com>

* Add the ability to install the Openshift certificate into Keycloak

Signed-off-by: David Festal <dfestal@redhat.com>

* Add a yaml file to provide the openshift certificate as a secret,

in case it has to be installed into the dedicated Keycloak server.

Then the commands to install Che multiuser on Minishift with this
certificate are:

```
oc new-project che

oc process -f multi/openshift-certificate-secret.yaml -p
CERTIFICATE="$(minishift ssh docker exec origin /bin/cat
./openshift.local.config/master/ca.crt)" | oc apply -f -; \
oc new-app -f multi/postgres-template.yaml; \
oc new-app -f multi/keycloak-template.yaml -p ROUTING_SUFFIX=$(minishift
ip).nip.io; \
oc apply -f pvc/che-server-pvc.yaml; \
oc new-app -f che-server-template.yaml -p ROUTING_SUFFIX=$(minishift
ip).nip.io -p CHE_MULTIUSER=true -p
CHE_INFRA_OPENSHIFT_OAUTH__IDENTITY__PROVIDER=openshift-v3; \
oc set volume dc/che --add -m /data --name=che-data-volume
--claim-name=che-data-volume
```

Of course it's still needed to register the `openshift-v3` identity
provider in the Keycloak server, as well as, add the corresponding
`OAuthClient` object in Minihshift.

Signed-off-by: David Festal <dfestal@redhat.com>
2018-05-28 11:39:44 +02:00
Anton Korneta deae9c25d5 Add JGroups based status cache and lock service 2018-05-17 11:50:00 +03:00
Anton Korneta 0d510824c0 Add missed termination for DistributedRemoteSubscriptionStorage 2018-05-17 11:50:00 +03:00
Anton Korneta 95c550d485 Rename che-multiuser-api-remote-subscription module to che-multiuser-api-jgroups 2018-05-17 11:50:00 +03:00
Mykhailo Kuznietsov cd99cf4e6c
Add ability to configure OAuth type in Multi User Che (#9640) 2018-05-14 17:37:14 +03:00
Roman Iuvshyn 6677e27a6b
RELEASE: Set next development version (#9669) 2018-05-11 10:27:31 +03:00
Max Shaposhnik 67d27e9eff CHE-9528 Refactor terminations mechanism to support suspend and dependencies 2018-05-03 11:23:02 +03:00
Anton Korneta d227e297b6 CHE-9528 Introduce an abstraction of workspace status cache and distributed locks 2018-05-03 11:22:07 +03:00
Sergii Leshchenko da69099743
Add processing of runtime exceptions during JWT tokens validation (#9557)
* Add processing of runtime exceptions during JWT tokens validation

It is needed to set correct 403 response code instead of 500.
Also added response message to notify a client about error reason.
2018-05-02 15:18:34 +03:00
Max Shaposhnik 8c3d2ead36
Fixed removal of remote subscriptions in manager (#9560) 2018-05-02 14:30:36 +03:00
Sergii Kabashniuk cf396a6979
Remove duplicated declaration of che-multiuser-api-resource artifact (#9515) 2018-04-23 15:28:22 +03:00
David Festal c66d349728
Skip authentication for the `OIDCKeycloak.js` file (Fix regression) (#9505)
Skip authentication for the `OIDCKeycloak.js` file

Signed-off-by: David Festal <dfestal@redhat.com>
2018-04-23 10:23:17 +02:00
Roman Iuvshyn edb0e15e6f
RELEASE: Set next development version (#9473) 2018-04-18 08:31:24 +02:00
Mykhailo Kuznietsov 013d485914
Use workspace limit idle timeout value in WorkspaceActivityManager (#9395) 2018-04-13 14:11:42 +00:00
Max Shaposhnik 66f9d0bed9
Add replicated storage for remote websocket subscriptions (#9311) 2018-04-11 14:33:52 +03:00
Anton Korneta 38ff5c084b Change machine token to JWT and rewrite auth mechanism 2018-04-11 10:30:32 +03:00
Mykhailo Kuznietsov ee54a220f4
Fix recreation of user in Che DB, when it has been recreated on Keycloak (#9280) 2018-04-03 12:10:20 +00:00
Mykhailo Kuznietsov db0644505c
Set correct response for non-working services in Multi User Che (#9237) 2018-03-30 06:45:55 +00:00
Max Shaposhnik 02504d2470
Make workspace expiration data persistent & shareable. 2018-03-28 12:11:06 +03:00
Roman Iuvshyn e006334aad
RELEASE: Set next development version (#9268) 2018-03-28 10:58:30 +03: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
Florent BENOIT f051b7f5d4
Introduce logger REST API to manage log level at runtime (#9161)
* Introduce logger REST API to manage log level at runtime

It's possible to create new logger with log level, list all loggers defined with log level, change level on a given logger, etc

Change-Id: I1c105aca33cc88f90270ade4d792d3a75191740a
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
2018-03-21 15:17:36 +01:00
Mykhailo Kuznietsov 66150852c0
Add indexes for reference side of foreign keys (#9146) 2018-03-21 08:38:30 +00:00
Mykhailo Kuznietsov cc25126d24
Add authentication for ws connections (#9043) 2018-03-14 09:47:17 +02:00
Roman Iuvshyn dbdac2a604
RELEASE: Set next development version (#9038) 2018-03-07 17:53:03 +07:00
Anton Korneta 806a6da184 Make start of OpenShift machines parallel 2018-02-26 11:53:12 +02:00
Max Shaposhnik d2fcdb772a
Improve functionality of identity provider token retrieval 2018-02-23 10:33:45 +02:00
Mykhailo Kuznietsov 48d516cad5
Fix machine token generation on workspace start (#8710) 2018-02-15 15:28:29 +02:00
Roman Iuvshyn e2762411b3
RELEASE: Set next development version (#8773) 2018-02-14 15:00:52 +02:00
Sergii Kabashniuk 247f81b519
Allow to call system state without permissions (#8607) 2018-02-05 14:52:43 +02:00
Max Shaposhnik 06b32260db
Protect installer service modifying methods with permissions 2018-02-02 12:26:34 +02:00
Roman Iuvshyn f50c2ebbf5
RELEASE: Set next development version (#8496) 2018-01-31 17:53:10 +02:00
Vitaliy Guliy 9abfec7c5f
CHE-7581 Improved keycloak initialization (#8425)
* Initialize keycloak before loading the IDE javascript

* Fix formatting

* Add explanation in error message
2018-01-26 12:35:42 +02:00
Mykhailo Kuznietsov 72b21e971b
Remove "source" field from stack object (#8407) 2018-01-25 15:53:33 +02:00
Max Shaposhnik 2902fc75a4
Refactor remaining everrest websocket endpoints to use Json RPC (#8388) 2018-01-24 16:17:00 +02:00
Anton Korneta 5c68c90a0b Move license to resource details 2018-01-24 13:44:36 +02:00
Oleksandr Garagatyi 9d75f3e219
Rework default memory limit setting (#8422)
Extract default machine memory limit setting from
InternalEnvironmentFactory to recipe specific environment
factories.
Make memory limit attribute optional by respecting it by
resource API subsystem.
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2018-01-24 12:47:06 +02:00
Anton Korneta 8ab59e1ece Add setting of RAM limit attribute to env factories and converters for specific recipes 2018-01-17 16:28:51 +02:00
Mykhailo Kuznietsov 2c2bd6637c
Set new year in license headers (#8244) 2018-01-11 16:04:49 +02:00
Sun Tan ec77e22046 Adding identity_id from keycloak to the logs through MDC Context
Signed-off-by: Sun Tan <sutan@redhat.com>
2018-01-05 13:46:28 +01:00
Oleksandr Garagatyi 9e0a4f2095
Add continuous servers liveness checks (#8088)
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2018-01-04 17:33:14 +02:00
Roman Iuvshyn 71704ab3a7
RELEASE: Set next development version (#8135) 2018-01-03 14:13:25 +02:00
Mykhailo Kuznietsov 93b974d1e0
Change worskpace project files storage path (#7844)
- Workspace projects are now stored in folders, named after their workspace id, rather than name,
to prevent issues with workspace renaming. Applies to Docker infrastructure only.
- Add migration, that would move workspace projects to their new location. Occurs on Che startup.
- Added configuration property to enable/disable this migration.
- Improved Workspace DAO/Manager to use pagination for methods, that return lists of workspaces
2017-12-22 15:55:28 +02:00
Max Shaposhnik 8ff1be36f5
Added support of Idenvity brokering mechanism of Keycloak for Multi-user Che 2017-12-21 17:50:03 +02:00
Max Shaposhnik db9b1667d4
Reflect changing user email on Keycloak to the Che database (#7895)
* Add check for user email if tokens does not match
* Add tests
2017-12-15 15:21:25 +02:00
Roman Iuvshyn 5a6d3910b2
RELEASE: set next dev version (#7882) 2017-12-14 15:51:34 +02:00
Oleksandr Garagatyi 6b7b1c6468 CHE-7561: add internal server concept into workspace API
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2017-12-11 11:41:11 +02:00
Sergii Leshchenko 6f0ab7894b
CHE-7502 Make it possible to bind only one RuntimeInfrastructure (#7655) 2017-12-01 12:01:44 +02:00
Roman Iuvshyn 506210325a
RELEASE: set next dev version (#7523) 2017-11-23 12:50:56 +02:00
Oleksandr Garagatyi ba7a1e2e51 CHE-7010: Add volumes into machine model object
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2017-11-20 16:14:47 +02:00
Sergii Leshchenko e7843db2de Add tests for new classes and fix existing tests in api-workspace module 2017-11-20 11:02:48 +02:00
Sergii Leshchenko 0f1ca700df Move objects related to InternalEnvironment into separate package 2017-11-20 11:02:48 +02:00
Gennady Azarenkov eb90e43cf3 Replace RuntimeInfrastructure#estimate with InternalEnvironmentFactory
It is done for decoupling runtime from environment configuration
2017-11-20 11:02:47 +02:00
Artem Zatsarynnyi 1e4a702724
Make it possible to tell IDE to use a different "wsagent" server (#7392)
* Make it possible to tell IDE to use a different "wsagent" server passing server's ref prefix through query parameter

Signed-off-by: Artem Zatsarynnyi <azatsary@redhat.com>
2017-11-17 10:27:30 +02:00
Anton Korneta f8d8511641 Fixed domain in set stack permissions while 'manageSystem' action check 2017-11-15 13:54:38 +02:00
Max Shaposhnik c74bad367c
Remove snapshotting mechanism; 2017-11-13 14:25:40 +02:00
Max Shaposhnik 7474054027
Build fix 2017-11-07 12:45:58 +02:00
Max Shaposhnik ea7e071b3a
Use same assembly for single- and multiuser Che 2017-11-07 12:27:02 +02:00
Roman Iuvshyn 19f5fd1f5a
RELEASE: Set next development version (#7112) 2017-10-31 16:46:30 +02:00
Artem Zatsarynnyi f15fbf1cb1
IDE agnostic way to launch GWT Super DevMode (#7084)
Adapted modules to gwt-lib/gwt-app lifecycle;
shared libs have been cleaned up from the GWT related stuff;
enabled launching Super DevMode with a reactor goal gwt:codeserver;
enabled launching Super DevMode inside a dev-machine (for Che in Che development);
separate compiling IDE GWT app from packaging IDE Web app.

Signed-off-by: Artem Zatsarynnyi <azatsary@redhat.com>
2017-10-31 15:27:22 +02:00
Sergii Leshchenko 4a4a4eb271 CHE-6577 Add usage of machine token while connecting to exec, terminal, workspace agents via websocket 2017-10-30 17:50:12 +02:00
Max Shaposhnik 57aa4400e4 Make /system/status service public to allow liveness checks by it 2017-10-25 12:53:43 +03:00
Max Shaposhnik c1bb1621a0 Group all DB migrations related to Che6 into 6.0.0 version; (#6945) 2017-10-24 15:37:00 +03:00
Florent BENOIT 3f262e620e Cleanup some Mockito deprecated usage (che6) (#6864)
* Cleanup some Mockito deprecated usage
org.mockito.Matchers —> org.mockito.ArgumentMatchers
org.mockito.runners.MockitoJUnitRunner —> org.mockito.junit.MockitoJUnitRunner

Change-Id: Icf7351cb58e0f42fa95885c2d2cf6b5e98206c35
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
2017-10-21 09:07:43 +02:00
Florent BENOIT 6a95b6d74a Apply google format v1.4 https://github.com/google/google-java-format/releases/tag/google-java-format-1.4
Change-Id: I5df30c23165df1fd39eef4c57893bebd1d681c1d
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
2017-10-19 22:23:04 +02:00
Max Shaposhnik 42e56b399c Fix workpsace-permissions module dependencies; 2017-10-19 14:52:41 +03:00
Sergii Kabashniuk 3258a4bb3f Remove unexisted artifact 2017-10-19 14:10:25 +03:00
Sergii Kabashniuk f4cc97acce Set next version 6.0.0-M1-SNAPSHOT 2017-10-19 13:53:40 +03:00
Oleksandr Garagatyi 90142e268c Move Docker client to Docker infrastructure packaging (#6779)
Also, remove OpenShiftConnector as it is replaced with OpenShift
infrastructure.
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2017-10-18 15:08:55 +03:00
Max Shaposhnik 4c5566ce94 Migration script license & version fixes; (#6797) 2017-10-18 14:48:38 +03:00
Max Shaposhnik 6d0a659e63 Remove usage of deprecated Recipe API (#6729) 2017-10-18 12:58:30 +03:00
Florent BENOIT 7a3bb3f5b7 Apply fixes to update maven plugins
- errorprone : ignore test methods that are using testxyz() pattern but are not annotated by @Test
- Remove  deprecated stuff (for example use descriptors/descriptor for maven-assembly plugin
- Remove unnecessary stubbing
- fix dependencies

Change-Id: I16f512fc3bfd542463d3b0d3c062f45ceb5ac6b2
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
2017-10-17 21:44:00 +02:00
Sergii Kabashniuk ba04245aff Merge Mockito 2017-10-15 15:24:12 +03:00
Sergii Kabashniuk e321ab00b1 Merge with master 2017-10-15 14:33:47 +03:00
Florent BENOIT 70e3834356 Move to mockito 2.10
Some changes are required like
 - anyString() --> nullable(String.class) for many tests as in fact we provide null values
 - add class for VerificationMode as there are more than one method now (can't use lambdas)
 - remove cast on ArgumentMatcher (now we can use lambdas as there is generics)
 - remove unecessary stubbing (mockito is now reporting un-needed stubs)

Change-Id: I69c7ccc86bc85a4401d5e33671229ae0ce560dbb
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
2017-10-15 10:45:04 +02:00
Florent BENOIT 9581a9bbef Move to mockito 2.10
Some changes are required like
 - anyString() --> nullable(String.class) for many tests as in fact we provide null values
 - add class for VerificationMode as there are more than one method now (can't use lambdas)
 - remove cast on ArgumentMatcher (now we can use lambdas as there is generics)
 - remove unecessary stubbing (mockito is now reporting un-needed stubs)

Change-Id: I69c7ccc86bc85a4401d5e33671229ae0ce560dbb
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
2017-10-15 10:34:15 +02:00
Roman Iuvshyn 891b619a5f fix dto versions that broke release, fix os scripts (#6743)
* Fix plugin version
2017-10-14 20:46:33 +03:00
Roman Iuvshyn abe3271908 RELEASE: Set next development version (#6692)
* RELEASE: Set next development version
2017-10-14 20:17:04 +03:00
Sergii Leshchenko 65562d857d CHE-6587 Add generating of user token before start of runtime 2017-10-13 14:45:22 +03:00
Sergii Leshchenko 52e43115b3 Remove deprecated jpa test classes 2017-10-13 14:45:21 +03:00
Sergii Leshchenko 5ef55f5993 CHE-6587 Add MachineTokenProvider interface
It is implemented in different ways for single and multiuser packaging
2017-10-13 14:45:21 +03:00
Oleksandr Garagatyi 0c77efc2b3 Workspace start code cleanup
Moved async operations from WorkspaceManager to WorkspaceRuntimes
to have async facility in one place instead of two.
Moved workspace start/stop logging from WorkspaceManager
to WorkspaceRuntimes since WorkspaceManager can not correctly log
them.
Improved logging of workspace start/stop including addition of new logs.
Fixed logging of exception thrown by RuntimeInfrastructure on runtime
start/stop.
Fix docker image deletion bug on stop of a workspace.
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2017-10-12 17:37:28 +03:00
Sergii Kabashniuk 70ac13c008 Merge remote-tracking branch 'origin/master' into che6 2017-10-12 16:14:51 +03:00
Sergii Kabashniuk 14061f5a2e Fixed concurrent user registration (#6703)
Signed-off-by: Sergii Kabashniuk <skabashniuk@redhat.com>
2017-10-12 15:57:46 +03:00
Artem Zatsarynnyi 5041b59e6e Merge branch 'master' into spi 2017-10-12 11:54:46 +03:00
Sergii Kabashniuk 1bea871d0a Fixed possible constraint violation with an existed organization. (#6674)
* Fixed possible constraint violation with an existed organization.

Usecase is following:
If we have already an organization with name, let's say "org"  and the new user also has name "org" then we will have constraint violation.
 In this case, we will try to create the user with name "org"+random string.
2017-10-11 16:21:59 +03:00
Sergii Leshchenko 03934a0804 Merge remote-tracking branch 'origin/master' into spi
# Conflicts:
#	assembly-multiuser/assembly-wsmaster-war/pom.xml
#	assembly-multiuser/assembly-wsmaster-war/src/main/java/org/eclipse/che/api/deploy/MachineAuthModule.java
#	assembly-multiuser/assembly-wsmaster-war/src/main/java/org/eclipse/che/api/deploy/MultiUserCheWsMasterModule.java
#	assembly-multiuser/assembly-wsmaster-war/src/main/resources/META-INF/persistence.xml
#	assembly/assembly-wsmaster-war/src/main/java/org/eclipse/che/api/deploy/CheWsMasterModule.java
#	assembly/assembly-wsmaster-war/src/main/java/org/eclipse/che/api/deploy/WsMasterModule.java
#	dashboard/src/app/admin/user-management/user-details/user-details.html
#	dashboard/src/app/organizations/organization-details/organization-details.html
#	dashboard/src/app/teams/team-details/team-details.html
#	dashboard/src/components/api/workspace/che-workspace.factory.ts
#	dockerfiles/init/manifests/che.env
#	dockerfiles/init/modules/openshift/files/scripts/deploy_che.sh
#	dockerfiles/init/modules/openshift/files/scripts/multi-user/wait_until_postgres_is_available.sh
#	ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/jsonrpc/WorkspaceMasterJsonRpcInitializer.java
#	ide/che-core-ide-stacks/src/main/resources/stacks.json
#	ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/OrionEditorPresenter.java
#	multiuser/api/che-multiuser-api-resource/pom.xml
#	multiuser/api/che-multiuser-api-resource/src/main/java/org/eclipse/che/multiuser/resource/api/usage/tracker/EnvironmentRamCalculator.java
#	multiuser/api/che-multiuser-api-resource/src/main/java/org/eclipse/che/multiuser/resource/api/usage/tracker/RamResourceUsageTracker.java
#	multiuser/api/che-multiuser-api-resource/src/main/java/org/eclipse/che/multiuser/resource/api/workspace/LimitsCheckingWorkspaceManager.java
#	multiuser/api/che-multiuser-api-resource/src/test/java/org/eclipse/che/multiuser/resource/api/usage/tracker/EnvironmentRamCalculatorTest.java
#	multiuser/api/che-multiuser-api-resource/src/test/java/org/eclipse/che/multiuser/resource/api/usage/tracker/RamResourceUsageTrackerTest.java
#	multiuser/api/che-multiuser-api-resource/src/test/java/org/eclipse/che/multiuser/resource/api/workspace/LimitsCheckingWorkspaceManagerTest.java
#	multiuser/api/che-multiuser-api-resource/src/test/java/org/eclipse/che/multiuser/resource/api/workspace/TestObjects.java
#	multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml
#	multiuser/integration-tests/che-multiuser-cascade-removal/src/test/java/org/eclipse/che/multiuser/integration/jpa/cascaderemoval/JpaEntitiesCascadeRemovalTest.java
#	multiuser/integration-tests/che-multiuser-cascade-removal/src/test/java/org/eclipse/che/multiuser/integration/jpa/cascaderemoval/TestObjectsFactory.java
#	multiuser/integration-tests/che-multiuser-cascade-removal/src/test/resources/META-INF/persistence.xml
#	multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml
#	multiuser/integration-tests/che-multiuser-postgresql-tck/src/test/java/MultiuserPostgresqlTckModule.java
#	multiuser/integration-tests/che-multiuser-postgresql-tck/src/test/resources/META-INF/persistence.xml
#	multiuser/keycloak/che-multiuser-keycloak-ide/src/main/java/org/eclipse/che/multiuser/keycloak/ide/KeycloakProvider.java
#	multiuser/machine-auth/che-multiuser-machine-authentication-ide/pom.xml
#	multiuser/machine-auth/che-multiuser-machine-authentication-ide/src/main/java/org/eclipse/che/multiuser/machine/authentication/ide/MachineAsyncRequestFactory.java
#	multiuser/machine-auth/che-multiuser-machine-authentication-ide/src/main/java/org/eclipse/che/multiuser/machine/authentication/ide/MachineTokenServiceClientImpl.java
#	multiuser/machine-auth/che-multiuser-machine-authentication-ide/src/main/java/org/eclipse/che/multiuser/machine/authentication/ide/inject/MachineAuthGinModule.java
#	multiuser/machine-auth/che-multiuser-machine-authentication/src/main/java/org/eclipse/che/multiuser/machine/authentication/server/MachineSessionInvalidator.java
#	multiuser/permission/che-multiuser-permission-machine/pom.xml
#	multiuser/permission/che-multiuser-permission-machine/src/main/java/org/eclipse/che/multiuser/permission/machine/filters/RecipePermissionsFilter.java
#	multiuser/permission/che-multiuser-permission-machine/src/main/java/org/eclipse/che/multiuser/permission/machine/jpa/JpaRecipePermissionsDao.java
#	multiuser/permission/che-multiuser-permission-machine/src/main/java/org/eclipse/che/multiuser/permission/machine/jpa/MultiuserJpaRecipeDao.java
#	multiuser/permission/che-multiuser-permission-machine/src/main/java/org/eclipse/che/multiuser/permission/machine/jpa/MultiuserMachineJpaModule.java
#	multiuser/permission/che-multiuser-permission-machine/src/main/java/org/eclipse/che/multiuser/permission/machine/jpa/listener/RemoveRecipeOnLastUserRemovedEventSubscriber.java
#	multiuser/permission/che-multiuser-permission-machine/src/main/java/org/eclipse/che/multiuser/permission/machine/recipe/RecipeCreatorPermissionsProvider.java
#	multiuser/permission/che-multiuser-permission-machine/src/main/java/org/eclipse/che/multiuser/permission/machine/recipe/RecipePermissionsImpl.java
#	multiuser/permission/che-multiuser-permission-machine/src/test/java/org/eclipse/che/multiuser/permission/machine/filters/RecipePermissionsFilterTest.java
#	multiuser/permission/che-multiuser-permission-machine/src/test/java/org/eclipse/che/multiuser/permission/machine/jpa/JpaRecipePermissionsDaoTest.java
#	multiuser/permission/che-multiuser-permission-machine/src/test/java/org/eclipse/che/multiuser/permission/machine/jpa/JpaTestModule.java
#	multiuser/permission/che-multiuser-permission-machine/src/test/java/org/eclipse/che/multiuser/permission/machine/jpa/MultiuserJpaRecipeDaoTest.java
#	multiuser/permission/che-multiuser-permission-machine/src/test/java/org/eclipse/che/multiuser/permission/machine/jpa/RemovePermissionsBeforeRecipeRemovedEventSubscriberTest.java
#	multiuser/permission/che-multiuser-permission-machine/src/test/java/org/eclipse/che/multiuser/permission/machine/jpa/TestWorkspaceEntity.java
#	multiuser/permission/che-multiuser-permission-machine/src/test/java/org/eclipse/che/multiuser/permission/machine/recipe/RecipeCreatorPermissionsProviderTest.java
#	multiuser/permission/che-multiuser-permission-machine/src/test/java/org/eclipse/che/multiuser/permission/machine/spi/tck/RecipePermissionsDaoTest.java
#	multiuser/permission/che-multiuser-permission-workspace/pom.xml
#	multiuser/permission/che-multiuser-permission-workspace/src/main/java/org/eclipse/che/multiuser/permission/workspace/server/WorkspaceCreatorPermissionsProvider.java
#	multiuser/permission/che-multiuser-permission-workspace/src/main/java/org/eclipse/che/multiuser/permission/workspace/server/filters/WorkspacePermissionsFilter.java
#	multiuser/permission/che-multiuser-permission-workspace/src/main/java/org/eclipse/che/multiuser/permission/workspace/server/jpa/MultiuserWorkspaceJpaModule.java
#	multiuser/permission/che-multiuser-permission-workspace/src/main/java/org/eclipse/che/multiuser/permission/workspace/server/spi/jpa/MultiuserJpaWorkspaceDao.java
#	multiuser/permission/che-multiuser-permission-workspace/src/test/java/org/eclipse/che/multiuser/permission/workspace/server/filters/WorkspacePermissionsFilterTest.java
#	multiuser/permission/che-multiuser-permission-workspace/src/test/java/org/eclipse/che/multiuser/permission/workspace/server/jpa/WorkspaceTckModule.java
#	multiuser/permission/che-multiuser-permission-workspace/src/test/java/org/eclipse/che/multiuser/permission/workspace/server/spi/jpa/JpaTckModule.java
#	multiuser/permission/che-multiuser-permission-workspace/src/test/java/org/eclipse/che/multiuser/permission/workspace/server/spi/jpa/RemovePermissionsBeforeStackRemovedEventSubscriberTest.java
#	multiuser/pom.xml
#	plugins/plugin-docker/che-plugin-docker-machine/src/test/java/org/eclipse/che/plugin/docker/machine/MachineProviderImplTest.java
#	plugins/plugin-docker/pom.xml
#	plugins/plugin-github/che-plugin-github-pullrequest/src/main/java/org/eclipse/che/plugin/pullrequest/client/GitHubHostingService.java
#	pom.xml
#	selenium/che-selenium-core/src/main/java/org/eclipse/che/selenium/core/workspace/TestWorkspaceProviderImpl.java
#	selenium/che-selenium-test/README.md
#	selenium/che-selenium-test/pom.xml
#	selenium/che-selenium-test/src/main/java/org/eclipse/che/selenium/pageobject/CodenvyEditor.java
#	selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/workspaces/CreateWorkspaceOnDashboardTest.java
#	selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/workspaces/WorkingWithNodeWsTest.java
#	selenium/che-selenium-test/src/test/resources/conf/selenium.properties
#	wsagent/agent/src/main/java/org/eclipse/che/api/agent/WsAgentLauncher.java
#	wsagent/agent/src/test/java/org/eclipse/che/api/agent/WsAgentLauncherTest.java
#	wsmaster/che-core-api-user/pom.xml
#	wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/environment/server/MachineLinksInjector.java
#	wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/workspace/server/WorkspaceServiceLinksInjector.java
#	wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/workspace/server/model/impl/EnvironmentImpl.java
#	wsmaster/integration-tests/postgresql-tck/pom.xml
2017-10-09 14:51:25 +03:00
Artem Zatsarynnyi ba47c0b825 Port AppStatesPreferenceCleaner to spi branch (#6611)
* Port AppStatesPreferenceCleaner from master branch. Class has been missed as a result of previous merges.

* Move AppStatesPreferenceCleaner to che-core-api-workspace.

* Move WorkspaceRemovedEvent and WorkspaceCreatedEvent to che-core-api-workspace-shared;
Move AppStatesPreferenceCleaner to che-core-api-user
2017-10-07 09:56:03 +03:00
Sergii Kabashniuk ee01b2998f Multi-user Eclipse Che (#6441)
Multi-user Eclipse Che (#6441)
#### How to run it.
```docker run -it -e CHE_MULTIUSER=true -e CHE_HOST=<your ip> -e CHE_KEYCLOAK_AUTH-SERVER-URL=http://<your ip>:5050/auth -v /var/run/docker.sock:/var/run/docker.sock -v ~/.che-multiuser:/data eclipse/che:nightly start --skip:pull --skip:nightly```
#### How to manage it
 - Keycloak configured with two realms. ```Master``` and ```che```. Also we have one user admin/admin in both realm. Admin user in master realm is  - super admin. 
-  Eclipse Che configured for che realm
- We enabled user registration in ```Che``` realm
#### Known limitation
 - swagger would not work. We need to upgrade a version. to support openid authentification https://github.com/eclipse/che/issues/6015
- It's working on local docker. We are going to provide scalable version based on OpenShift on next versions.
- Invitation of non-existent users to Eclipse Che organization https://github.com/eclipse/che/issues/6335
#### How to run it when it is in a branch


To run an multiuser Che version, the following steps are required after building the branch:
 - Rebuild init, cli and che images (in the given sequence). To do that, proceed to folder _dockerfiles/<image_name>_ and run _build.sh_
 - Run Che in a  usual way using cli, with additional parameters:  `-e CHE_MULTIUSER=true` and `--skip:pull --skip:nightly`  
   Full command example:
   `docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock -v /home/user/.che:/data -e CHE_MULTIUSER=true eclipse/che-cli:nightly start --skip:pull --skip:nightly`
 - MacOS users may need to edit _che.env_ file in the data folder, changing `CHE_HOST` and `CHE_KEYCLOAK_AUTH__SERVER__URL` values to their specific IP.
 
When start is succeeded, the following docker containers should be created:  
 - che, exposing 8080 port;
 - che_keycloak, exposing 5050 port;  
 - che_postgres, exposing 5432 port;
2017-10-06 17:27:27 +03:00
Artem Zatsarynnyi 4bc18519db Merge branch 'che-multiuser' into spi 2017-10-05 16:30:22 +03:00
Max Shaposhnik 2d36fabf0f CHE-6546; Add some style to organization email templates (#6584) 2017-10-05 11:21:02 +03:00
Sergii Leshchenko 7924910ee0 CHE-6565 Add ability to configure `allowedClockSkewSeconds` for JWT parser (#6568) 2017-10-04 13:49:46 +03:00
Sergii Leshchenko 5dbdaa00db Merge pull request #6520 from sleshchenko/CHE-6515
CHE-6515 Added email notifications
2017-10-03 17:10:31 +03:00
Anton Korneta 32c02883b6 Remove '/ws' and '/websocket' parts from KeycloakAuthenticationFilter binding 2017-10-03 14:42:27 +03:00
Sergii Leshchenko 541e39530c CHE-6515 Add sending of email notification when changes occur in an organization 2017-10-03 14:16:44 +03:00
Artem Zatsarynnyi 8de6dbe5fb Merge branch 'che-multiuser' into spi 2017-10-03 13:04:39 +03:00
Oleksandr Garagatyi 49f80dad17 CHE-5893: Map system state API to login filter
It is needed since it is secured by permissions system which requires
an authenticated user.
Also, use base API endpoint for checking Che in OpenShift deploy
script since system state API which was used before is secured now.
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2017-10-03 09:45:58 +03:00
Anna Shumilova f1e09ced81 Fix activity checker fails
Signed-off-by: Anna Shumilova <ashumilo@redhat.com>
2017-10-02 15:26:38 +03:00
Artem Zatsarynnyi 81bce959ce Merge branch 'che-multiuser' into spi 2017-10-02 14:59:55 +03:00
Sergii Kabashniuk 2df0a54923 Fixing wrong code formatting 2017-10-02 14:04:04 +03:00
Anton Korneta 09f062370c Fix selenium-tests.sh add keycloak token endpoint to settings 2017-10-02 11:14:45 +03:00
Anton Korneta 9559f7ce7e Adapt selenium tests to che multiuser 2017-09-29 18:03:08 +03:00
Sergii Leshchenko 146636b03e Clean KeycloakConfigurationService up 2017-09-29 12:11:55 +03:00
Sergii Leshchenko d490e7c19f Parse object with GSON instead of jackson 2017-09-29 12:11:55 +03:00
Sergii Leshchenko 198522cd2d Remove dependency on keycloak-core artifact 2017-09-29 12:11:55 +03:00
Artem Zatsarynnyi 44aa9d89fe Merge branch 'che-multiuser' into spi 2017-09-29 12:07:53 +03:00
Sergii Kabashniuk 35418c48dd Initializing org.eclipse.che.multiuser.api.permission.server.AdminPermissionInitializer only in multi-user assembly 2017-09-28 17:07:31 +03:00
Sergii Leshchenko a717eec1eb Remove unused dependency in cascade tests 2017-09-28 14:57:46 +03:00
Sergii Leshchenko f07fdb9d36 CHE-6463 Sort poms, Fix licenses, format sources 2017-09-28 13:06:51 +03:00
Sergii Leshchenko 8798221e07 CHE-6463 Add auth to openshift infrastructure 2017-09-28 13:06:51 +03:00
Sergii Leshchenko 861f4eccbb CHE-6463 Remove machine auth code that is outdated in spi 2017-09-28 13:06:50 +03:00
Sergii Leshchenko 92c5d1af20 CHE-6463 Adapt api-resource module, comment tracking of used RAM 2017-09-28 13:06:50 +03:00
Sergii Leshchenko 96d9328bae CHE-6463 Update packages of Recipe, Snapshot objects 2017-09-28 13:06:50 +03:00
Sergii Leshchenko c417d75212 CHE-6463 Remove dependencies on removed api-machine and docker-compose modules 2017-09-28 12:34:25 +03:00
Florent BENOIT d099737498 Update dependencies for EclipseLink (#6466)
* Update dependencies for EclipseLink
2017-09-27 17:57:54 +02:00
Sergii Kabashniuk de52d5f04b Code cleanup 2017-09-27 11:29:54 +03:00
Sergii Kabashniuk d9ded7aa8d Subscribe for PostUserPersistedEvent 2017-09-25 22:33:41 +03:00
Sergii Kabashniuk d7d98081ea Added components to initialize admin permissions for configured user (#6414)
* Init admin permissions
2017-09-25 14:52:08 +03:00
Sergii Leshchenko 118a54521c Fix sql scripts license 2017-09-22 15:22:33 +03:00
Sergii Leshchenko 211648b573 Rename PostgresqlTckModule to MultiuserPostgresqlTckModule 2017-09-22 15:22:33 +03:00
Oleksii Kurinnyi bd2ea09b1a CHE-5802: transplantation of Codenvy dashboard stuff to Che dashboard (#6381)
* code clean-up

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

* move user-management and its related components

Signed-off-by: Oleksii Kurinnyi <okurinnyi@codenvy.com>

* move organizations and its related components

Signed-off-by: Oleksii Kurinnyi <okurinnyi@codenvy.com>

* add Keycloak authorization

Signed-off-by: Oleksii Kurinnyi <okurinnyi@codenvy.com>

* move teams and its related components

Signed-off-by: Oleksii Kurinnyi <okurinnyi@codenvy.com>

* move share-workspace and its related components

Signed-off-by: Oleksii Kurinnyi <okurinnyi@codenvy.com>

* update assembly

* fixup! update assembly
2017-09-22 10:03:17 +03:00
Sergii Leshchenko de347bedae CHE#6041 Move Organization&Resource APIs (#6384)
* Use different Sql schemas for che and che-multiuser
* Move Resource API
* Move Organization API
* Move personal account
* Add Che Multiuser integration tests
* Fix integration tests
* Set 5.19.0-SNAPSHOT version for moved modules
* Fix multiuser packaging
2017-09-22 09:31:23 +03:00
Sergii Kabashniuk 546ba4e4ea Merge with master 2017-09-20 11:34:18 +03:00
Sergii Kabashniuk d4f03cbc4a Ability to authenticate Oauth flow (#6326)
* Add keycloak token to oauth authenticate call

* fixup! Add keycloak token to oauth authenticate call

* fixup! Add keycloak token to oauth authenticate call

* Fix dashboard build

* fixup! Add keycloak token to oauth authenticate call

* fixup! Add keycloak token to oauth authenticate call

* Add security token for websocket url  (#6319)

* Add security token for websocket url

Signed-off-by: Vitalii Parfonov <vparfonov@redhat.com>

* Fix failed test (#6325)

Signed-off-by: Vitalii Parfonov <vparfonov@redhat.com>
2017-09-18 18:42:49 +03:00
Max Shaposhnik e3e382103f Fix build warnings 2017-09-15 17:03:34 +03:00
Max Shaposhnik d2bfa4f7f4 Move permissions and authorization into separate module; 2017-09-14 17:03:43 +03:00