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

Jira's DVCS GitHub connector uses the "access_token" query parameter which is a deprecated authentication method for the GitHub API

      Issue Summary

      Jira's DVCS GitHub connector uses the "access_token" query parameter which is now a deprecated authentication method for the GitHub API

      Steps to Reproduce

      1. Go to Jira Administration > Application > DVCS Accounts
      2. Click on "Link Bitbucket Cloud and GitHub accounts" button
      3. Provide details for GitHub (check screen shot) and proceed.
      4. Make sure that Jira syncs this GitHub data at least once

      Expected Results

      The integration works without any problems.

      Actual Results

      GitHub is currently emailing administrators to inform them that they have an integration that is using this deprecated authentication method. The message looks like this:

      Hi,

      On February 4th, 2020 at 14:01 (UTC) your application (JIRA DVCS) used an access token (with the User-Agent Java/1.8.0_151) as part of a query parameter to access an endpoint through the GitHub API:

      https://api.github.com/repositories/229755391/hooks

      Please use the Authorization HTTP header instead as using the `access_token` query parameter is deprecated.

      Depending on your API usage, we'll be sending you this email reminder once every 3 days for each token and User-Agent used in API calls made on your behalf.
      Just one URL that was accessed with a token and User-Agent combination will be listed in the email reminder, not all.

      Visit https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api/#authenticating-using-query-parameters for more information.

      Thanks,
      The GitHub Team

      Notes

      Workaround

      None

          Form Name

            [JSWSERVER-20414] Jira's DVCS GitHub connector uses the "access_token" query parameter which is a deprecated authentication method for the GitHub API

            Bill Goetz added a comment -

            Just as Pete was saying, a remove & re-add of the DVCS connector cleared up our issue. Tried a bunch of different fixes. This was the only thing that worked.

            Bill Goetz added a comment - Just as Pete was saying, a remove & re-add of the DVCS connector cleared up our issue. Tried a bunch of different fixes. This was the only thing that worked.

            @Bill Goetz yes believe so - Remove and re-add to tickets.

            The tickets themselves don't get transitioned or anything during the remove/re-add IIRC. Just a case of the attribute not being available during the change period.

            Pete Stanley added a comment - @Bill Goetz yes believe so - Remove and re-add to tickets. The tickets themselves don't get transitioned or anything during the remove/re-add IIRC. Just a case of the attribute not being available during the change period.

            Bill Goetz added a comment -

            @Pete Stanley, do the commits essentially get removed from the Jira tickets and re-added after re-sync? Did you see tickets become updated when this occurred? I know you say "little risk", but just trying to do a CYA from my standpoint. 

            Bill Goetz added a comment - @Pete Stanley, do the commits essentially get removed from the Jira tickets and re-added after re-sync? Did you see tickets become updated when this occurred? I know you say "little risk", but just trying to do a CYA from my standpoint. 

            @Bill Goetz, it really depends on how many repositories and historical commits you have to sync. For our well established GitHub account (About 10 years old with ~100 repos) took about 24 hours to sync. You might want to do it over a weekend or plan an outage window with your dev teams.

            Pete Stanley added a comment - @Bill Goetz, it really depends on how many repositories and historical commits you have to sync. For our well established GitHub account (About 10 years old with ~100 repos) took about 24 hours to sync. You might want to do it over a weekend or plan an outage window with your dev teams.

            Bill Goetz added a comment -

            @Pete Stanley,  how long did it take for the entire "remove and re-add" process to occur? We are considering your solution, but hoping to have some insight into the timeframe. We have over 700 repos.

            Bill Goetz added a comment - @Pete Stanley,  how long did it take for the entire "remove and re-add" process to occur? We are considering your solution, but hoping to have some insight into the timeframe. We have over 700 repos.

            For those still struggling with this, one way to deal with it is to remove the integration and setup from scratch.

            You could just create a new authentication token rather than completely setup the integration again but I had some other technical debt to deal with...

            Either way, there's little risk in setting up from scratch as Jira will sync all historical commits from GitHub once reconfigured:

             

            1. Log into your GitHub account (Works for 'Team' or 'Enterprise' accounts).
            2. Navigate to Account Settings > Applications > Authorized OAuth Apps > Jira DVCS
            3. Delete any existing DVCS connector titled "Jira DVCS" if it already exists.
            4. Navigate to Account Settings > Developer Settings > OAuth Apps > Create new OAuth App
            5. Set the following:
              1. Application name: JIRA DVCS 
              2. Homepage URL: https://<YOURJIRASERVER>.com
              3. Authorization Callback URL:  https://<YOURJIRASERVER>.com
              4. Save the new application.
            6. Generate a new Client Secret - Note this down somewhere safe (e.g. a password vault). It will only be displayed this once.
            7. Save the Client ID (key) along with your Client Secret somewhere safe.
            8. Navigate to Jira > Settings > Applications > DVCS accounts.
            9. Disable/remove any existing instance configuration for your GitHub account. (This may take some time due the size.)
            10. Refresh the page once complete to verify the GitHub account has been removed 100%.
            11. Choose "Link Bitbucket Cloud or GitHub Account".
            12. Complete the following:
              1. Host: Github
              2. Team or User Account: <COMPANYNAME>
              3. Client ID: Enter Client ID previously created.
              4. Client Secret: Enter Client Secret previously created.
              5. Auto Link New Repositories: Yes (Checked)
              6. Enable Smart Commits: Yes (Checked)
            13. Note, the initial sync may take hours/days and can take several attempts due to GitHub rate limiting.

            Pete Stanley added a comment - For those still struggling with this, one way to deal with it is to remove the integration and setup from scratch. You could just create a new authentication token rather than completely setup the integration again but I had some other technical debt to deal with... Either way, there's little risk in setting up from scratch as Jira will sync all historical commits from GitHub once reconfigured:   Log into your GitHub account (Works for 'Team' or 'Enterprise' accounts). Navigate to Account Settings > Applications > Authorized OAuth Apps > Jira DVCS Delete any existing DVCS connector titled "Jira DVCS" if it already exists. Navigate to Account Settings > Developer Settings > OAuth Apps > Create new OAuth App Set the following: Application name: JIRA DVCS  Homepage URL: https://<YOURJIRASERVER>.com Authorization Callback URL:  https://<YOURJIRASERVER>.com Save the new application. Generate a new Client Secret - Note this down somewhere safe (e.g. a password vault). It will only be displayed this once. Save the Client ID (key) along with your Client Secret somewhere safe. Navigate to Jira > Settings > Applications > DVCS accounts. Disable/remove any existing instance configuration for your GitHub account. (This may take some time due the size.) Refresh the page once complete to verify the GitHub account has been removed 100%. Choose "Link Bitbucket Cloud or GitHub Account". Complete the following: Host: Github Team or User Account: <COMPANYNAME> Client ID: Enter Client ID previously created. Client Secret: Enter Client Secret previously created. Auto Link New Repositories: Yes (Checked) Enable Smart Commits: Yes (Checked) Note, the initial sync may take hours/days and can take several attempts due to GitHub rate limiting.

            @Marcel Haase

            We are creating an access token earlier this year and when trying to create a fresh token it has the same length and the same format

            Regards

            Petr Vasich added a comment - @Marcel Haase We are creating an access token earlier this year and when trying to create a fresh token it has the same length and the same format Regards

            Hello,

            It is another "error" . You have to go into github and reset your Auth token (secret token) of the dvs Auth app on github. 

            Github changed the format of the secret key. (i.e. length) 

            Please follow the steps in the "error"-mail on github and after resetting the token, you shouldn't receive these kind of "error" / notice.

            Best regards

            Marcel Haase added a comment - Hello, It is another "error" . You have to go into github and reset your Auth token (secret token) of the dvs Auth app on github.  Github changed the format of the secret key. (i.e. length)  Please follow the steps in the "error"-mail on github and after resetting the token, you shouldn't receive these kind of "error" / notice. Best regards

             

            We are running Jira Software Version (Data Center) 8.14.1 and still receiving emails from GitHub stating we are using an API with an outdated format. What do we need to do to stop these notifications?


            +1

            Petr Vasich added a comment -   We are running Jira Software Version (Data Center) 8.14.1 and still receiving emails from GitHub stating we are using an API with an outdated format. What do we need to do to stop these notifications? +1

            Hi all,

            We are running Jira Software Version (Data Center) 8.14.1 and still receiving emails from GitHub stating we are using an API with an outdated format. What do we need to do to stop these notifications?

            Please advise

            Thanks

            James

            James McDonagh added a comment - Hi all, We are running Jira Software Version (Data Center) 8.14.1 and still receiving emails from GitHub stating we are using an API with an outdated format. What do we need to do to stop these notifications? Please advise Thanks James

              aermolenko Tony Miller
              vpandey2@atlassian.com Vikas Pandey (Inactive)
              Affected customers:
              130 This affects my team
              Watchers:
              166 Start watching this issue

                Created:
                Updated:
                Resolved: