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

JIRA integration doesn't handle OAuth token rejection cleanly

    XMLWordPrintable

Details

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

    Description

      • 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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mszczepanski Marcin
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Backbone Issue Sync