Commit Graph

20 Commits

Author SHA1 Message Date
Narciso 1cf81e3802 feat: add baseUrl to github provider to support github enterprise url 2026-07-31 11:42:12 -04:00
Mauricio Siu 26cae3b8a9 fix(types): guard git-provider access check for optional id in getBranches
The getBranches inputs type the provider id as optional, so only fetch and
authorize when an id is actually present; the underlying getBranches already
returns [] when no id is supplied.
2026-07-19 21:04:54 -06:00
Mauricio Siu 071d9eacee fix(security): enforce org-scope on git provider read endpoints
The .one / getRepositories / getBranches / testConnection handlers for
github, gitlab, gitea and bitbucket resolved a provider by bare id under
protectedProcedure and returned the full row (OAuth tokens, app private
keys, webhook secrets) with no organization or entitlement check, letting
any authenticated user read another org's git-provider credentials (IDOR).

Adds assertGitProviderAccess() in the git-provider service (rejects cross-org
with NOT_FOUND and non-entitled same-org with FORBIDDEN, reusing the existing
getAccessibleGitProviderIds entitlement logic) and calls it in every read
handler before returning secret-bearing data.

Closes GHSA-66r5-5m5f-57vg
2026-07-19 20:55:53 -06:00
Mauricio Siu 06b18aca08 feat(git-provider): enhance sharing and permissions management
- Added functionality to toggle sharing of Git providers with the organization.
- Introduced a new column "sharedWithOrganization" in the git_provider table to track sharing status.
- Updated user permissions to include accessedGitProviders, allowing for more granular access control.
- Enhanced API routes to support fetching accessible Git providers based on user roles and permissions.
- Implemented UI components for managing Git provider sharing and permissions in the dashboard.
2026-04-03 14:29:48 -06:00
Mauricio Siu 8127dc4536 feat: add comprehensive permission tests and enhance permission checks in components
- Introduced new test files for permission checks, including `check-permission.test.ts`, `enterprise-only-resources.test.ts`, `resolve-permissions.test.ts`, and `service-access.test.ts`.
- Implemented permission checks in various components to ensure actions are gated by user permissions, including `ShowTraefikConfig`, `UpdateTraefikConfig`, `ShowVolumes`, `ShowDomains`, and others.
- Enhanced the logic for displaying UI elements based on user permissions, ensuring that only authorized users can access or modify resources.
2026-03-15 16:42:48 -06:00
Mauricio Siu b2218efce6 refactor: update database imports to use centralized db module for improved consistency across API routes and schemas 2026-02-24 19:00:30 -06:00
Mauricio Siu 7d682870ff feat: add appName field to GitHub provider settings and update related API and database schema 2025-09-21 02:39:20 -06:00
Mauricio Siu 774365c68e Refactor and update various components in the Dokploy application, enhancing functionality and fixing minor issues across multiple pages and features, including dashboard, settings, and API integrations. 2025-08-16 20:18:08 -06:00
autofix-ci[bot] 030e482fce [autofix.ci] apply automated fixes 2025-06-02 00:15:31 +00:00
ayham291 56d21aff60 fix: add authorization checks in GitHub router to include userId validation
- Updated conditional checks to ensure that the GitHub provider's userId matches the session userId, in addition to the organizationId, for improved security and access control.
2025-06-01 20:53:54 +02:00
Mauricio Siu e7db0ccb70 refactor: update invitation 2025-02-16 02:57:49 -06:00
Mauricio Siu e3e35ce792 refactor: update to use organization resources 2025-02-15 20:43:23 -06:00
Mauricio Siu ca217affe6 feat: update references 2025-02-14 02:18:53 -06:00
Mauricio Siu f3ce69b656 refactor: rename builders to server 2024-10-05 22:15:47 -06:00
Mauricio Siu 7c4987d84d refactor(cloud): add validation to prevent access to shared resources 2024-10-04 20:44:57 -06:00
Mauricio Siu ec1d6c7430 refactor(cloud): add validation to prevent access to resources from another admin 2024-10-03 19:48:49 -06:00
Mauricio Siu e4b998c608 refactor(server): update imports 2024-09-29 11:55:29 -06:00
Mauricio Siu 2874c45227 chore: biome lint 2024-09-01 22:41:25 -06:00
Mauricio Siu 68d2e73e7a feat: add test connection github 2024-09-01 22:00:10 -06:00
Mauricio Siu 99f63597a8 feat: add test connection bitbucket and gitlab 2024-09-01 21:49:59 -06:00