Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-48412

Github OAuth: Slow down or even timeout when using API Token

    Details

    • Similar Issues:

      Description

      After the correction of the authorities population when using API Token, it seems that the code to retrieve the granted authorities is very slow.

      The authorities retrieval for GitHub access token is done in 2 requests (1 for my orgs and 1 for my teams). But for the retrieval in case of API Token, using the stored access token, there are as many requests as your organizations have teams (even if don't belong to them).

      The result is frequent timeout when using CLI and somewhat not usable system.

      The code seems to be unused before that modification since there was an implicit team.toString() in the authorities that show some internal reference.

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Wadeck Follonier
          Path:
          src/main/java/org/jenkinsci/plugins/GithubAuthenticationToken.java
          src/main/java/org/jenkinsci/plugins/GithubOAuthUserDetails.java
          http://jenkins-ci.org/commit/github-oauth-plugin/99e3d1350d68a549e0ca44f39ad687d227235638
          Log:
          JENKINS-48412 Fix authorities retrieval for API Token

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Wadeck Follonier Path: src/main/java/org/jenkinsci/plugins/GithubAuthenticationToken.java src/main/java/org/jenkinsci/plugins/GithubOAuthUserDetails.java http://jenkins-ci.org/commit/github-oauth-plugin/99e3d1350d68a549e0ca44f39ad687d227235638 Log: JENKINS-48412 Fix authorities retrieval for API Token
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Sam Gleske
          Path:
          src/main/java/org/jenkinsci/plugins/GithubAuthenticationToken.java
          src/main/java/org/jenkinsci/plugins/GithubOAuthUserDetails.java
          http://jenkins-ci.org/commit/github-oauth-plugin/393ada34dc5c6dba286eb71f4a2b817686cb6be0
          Log:
          Merge pull request #92 from Wadeck/SPEED_UP_API_TOKEN_AUTHORITIES

          JENKINS-48412 Fix authorities retrieval for API Token

          Compare: https://github.com/jenkinsci/github-oauth-plugin/compare/7e13146c96ab...393ada34dc5c

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Sam Gleske Path: src/main/java/org/jenkinsci/plugins/GithubAuthenticationToken.java src/main/java/org/jenkinsci/plugins/GithubOAuthUserDetails.java http://jenkins-ci.org/commit/github-oauth-plugin/393ada34dc5c6dba286eb71f4a2b817686cb6be0 Log: Merge pull request #92 from Wadeck/SPEED_UP_API_TOKEN_AUTHORITIES JENKINS-48412 Fix authorities retrieval for API Token Compare: https://github.com/jenkinsci/github-oauth-plugin/compare/7e13146c96ab...393ada34dc5c

            People

            • Assignee:
              wfollonier Wadeck Follonier
              Reporter:
              wfollonier Wadeck Follonier
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: