23 Commits

Author SHA1 Message Date
Sven Efftinge
16960334b2
[usage] cleanup after org-only mig (#18023) 2023-06-23 20:09:13 +08:00
Milan Pavlik
264b57ad72
[db] Add go model for User - WEB-263 (#17824)
* [db] Add go model for User

* update helper constructor

* fix

* Add identity definition, and reference in User

* fix

* fix
2023-06-06 21:03:57 +08:00
Milan Pavlik
321da4322e
[gitpod-db] Rename Go definitions from Teams to Organizations (#17763)
* [gitpod-db] Rename Go definitions from Teams to Organizations

* fix

* fix

* Fix

* fix

* Fix
2023-05-30 19:09:04 +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
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
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
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
Alex Tugarev
7ecc196baa
Sign in with SSO (#17055)
* [experiment] Add "Sign in with SSO" to Login

Reusing existing parts:
 * `/complete-auth` page of Dashbaord to forward results of authN flows running in a modal
 * Adding preliminary UI to the Login view: Org-slug and simple button.

* [gitpod-db] get team/org by slug

* [gitpod-db] fix OIDCClientConfig.OrganizationID field's type

* [oidc] consider returnTo URL

* [oidc] consider orgSlug param from start request

* [oidc] fix oauth2 clientId propagation

* [oidc] fix a flaky test

* [onboarding] skip for organizational accounts

* Move SSO Login UI into it's own component

* adjust validation a bit, add useCallbacks

* adding GetOIDCClientConfigByOrgSlug

* add table name

* removing commented out code

---------

Co-authored-by: Brad Harris <bmharris@gmail.com>
2023-03-29 15:49:39 +02:00
Gero Posmyk-Leinemann
ab6895e4b7 [db] Make 'leeway run components/gitpod-db:init-testdb' the new default for starting test dbs 2023-01-23 16:51:30 +01:00
Moritz Eysholdt
d467d37575 Fix Go DB test in GHA 2023-01-20 15:49:28 +01:00
Milan Pavlik
abff6189f2 [db] Add organisationId to d_b_oidc_client_config + indices 2023-01-18 11:56:26 +01:00
Milan Pavlik
6fc1a75102 [iam] Implement COIDC CreateClientConfig RPC 2023-01-05 11:51:45 +01:00
Milan Pavlik
8a85247a56 [db] Support cipher-set in go 2022-12-20 12:56:29 -03:00
Milan Pavlik
9ca833a1cc [db] Support encrypted JSON in Go 2022-12-20 05:10:29 -03:00
Milan Pavlik
620b0fa288 [oidc] Setup db 2022-12-13 11:14:23 -03:00
Christian Weichel
478a75e744 Switch license to AGPL 2022-12-08 13:05:19 -03:00
Milan Pavlik
7ef62ba4a2 [pat] Validate and enforce scopes for PATs 2022-11-24 06:22:53 -03:00
Milan Pavlik
64ed64a428 [pat] Remove description field 2022-11-24 05:19:53 -03:00
Jean Pierre
afac3c9b43 [public-api] regenerate personal access token
Co-authored-by: Milan Pavlik <milan@gitpod.io>
Co-authored-by: mustard <huiwen@gitpod.io>
2022-11-23 10:01:52 -03:00
Milan Pavlik
4913d48793 [public-api] Create Personal Access Token implementation 2022-11-22 11:39:52 -03:00
Milan Pavlik
b30941bc83 [public-api] Implement list personal access tokens 2022-11-22 06:53:51 -03:00
Laurie T. Malau
ee08e7863c [db] Move db models to gitpod-db/go module 2022-11-21 08:37:50 -03:00