Jira Service Account Authentication Support
## Summary GitLab's Jira integration currently requires standard user credentials (API token + email) but lacks support for Atlassian Service Accounts, which are designed for automation and system integrations. ## Problem Description **Steps to reproduce:** 1. Create an Atlassian Service Account following Atlassian documentation 2. Generate API token for the service account using the new OAuth 2.0 flow 3. Attempt to configure Jira integration in GitLab project settings 4. Use service account credentials in the integration form 5. Test the connection **Current behavior:** Connection fails with error: `Connection failed. Check your integration settings. unexpected character: 'Client' at line 1 column 1` ![image](/uploads/522a7aba6906f9c2accd48eb4f065415/image.png){width=594 height=77} **Expected behavior:** GitLab should successfully authenticate using Atlassian Service Account credentials, similar to how it works with standard user API tokens. ## Background Atlassian recently introduced Service Accounts for Cloud platforms to address compliance issues with shared credentials. Service accounts provide: - Dedicated, non-human technical identities for automation - Compliance with Atlassian's license terms - Better security through scoped access tokens - Clear audit trails separate from human user activities ## Technical Details **Authentication differences:** - **Standard users**: Basic auth with email + API token to `{org}.atlassian.net` - **Service accounts**: OAuth 2.0/API Tokens with scoped tokens to `api.atlassian.com/ex/jira/{cloudId}` The error suggests GitLab is receiving an unexpected response format when attempting to authenticate, likely because the service account endpoint returns OAuth-specific responses rather than the expected API token responses. ## Proposed Solution Enhance GitLab's Jira integration to support both authentication methods: 1. **Detect credential type** during configuration 2. **Implement API key support** for service accounts alongside existing user API token method 3. **Handle different endpoint structures** (`api.atlassian.com` vs subdomain URLs) 4. **Update configuration UI** to allow users to specify authentication method ## Benefits - **Security**: Service accounts provide better credential management and scoping[^3] - **Governance**: Clear separation of automated vs human activities in audit logs[^1] - **Future-proofing**: Aligns with Atlassian's direction toward service accounts for integrations ## Labels ~"type::feature" ~"group::project management" ~"Category:Integrations" ~"Integration::Jira" ~"priority::3" ~"Jira::Issue integration" ## Related Documentation - [GitLab Jira Integration](https://docs.gitlab.com/integration/jira/configure/) - [Atlassian Service Accounts](https://support.atlassian.com/user-management/docs/understand-service-accounts/) - [Service Account API Tokens](https://support.atlassian.com/user-management/docs/manage-api-tokens-for-service-accounts/)
issue