26 Commits

Author SHA1 Message Date
Nandaja Varma
4bd992439c
[oidc] Fix the HEAD method call that checks reachability (#20474)
* [oidc] Fix the HEAD method call that checks reachability

* [server] Fix setup flow

---------

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
2024-12-20 03:01:05 -05:00
Pudong
5ebe1cca85
Add PKCE support for OIDC (#20094) 2024-08-08 03:53:46 -04:00
Huiwen
c4b53f9320
Support validate claims with CEL expr for SSO (#20083)
* [papi] proto update

* [dashboard] nit TODO

* [papi] implement cel expression verify

* drop me: Add debug logs

* 1

* tidy

* export cel error message

* 💄 dashboard

* improve error

* nit doc
2024-08-07 02:33:45 -04: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
Milan Pavlik
59e58f96c1
[common-go] Composable log fields (#16860)
* [common-go] Composable log fields

* add test for compose

* use in public api

* fix

* fix
2023-03-16 20:57:08 +01:00
Milan Pavlik
59ff034d6f
[public-api] Use context logger (#16686)
* Fix

* Fix

* Fix

* Fix

* Fix

* [public-api] Use context logger

* fix

* Fix

* fix

* Fix

* fix

* fix

* fix

* fix

* fix

* Fix

* fmt

* fix

* retest
2023-03-15 13:52:07 +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
Milan Pavlik
58a06943f6 [papi] Refactor valdiation functions to a file 2023-01-17 11:26:25 +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