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

Gitlab oauth doesn't return groupdetails and userdetails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • gitlab-oauth-plugin
    • None

      With GitLabSecurityRealm configured,

      Jenkins.get().getSecurityRealm().loadUserByUsername("emilio");
      

      throws

      org.acegisecurity.userdetails.UsernameNotFoundException: user(emilio) is also an organization
      	at org.jenkinsci.plugins.GitLabSecurityRealm.loadUserByUsername(GitLabSecurityRealm.java:529)
      	at org.acegisecurity.userdetails.UserDetailsService$loadUserByUsername.call(Unknown Source)
      	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
      

      Trying to load groups details, the plugin always returns one even if doesn't match with the requested

      Jenkins.get().getSecurityRealm().loadGroupByGroupname("non-existing-group");
      

      https://github.com/jenkinsci/gitlab-oauth-plugin/blob/master/src/main/java/org/jenkinsci/plugins/GitLabSecurityRealm.java#L577
      https://github.com/jenkinsci/gitlab-oauth-plugin/blob/master/src/main/java/org/jenkinsci/plugins/GitLabAuthenticationToken.java#L302

            elhabib_med Mohamed El Habib
            escoem Emilio Escobar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: