Uploaded image for project: 'Elements Connect'
  1. Elements Connect
  2. CO-3705

Can't configure a connection to GitHub with OAuth2

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: 5.13.16, 6.1.11
    • Fix Version/s: 6.3.0
    • Labels:
    • Functional components:
      Datasource - URL
      Datasource - URL > Authentication

      Description

      How to reproduce

      • Configure a new URL datasource to Github using OAuth2
      • Launch the "Get new credentials" action

      See : https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/

      Current

      Log:

      2020-02-25 22:08:27,115 http-nio-8080-exec-9 ERROR anonymous 1328x223x1 qv6s4k 0:0:0:0:0:0:0:1 /nfeed/admin/models/datasources/oauth/_callback [c.v.j.p.s.a.r.v2.api.DatasourcesOauthRestService] Error while parsing callback URL
      com.valiantys.jira.plugins.sql.NFeedException: Error while accessing 'https://github.com/login/oauth/access_token?client_id=XXXXXXXX&client_secret=XXXXXXXXXX':Unexpected character ('a' (code 97)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
       at [Source: com.google.api.client.http.javanet.NetHttpResponse$SizeValidatingInputStream@43737020; line: 1, column: 2]
      	at com.valiantys.jira.plugins.sql.service.request.execution.datasource.oauth.OAuthService.validateAuthorizationCode(OAuthService.java:135)
      	at com.valiantys.jira.plugins.sql.admin.rest.v2.api.DatasourcesOauthRestService.oAuthCallback(DatasourcesOauthRestService.java:223)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	... 1 filtered
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	... 19 filtered
      	at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:159)
      	... 1 filtered
      	at com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:69)
      	... 32 filtered
      	at com.atlassian.diagnostics.internal.platform.monitor.http.HttpRequestMonitoringFilter.doFilter(HttpRequestMonitoringFilter.java:55)
      	... 3 filtered
      	at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
      	... 39 filtered
      	at com.atlassian.jira.security.JiraSecurityFilter.lambda$doFilter$0(JiraSecurityFilter.java:66)
      	... 1 filtered
      	at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:64)
      	... 20 filtered
      	at com.atlassian.jira.servermetrics.CorrelationIdPopulatorFilter.doFilter(CorrelationIdPopulatorFilter.java:30)
      	... 5 filtered
      	at com.valiantys.jira.plugins.sql.service.servletcontext.ContextListenerServletFilter.doFilter(ContextListenerServletFilter.java:24)
      	... 10 filtered
      	at com.atlassian.jira.servermetrics.MetricsCollectorFilter.doFilter(MetricsCollectorFilter.java:25)
      	... 7 filtered
      	at com.valiantys.jira.plugins.sql.admin.rest.v2.oauth.OAuthCallbackRedirect.doFilter(OAuthCallbackRedirect.java:19)
      	... 8 filtered
      	at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
      	... 4 filtered
      	at com.atlassian.web.servlet.plugin.LocationCleanerFilter.doFilter(LocationCleanerFilter.java:36)
      	... 26 filtered
      	at com.atlassian.jira.servermetrics.MetricsCollectorFilter.doFilter(MetricsCollectorFilter.java:25)
      	... 25 filtered
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      	at java.lang.Thread.run(Thread.java:748)
      
      

      Expected

      It works

      Workaround

      Use the "Basic authentication" (less secured)
       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              christophe.prome@valiantys.com Christophe Promé
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: