mfrancisc opened a new pull request, #9159:
URL: https://github.com/apache/devlake/pull/9159

   ### 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
   <img width="1692" height="1190" alt="Screenshot 2026-09-08 at 14 23 05" 
src="https://github.com/user-attachments/assets/34957c06-d6d2-4b91-aa26-90358589c960";
 />
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to