Bitbucket API Token Authentication (Breaking Change)
Version: 3.0.0 Date: 2026-05-07
Goal: Support Bitbucket Cloud's new API token authentication, replacing deprecated App passwords.
Solution: Migrated all Bitbucket API calls to Basic auth (email:API_TOKEN) and Git clone URLs to x-bitbucket-api-token-auth:API_TOKEN. Added a dedicated email field to Bitbucket source configuration.
Impact: Clients upgrading to this version must update their Bitbucket source configuration:
- Create a Bitbucket API token (scopes: account read, repositories read, webhooks).
- Re-save the Bitbucket source in Tower with the account email and the new API token.
- Existing sources using App passwords will no longer work.
Features:
- New
emailfield on Bitbucket sources (required, validated in schema and DTO) - API calls use
Basic base64(email:token)authorization - Git clone uses
x-bitbucket-api-token-auth:tokenin URL buildBasicAuthutility centralises Basic auth header construction
Implementation Details:
HookActionBasenow carries a genericauthorizationHeader: string—WebhookCapacityServiceis auth-agnostic- Each provider builds its own
Authorizationheader in its factory - Removed
catchError → of([])ingetHooksso auth failures surface in init report - Fixed
isInitOkvacuous-truth bug: empty init report no longer counts as success
Files Modified:
src/protocol/source/auth.util.ts- NewbuildBasicAuthutilitysrc/protocol/source/source.types.ts-authorizationHeaderreplacesauthTokeninHookActionBasesrc/protocol/source/bitbucket/bitbucket.types.ts- Addedemailfieldsrc/protocol/source/bitbucket/bitbucket.service.ts- Basic auth for all API callssrc/protocol/source/gitlab/gitlab.service.ts- Bearer header in factorysrc/protocol/source/github/github.service.ts- Bearer header in factorysrc/protocol/capacities/webhook-capacity/webhook-capacity.service.ts- Generic auth headersrc/app.service.ts- Bitbucket-specific clone URLsrc/config.dto.ts-emailfield +require_tld: falsesrc/core/configuration/config.schema.ts- Joiemailvalidationsrc/core/data/data.service.ts- FixedisInitOksrc/app.controller.ts- Discover usessource.emailui/src/pages/workflows/sources.types.ts-emailonTypedSourceui/src/pages/workflows/context.tsx- Reducer passesemailfor Bitbucketui/src/pages/workflows/stepForms/StepInitForm.tsx- Email field