brain/wiki/connections-auth/global-connections.md
App connections scoped to a platform (AppConnectionScope.PLATFORM) rather than a single project, shared across projects so each doesn't re-authenticate the same service account. A platform admin creates them; accessible to any project in the connection's projectIds[] (or all new projects if preSelectForNewProjects). Gated by platform.plan.globalConnectionsEnabled (EE/Cloud only).
app_connection table as project connections; the scope column distinguishes them.global-connection-module.ts) is controller + registration in one file; delegates everything to the shared appConnectionService with scope: PLATFORM, projectId: null.projectIds: projects allowed to use the connection; externalId: stable id for upserts from external systems./v1/global-connections, all platformAdminOnly (USER or SERVICE, also accept service-key auth):
POST / upsert (fires CONNECTION_UPSERTED), POST /:id update (displayName/projectIds/preSelectForNewProjects only), GET / list (strips sensitive data), DELETE /:id (fires CONNECTION_DELETED).platformMustHaveFeatureEnabled((p) => p.plan.globalConnectionsEnabled).list call runs with the project's ID and scope filtering handles visibility.Entry point: globalConnectionModule, registered twice in packages/server/api/src/app/app.ts (cloud and enterprise editions).
packages/server/api/src/app/ee/global-connections/ — the module, controller and request schemas, all in one filepackages/server/api/src/app/app-connection/app-connection-service/ — shared appConnectionService the module delegates to with scope: PLATFORMpackages/core/shared/src/lib/automation/app-connection/dto/ — UpsertGlobalConnectionRequestBody, UpdateGlobalConnectionValueRequestBody, ListGlobalConnectionsRequestQuerypackages/core/shared/src/lib/automation/app-connection/app-connection.ts — AppConnectionScope, AppConnectionWithoutSensitiveDatapackages/web/src/features/connections/ — api client, hooks and the edit dialog for global connectionspackages/server/api/test/integration/cloud/global-connection/ — endpoint integration testsPaths verified 2026-07-17. An earlier version pointed at packages/server/api/src/app/ee/app-connection/app-connection-service/app-connection-service.ts; the service moved out of ee/ to packages/server/api/src/app/app-connection/app-connection-service/.