22 Commits

Author SHA1 Message Date
Milan Pavlik
9f51b6134b
[public-api] Remove db debug from OIDC tests (#18252)
* [public-api] Remove db debug from OIDC tests

* fix
2023-07-12 16:02:28 +08:00
Milan Pavlik
fcb8c5f79d
[papi] Extract JWT cookie when extracting creds (#17875)
* [papi] Extract JWT cookie when extracting creds

* fix

* fix

* fix

* Fix

* fix

* Update components/public-api-server/pkg/auth/middleware.go

Co-authored-by: Gero Posmyk-Leinemann <32448529+geropl@users.noreply.github.com>

---------

Co-authored-by: Gero Posmyk-Leinemann <32448529+geropl@users.noreply.github.com>
2023-06-14 15:37:04 +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
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
Milan Pavlik
89e9ad0075
[sso] Validate Issuer URL + fix trailing slash WEB-345 (#17623)
* [sso] Fix trailing slash in issuer

* fix

* fix

* fix
2023-05-16 16:08:01 +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
d7480d1cd4
[papi] check for OIDC Discovery support (#17268) 2023-04-20 13:51:52 +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
Brad Harris
ff079b96fa
Org SSO Page updates (#16868)
* Breaking SSO page into components & react-query

* wrapper component not needed anymore

* position off of bottom instead

* add a heading/subheading for consistency

* add clientside validation

* adding oidcConfig.issuer to api response

* updating test

* minor cleanup
2023-03-16 21:59:08 +01:00
Alex Tugarev
f4889ad5e0 [oidc] assertIssuerIsReachable 2023-02-10 08:58:15 +01:00
Milan Pavlik
e5c8da1491 [oidc] Implement Get OIDC Client Config API 2023-01-20 15:53:28 +01:00
Milan Pavlik
b984390bfb [oidc] Move create RPC directly to public-api 2023-01-20 15:20:28 +01:00
Milan Pavlik
72a31730f7 [oidc] Delete OIDC Client Config API 2023-01-20 15:00:28 +01:00
Alex Tugarev
487b7edfde [public-api] re-generate and adjust callsites 2023-01-20 12:11:27 +01:00
Milan Pavlik
7012fe2ce3 [oidc] List client configs API implementation 2023-01-19 14:30:27 +01:00
Milan Pavlik
e3fb86f950 [oidc] Propagate OrganisationID to IAM component 2023-01-19 09:05:26 +01:00
Alex Tugarev
ba6ce0ecce [public-api] Implement CreateClientConfig 2023-01-13 17:37:21 +01:00
Christian Weichel
478a75e744 Switch license to AGPL 2022-12-08 13:05:19 -03:00
Milan Pavlik
114a3bd1b4 [oidc] Add stub RPCs 2022-12-07 05:05:17 -03:00