87 Commits

Author SHA1 Message Date
Gero Posmyk-Leinemann
bdad590b09
[server] Missing SCM access: Filter out user error on workspace start (#19469)
* [server] Missing SCM access: Filter out user error on workspace start

to prevent false alerts (EXP-1434)

* [proxy] api.: Handle /auth/*/callback
2024-02-27 09:13:08 +02:00
Gero Posmyk-Leinemann
4e718d9b2a
[proxy, server] api. subdomain for Github login callback (#19448) 2024-02-21 09:56:02 +02:00
Huiwen
b7d39c0cd4
[papi] add prebuild log url to prebuild message (#19353)
* [papi] GetPrebuildLogUrl proto implement

* Remove seperated API

* fix incorrect URL module
2024-01-29 19:38:05 +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
Gero Posmyk-Leinemann
f78eff2467
Frontend development: redirect instead of proxy (#19177)
* [dev] make-user-admin: Grant all admin permissions

* [dev] Change frontend-dev to redirect instead of transparently proxy

This removes the "proxy needs network access to upstream" constraint, by relying on the developers browser

* [dev] front-end dev: more convenience, and added to readme
2023-12-05 16:48:13 +02:00
Gero Posmyk-Leinemann
33f9c0b6a7
[proxy] Expose v1 api on api. subdomain (#19089)
* [proxy] Expose v1 api on api. subdomain

* [gpctl] Move to use gRPC on api.gitpod.io directly

* [proxy] Remove "test compression" comment as that has been tested and works
2023-11-20 14:59:58 +02:00
Filip Troníček
c00f28a9d4
Gitpod CLI: Improve Segment logging (#19064)
* Gitpod CLI: Improve Segment logging

* Set empty logger correctly

* Proxy all files in the `static/bin/` folder

* copy all files

* Revert gzip change and fix proxy dep

* Update folder for artefacts
2023-11-17 12:38:55 +02:00
Filip Troníček
e51d974c52
Local App v2 :) (#18971)
* Local App v2 :)

* bind variables correctly

* Play around with units

* Port more commands over

* Separate commands (1 per file)

* `gitpod workspace delete`

* Extract login

* Show help text when run without a command

* Fix login

* `gitpod logout`

* Simple logging

* Remove unused import

* Make host use consistent

* Fix GetToken

* Split distribution

* 🤷‍♂️

* Fix paths 🤷🤦

* Change URL of binaries

* Fix proxy binary handling

Co-authored-by: Pudong <tianshi8650@gmail.com>

* Improve logging

* Change workspace list to be up-to-spec

* `gitpod organizations list`

* Simplify table code

* `gitpod workspace get`

* Created at

* `gitpod organization get <id>`

* Hide open for now

* `workspace start --ssh`

* `ws start --open`

* server: OAuth client

* Use OAuth app

* logs

* `gitpod workspace create`

* Rename to follow singular noun semantics

* Fix nil pointers in list and go cmds

* `--field` for `gitpod organizations list`

* `gitpod ws list --field`

* Simplify some of the ws code

* Unify WS data structure

* Allow opening browser-based WSs

* `gitpod workspace open`

* Constants package to get rid of circular dependency issues

* No config file by default

* Guidance when missing in path

* Fix local companion maybe 🤷‍♂️

* Create wait for start by default

* Align scopes

* KeychainName constant

* Provide token via flag instead

* Host in scope error lookup message

* 🤷‍♂️

* Name for consistency

* Editors in go client of papi

* `gitpod workspace list-classes`

* `gitpod config`

* Infer orgs if applicable

* Remove redundant error log

* Retry mechanism for streaming

* More useful error message for unauthed

* README update

* Allow `function:getTeam`

* return org inference errors properly

* Replace config with context

* Fix config file path

* Wrap up pretty printer

* Name changes

* Remove unused vars

* 🇺🇸

* Update README

* Fix login

* [local-app] Add whoami command

* [local-app] Add context management

* Refactor common package

* Harmonise output and formatting

* Add error resolution support

* Improve resolution printing

* Add apology for system exceptions

* Add class resolutions

* Apologise more

* Add unknown field resolution

* Add better login context name

* Make it build

* `gitpod workspace list-editors`

* Fix multiple ws IDs for `ws get`

* Simplify open code

* Update local-app README with usage instructions

* Help for editor options

* Remove unused config code

* Call workspace ID field ID instead of workspace

* Improve long format output

* Fix whoami output

* Streamline workspace listing

* Introduce fancy intro

* Improve set-context feedback

* Remove common package

* Add first unit test

* Harmonise field order

* Consistency across get commands

* Consistency among list command aliases

* Fix column name in whoami

* Fix nil refs for empty hosts

* Make prettyprint writer typesafe

* Add resolutions for no token or no host found

* Fix typo

* Fix CI build

* Properly record org ID on login

* Print orgs in wide format

* Added "workspace up" functionality back in

but hidden

* Make "Git" casing consistent

https://english.stackexchange.com/questions/611711/tech-related-should-i-capitalize-the-word-git-in-this-context-or-not

* Introduce workspace up intermediary

* Fix proxied binary name

---------

Co-authored-by: Pudong <tianshi8650@gmail.com>
Co-authored-by: Christian Weichel (Chris) <chris@gitpod.io>
2023-11-06 16:32:44 +02:00
Sven Efftinge
f6bf401d38
[dashboard] use organization v2 shapes (#18970) 2023-11-06 15:18:44 +02:00
Anton Kosyakov
c7f8c35f64
[dashboard] integrate v2 WorkspaceService.getWorkspace (#18884) 2023-10-18 11:50:25 +03:00
Milan Pavlik
547b8b3590
[proxy] Add /api/health 200 (#18917)
* [proxy] Add /api/health 200

* Update Caddyfile
2023-10-13 10:22:21 +03:00
Gero Posmyk-Leinemann
ba79893532
Revert "[dashboard] Downtime in-app announcements (#18761)" (#18789)
This reverts commit cebee56ff834a0017c42a799c298ef0e8df67db7, modulo some fixes we want to keep.
2023-09-25 09:06:04 +02:00
Gero Posmyk-Leinemann
cebee56ff8
[dashboard] Downtime in-app announcements (#18761)
* [dashboard] Downtime in-app announcements

* [dashboard] Set correct port for hot reload to work

* [dashboard] Display local time

* adding static page for maintenance mode

* [dashboard] maintenance screen: Add specific end time

* [dashboard] in-app maintenance notification: Point to https://www.gitpodstatus.com instead of specific event

* [proxy] Re-direct mechanism controlled by env var MAINTENANCE_REDIRECT

---------

Co-authored-by: Brad Harris <bmharris@gmail.com>
2023-09-21 11:15:00 +02:00
Anton Kosyakov
352484b34d
node grpc spike dashboard to server (#18691)
* [public-api] add dummy service for testing

* [public-api] proxy dummy to server

* [public-api] hello service server impl

* [server] fix API contribution bindings

* [dashboard] emulate unary call

* only if actually called

* [dummy] auth

* fix tests

* [server] add interceptor to public api

* add server side observability

* fix port name

* change to unimplemented for unknown methods

* [public-api] client metrics

* fix metrics imports

* align server metrics

* actually fix metrics

* add feature flags

* fix server side streams

* [dashboard] hook error reporting

* rebase and fix imports

* feature flagged metrics from dashboard

* revert GRPC_TYPE

* address feedback
2023-09-15 13:46:54 +02:00
Milan Pavlik
efb573cb51
[proxy] Add services.DOMAIN handlers for IDP and Apps ENG-524 (#18357)
* [proxy] Add services.DOMAIN handlers for IDP and Apps

* retest

* fix

* fix

* fix

* fix

* fix
2023-07-26 22:10:28 +08:00
Anton Kosyakov
ce63317578
[configcat] fix IDE-185: user internal route (#18029) 2023-06-23 16:33:13 +08:00
Anton Kosyakov
7bde75d29d
internal analytics endpoint (#17389)
* internal analytics endpoint

to prevent triggering rate limitting on analytics from internal components
see https://gitpod.slack.com/archives/C02EN94AEPL/p1682493547309509

* add AnalyticsPort to service and modify network policy

* include all internal components

* fully qualified service reference

---------

Co-authored-by: Pudong <tianshi8650@gmail.com>
2023-04-27 15:50:35 +08:00
Anton Kosyakov
bf65f38734
[proxy] add analytics endpoint 2023-04-17 10:28:19 +02:00
Milan Pavlik
b1dec9f34a
[proxy] Remove slow-server config (#16448) 2023-02-27 12:03:57 +01:00
Gero Posmyk-Leinemann
7a1f01d580 [proxy] Fix meta workspace-handler 2023-02-01 10:20:39 +01:00
Gero Posmyk-Leinemann
c4caa10438 [proxy] Remove dependency on ws-proxy for "Meta" installation 2023-01-31 13:47:38 +01:00
Milan Pavlik
5cc1ab99f5 [proxy] Route /iam/* to public-api-server 2023-01-23 15:31:31 +01:00
Gero Posmyk-Leinemann
78e58ee1c1 [proxy, server] Introduce X-Frontend-Dev-URL 2023-01-19 10:45:27 +01:00
Andrew Farries
503ef163f4 Stop setting X-Real-IP on upstream requests
The value of the header was set to the IP address of a machine inside
GCP rather than the the actual client IP address.

To ensure that the header contains the actual client IP address, this
header is now set at the GCP load balancer.
2023-01-16 21:50:24 +01:00
Huiwen
a1670a1675 Add proxy route for public-api 2023-01-10 13:03:49 +01:00
Anton Kosyakov
697696029b [gp-run] experimental workspace config debug mode
Co-authored-by: Anton Kosyakov <anton@gitpod.io>
Co-authored-by: Victor Nogueira <victor@gitpod.io>
Co-authored-by: Andrea Falzetti <andrea@gitpod.io>
2023-01-09 06:32:48 +01:00
Alex Tugarev
9506a02554 [iam] add proxy route /iam/* 2022-12-22 12:40:31 -03:00
Andrew Farries
fc3fcf3fc1 Extract request matchers to snippet 2022-12-01 11:53:00 -03:00
Andrew Farries
2071284bbd Pre-flight /auth endpoints 2022-12-01 11:43:01 -03:00
Andrew Farries
2d4df42103 Add cors_origin directive to backend_wss 2022-11-30 07:13:59 -03:00
Gero Posmyk-Leinemann
a845eb167e [proxy] Improve reconnection behavior of websockets 2022-11-30 07:13:59 -03:00
Andrew Farries
f89093da40 Match /api/v1 in the @backend_wss matcher
This reverts commit d9ca120e0b0ac59a1ece3e11c13a4d3659ef6c5a.
2022-11-29 13:40:58 -03:00
Andrew Farries
d9ca120e0b Revert "Match /api/v1 in the @backend_wss matcher"
This reverts commit 79e4e3742ec4fc106055ecac4be763f21aafe362.
2022-11-29 12:00:58 -03:00
Andrew Farries
69187b2103 Use forward_auth to pre-flight ws connections
Use the returned `X-Gitpod-Slow-Database` header to direct the ws
connection to either the `slow-server` or `server` deployment.
2022-11-29 11:19:58 -03:00
Andrew Farries
a7d5bb42fb Pre-flight requests to server /api/* endpoints
Before serving /api requests, make a 'pre-flight' request to
`/api/feature-flags/slow-database` and use the `X-Gitpod-Slow-Database`
header in the response to decide where to send the actual request;
either to the regular `server` service or the new `slow-server` service.
2022-11-28 11:47:57 -03:00
Andrew Farries
79e4e3742e Match /api/v1 in the @backend_wss matcher
Websocket Upgrade requests can hit either `/api/gitpod` (from `server`)
or `/api/v1` (from the public API).

This matcher change ensures that the request is handled by the intended
matcher block rather than the block for `api/*` requests below.
2022-11-28 11:21:58 -03:00
Andrew Farries
cd03a462aa Reverse proxy by Sec-WebSocket-Protocol header
Add matchers for the `Sec-WebSocket-Protocol` header and use them in the
`reverse_proxy` directives.
2022-11-21 10:53:51 -03:00
Andrew Farries
f0252299c4 Run caddy fmt 2022-11-21 10:53:51 -03:00
Milan Pavlik
311e9f4512 Revert "[proxy] Remove workspace download plugin"
This reverts commit c74f84bd2942495e9eafa0e57a3e08334e821613.
2022-11-11 11:25:40 +02:00
Milan Pavlik
c74f84bd29 [proxy] Remove workspace download plugin 2022-11-09 13:19:39 +01:00
Manuel Alejandro de Brito Fontes
7c4ddc6196 Update configuration 2022-10-19 20:58:34 +02:00
Milan Pavlik
e8ed0103b0 [proxy] Use AllowedOrigins instead of BaseDomain for CORS 2022-10-13 10:30:28 +02:00
Milan Pavlik
0a476c52e8 [public-api] U Refactor to use connect handlers, route to HTTP server 2022-10-12 12:19:27 +02:00
Milan Pavlik
31f273205f [proxy] Route HTTP 1.x requests to public-api-server 2022-10-05 07:56:20 +02:00
Jean Pierre
350404f82d Add vscode callback route 2022-09-12 20:25:13 +02:00
mustard
cadc7d9552 [proxy] add configcat plugin 2022-09-09 12:25:24 +02:00
Jean Pierre
aa2c51c804 Serve webview resources from blobserve 2022-05-19 08:12:33 +05:30
Milan Pavlik
997c6045fa [public-api] Caddy serves gRPC port instead of http 2022-04-28 12:45:14 +05:30
Milan Pavlik
c1d9ae936f [public-api] Route api.<domain> to public api service & deployment 2022-04-20 22:44:33 +05:30
Gero Posmyk-Leinemann
37feff2c4a [proxy] REplace GITPOD_INSTALLATION_LONGNAME with "<region>.<shortname>" 2022-04-19 20:33:32 +05:30