585 Commits

Author SHA1 Message Date
Gero Posmyk-Leinemann
cc52d25280
Upgrade yarn packages (#18128)
* [ts] Pin mimimatch and minimist

* [server] Update minio

* [ts] Remove superfluous node-pre-gyp dep

* [ts] Pin jsonwebtoken to 9.0.0

* [grpc] Update grpc-toolsis

* [ts] Upgrade from mocha-typescript to  @testdeck/mocha

* fix rimraf
2023-07-03 14:47:19 +08:00
Milan Pavlik
2933eeef54
Upgrade ts-node to 10.4 WEB-575, WEB-576 (#18102)
* Upgrade ts-node to 10.4

* [server] Make typings work in workspace AND leeway

* [leeway] Increase node heap size to 8GB

---------

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
2023-06-30 20:26:48 +08:00
Sven Efftinge
b766c9146e
[server] Use our own error type (#18113) 2023-06-30 15:27:48 +08:00
Sven Efftinge
caf26b812d
[server] remove getUserProjects (#18093) 2023-06-29 16:30:47 +08:00
Sven Efftinge
3318ef3563
[db] directly delete code sync resources (#18053) 2023-06-26 18:35:50 +08:00
Sven Efftinge
15db374739
[db] allow nesting transactions (#18038)
The implementation of a db method should be able to use transactions
when it makes sense without assummptions of whether the code
is called from a running transaction or not.
2023-06-23 21:33:13 +08:00
Milan Pavlik
dd4b30c7c3
[perms] Grant owner/member on role change WEB-505, WEB-507 (#17993)
* fix

* fix

* fix

* fix

* fix

* fix

* fix?

* fix

* fix

* fix

* fix

* fix

* Fix

* fix

* fix

* fix

* fix

* fix

* fix

* remove migration

* fix

* fix

* fix

* fix

* fix

* fix

* fix
2023-06-23 20:22:13 +08:00
Sven Efftinge
b72f9ae0fe
[db] some cleanups for db impls (#18018) 2023-06-22 19:10:12 +08:00
Milan Pavlik
95e4f5d9e7
[db] Make Team DB transactional (#18012) 2023-06-22 17:30:12 +08:00
Sven Efftinge
f44d1bab50
[db] check if table exists before creating (#18014) 2023-06-22 16:39:12 +08:00
Sven Efftinge
248a00eaa8
[server] clean up org-only migration code (#17939) 2023-06-22 15:03:12 +08:00
Gero Posmyk-Leinemann
909955d2c4
[db, ts] Introduce a generic db.transaction() (#17980)
* [ts] Upgrade inversify 5.0.1 -> 6.0.1

* [server, db] Introduce TransactionalDB for User, Workspace, Projects

* Fix tests
2023-06-21 16:12:11 +08:00
Sven Efftinge
fb0b7c4980
[usage] compute correct spending limit (#17947) 2023-06-20 17:39:10 +08:00
Sven Efftinge
79752d785f
[job] drop job state feature (#17948) 2023-06-15 18:52:05 +08:00
Sven Efftinge
fb3f55ad51
[db/server] cache the user object using redis (#17906) 2023-06-14 13:50:04 +08:00
Sven Efftinge
097d178910
[server] remove user relation from gitpod_token (#17923) 2023-06-14 03:53:04 +08:00
Sven Efftinge
2e8e6ac9c3
[gitpod-db] don't leak DBUser (#17912) 2023-06-13 16:58:03 +08:00
Milan Pavlik
bf947d1260
[db] Drop sessions table & db - WEB-106 (#17862)
* retest

* add ws handler

* retest

* fix

* clean up

* [db] Drop sessions table & db

* add comments
2023-06-08 16:32:59 +08:00
Alex Tugarev
c3ffd87a56
[db] fix expensive table check (#17864) 2023-06-07 19:47:57 +08:00
Alex Tugarev
0c4be908db
[gitpod-db] Fix tables.ts (#17841) 2023-06-07 00:08:57 +08:00
Alex Tugarev
f7fd787088
Read email from SSO profile – WEB-437 (#17819)
* [protocol] remove unnecessary User.censor

* Read email from SSO profile

* [gitpod-db] Add Identity.lastSigninTime

* revert useOIDCClientsQuery changes

* make use of lastSigninTime on Account page

* [server] update lastSigninTime on signin

* fixup tests

* fixup update of lastSigninTime
2023-06-06 16:50:57 +08:00
Alex Tugarev
6436f44274
[gitpod-db] remove deprected/unused tokens column – WEB-400 (#17813)
* [gitpod-db] remove deprected/unused `tokens` column

* fix db model
2023-06-02 19:08:07 +08:00
Milan Pavlik
a05ea2c9eb
[server] Remove self-hosted installation admin telemetry endpoint (#17787)
* [server] Remove self-hosted installation admin telemetry endpoint

* Fix

* fix

* fix

* fix

* Fix

* fix
2023-06-02 16:15:07 +08:00
Gero Posmyk-Leinemann
49c6e05130
Don't migrate technical users (#17786)
* [server] Don't migrate technical user, incl. rollback

* [server] Skip migration related test

* fix
2023-05-31 23:07:05 +08:00
Gero Posmyk-Leinemann
f7d81a8eef
[server, db] Fix some imports to re-enable "yarn test" in server (#17769) 2023-05-30 17:27:04 +08:00
Sven Efftinge
734e144bf5
[server] expose API for blocked email domains (#17754) 2023-05-26 04:12:59 +08:00
Sven Efftinge
2ff6e6ae76
[jobs] support passing state between job runs (#17734) 2023-05-25 15:03:59 +08:00
Sven Efftinge
5ec0c8b9b9
[db] optimize often used qery (#17722) 2023-05-24 17:01:58 +08:00
Sven Efftinge
97af77c86b
[periodic deleter] remove unmanaged tables (#17698) 2023-05-22 22:54:56 +08:00
Sven Efftinge
335aa6e04a
[db] removed unused instance join (#17700) 2023-05-22 20:04:56 +08:00
Sven Efftinge
9a83e92d81
[server] delete duplicate auth provider (#17651) 2023-05-22 16:28:56 +08:00
Milan Pavlik
2c50eb77ae
[server] Delete webhook events directly (#17650)
* [server] Delete webhook events directly

* fix

* log query

* fix

* Fix
2023-05-19 17:18:53 +08:00
Sven Efftinge
85d958450b
[db] remove db-based distributed lock (#17652)
we are using redis for this now
2023-05-17 23:28:51 +08:00
Sven Efftinge
dc7fa38db4
remove long-running migrations (#17638) 2023-05-17 21:23:51 +08:00
Alex Tugarev
7952153237
Add verify param to OIDC start request – WEB-333 (#17576)
* [papi] Add `verified` flag to config and `ActivateClientConfig` to OIDC service

* [papi] implement `ActivateClientConfig`

* [gitpod-db/go] add `setClientConfigVerifiedFlag`

* [gitpod-db/migration] add `d_b_oidc_client_config.verified` field

* [papi] Don't deactive on UpdateClientConfig

* [gitpod-db/go] add missing `Verified` field

* On "activate" request also mark as verified.

* [gitpod-db/go] fix mapping of `Verified` field

* [papi] ensure only verified OIDC client configs can be activated

* [papi] Skip the sign-in on verify-only requests.

* [papi] fix skipped tests

* [papi] fix mapping of OIDC configs

* rename RPC method

* fix tests after adding validation of claims

* fix: activation of record should deactivate others

* fix: update should unverify the entry

* remove Debug()

* [db-migration] fix: mark active entries as verified
2023-05-16 21:09:02 +08:00
Alex Tugarev
bac0eaec6b
[SSO] find organizational accounts by email – WEB-346 (#17614)
* [SSO] find organizational accounts by email

First try to look up accounts by `[subjectID, audience]` as composite key, then try to lookup by email address. The scope of this lookup is limited to the Org owning the SSO configuration.

* fix tests for /session endpoint handler

* rename to findOrganizationalUser

* fix test case

* added logging for "find by email" path
2023-05-16 00:09:00 +08:00
Sven Efftinge
8e952fe821
Update stripe customers during migration (#17574) 2023-05-15 21:14:00 +08:00
Alex Tugarev
4063c75f7d
[server] remove unused code in user-service.ts (#17613) 2023-05-15 19:02:00 +08:00
Sven Efftinge
28e3649850
Org slugs are kept in sync with name (#17596) 2023-05-12 20:42:57 +08:00
Sven Efftinge
b7d01a7e25
Disallow deletion of teams (#17538) 2023-05-10 22:25:55 +08:00
Sven Efftinge
606e74f6c7
[dashboard] invite link for SSO orgs (#17478) 2023-05-05 17:59:43 +08:00
Milan Pavlik
e0f8cd3251
Revert "[server] Delete webhook events directly (#17487)" (#17500)
This reverts commit 5ae23651c0003f7334ff0c52cfe5d8b2a55406d5.
2023-05-04 20:43:42 +08:00
Brad Harris
38f033af05
Use getOnboardingState api for dedicated setup flow (#17488)
* check onboaring state for dedicated setup flow

* track dedicated setup completed w/ state

* use ff for loading check too

* remove caching of onboarding state

* wip

* checking for deleted oidc configs too

* trying to drive off onboarding state more

* more wip to handle state of dedicated setup

* reset queries

* set active org id in local storage

* clear query client cache

* removing ff check

* move updateUser from step to flow

---------

Co-authored-by: Alex Tugarev <alex@gitpod.io>
2023-05-04 17:15:43 +08:00
Sven Efftinge
136e248a65
[db] mark admin as migrated (#17493) 2023-05-04 15:55:42 +08:00
Milan Pavlik
2c25c70f6d
[server] Delete OTS directly, instead of through db deleter (#17484) 2023-05-04 15:00:42 +08:00
Milan Pavlik
5ae23651c0
[server] Delete webhook events directly (#17487) 2023-05-04 14:59:42 +08:00
Sven Efftinge
0d85286758
[server] migrate ws without usageattribution (#17485) 2023-05-03 21:26:41 +08:00
Alex Tugarev
af796f2825
[server] Compute state of Dedicated Onboarding (#17466) 2023-05-03 14:27:41 +08:00
Sven Efftinge
2960e001fb
[server] fix login regression (#17461) 2023-05-02 18:31:40 +08:00
Milan Pavlik
809b5a5316
[server] Use redlock for periodic db deleter (#17381)
* [server] Use redlock for periodic db deleter

* Fix

* fix
2023-04-28 16:34:36 +08:00