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

GitHub OAuth should include teams as groups

    Details

    • Similar Issues:

      Description

      Current implementation does not work with GitHub teams. It only includes GitHub organizations as Jenkins groups.
      Worse, giving access to "Owners", "Developers", "Administrators" and so on actually gives access to GitHub organizations named "Owners"...!

      Suggestion:

      • keep GitHub organization to Jenkins group mapping
      • add GitHub teams mapping to Jenkins group with the following form: "organization*team" using an asterisk as separator (any separator not allowed by GitHub in team names could be used, but the slash generates browsing errors in Jenkins).

        Attachments

          Issue Links

            Activity

            Show
            jcarsique Julien Carsique added a comment - https://github.com/jenkinsci/github-oauth-plugin/pull/36
            Hide
            jcarsique Julien Carsique added a comment -

            Improvements (TODO):

            • accordingly update GithubAuthorizationStrategy and GithubRequireOrganizationMembershipACL
            • eventually add some caching with a configurable cache duration as well as a "force refresh" button
            Show
            jcarsique Julien Carsique added a comment - Improvements (TODO): accordingly update GithubAuthorizationStrategy and GithubRequireOrganizationMembershipACL eventually add some caching with a configurable cache duration as well as a "force refresh" button
            Hide
            sag47 Sam Gleske added a comment -

            It would be preferable for the teams to be accessed via Org/Team. I've attached a screenshot.

            • samrocketman is a GitHub user.
            • s2disk is a GitHub org.
            • s2disk/Owners is a GitHub team.
            Show
            sag47 Sam Gleske added a comment - It would be preferable for the teams to be accessed via Org/Team. I've attached a screenshot. samrocketman is a GitHub user. s2disk is a GitHub org. s2disk/Owners is a GitHub team.
            Hide
            jcarsique Julien Carsique added a comment -

            Thanks for your edit, I didn't see JENKINS-21331 when I looked for an already existing issue on the same subject: your update made it clearer.

            Your suggestion is exactly what I've done in the pull-request, except that I couldn't use the slash ("/") as a separator between Org and Team: that generates browsing issues on Jenkins side. So I choose to use an asterisk ("*" ; see https://github.com/jcarsique/github-oauth-plugin/commit/74f0e9eecea5f3777e7935d9e7c762f4f5f51b70#diff-8524b26b72d1d1cd6ddf1048e92b23a1R19): any character filtered out by GitHub would be convenient.

            Show
            jcarsique Julien Carsique added a comment - Thanks for your edit, I didn't see JENKINS-21331 when I looked for an already existing issue on the same subject: your update made it clearer. Your suggestion is exactly what I've done in the pull-request, except that I couldn't use the slash ("/") as a separator between Org and Team: that generates browsing issues on Jenkins side. So I choose to use an asterisk ("*" ; see https://github.com/jcarsique/github-oauth-plugin/commit/74f0e9eecea5f3777e7935d9e7c762f4f5f51b70#diff-8524b26b72d1d1cd6ddf1048e92b23a1R19): any character filtered out by GitHub would be convenient.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Julien Carsique
            Path:
            pom.xml
            src/main/java/org/jenkinsci/plugins/GithubAuthenticationToken.java
            src/main/java/org/jenkinsci/plugins/GithubOAuthGroupDetails.java
            src/main/java/org/jenkinsci/plugins/GithubOAuthUserDetails.java
            src/main/java/org/jenkinsci/plugins/GithubSecurityRealm.java
            http://jenkins-ci.org/commit/github-oauth-plugin/7fea11475da28861ddf1f1e09add6a93a1bbfc6a
            Log:
            JENKINS-21331: include teams as groups

            duplicate: JENKINS-28575

            Conflicts:
            src/main/java/org/jenkinsci/plugins/GithubAuthenticationToken.java
            src/main/java/org/jenkinsci/plugins/GithubSecurityRealm.java

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Julien Carsique Path: pom.xml src/main/java/org/jenkinsci/plugins/GithubAuthenticationToken.java src/main/java/org/jenkinsci/plugins/GithubOAuthGroupDetails.java src/main/java/org/jenkinsci/plugins/GithubOAuthUserDetails.java src/main/java/org/jenkinsci/plugins/GithubSecurityRealm.java http://jenkins-ci.org/commit/github-oauth-plugin/7fea11475da28861ddf1f1e09add6a93a1bbfc6a Log: JENKINS-21331 : include teams as groups duplicate: JENKINS-28575 Conflicts: src/main/java/org/jenkinsci/plugins/GithubAuthenticationToken.java src/main/java/org/jenkinsci/plugins/GithubSecurityRealm.java
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Sam Gleske
            Path:
            pom.xml
            src/main/java/org/jenkinsci/plugins/GithubAuthenticationToken.java
            src/main/java/org/jenkinsci/plugins/GithubOAuthGroupDetails.java
            src/main/java/org/jenkinsci/plugins/GithubOAuthUserDetails.java
            src/main/java/org/jenkinsci/plugins/GithubSecurityRealm.java
            http://jenkins-ci.org/commit/github-oauth-plugin/bdb98e6215616b678a7c7d44da6d56f9fcda935d
            Log:
            Merge PR #41 JENKINS-28575 include GitHub teams as

            groups

            closes #36

            Compare: https://github.com/jenkinsci/github-oauth-plugin/compare/24a3f6ff02ce...bdb98e621561

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Sam Gleske Path: pom.xml src/main/java/org/jenkinsci/plugins/GithubAuthenticationToken.java src/main/java/org/jenkinsci/plugins/GithubOAuthGroupDetails.java src/main/java/org/jenkinsci/plugins/GithubOAuthUserDetails.java src/main/java/org/jenkinsci/plugins/GithubSecurityRealm.java http://jenkins-ci.org/commit/github-oauth-plugin/bdb98e6215616b678a7c7d44da6d56f9fcda935d Log: Merge PR #41 JENKINS-28575 include GitHub teams as groups closes #36 Compare: https://github.com/jenkinsci/github-oauth-plugin/compare/24a3f6ff02ce...bdb98e621561

              People

              • Assignee:
                skottler Sam Kottler
                Reporter:
                jcarsique Julien Carsique
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: