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

Accessing Jenkins using API token does not populate group memberships

    Details

    • Similar Issues:

      Description

      I am using Project-based Matrix Authorization Strategy to manage user permission.

      I have an account under group A. I give this group Overall/Read permission. When I call rest API with user API token Jenkins rejects the request and says no overall/read permission. If I add this user to the matrix and grant appropriate permission, it works. 

      It seems API authorization doesn't work with Group.

      Please help me on this. THanks

       

        Attachments

          Issue Links

            Activity

            Hide
            lowry Lowry Tang added a comment -

            Daniel Beck Sorry, I thought you must pass git access token so that it can pull the info from github. 

            Show
            lowry Lowry Tang added a comment - Daniel Beck  Sorry, I thought you must pass git access token so that it can pull the info from github. 
            Hide
            wfollonier Wadeck Follonier added a comment - - edited

            Lowry Tang Solution proposed: store the access token after a successful authentication to Github to populate correctly the future usage of API Token of that user.

            Show
            wfollonier Wadeck Follonier added a comment - - edited Lowry Tang Solution proposed: store the access token after a successful authentication to Github to populate correctly the future usage of API Token of that user.
            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/GithubAccessTokenProperty.java
            src/main/java/org/jenkinsci/plugins/GithubAuthenticationToken.java
            src/main/java/org/jenkinsci/plugins/GithubSecretStorage.java
            src/main/java/org/jenkinsci/plugins/GithubSecurityRealm.java
            src/test/java/org/jenkinsci/plugins/GithubAccessTokenPropertyTest.java
            src/test/java/org/jenkinsci/plugins/GithubSecretStorageTest.java
            src/test/java/org/jenkinsci/plugins/api/GihubAPITest.java
            http://jenkins-ci.org/commit/github-oauth-plugin/7e13146c96ab607301ee1993c4183569a93da0f7
            Log:
            JENKINS-47113 Populate the authorities after a successful authentication to Github (#87)

            This change stores a GitHub token in a user property for reuse by other
            authorization method. Specifically, the token in which the user authorized for
            Jenkins to collect consenting through OAuth.

            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/GithubAccessTokenProperty.java src/main/java/org/jenkinsci/plugins/GithubAuthenticationToken.java src/main/java/org/jenkinsci/plugins/GithubSecretStorage.java src/main/java/org/jenkinsci/plugins/GithubSecurityRealm.java src/test/java/org/jenkinsci/plugins/GithubAccessTokenPropertyTest.java src/test/java/org/jenkinsci/plugins/GithubSecretStorageTest.java src/test/java/org/jenkinsci/plugins/api/GihubAPITest.java http://jenkins-ci.org/commit/github-oauth-plugin/7e13146c96ab607301ee1993c4183569a93da0f7 Log: JENKINS-47113 Populate the authorities after a successful authentication to Github (#87) This change stores a GitHub token in a user property for reuse by other authorization method. Specifically, the token in which the user authorized for Jenkins to collect consenting through OAuth.
            Hide
            sag47 Sam Gleske added a comment -

            This issue has been fixed and will be available in the next release.

            Show
            sag47 Sam Gleske added a comment - This issue has been fixed and will be available in the next release.
            Hide
            sag47 Sam Gleske added a comment -

            0.29 has been released.

            Show
            sag47 Sam Gleske added a comment - 0.29 has been released.

              People

              • Assignee:
                wfollonier Wadeck Follonier
                Reporter:
                lowry Lowry Tang
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: