Registering a Jira Cloud site with valid OAuth credentials returns an error "Invalid OAuth credentials"

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Low
    • 8.1.0
    • Affects Version/s: 7.14.0
    • Component/s: Integration - JIRA
    • None
    • Severity 3 - Minor

      Issue Summary

      This is reproducible on Data Center: yes

      Steps to Reproduce

      1. Generate OAuth Credentials from Jira Cloud
        • Add one or more permissions except for Development information
      2. Go to Bitbucket Data Center's Jira Cloud Integration page (Administration > System > Jira Cloud Integration)
      3. Click on Register site
      4. Add the credentials generated from step 1 and save.  An error is displayed. 

      Expected Results

      The credentials are saved

      Actual Results

      An "Invalid OAuth credentials" error is displayed upon saving.  The below exception is thrown in the atlassian-bitbucket.log file:

      DEBUG [http-nio-22110-exec-6] bitbucket @19X73F5x939x153x0 e615o1 0:0:0:0:0:0:0:1 "POST /rest/jira-dev/latest/jira-site-config HTTP/1.1" c.a.s.i.r.e.ServiceExceptionMapper Mapping ServiceException to REST response 400
      com.atlassian.stash.internal.jira.cloud.config.exception.InvalidOauthCredentialException: Invalid OAuth credentials
          at com.atlassian.stash.internal.jira.cloud.config.service.DefaultJiraSiteConfigService.validateOauthCredentials(DefaultJiraSiteConfigService.java:232)
          at com.atlassian.stash.internal.jira.cloud.config.service.DefaultJiraSiteConfigService.create(DefaultJiraSiteConfigService.java:85)
          at com.atlassian.stash.internal.jira.rest.JiraSiteConfigurationResource.create(JiraSiteConfigurationResource.java:46)
      ..
      ..
      Caused by: com.atlassian.stash.internal.jira.http.client.exception.HttpClientException: Forbidden
          at com.atlassian.stash.internal.jira.http.json.DefaultHttpRequestExecutor.lambda$null$3(DefaultHttpRequestExecutor.java:74)
          at com.atlassian.httpclient.api.ResponsePromiseMapFunction.apply(ResponsePromiseMapFunction.java:49)
          at com.atlassian.httpclient.api.ResponsePromiseMapFunction.apply(ResponsePromiseMapFunction.java:10)
          at io.atlassian.util.concurrent.Promises$OfStage.lambda$fold$4(Promises.java:332)
          at io.atlassian.util.concurrent.Promises.lambda$biFunction$7(Promises.java:422)
       

      Workaround

      Add the Development Information permission on the OAuth Credential in Jira Cloud

            Assignee:
            Unassigned
            Reporter:
            Aedrian Escultura (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: