984 Commits

Author SHA1 Message Date
Filip Troníček
da1053e101
Make auth cookie stricter (#19973)
* Use `__Host-` prefix for cookie

* Fix tests

* Remove domain from cookie

* Fix logout

* remove unused fn

* fix user logout properly

* [server] Make domain-only cookie work for GitHub oauth login

... by adding additional step so we can set the cookie for the base domain only

* test: fix by redirecting before callbacl/authorize

* [server] SessionHandler: Allow to login with both primary and secondary cookies

* [server] Clear 2ndary cookie on logout

* Fix filtering cookie values when primary cookie is empty

* Fix logouts

* Fix tests

---------

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
2024-07-01 08:53:14 +02:00
Sven Efftinge
9fa6f885dc
[server] audit log service (#19917) 2024-06-25 10:10:20 +02:00
Gero Posmyk-Leinemann
dfb6b6d6cb
[usage, server, dashboard] Remove ff usage_update_scheduler_duration (#19914)
* [usage, server, dashboard] Remove ff usage_update_scheduler_duration

* spelling improvement

Co-authored-by: Filip Troníček <filip@gitpod.io>

---------

Co-authored-by: Filip Troníček <filip@gitpod.io>
2024-06-20 12:29:15 +02:00
Huiwen
9d947b04ea
[JetBrains] add more integration tests (#19913)
* [JetBrains] add more integration tests

* Add deps

* Add in workspace JetBrains integration test

* Support papi

* fixup

* Test succeed

* remove unnecessary code

* Fixup

* Remove warmup TODO item

* Add doc for sh file

* Increase timeout and make it run in parallel

* Use empty

* fixup

* Sleep

* db wait

* speed up
2024-06-19 11:51:14 +02:00
Gero Posmyk-Leinemann
2686bc2f47
[server, bridge] Bump grpc-js and authzed clients (#19849)
* [yarn] Bump @grpc/grpc-js to 1.10.8 and @authzed/authzed-node to 0.15.0

* [server] SpiceDB: explicit re-try on UNAVAILABLE

We tried to configured this inside the SpiceDBClientProvider already, but somehow it still surfaced.

* [server, bridge] Configure "grpc.dns_min_time_between_resolutions_ms" to be 2s instead of 30s
2024-06-06 13:57:19 +08:00
Huiwen
f9c0969d7d
[JetBrains] support RustRover editor (#19839)
* [JetBrains] support RustRover

* Add startup json

* fixup generate

* Add svg icon
2024-06-05 04:04:16 +08:00
Sven Efftinge
e7d79c355e
[server] add workspace.deletionEligabilityTime (#19831) 2024-06-04 16:51:15 +08:00
Sven Efftinge
c80ce4852b
[server] allow fetching task specific prebuild-logs (#19812)
* [server] allow fetching task specific prebuild-logs

* [dashboard] prebuild details shows tabs per task
2024-05-30 22:53:11 +08:00
Sven Efftinge
2a397c31f6
[server] listWorkspaceSessions API (#19733) 2024-05-13 21:00:51 +08:00
Gero Posmyk-Leinemann
435fa5e729
Opportunistic token refresh (for BitBucket Server) (#19715)
* [server] Introduce and use "reservedUntilDate" in TokenService

* Fix for extending reservations, and a bit of cleanup

* review comments
2024-05-13 18:15:51 +08:00
Huiwen
4cb5b6b9c0
Fix regular IDE integration tests (#19728)
* Test integration test

* Log ide settings

* Fix regular integration test

* fixup
2024-05-10 20:33:48 +08:00
Sven Efftinge
30d5e2fa08
Configure default role for new joiners (#19701) 2024-05-06 17:05:44 +08:00
Gero Posmyk-Leinemann
08847d07dd
[bridge] Remember last status update, and skip if they are identical (#19699)
* [bridge] Remember last status update, and skip if they are identical

* [bridge] More detailed logging, and fix workspaceType in metrics
2024-05-03 23:11:43 +08:00
Aminur Rahman
58156dcf60
Add adminVerifyUser command to gpctl (#19602) 2024-04-22 16:50:00 +02:00
Alex Tugarev
13d7bdbcb2
[admin] add "Block Free Usage" (#19633) 2024-04-17 11:31:55 +02:00
Manuel Alejandro de Brito Fontes
5992b0f614
Update go dependencies (#19577)
* Update go dependencies

* Update S3

* Caddy plugins cannot use 1.22

* Update controller runtime signatures

* Update webhook suite test

* Update IPFS signatures

* Update go modules

* Update ipfs-cluster to v1.0.8

* Fix node-labeler build

* Fix IPFS CID parsing

* Update ipfs-cluster version

* Update controller-runtime signature

* Update statefulset signature

* Disable controller-runtime metrics

* Add comments
2024-03-26 20:55:35 +01:00
Filip Troníček
f83df85d13
Introduce /quickstart (#19567)
* necessary changes for github to comply

* try automating the popup

* Simplify with an effect

* try redirecting

* try redirecting somewhere authenticated

* pass the original search and hash

* Fix `TypeError: setting getter-only property "searchParams"`

* allow scm redirect

* Auomatically redirect git after signin

* quickstart the quickstart page

* Use unauthed router for quickstart

* Include the leading slash

* Redirect to new WS page on sucess

* Do not require OIDC signing, allow git login

* Do not be too clever around git auth

* Clear `message` from search params on success

* 🐬

* Retain hash when clearing message

* don't use URL.parse

It does not work in all browsers

* Make sure we properly handle all errors on `/quickstart`

* Revert ssologinform changes

* Tidy up

* Re-enable first-class git auth

* Do not require git api response for scm auth

* Enable logging in with SCM properly

* keep pathname for redirect functions

* Remove routing in multiple places

* Document empty org

* Allow `quickstart/`

* Use react's location

* Group routes registerings

* Try registering router in the query error boundary

* Try not using location 🤷‍♂️

* Revert "Try registering router in the query error boundary"

This reverts commit 228c1606d77550fab24089557aa7b4eed48257b4.

* Revert "Try not using location 🤷‍♂️"

This reverts commit 28ca3574820f958cd6936e1627662f376348408d.

* Make sure to load user first before acting on sideeffect

* Reapply "Try registering router in the query error boundary"

This reverts commit a73ac8fc732fa231fefa8ba9190451642fb55185.

* Fix position for only rendering when not authed

* do not retry auth fetch calls

* Do not cache the query

* Remove user cache on login begin

* Do not allow empty auths

* Try refetching auth providers when authed

* Try no queries
2024-03-25 22:30:34 +01:00
Huiwen
7bde766789
White list GITPOD_IMAGE_AUTH env var name (#19579)
* White list `GITPOD_IMAGE_AUTH` env var name

* Add link to doc
2024-03-25 18:00:34 +01:00
Huiwen
f9d6077523
Add repo-level editor restriction (#19564)
* Implement repo-level editor restriction relates APIs

* hack

* address feedback

* Reset option load after context changed

* Address feedback

* 💄

---------

Co-authored-by: Jean Pierre <jeanpierre@gitpod.io>
2024-03-22 06:05:31 +01:00
Huiwen
ae09aca59a
Add editor restriction on organization-level (#19542)
* [server] allow to update org settings

* [dashboard] allow org-level editor restriction

* Org owned user's editor settings should be restricted too

* Never pass empty array

* Fix user onboarding editors always loading

* Fix incorrect loading state of ide versions

* Show available editors for org owned users

* Update components/dashboard/src/user-settings/SelectIDE.tsx

Co-authored-by: Filip Troníček <filip@gitpod.io>

* Address feedback

* Revert version pin on user settings page

* Add json rpc checking

---------

Co-authored-by: Filip Troníček <filip@gitpod.io>
2024-03-20 14:07:29 +01:00
Huiwen
3f20297034
Respond bad_request with reserved env var name prefix GITPOD_ (#19547)
Co-authored-by: Filip Troníček <filip@gitpod.io>
2024-03-19 14:47:28 +01:00
Jean Pierre
9e6419c3f4
Add pin editor version (#19479)
* Add pin editor version

* Put it behind feature flag

* Fix tests

* 💄

* 💄

* Add pin icon

* 💄

* Put version pinning behind feature flag
2024-03-15 18:35:25 +01:00
Jean Pierre
475be1259b
Add db migration (#19510) 2024-03-07 17:51:17 +02:00
Huiwen
718353ef90
[papi] add restricted_workspace_classes in repository settings (#19480)
* [papi] add `restricted_workspace_classes` in repository settings

* Update components/public-api/gitpod/v1/configuration.proto

Co-authored-by: Filip Troníček <filip@gitpod.io>

* generate

* Fix build

---------

Co-authored-by: Filip Troníček <filip@gitpod.io>
2024-02-28 13:23:09 +02:00
Huiwen
e80714a733
Fix duration validation (#19476) 2024-02-27 21:10:09 +02:00
Filip Troníček
6e8cd3ed89
Configuration coachmark (#19413)
* Add repo migrate coachmark

* Public API: `coachmarksDismissals`

* Early exit for new signups

* Try to inject dismissal to link

* Dismiss on path visit

* Align to the left

* Dismiss on trigger

* Simplify show logic

Co-authored-by: Siddhant Khare <siddhant@gitpod.io>

* Consider `showPrebuildsMenuItem` when hiding projects

* update tests

* Adjust date for testing

* fix projects hide condition

* Fix repo link id ref

* Do not dismiss accidentally

* up-date

* move prebuild detail to correct folder

* Make sure errors are displayed properly for prebuilds list

* don't throw

* Report dismiss

---------

Co-authored-by: Siddhant Khare <siddhant@gitpod.io>
2024-02-19 23:47:01 +02:00
Jean Pierre
d0b5b873ec
Add invalid billing address notification (#19349)
* Add webhook events

* Properly set AutomaticTax

* Use address element

* 💄

* Update susbcription on address update

* Try scroll modal

* Fix

* try fix modal scroll

* Add toast notification

* Add invalidBillingAddress column to d_b_stripe_customer

* 💄

* 💄

* Fix

* Try fix update

* Address feedback
2024-01-29 11:12:05 +02:00
Huiwen
7094f19ee8
Add collaborator role to organization (#19311)
* Update spicedb schema

* SpiceDB gen code

* [server] add collaborator

* Update papi

* Dashboard

* nit

* Complete TODOs

* server dataops pass teamId

* Add test cases for collaborator's PAT and cookie API fetch

* Add test case description

* remove unnecessary export

* Redirect to dashboard after join an org

* Hide settings for collaborator

* dataops join via oidc should be collaborator

* Fix test

* Goes back to /workspaces
2024-01-12 10:53:49 +02:00
Sven Efftinge
0a3e22ba3d
[usage] track email for free allowance (#19303)
* [usage] track email for free allowance

* [db] d_b_free_credits: Add indexes for userId and email

---------

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
2024-01-04 10:49:41 +02:00
Huiwen
6c0a978eee
Revert "Revert "Add org-level workspace class restrictions"" - Server (#19275)
* Revert "Revert "Add org-level workspace class restrictions (#19191)" (#19272)"

This reverts commit 2c805ad0fcad05aa3c3983c08302ad4f16dc1e69.

* Fix build
2023-12-15 15:24:22 +02:00
Alex Tugarev
2c805ad0fc
Revert "Add org-level workspace class restrictions (#19191)" (#19272)
This reverts commit 653d858fa8d5edef1717a2319bc02cf356a10fc9.
2023-12-15 12:43:22 +02:00
Huiwen
653d858fa8
Add org-level workspace class restrictions (#19191)
* Add org-level maxmium workspace class limit

* [papi] add ListOrganizationWorkspaceClasses method

* Use papi in dashboard

* Validate when updating

* Fix bug

* Make it select default

* Align figma

* Option checking

* fixup

* Use switch button

* Add feature flag

* `invaldiator2` => `invalidateWorkspaceClasses`

* Don't allow to all if selected ones are removed from installation

* Update respond error msg

* dashboard show error msg

* fixup

* update proto doc

* Apply suggestions from code review

Updated error wording.

* update order

* Fix edge case

* Hide delete scope if not owner

* Update error msg

* Not cache org ws cls

* Force update org info

* Rename query file

* Add todos

* Remove refetch

---------

Co-authored-by: Filip Troníček <filip@gitpod.io>
Co-authored-by: Laurie T. Malau <laurie@gitpod.io>
2023-12-15 08:48:22 +02:00
Anton Kosyakov
521e6a5aab
[dashboard] use HTTP endpoint for telemetry (#19223)
* [dashboard] use HTTP endpoint for telemetry

* 💄

---------

Co-authored-by: Jean Pierre <jeanpierre@gitpod.io>
2023-12-12 14:56:19 +02:00
Huiwen
633f9915fc
Migrate instanceUpdate on service.tsx (#19213)
* Migrate instanceUpdate on service.tsx

* Remove useless code

* Fix build
2023-12-08 13:14:15 +02:00
Pudong
6ecc991ff5
[experimental] add ssh certificate authorities as feature flags (#19208) 2023-12-07 22:59:14 +02:00
Alex Tugarev
e4ccbf0b4d
GetAuthenticatedUser in Dashboard (#19142)
* [dashboard] remove unused service mock

* [dashboard] use `GetAuthenticatedUser` instead of `getLoggedInUser`

* fixup: override workspaceAutostartOptions

also fix toDurationString call

* fixup: move `isOnboardingUser` to dashboard

* fixup: move getProfile from protocol to common

* fixup fromWorkspaceAutostartOption

* move getPrimaryEmail to common and clean up

* rm getProfile from protocol, use ProfileDetails

* fixup missing leeway dependencies

* fix getPrimaryEmail

* fix resetting workspace timeout

* [gitpod-db] remove dependency to `@gitpod/public-api-common`

* cleanup BUILD.yaml
2023-12-06 17:42:14 +02:00
Anton Kosyakov
5a55a7a6ff
[dashboard] proactively reconnect grpc streams (#19185) 2023-12-04 16:05:11 +02:00
Filip Troníček
7bcc749da0
Configuration Variables page (#19128)
* `updateConfiguration`

* typdate

* Try with no deeply nested property

* JKADFkosaNcISADFuisabnfhjl hjkafb ashjdbjbhj

* Constrain even further

* Return the configuration

* Fix update mutation

* Only update necessary properties

* Implement name changes

* typastuff

* 🙄

* Mutation update

* 🤷‍♂️

* init

* Remove method present in upstream

* newlines and imports

* Address env var API changes

* fixies

* Fix list query key

* Fix for new router

* Fix list vars key? 🤷‍♂️

* Simplify return

* Adding stuff

* Add path

* Single variable component

* Use mutation callbacks for success and errs

* Typography and layout

* Do not store variable data in-browser

* Edit variable modal

* De-center

* Small fixes with admission init

* Spacing and alignment of menu items

* 🤷‍♂️

* Error reporting for creation/edit

* Update copy

* Verboserer output

* Fix missing argument 😱

* Pass in all properties of variables

* Provide ID when updating

* Fix changing admission

* Simplify

* Update table copy

* Text sizes

* Format

* Typo

* rename

* Simplify

* Copy update

* Rename comp

* Duplicate error printing

* Use `TextInputField`!

* Clean up TextInputField

* Break instead of truncate

* Fixed width table headers

Co-authored-by: Brad Harris <bmharris@gmail.com>

* Simplify route setup

---------

Co-authored-by: Brad Harris <bmharris@gmail.com>
2023-12-02 00:31:09 +02:00
Anton Kosyakov
2f14d7a2fe
decouple gitpod-protocol from public-api (#19151)
to prevent rebuilding of components which dependent on gitpod-protocol, but not public-api on an API change
2023-11-29 10:36:06 +02:00
Alex Tugarev
4c6cc4fb01
[papi] add user.proto and GetAuthenticatedUser – EXP-845 (#19132)
* [papi] add user.proto and GetAuthenticatedUser

* [papi] (generate.sh) Run end-of-file-fixer

* rename to EditoSettings

* clean up proto

* fix import

* update WorkspaceTimeoutSettings

* fix typo

* update WorkspaceTimeoutSettings

* clarify User.name is full name in doc line
2023-11-28 12:42:06 +02:00
Anton Kosyakov
180f648782
[dashboard] enable grpc migration per service (#19140) 2023-11-27 10:42:04 +02:00
Jean Pierre
c201a2d9df
[public-api] migrate ssh service (#19110)
* migrate ssh service

* 💄

* 💄

* fix build

* Fix

---------

Co-authored-by: Huiwen <mhqnwt@gmail.com>
2023-11-23 07:12:00 +02:00
Alex Tugarev
79666cd24d
[dashboard] Use SCM Service (gRPC) (#19101)
* [dashboard] Use SCM Service (gRPC)

* address review comments

* bump cache version
2023-11-22 18:26:00 +02:00
Huiwen
fa3cca46c0
Migrate CreateAndStartWorkspace method in dashboard (#19076)
* Migrate WorkspaceService.CreateAndStartWorkspace

* Add unit tests

* Fix rebase build error
2023-11-22 18:23:59 +02:00
Anton Kosyakov
70517fbd5a
[dashboard/server] app error conversion based on error details (#19103) 2023-11-22 17:49:59 +02:00
Alex Tugarev
612b919699
[server] Extract ScmService to be used by both APIs (#19098)
* [server] add ScmService to be used by ScmServiceAPI (and WS API)

* add simple test for `getToken`

* refactor `ScmService.getToken` to return token of undefined

* fix duplicata validation

* add api converter tests

* just some docs
2023-11-22 16:27:00 +02:00
Sven Efftinge
602fd5edcb
[build] fix tsconfig (#19111) 2023-11-22 10:10:59 +02:00
Sven Efftinge
6ff405b964
[build] make build incremental (#19106) 2023-11-22 08:17:00 +02:00
Filip Troníček
6f7ff4f7f4
updateConfiguration (#19080)
* `updateConfiguration`

* typdate

* Try with no deeply nested property

* JKADFkosaNcISADFuisabnfhjl hjkafb ashjdbjbhj

* Constrain even further

* Return the configuration

* Fix update mutation

* Only update necessary properties

* Implement name changes

* typastuff

* 🙄

* Mutation update

* 🤷‍♂️

* Type fixes

* Conditionally pass in name

* Partials

* Fix type mishap

* Update mutation name

* Tweak types

* Reduce abstractions

* Only supply name if applicable

* Better partial assignment

* Deepmerge with originals

* Only update fully when necessary

* Fix name conversion in papi converter

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

* Assert some converted properties to not exist

* Disallow empty configuration names

* Add cache update todo

* fix type vs class

* Error toasts

* Be less strict about value of name

* Toast the actual updated name

* Fix tests :-)

---------

Co-authored-by: Gero Posmyk-Leinemann <32448529+geropl@users.noreply.github.com>
2023-11-21 22:42:00 +02:00
Anton Kosyakov
6933bab2b6
[public-api] migrate PrebuildService (#19062) 2023-11-21 17:14:58 +02:00