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

Gitlab Oauth Plugin fails after login to server with groups with ldap_access set to null

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: gitlab-oauth-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.18
      Gitlab plugin 1.3.0
      Gitlab Authentication plugin 1.0.5
      OpenJDK 7u111-2.6.7-1~deb7u1
    • Similar Issues:

      Description

      Our gitlab install returns groups with ldap_access and ldap_cn set to null, which trips up the oath plugin, and causes logins to fail completely.

      Caused by: com.fasterxml.jackson.databind.JsonMappingException: N/A (through reference chain: Object[][0]->org.gitlab.api.models.GitlabGroup["ldap_access"])
              at com.fasterxml.jackson.databind.deser.SettableBeanProperty._throwAsIOE(SettableBeanProperty.java:567)
              at com.fasterxml.jackson.databind.deser.SettableBeanProperty._throwAsIOE(SettableBeanProperty.java:551)
              at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:99)
              at com.fasterxml.jackson.databind.deser.impl.BeanPropertyMap.findDeserializeAndSet(BeanPropertyMap.java:285)
              at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:248)
              at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:136)
              at com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:156)
              at com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:17)
              at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3562)
              at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2578)
              at org.gitlab.api.http.GitlabHTTPRequestor.parse(GitlabHTTPRequestor.java:330)
              at org.gitlab.api.http.GitlabHTTPRequestor.access$200(GitlabHTTPRequestor.java:28)
              at org.gitlab.api.http.GitlabHTTPRequestor$1.fetch(GitlabHTTPRequestor.java:232)
              ... 86 more
      Caused by: java.lang.NullPointerException
              at org.gitlab.api.models.GitlabGroup.setLdapAccess(GitlabGroup.java:56)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:606)
              at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:97)
      
      

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: wzxjohn
          Path:
          pom.xml
          http://jenkins-ci.org/commit/gitlab-oauth-plugin/3b9ee865c63fd85a7a758b30050adeda1b27d9dc
          Log:
          JENKINS-37517 Fix login fails because of a GitLab Api Bug
          Use v1.2.6 of GitLab Api Client to fix this issue.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: wzxjohn Path: pom.xml http://jenkins-ci.org/commit/gitlab-oauth-plugin/3b9ee865c63fd85a7a758b30050adeda1b27d9dc Log: JENKINS-37517 Fix login fails because of a GitLab Api Bug Use v1.2.6 of GitLab Api Client to fix this issue.
          Hide
          elhabib_med Mohamed El Habib added a comment -

          Hello,

          can you please test the version 1.0.7
          This is an issue into java-gitlab-api 1.0.5, I think this is fixed into 1.0.6

          Thanks

          Show
          elhabib_med Mohamed El Habib added a comment - Hello, can you please test the version 1.0.7 This is an issue into java-gitlab-api 1.0.5, I think this is fixed into 1.0.6 Thanks
          Hide
          patch0 Patrick Cherry added a comment -

          Yes, that works fine thanks

          Show
          patch0 Patrick Cherry added a comment - Yes, that works fine thanks

            People

            • Assignee:
              patch0 Patrick Cherry
              Reporter:
              patch0 Patrick Cherry
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: