Uploaded image for project: 'Jira Software Data Center'
  1. Jira Software Data Center
  2. JSWSERVER-21676

Introduce auth token refresh for github user tokens (ghu_) for DVCS integration

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • None
    • DVCS Connector
    • 1
    • 7
    • We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      Problem Definition

      Admins are currently allowed (even though not recommended) to integrate github.com accounts through GitHub Apps for DVCS integration. Unlike oAuth tokens (gho_), these are ghu_ tokens.

      As per Github documentation: Behind GitHub’s new authentication token formats these two are different types of tokens:

      So even though Jira DVCS plugin allows Jira admins to create the integration with these ghu_ tokens (created via Github apps), the oAuth refresh fails at every 8 hours interval and starts throwing Bad credentials (401) errors:

      2023-04-06 22:10:26,299+0000 Caesium-1-2 WARN ServiceRunner     [c.a.j.p.d.spi.github.GithubClientWithTimeout] Failed to execute request [GET /users/ORG1234] response code: 401, errors: 
          Bad credentials (401)
      2023-04-06 22:10:26,299+0000 Caesium-1-2 DEBUG ServiceRunner     [c.a.j.p.d.spi.github.GithubCommunicator] Could not find user/organization ORG1234
      org.eclipse.egit.github.core.client.RequestException: Bad credentials (401)
      

      Suggested Solution

      Introduce the auth token refresh for Non-OAuth tokens viz., ghu_ tokens created via GitHub Apps.

      Workaround

      Until this feature is implemented:

      • Follow our documentation and integrate DVCS with github.com through oAuth tokens: Linking GitHub accounts
      • Alternatively, Jira admins would have to refresh the tokens manually every 8 hours - Account Tools >> Reset OAuth Settings - (Same client ID and Secret will continue to work but the refresh would need to be done manually)

              Unassigned Unassigned
              smitra2@atlassian.com Suddha
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: