Skip to content

feat(jira): add Cloud OAuth 2.0 client-credentials auth - #9159

Open
mfrancisc wants to merge 1 commit into
apache:mainfrom
mfrancisc:feat/jira-oauth2-client-credentials
Open

mfrancisc wants to merge 1 commit into
apache:mainfrom
mfrancisc:feat/jira-oauth2-client-credentials

Conversation

@mfrancisc

Copy link
Copy Markdown
Contributor

Summary

Adds Jira Cloud OAuth 2.0 client-credentials (2LO / service account) as a native connection option.

Jira Cloud service accounts authenticate with grant_type=client_credentials, not Basic Auth or a user API token. Access tokens last ~60 minutes and API calls go through https://api.atlassian.com/ex/jira/{cloudId}/rest/.

This extends the existing Jira Cloud (Atlassian API Gateway) connection from #9024:

  • Scoped API Token — unchanged (authMethod=AccessToken)
  • OAuth 2.0 (Service Account) — new (authMethod=OAuth2) with Cloud ID, Client ID, and Client Secret

The plugin mints tokens in memory, sends Authorization: Bearer, and remints on 401 during long collections. authMethod=OAuth2 is handled inside the Jira plugin so core MultiAuth (oneof=BasicAuth AccessToken AppKey) does not need to change.

Test Connection maps remote 401/403 to HTTP 400 and includes Jira's error body (e.g. scope does not match), so Config UI does not treat a bad Jira credential as a DevLake session expiry.

Does this close any open issues?

Relates to #8822 (closed as stale; please reopen if you want this PR to close it).

Screenshots

Screenshot 2026-09-08 at 14 23 05

Service-account 2LO can mint 60-minute Bearer tokens and call the
Atlassian API gateway, so Jira Cloud connections no longer require a
user API token.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant