1992 Commits

Author SHA1 Message Date
Cornelius A. Ludmann
e9f25f4224
Replace npx with pinned npm-tools and add security hardening (#21166)
* [dev] disable npm lifecycle scripts and npx

* Add npm-tools

* update npm-tools

* dev/image/Dockerfile

* update

Co-authored-by: Ona <no-reply@ona.com>

* Bump leeay version to 0.10.6

Co-authored-by: Ona <no-reply@ona.com>

* Fix npx removal to also delete the target script

The symlink at /root/.nvm/.../bin/npx points to npx-cli.js.
Remove both to ensure npx is fully disabled.

Co-authored-by: Ona <no-reply@ona.com>

* Remove gce-github-runner usage from all workflows

Replace self-hosted GCE runner pattern with GitHub-hosted ubuntu-latest runners across all workflows. This removes the three-phase pattern (create-runner, use-runner, delete-runner) and simplifies workflow execution.

Changes:
- Remove create-runner and delete-runner jobs from all workflows
- Replace runs-on: ${{ needs.create-runner.outputs.label }} with runs-on: ubuntu-latest
- Remove create-runner from job dependencies
- Preserve all other job dependencies and concurrency controls

Affected workflows:
- build.yml (8 jobs)
- workspace-integration-tests.yml (4 jobs)
- ide-integration-tests.yml (4 jobs)
- preview-env-check-regressions.yml (4 jobs)
- preview-env-gc.yml (2 jobs)
- jetbrains-auto-update-template.yml (1 job)
- jetbrains-integration-test.yml (1 job)
- code-nightly.yml (1 job)
- preview-env-delete.yml (1 job)

Co-authored-by: Ona <no-reply@ona.com>

* [dev] use ubuntu-latest-16-cores for builds

* Fix container permissions for GitHub-hosted runners

Add 'options: --user root' to all container configurations to resolve EACCES permission errors when GitHub Actions tries to write to internal directories.

GitHub-hosted runners require containers to run as root to allow the Actions runtime to write to /__w/_temp/_runner_file_commands/ and other internal paths.

Affected workflows:
- build.yml (3 container jobs)
- workspace-integration-tests.yml (2 container jobs)
- ide-integration-tests.yml (2 container jobs)
- preview-env-check-regressions.yml (1 container job)
- preview-env-gc.yml (1 container job)
- jetbrains-auto-update-template.yml (1 container job)
- jetbrains-integration-test.yml (1 container job)
- code-nightly.yml (1 container job)

Co-authored-by: Ona <no-reply@ona.com>

* Fix dev/image build by adding leeway dependency for npm-tools

Create leeway generic build for dev/npm-tools and use it as a dependency in dev/image:docker build. This resolves the build error where npm-tools files were not accessible during Docker build.

Changes:
- Add dev/npm-tools/BUILD.yaml with generic package containing package.json and package-lock.json
- Add dev/npm-tools:pkg as dependency in dev/image/BUILD.yaml
- Update Dockerfile to use COPY from leeway dependency path (dev-npm-tools--pkg/)

This follows the established pattern used in other builds like install/installer where dependencies are copied from leeway-generated paths.

Co-authored-by: Ona <no-reply@ona.com>

* Fix npm-tools installation permissions in dev/image

Add chown command to fix EACCES permission error when installing npm-tools. The COPY command creates files owned by root, but npm ci runs as gitpod user and needs write access to create node_modules.

Changes:
- Add 'sudo chown -R gitpod:gitpod /opt/npm-tools' before npm ci
- This ensures the gitpod user can write to /opt/npm-tools/node_modules/

Error fixed:
  npm error code EACCES
  npm error syscall mkdir
  npm error path /opt/npm-tools/node_modules
  npm error errno -13

Co-authored-by: Ona <no-reply@ona.com>

* [dev] Split builds into branch and main

Co-authored-by: Ona <no-reply@ona.com>

---------

Co-authored-by: Cornelius Ludmann <cornelius@ona.com>
Co-authored-by: Ona <no-reply@ona.com>
Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
2025-12-05 16:25:19 +01:00
Gero Posmyk-Leinemann
8e02e09f71
[CLC-2041] Block signups for Classic PAYG sunset (#21114)
Block new user signups when Classic PAYG sunset is enabled:

- Add isUserSignupBlockedBySunset() function in featureflags.ts
  - Checks if sunset is enabled for the installation
  - Exempts dedicated installations
  - Blocks all signups (new users don't have orgs/roles yet)

- Add signup blocking in generic-auth-provider.ts callback
  - Check before createNewUser() is called
  - Redirect blocked signups to https://app.ona.com/login
  - Log blocked signup attempts

This complements the existing login and workspace operation blocks
from CLC-2032, closing the signup path that was previously unblocked.

Co-authored-by: Ona <no-reply@ona.com>
2025-10-21 02:54:50 -04:00
Cornelius A. Ludmann
7421edc4e8
[CLC-2032] Fix Classic PAYG sunset bypass via websocket API (#21108)
The original sunset implementation only added checks to the new gRPC API
(WorkspaceServiceAPI) but missed the legacy websocket API (GitpodServerImpl).
This allowed users to bypass the sunset blocking through:

- Gitpod CLI/Local App (uses experimental/v1 API)
- JetBrains Gateway (uses websocket API directly)
- Public API with Personal Access Tokens
- Dashboard when feature flag is disabled

This fix adds the sunset check to both startWorkspace() and createWorkspace()
methods in GitpodServerImpl, using the same isWorkspaceStartBlockedBySunset()
function that's already used in WorkspaceServiceAPI.

The check:
- Blocks installation-owned users (no organizationId)
- Blocks users in non-exempted organizations
- Exempts dedicated installations
- Exempts organizations in the exemptedOrganizations list

Co-authored-by: Ona <no-reply@ona.com>
2025-10-17 08:19:39 -04:00
Gero Posmyk-Leinemann
d42b06d3b0
[CLC-2032] Block login and workspace operations for Classic PAYG sunset (#21100)
* [CLC-2032] Block login and workspace operations for Classic PAYG sunset

Implement feature flag-based blocking for Gitpod Classic PAYG users:

Backend:
- Add utility functions to check if user is blocked by sunset
- Block login attempts in /login route handler, redirect to app.ona.com
- Block workspace creation and start operations in workspace-service-api
- Exempt users with roles/permissions and users in exempted organizations

Frontend:
- Update login page to show 'Login with Ona' button when sunset is enabled
- Keep SSO login form visible for exempted organizations
- Hide sunset notice banner when flag is enabled
- Update heading to 'Gitpod Classic has sunset'

Feature flag: classic_payg_sunset_enabled (JSON with enabled boolean and exemptedOrganizations array)

Co-authored-by: Ona <no-reply@ona.com>

* Add oldLogin parameter to show full login UI for exempted orgs

When sunset is enabled on gitpod.io, users now see a simplified UI:
- 'Continue with Ona' button (default)
- Link to show all login options (?oldLogin=true)

With ?oldLogin=true parameter:
- Shows all OAuth provider buttons
- Shows SSO login form
- Full functionality for exempted organizations

The link preserves returnToPath parameter if present.

Co-authored-by: Ona <no-reply@ona.com>

* Refactor backend sunset checks into separate functions

Split sunset blocking logic into two functions:
- isUserLoginBlockedBySunset: checks roles/permissions exemption for login
- isWorkspaceStartBlockedBySunset: checks org-level exemption for workspace ops

Move ClassicPaygSunsetConfig interface to gitpod-protocol for reusability.
Pass organizationId explicitly to workspace blocking checks.

Co-authored-by: Ona <no-reply@ona.com>

* Use typed ClassicPaygSunsetConfig in frontend feature flag

Import ClassicPaygSunsetConfig type from gitpod-protocol and use it
as the default value for classic_payg_sunset_enabled feature flag.

This leverages TypeScript's generic type inference in useFeatureFlag:
- useFeatureFlag<K extends keyof FeatureFlags> returns FeatureFlags[K]
- For classic_payg_sunset_enabled, it now returns ClassicPaygSunsetConfig
- Other flags continue to return their respective types (boolean, string, etc.)

Updated Login.tsx to access .enabled property with type guard to handle
the union type (ClassicPaygSunsetConfig | boolean) during loading state.

This ensures type safety and consistency between frontend and backend.

Co-authored-by: Ona <no-reply@ona.com>

* Parse JSON string for classic_payg_sunset_enabled feature flag

ConfigCat text flags return strings, so we need to parse JSON on both
frontend and backend.

Backend (featureflags.ts):
- Send JSON.stringify(defaultConfig) to ConfigCat
- Parse returned string with JSON.parse()
- Handle errors gracefully with fallback to default

Frontend (featureflag-query.ts):
- Add parseFeatureFlagValue() helper for JSON flags
- Send stringified default for classic_payg_sunset_enabled
- Parse returned string value
- Maintain type safety with generic return types

This allows ConfigCat to store the flag as text while maintaining
the typed object structure in our code.

Co-authored-by: Ona <no-reply@ona.com>

* Exempt dedicated installations from sunset blocking

Add isDedicatedInstallation parameter to sunset check functions.
Dedicated installations always return false (not blocked) regardless
of feature flag state.

Changes:
- isUserLoginBlockedBySunset: add isDedicatedInstallation param
- isWorkspaceStartBlockedBySunset: add isDedicatedInstallation param
- UserController: pass config.isDedicatedInstallation to login check
- WorkspaceServiceAPI: inject Config and pass isDedicatedInstallation

This ensures the sunset only affects gitpod.io (PAYG) and not
dedicated installations.

Co-authored-by: Ona <no-reply@ona.com>

* update login page for Gitpod classic `gitpod.io` users

* fix

* Improve sunset UI: use primary button and remove redundant subheading

Co-authored-by: Ona <no-reply@ona.com>

* Update sunset UI heading to focus on Ona value proposition

Co-authored-by: Ona <no-reply@ona.com>

---------

Co-authored-by: Ona <no-reply@ona.com>
Co-authored-by: Siddhant Khare <siddhant@gitpod.io>
Co-authored-by: Cornelius A. Ludmann <github@cornelius-ludmann.de>
2025-10-15 09:06:36 -04:00
Gero Posmyk-Leinemann
9e34aea982
Remove superfluous security feature flags and always enable protections (#21007)
* Remove superfluous security feature flags and always enable protections

- Remove context_env_var_validation feature flag - environment variable validation now always enabled
- Remove enable_nonce_validation feature flag - CSRF protection with nonce validation now always enabled
- Remove enable_strict_authorize_return_to feature flag - strict OAuth returnTo validation now always enabled
- Update tests to reflect permanent security measures
- Simplify code by removing conditional security logic

These security features should be permanently active rather than behind feature flags.
Addresses CLC-1618 by ensuring critical security protections cannot be accidentally disabled.

Co-authored-by: Ona <no-reply@ona.com>

* Fix unused import in envvar-prefix-context-parser.spec.ts

Remove unused Experiments import that was causing TypeScript compilation error.

Co-authored-by: Ona <no-reply@ona.com>

---------

Co-authored-by: Ona <no-reply@ona.com>
2025-09-22 11:53:22 -04:00
Cornelius A. Ludmann
29f3c59f4e
Revert "Redact args in the logs of audit log service (#20853)" (#21039)
This reverts commit b007b1dcaa995fec9ee7aded2c7de402bd0c5493.

Co-authored-by: Ona <no-reply@ona.com>
2025-09-04 06:02:05 -04:00
iQQBot
a736c1b83b
feat: implement CSRF protection for OAuth flows with nonce validation (#20983)
* feat: implement CSRF protection for OAuth flows with nonce validation

- Add NonceService for cryptographically secure nonce generation and validation
- Include nonce in JWT state for OAuth authorization requests
- Store nonce in secure httpOnly cookie with SameSite=strict
- Validate nonce matches between state and cookie in auth callback
- Add origin/referer header validation for additional CSRF protection
- Use timing-safe comparison to prevent timing attacks
- Clear nonce cookie after successful validation or on error

This prevents CSRF attacks where malicious sites could initiate OAuth flows
on behalf of users by ensuring authorization requests originate from Gitpod.

Co-authored-by: Ona <no-reply@ona.com>

* refactor: consolidate fragment protection and fix context provider conflict

Co-authored-by: Ona <no-reply@ona.com>

* fix: handle GitHub OAuth api subdomain edge case with secure redirect

Co-authored-by: Ona <no-reply@ona.com>

* fix: simplify api subdomain redirect test to avoid dependency injection complexity

Replace complex Authenticator dependency injection test with simple unit test
that focuses on the core logic without requiring all service dependencies.

This makes the test more reliable and easier to maintain while still validating
the critical api subdomain detection logic for the GitHub OAuth edge case.

Co-authored-by: Ona <no-reply@ona.com>

* docs: update domain examples to use gitpod.io instead of preview domains

Update test examples and documentation to use production-appropriate
domain examples (gitpod.io) instead of specific preview environment
domains for better clarity and maintainability.

Co-authored-by: Ona <no-reply@ona.com>

* fix cookie

Co-authored-by: Ona <no-reply@ona.com>

* Update authenticator.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update authenticator.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* minor stuff

* cleanup old redirect logic

* cleanup

* 1

Co-authored-by: Ona <no-reply@ona.com>

* feat: add feature flags for nonce validation and strict authorize returnTo

Add two feature flags to control security features with safe defaults:

**Feature Flag 1: enable_nonce_validation (default: false)**
- Controls CSRF nonce validation in OAuth flows
- When disabled: Nonce is generated but not validated (future compatibility)
- When enabled: Full CSRF protection with nonce and origin validation
- Nonce cookies are always generated and cleared for consistency

**Feature Flag 2: enable_strict_authorize_return_to (default: false)**
- Controls returnTo validation strictness for /api/authorize endpoint
- When disabled: Falls back to login validation (broader patterns)
- When enabled: Uses strict authorize validation (limited to specific paths)
- /api/login always uses login validation regardless of flag

**Implementation Details:**
- Always generate nonce for consistency and future compatibility
- Only validate nonce when feature flag is enabled
- Always clear nonce cookies regardless of validation state
- Authorize endpoint checks flag and falls back gracefully
- Comprehensive logging for debugging and monitoring

**Backward Compatibility:**
- Default false ensures no breaking changes
- Gradual rollout possible via feature flag configuration
- Existing authentication flows continue to work
- Safe fallback behavior when flags are disabled

Co-authored-by: Ona <no-reply@ona.com>

* fix: validate OAuth callback origin against SCM provider domain

Update NonceService.validateOrigin to check request origin against the
expected SCM provider domain instead of Gitpod's own domain. This fixes
the CSRF protection logic for OAuth callbacks which legitimately come
from external providers (github.com, gitlab.com, etc.).

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* 1

* remove the origin check logic

* update sorry url

* move files

* use safeRedirect for redirect

* 1

* [server] minor refactor/renames

* moah changes

---------

Co-authored-by: Ona <no-reply@ona.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
Co-authored-by: Claude <noreply@anthropic.com>
2025-08-01 06:20:47 -04:00
Gero Posmyk-Leinemann
9b7dd9f5c7
[dev] Use "ping" in redis-cli, which is compatible with newer versions (#20989)
* [dev] Use "-ping" in redis-cli, which is compatible with newer versions

* Fix ping invocation

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

---------

Co-authored-by: iQQBot <tianshi8650@gmail.com>
2025-08-01 05:52:47 -04:00
Gero Posmyk-Leinemann
266d6536e5
[server] Implement context env var validation behind context_env_var_validation ff (#20968)
Co-authored-by: Ona <no-reply@ona.com>
2025-07-24 02:23:35 -04:00
iQQBot
830d9c91b0
[server] tolerate deleted users for listWorkspaceSessions (#20943)
Co-authored-by: Kyle Brennan <kyle@gitpod.io>
2025-07-09 02:03:21 -04:00
Gero Posmyk-Leinemann
c5a55dd02a
[claude/cline] See if it works to integrate memory-bank into Claude Code (#20913)
* [cline] Fix memory-bank rules

* [claude] Integrate with memory-bank (attempt)
2025-06-19 11:41:02 -04:00
Gero Posmyk-Leinemann
c568be5978
[image-builder] Introduce retry for all resolver requests (timeout 15s, up to 3 times) for all network-related issues (#20868)
* [image-builder] Fix generate.sh

* [image-builder-api] Add use_retry_client to ResolveBaseImageRequest and BuildRequest

* [image-builder] Use req.GetUseRetryClient() instead of feature flag resolved on startup

[image-builder] Drop superfluous imports

[image-builder] Switch to github.com/hashicorp/go-retryablehttp, incl. better unit tests at orchestrator level!

* [server] Pass "useRetryClient" on all requests to image-builder
2025-06-05 11:30:13 -04:00
Cornelius A. Ludmann
f1dc3a5bc2
[scrubber] Scrub Git URLs in log messages (#20843) 2025-06-02 15:04:10 -04:00
Gero Posmyk-Leinemann
7d1a8eb13c
[server] Fix spicedb retry on DEADLINE_EXCEEDED & UNAVAILABLE (#20867) 2025-06-02 05:29:09 -04:00
iQQBot
301f1b73da
upgrade golang to 1.24.3 (#20846)
* upgrade golang to 1.24.3

* fix caddy

* update go debug

* fix non-constant format string in call to fmt Format method
2025-05-28 13:32:00 -04:00
Cornelius A. Ludmann
b007b1dcaa
Redact args in the logs of audit log service (#20853) 2025-05-28 04:35:59 -04:00
Gero Posmyk-Leinemann
175fb0bebd
[dev] Bump node 18.x to 22.15.1 (#20852)
* [node] Bump docker builder images 18.20.7 -> 22.15.1

* [dev] Bump dev image references (18.20.7 -> 22.15.1)

* [dev] Bump devcontainer nodejs to 22.15.1
2025-05-27 10:53:59 -04:00
Gero Posmyk-Leinemann
52848de54f
[server, dashboard, db] Org-wide "maintenance mode" (#20813)
* [dashboard] Initial infra rollout page, incl. list running workspaces

* [server, db, dashboard] Allow org-owner to stop workspace on all workspaces in the organization

Also, fix maintenanceMode update

* [public-api, db, server, dashboard] Introduce MaintenanceNofitication banner that can be configured per org

* review comments: use mutation instead of callback for state mutation

* Fix workspace start prevention

* Review comments around banners and rendering

 - permissions issues
 - add banner to /new page
 - a bunch of rendering issues and alignments
 - renaming some things for clarity (dropped "Scheduled" prefixes)
 - only allow up to 255 characters in notification messages

* [dashboard] Only show Admin entry for dedicated

* [server] Fix permissions for setMaintenanceMode to "maintenance"

* [dashboard] Adjusted copy incl. default notification message

* Review coments: re-use and fix styles, and naming

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

* Minor copy improvements

* [server] Fix bogus permission check in stopWorkspace

---------

Co-authored-by: Filip Troníček <filip@gitpod.io>
2025-05-15 09:57:00 -04:00
Gero Posmyk-Leinemann
6a6052fe11
[server, dashboard] Map USER_DELETED properly through the API (#20796)
* [server] Fix OrganizationService.addOrUpdateMember

* [server] OrganizationService test: apply withTestCtx

* [server, dashboard] Replace USER_DELETED with NOT_FOUND + error details, and ensure it's properly mapped across the API
2025-05-07 10:57:53 -04:00
Gero Posmyk-Leinemann
b34a9fda67
[server] Fix permission issue for collaborators in listenForPrebuildUpdates (#20782) 2025-05-05 07:35:50 -04:00
Gero Posmyk-Leinemann
a3db4f1693
[server] Allow org env vars in repos that don't have projects (#20774)
Enables the use case of collaborators allowing to use projects with a private default workspace image configured on the org-level. This is enabled by the optional `enableDockerdAuthentication` that was implemented in #20586 - shortly _after_ org-level-env vars was implemented in #20538.
2025-04-25 09:39:34 -04:00
Gero Posmyk-Leinemann
198dea471d
[server, bridge] Bind metrics apps to "127.0.0.1" instead of "localhost" (#20719)
Tool: gitpod/catfood.gitpod.cloud
2025-03-31 08:57:59 -04:00
Gero Posmyk-Leinemann
4083e6f252
[server, bridge] Switch base-images to node:18.20.7-alpine to avoid CVEs (#20692)
Tool: gitpod/catfood.gitpod.cloud
2025-03-21 07:16:50 -04:00
Gero Posmyk-Leinemann
10672a1c50
[server] Remove google-cloud-profiler (#20691)
Tool: gitpod/catfood.gitpod.cloud
2025-03-21 06:40:49 -04:00
Gero Posmyk-Leinemann
61795b793a
[server] Some change to trigger a release (#20678)
Tool: gitpod/catfood.gitpod.cloud
2025-03-20 16:15:49 -04:00
Gero Posmyk-Leinemann
aaa27c2821
[server] Add /ready probe to smooth rollout of server pods (#20673)
* [server] Move /ready to /startup, and rename code to StartupController (because it's used by the StartupProbe)

Tool: gitpod/catfood.gitpod.cloud

* [server] Introduce special /ready handler that only returns "false" during the shutdown phase

Tool: gitpod/catfood.gitpod.cloud
2025-03-18 11:28:47 -04:00
Gero Posmyk-Leinemann
fad0801ca8
[server] Fix broken /ready endpoint and chaned the probe to be a StartupProbe (#20672)
Tool: gitpod/catfood.gitpod.cloud
2025-03-18 06:34:47 -04:00
Gero Posmyk-Leinemann
89e09307b9
[server] Introduces ReadinessProbe (#20669)
* [server] Introduce ReadinessController and probe at /ready

Tool: gitpod/catfood.gitpod.cloud

* [server] Move /live and /ready endpoints to a separate express app and port

Tool: gitpod/catfood.gitpod.cloud

* [memory-bank] task-related learnings

Tool: gitpod/catfood.gitpod.cloud

* [server] Introduce `server_readiness_probe` feature flag so we can disable the ReadinessProbe if required

Tool: gitpod/catfood.gitpod.cloud

* docs: formalize Product Requirements Document workflow

- Add PRD workflow to systemPatterns.md as a standardized development process
- Update .clinerules with instructions to follow the PRD workflow
- Update activeContext.md and progress.md to reference the new workflow

This formalizes the process we used for implementing the server readiness probe feature.

Tool: gitpod/catfood.gitpod.cloud

* [server] ReadinessProbe: add redis as dependency

Tool: gitpod/catfood.gitpod.cloud

* review comments

Tool: gitpod/catfood.gitpod.cloud

* [dev] Remove outdated gopls config

Tool: gitpod/catfood.gitpod.cloud

* [server] Fix import

Tool: gitpod/catfood.gitpod.cloud
2025-03-17 11:44:46 -04:00
Gero Posmyk-Leinemann
5d557f73c8
[spicedb] Fix intermittent "Error: 4 DEADLINE_EXCEEDED...Waiting for LB pick" (#20637)
* [dev] Bump grpc/grpc-js 1.10.8 -> 1.12.6 and authzed/authzed-node 0.15.0 -> 1.2.2

Tool: gitpod/catfood.gitpod.cloud

* [server] Streamline spicedb gRPC client usage and creation options

 - instead of doing retries on two levels, rely on the gRPC-level retries
 - to mitigate the loss of insights, introduce createDebugLogInterceptor
  - client options: use sane defaults derived from the documentation instead of the excessive ones we had in place before
  - use "waitForReady" option: it should a) make our calls for responsive on re-connects, while b) - because we keep re-trying on DEADLINE_EXCEEDED - should be as reliable as before

Tool: gitpod/catfood.gitpod.cloud

* [protocol] Centralize grpc.isConnectionAlive

Tool: gitpod/catfood.gitpod.cloud

* [server] SpiceDB client: retry with new client on "Waiting for LB pick" error

Tool: gitpod/catfood.gitpod.cloud
2025-03-17 05:13:46 -04:00
Gero Posmyk-Leinemann
23c3e83013
[server] OrganizationService:Fix unpin for pinnedEditorVersions (don't use deepmerge but overwrite if set) (#20646)
Tool: gitpod/catfood.gitpod.cloud
2025-03-03 04:46:31 -05:00
mustard
f5eda871e6
[server] add feature flags for spicedb client options (#20613)
* add feature flags for spicedb client options

Tool: gitpod/catfood.gitpod.cloud

* Add comments

Tool: gitpod/catfood.gitpod.cloud

* fixup

Tool: gitpod/catfood.gitpod.cloud

* address feedback

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
Tool: gitpod/catfood.gitpod.cloud

* fixup

Tool: gitpod/catfood.gitpod.cloud

---------

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
2025-02-26 11:34:11 -05:00
Gero Posmyk-Leinemann
dd50c2aee8
[api, server, dashboard] Cleanup UpdateOrganizationSettings API (#20603)
* [api, server, dashboard] Cleanup UpdateOrganizationSettings API

Tool: gitpod/catfood.gitpod.cloud

* Org settings partial updates improvements (#20626)

Tool: gitpod/catfood.gitpod.cloud

* review comment

Tool: gitpod/catfood.gitpod.cloud
2025-02-25 08:58:11 -05:00
Filip Troníček
331453c892
[dasboard] Avatar selection improvements (#20620)
* feat(dashboard): Enhance team onboarding with member avatar and framework selection

- Add OrgMemberAvatarInput component with improved member selection using Popover and Command
- Implement ComboboxDemo for framework selection
- Update Button variant and add cmdk package
- Improve UI components with more flexible selection and filtering

Tool: gitpod/catfood.gitpod.cloud

* fix(orgs): when updating org welcome msg settings, enforce updating `featuredMemberId`

Tool: gitpod/catfood.gitpod.cloud

* A proper fix with existing prebuild list combobox

Tool: gitpod/catfood.gitpod.cloud

* chore: Remove unused cmdk package and related components

- Remove cmdk package from package.json
- Delete Command.tsx component
- Remove unused featuredMemberId state from TeamOnboarding
- Clean up yarn.lock dependencies related to cmdk and radix-ui packages

Tool: gitpod/catfood.gitpod.cloud

* Clean up

Tool: gitpod/catfood.gitpod.cloud
2025-02-24 04:47:09 -05:00
Filip Troníček
04f590de85
Organization onboarding welcome message (#20577)
* squashed (- oidc/newUser)

Tool: gitpod/catfood.gitpod.cloud

* [server, db] Cleanup UpdateOrgSettings API handling

Tool: gitpod/catfood.gitpod.cloud

* [dashboard] Render WelcomeMessage based on a) user.createdAt and b) localStorage

Tool: gitpod/catfood.gitpod.cloud

* [api, server] Add missing update_allowed_workspace_classes field

Tool: gitpod/catfood.gitpod.cloud

* [dashboard] Fix updateOrgSettings API usage

Tool: gitpod/catfood.gitpod.cloud

* [dashboard, server] Fix duration handling/conversion

Tool: gitpod/catfood.gitpod.cloud

---------

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
2025-02-14 08:14:50 -05:00
Gero Posmyk-Leinemann
e9aae6e497
[docker-up] Auto-login dockerd if GITPOD_IMAGE_AUTH is set (#20586)
* [docker-up] Minor fixes and add tests

Tool: gitpod/catfood.gitpod.cloud

* [image-builder-bob] Tests&fixes from an experimental PR

Tool: gitpod/catfood.gitpod.cloud

* [supervisor, ws-manager] Write docker credentials into client config file if passed into workspace

Tool: gitpod/catfood.gitpod.cloud

* [server] Introduce project.settings.enableDockerdAuthentication and expose it on the API

Tool: gitpod/catfood.gitpod.cloud

* [dashboard] Add "Docker registry authentication" toggle under projects/env vars

Tool: gitpod/catfood.gitpod.cloud

* [server] Guard project.settings.enableDockerdAuthentication by org write_settings permission

Tool: gitpod/catfood.gitpod.cloud

* review comments with cleanup + small fixes

Tool: gitpod/catfood.gitpod.cloud
2025-02-12 05:16:48 -05:00
Filip Troníček
754dc9eb38
Organization-recommended repositories (#20559)
* [server] implement `recommendedRepositories` API field

Tool: gitpod/catfood.gitpod.cloud

* [dashboard] implement org-suggested repositories

Tool: gitpod/catfood.gitpod.cloud

* [dashboard] Spacing and pill labels

Tool: gitpod/catfood.gitpod.cloud

* update copy

Tool: gitpod/catfood.gitpod.cloud

* Get rid of debug fluff

Tool: gitpod/catfood.gitpod.cloud

* Fix onboarding page heading

Tool: gitpod/catfood.gitpod.cloud

* minor nitfix

Tool: gitpod/catfood.gitpod.cloud

* Cascade project deletions to repo recommendations

Tool: gitpod/catfood.gitpod.cloud

* Fix db tests

Tool: gitpod/catfood.gitpod.cloud

* Fix docs link

Tool: gitpod/catfood.gitpod.cloud

* add db test

Tool: gitpod/catfood.gitpod.cloud

* Fix showing suggested repos even with no user contributions

Tool: gitpod/catfood.gitpod.cloud

* Add organization suggested repositories to RepositoryFinder

Tool: gitpod/catfood.gitpod.cloud

* Don't add recommended repos to workspace list for now

Tool: gitpod/catfood.gitpod.cloud

* Regular repo icon for org-suggested repos

Tool: gitpod/catfood.gitpod.cloud
2025-02-04 08:31:19 -05:00
Filip Troníček
71e2b01c8e
[server] Don't block soft deletion rewinds in updateDeletionEligibilityTime (#20569)
* [server] Don't block soft deletion rewinds in `updateDeletionEligibilityTime`

Tool: gitpod/catfood.gitpod.cloud

* Use ISO date strings for comparison

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>

---------

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
2025-01-31 04:21:20 -05:00
mustard
999ade3fb6
[JetBrains] display workspace name on the navbar (#20544)
* [JetBrains] display workspace name on the remote navbar

* Use workspace name
2025-01-30 13:36:20 -05:00
Filip Troníček
9b574a9022
[server] make gRPC clients viable in non-HTTP/2-compatible environments (#20565)
* [server] make gRPC clients viable in non-HTTP/2-compatible environments

Tool: gitpod/catfood.gitpod.cloud

* Address review comments

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
Tool: gitpod/catfood.gitpod.cloud

---------

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
2025-01-30 07:00:19 -05:00
Filip Troníček
77f3fde7a2
[server] Add organization image auth context to workspace image validation (#20560)
* [server] Add organization image auth context to workspace image validation

Tool: gitpod/catfood.gitpod.cloud

* Introduce `listOrgEnvVarsWithValues`

Tool: gitpod/catfood.gitpod.cloud
2025-01-29 04:48:18 -05:00
Filip Troníček
c24b8f4aed
Add optional, org-wide Gitpod commit annotation (#20525)
* [supervisor] Add Gitpod commit annotation

* server and API changes

* [dashboard] add org setting for commit annotation

* Fix things

* Fix label for annotation switch

* Revert accidental rename

* minor docs fixes

* Add a feature flag for the setting: `commit_annotation_setting_enabled`

* Register hook in the cloned repo instead of under /etc/

* don't override existing hooks

* `gp git-commit-message-helper` to use `git interpret-trailers`

* Test it!

* 🧹 indeed

* Update timestamp of DB migration
2025-01-24 08:11:14 -05:00
Gero Posmyk-Leinemann
ad4b7a8f4a
Introduce org-level GITPOD_IMAGE_AUTH (#20538)
* [db, protocol] Introduce DBOrgEnvVar

* [server, spicedb] Introduce and integrate org env vars into internal services

* [server, public-api] Added API for org-level environment variables

* [dashboard] Add UI for setting/removing GITPOD_IMAGE_AUTH to "Organization Settings"

* [db, server] Fix DB queries, mapping to image-build args and fixed tests

* [dashboard] Review comment "icon spacing"

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

* [dashboard] Review comment superfluous key

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

* [dashboard] more spacing

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

* [dashboard] Copyright year

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

* [public-api] Add converter test case

---------

Co-authored-by: Filip Troníček <filip@gitpod.io>
2025-01-24 03:43:14 -05:00
Filip Troníček
5c8700e427
[dashboard] Add org resources to the top of the workspace list (#20520)
* UI reorg

* generated stuffs

* Make it woooooooork

* Enterprise workspace list overhaul

Todo:
- [ ] only enable on dedicated installs
- [ ] add org setting for org-wide suggestions
- [ ] possibly adopt `Recommended` badges from figma
- [ ] open configurationId instead of cloneUrl if possible

* Conditionally show top sections

* Refactor PillLabel component usage and improve workspace card layout

* Reduce PR scope

* Behave nicely in dedicated emulated preview envs

* Make Getting started dismissible

* Still show old empty ws page for PAYG

* Use ff to display

* accordions are stylish (and clean u user prefs)

* Approach accordions differently (feat. @geropl)

* Revert things for later

* Get rid of debug logs!

* Use pk colors
2025-01-16 06:09:31 -05:00
Filip Troníček
d54bd04999
Enteprise onboarding settings (#20508)
* UI reorg

* generated stuffs

* Make it woooooooork

* Classier placeholder

* Remove unneeded fragment

* Introduce `enterprise_onboarding_enabled` flag

* move things properly

* add ipv6 localhost
2025-01-08 11:05:23 -05:00
Filip Troníček
7ac347a771
[server] log all deletion eligibility time updates (#20497) 2025-01-06 06:08:21 -05:00
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
Filip Troníček
b29e06a67e
[server] Fix workspace service's workspace ID validation (#20468) 2024-12-19 10:34:04 -05:00
Filip Troníček
da1d931464
[server] fix private GitHub avatars (#20461)
* [server] fix private GitHub avatars

* Improve comment and don't delete all search params
2024-12-17 04:20:02 -05:00
Filip Troníček
55b486ee5f
Introduce max_parallel_running_workspaces for orgs (#20448)
* Introduce `max_parallel_running_workspaces` for orgs

* Add migration

* Add UI and org settings server changes

* Rough edges

* Number inputs (:trollface:)

* Move LazyOrganizationService to UBP entitlement service to get rid of circ. dep. errs

* Fix tests

* Update components/gitpod-db/src/typeorm/entity/db-team-settings.ts

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>

* Rename `isPaidPlan` to `isPaidOrDedicated` and get rid of `update_max_parallel_running_workspaces`

* Update components/server/src/workspace/workspace-service.ts

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>

* Deduplicate instance counting logic

---------

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
2024-12-16 09:06:02 -05:00
Filip Troníček
a303660a5f
Add insights page (#20437)
* Add WS image metrics to workspace instances

* Update tests

* fix ws-manager-api field description

* [dashboard] Org Insights page

* Pagination, date filters and downloads

* Safety limits for pagination and prettier icons

* UI improvements

* Enhance `from` date to capture whole day

* some more props for the CSVs

* Include git context with workspace responses

* Context url segments in CSV

* ide => editor to align with papi convention

* Remove duplicate fc

* revert route deletion

* Update papi converter tests and revert unecessary changes

* fix error rendering

* partly revert ws api svc changes

* Remove debug lines

* fix proto typo

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>

* Remove org member listing from frontend

* Shorter == better 😎

* Move workspace.metadata.context onto a top-level `WorkspaceSession` property

---------

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
2024-12-12 08:55:33 -05:00