Commit Graph

133 Commits (b071721ad3fcd76216e1ca8ae11a9ebdbfd7410c)

Author SHA1 Message Date
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