16 Commits

Author SHA1 Message Date
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
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
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
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
Milan Pavlik
5317b53ef8
[db-sync] Remove comment references (#16602) 2023-03-01 11:06:58 +01:00
Milan Pavlik
e5c8da1491 [oidc] Implement Get OIDC Client Config API 2023-01-20 15:53:28 +01:00
Milan Pavlik
72a31730f7 [oidc] Delete OIDC Client Config API 2023-01-20 15:00:28 +01:00
Milan Pavlik
7012fe2ce3 [oidc] List client configs API implementation 2023-01-19 14:30:27 +01:00
Milan Pavlik
fde5279d3a [db] Implement basic list oidc client configs 2023-01-19 08:26:26 +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
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