529 Commits

Author SHA1 Message Date
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
Alex Tugarev
d52ba759ae
Implement deactivation of OIDC client configs – WEB-333 (#17659)
* [papi] implement deactivation of OIDC client configs

* fix: add test for record not found

* simplify db.SetClientConfigActiviation
2023-05-22 19:55: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
Alex Tugarev
9266c7617c
[papi] select active OIDC config for start request – WEB-316 (#17518)
* [papi] select active OIDC config for start request

* rename GetActiveOIDCClientConfigByOrgSlug

* add CreateTeams helper

* [papi] Ensure activation of SSO config deactivates previous one

* applied PR review comment
2023-05-10 19:56: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
Milan Pavlik
c1a5e53134
[oidc] Restrict actions to team owners (#17470) 2023-05-03 14:20:41 +08:00
Milan Pavlik
4e983b7998
[public-api] Implement UpdateOIDCClientConfig WEB-278 (#17464)
* [public-api] Implement UpdateOIDCClientConfig

* fix

* fix

* fix

* fix

* fix

* fix
2023-05-02 23:48:40 +08:00
Sven Efftinge
2960e001fb
[server] fix login regression (#17461) 2023-05-02 18:31:40 +08:00
Sven Efftinge
cbd56c2592
Frictionless login for dedicated (#17432) 2023-05-02 02:12: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
Alex Tugarev
76c61533a6
[OIDC] Enable mark client config as "active" (#17365)
* [gitpod-db] Add `d_b_oidc_client_config.active` field

* [papi] Add OIDCClientConfig.active to proto def

* [gitpod-db] Add OIDCClientConfig.active

* [papi] Add `activate` param to `/oidc/start` endpoint handler

If provided it should mark the OIDC client config as `active` in the DB.

* Fix propagation of state params and add tests.

* fix import of deprecated ioutil

* refactor GetStartParams

* consider `activate` from create request
2023-04-27 21:35:36 +08:00
Sven Efftinge
f840049dbf
[db] directly delete workspaces (#17400) 2023-04-27 15:30:35 +08:00
Sven Efftinge
bbc0985c67
[wsgc] fix workspaceForPurging query (#17398) 2023-04-26 22:16:35 +08:00
Gero Posmyk-Leinemann
2867dab4d7
[db] Unblock admin-user by default (#17394) 2023-04-26 20:38:34 +08:00
Sven Efftinge
2733008e87
[org-only] relax org name restriction (#17371) 2023-04-25 23:52:46 +08:00
Gero Posmyk-Leinemann
179e55b98a
[preview] Configure with-dedicated-emulation (#17337)
* [preview] Disable stripe secrets on GITPOD_WITH_DEDICATED_EMU

* [preview] Disable linkedin secrets on GITPOD_WITH_DEDICATED_EMU

* [dashboard, db] Don't show onboarding dialogues for "admin-user"

* [preview] Configure stripe/linkedin in the same code block
2023-04-25 16:04:46 +08:00
Alex Tugarev
ee82d153e3
Enable Dedicated Onboarding Flow – WEB-193 (#17303)
* uncommitted yarn.lock

* [protocol] adding ONBOARDING_IN_PROGRESS

* [gitpod-db] add `someOrgWithSSO` to team db

* [server] add ONBOARDING_IN_PROGRESS hook

* [dashboard] catch ONBOARDING_IN_PROGRESS error

* [configcat] adding `custom.gitpod_host` attribute to select preview envs
2023-04-21 21:08:42 +08:00
Alex Tugarev
62c5a09113
[server] stop logging 0 items (#17311) 2023-04-21 19:40:42 +08:00
Gero Posmyk-Leinemann
31457adcad
[db] Purge all Chargebee-related DB tables (#17286)
* [db] Drop all Chargebee-related tables

* [db] Drop table d_b_pending_github_event
2023-04-20 23:04:41 +08:00
Gero Posmyk-Leinemann
3a284fac8a
[db] Remove all Chargebee-related DB models (#17287)
* [yarn] Fix dirty yarn.lock

* [db] Remove models for Subscription, AccountEntry, TeamSubscription/2 and PendingGithubEvent

* [db] Adjust DB model for TeamMembership
2023-04-19 20:54:51 +08:00
Gero Posmyk-Leinemann
ae37d8c1ab
Remove api.isStudent and all connected code/DB (#17275)
* [server, dashboard] Remove isStudent

* [server] Remove hasEducationalInstitutionSuffix and swot-js

* [db] Clean EduEmailDomainDB model

* [db] Drop d_b_edu_email_domain

* [yarn] Remove swot-js from yarn.lock

* [db] Remove d_b_edu_email_domain from tables.ts

* Fix
2023-04-19 15:58:51 +08:00
Milan Pavlik
311568460c
[server] Remove license db model - WEB-171 (#17264)
* [server] Remove license db model

* fix
2023-04-18 22:23:50 +08:00
Milan Pavlik
0f8df4de92
[db] Drop d_b_user_message_view_entry (#17259) 2023-04-18 18:35:50 +08:00
Milan Pavlik
eab2cfebd5
[db] Remove user message view db model - WEB-172 (#17258)
* [db] Remove user message view db model

* Fix

* retest
2023-04-18 18:08:50 +08:00
Milan Pavlik
650bc1f862
[db] Drop d_b_theia_plugin (#17257) 2023-04-18 17:54:50 +08:00
Milan Pavlik
318e9d8136
[db] Drop d_b_terms_acceptance_entry (#17254) 2023-04-18 17:41:50 +08:00
Sven Efftinge
22a29b20d9
[db] make verification faster (#17247) 2023-04-18 17:40:50 +08:00
Milan Pavlik
296efd61d4
[db] Remove theia plugin db model - WEB-168 (#17255)
* [db] Remove theia plugin db model

* retest
2023-04-18 17:38:50 +08:00
Milan Pavlik
43a00d5b39
[server] Remove terms acceptance db model - WEB-167 (#17253)
* [server] Remove terms acceptance db model

* fix

* retest
2023-04-18 17:16:50 +08:00
Alex Tugarev
a657f94767
[server] clean up auth provider (#17238)
removing dead code.
2023-04-17 23:56:49 +08:00
Sven Efftinge
c44aa18c28
[workspace list] filter by org (#17228) 2023-04-17 17:48:49 +08:00
Jan Keromnes
f7101c5aed
Implement user account verification with LinkedIn during onboarding (#17074)
* Implement user account verification with LinkedIn during onboarding

* updating connect with linked-in banner

* removing unused imports

* Store token, fix binding

* Refactor LinkedInToken to LinkedInProfile

* Actually write the LinkedIn secret to the server config

* Fetch LinkedIn user profile and email address

* Add creationTime column to d_b_linked_in_profile

* Add more debug logging

* Fix LinkedIn API calls, mount LinkedInProfileDB

* Also bind LinkedInProfileDB

* Add LinkedIn scope r_liteprofile

* Enhance LinkedIn profile retrieval, store the profile, ensure uniqueness

* Align with UX spec and complete onboarding flow

* Prevent the LinkedIn button from auto-submitting the onboarding form

* Address nits (LinkedInService to /src and minor spacing)

---------

Co-authored-by: Brad Harris <bmharris@gmail.com>
2023-04-12 16:39:52 +02:00
Manuel Alejandro de Brito Fontes
27979c9395
Update go dependencies (#17101)
* Update go dependencies

Signed-off-by: Manuel de Brito Fontes <aledbf@gmail.com>

* Update runc to v1.1.5

* Update docker cli to v23.0.2+incompatible

---------

Signed-off-by: Manuel de Brito Fontes <aledbf@gmail.com>
2023-04-12 10:03:52 +02:00