Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-9903

JIRA integration doesn't handle OAuth token rejection cleanly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • None
    • None
    • None

      • Be OAuth'd against an applink'd JIRA
      • Revoke your OAuth token in JIRA
      • Refresh BbS
      • Click "Create JIRA issue"
      • You'll get an Error 500

      JIP is returning this as an unknown error:

      {"errors":[{"context":null,"message":"The server may be unreachable. Please ensure you are running JIRA 5.0 or higher.","exceptionName":"com.atlassian.integration.jira.JiraCommunicationException","applicationName":"JIRA Two","applicationUrl":"http://mszczepanski:8080"}]}

      However JIRA is rejecting the OAuth token:

      2017-07-03 09:39:30,696 http-nio-8080-exec-9 WARN anonymous 579x919x1 - 127.0.0.1 /rest/api/2/serverInfo [c.a.o.serviceprovider.internal.AuthenticatorImpl] Problem encountered authenticating OAuth client for url "http://mszczepanski:8080/rest/api/2/serverInfo", error was "token_rejected", with parameters "{oauth_problem=token_rejected}"

      We should consider returning a more meaningful error from JIP so we can reset to the "You need to login" state on the create issue dialog.

      This is a relatively minor edge case bug, after another refresh in BbS you get the normal "not logged in to JIRA" flow.

              Unassigned Unassigned
              mszczepanski Marcin
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: