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

Build Pipeline Plugin (1.4.2) throws ServletException: Need to log in to access <project> for not-logged in users

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • build-pipeline-plugin
    • Jenkins v1.545 in Tomcat 6 on Mandriva Linux 2010.1
      Auth Realm: Matrix Auth plugin

      When a not-logged-in user tries to view the start page, a big StackTrace indicating that they don't have access to some job appears. (This is actually true)
      For an user with access to all plugins, everything is shown properly.
      This issue appeared immediately after I updated my Build Pipeline Plugin from 1.4.1 to 1.4.2 and the plugin also appears in the StackTrace.

      This is the StackTrace I get: http://pastebin.com/jNz8E4qw
      This is what the User interface looks like for not-logged-in users: http://screencloud.net/img/screenshots/a45ce4757a1b6ef7dfe3006e08900557.png
      This is what is looks like for a user with access to all jobs: http://screencloud.net//img/screenshots/ba953d7c92a35ec2dd10dbfb72734537.png

          [JENKINS-21188] Build Pipeline Plugin (1.4.2) throws ServletException: Need to log in to access <project> for not-logged in users

          Philipp Nowak created issue -
          Jesse Glick made changes -
          Component/s Original: matrix-auth [ 18131 ]
          Assignee Original: Jesse Glick [ jglick ]

          I occurred following errors.

          Caused by: java.lang.NullPointerException
          at au.com.centrumsystems.hudson.plugin.buildpipeline.BuildPipelineView.getItems(BuildPipelineView.java:773)
          at hudson.security.AuthorizationStrategy$1.hasPermission(AuthorizationStrategy.java:104)
          at hudson.security.ACL.hasPermission(ACL.java:64)
          at hudson.model.View.hasPermission(View.java:581)
          at hudson.model.ViewGroupMixIn.getViews(ViewGroupMixIn.java:115)
          at jenkins.model.Jenkins.getViews(Jenkins.java:1458)

          Toshiyuki Kawanishi added a comment - I occurred following errors. Caused by: java.lang.NullPointerException at au.com.centrumsystems.hudson.plugin.buildpipeline.BuildPipelineView.getItems(BuildPipelineView.java:773) at hudson.security.AuthorizationStrategy$1.hasPermission(AuthorizationStrategy.java:104) at hudson.security.ACL.hasPermission(ACL.java:64) at hudson.model.View.hasPermission(View.java:581) at hudson.model.ViewGroupMixIn.getViews(ViewGroupMixIn.java:115) at jenkins.model.Jenkins.getViews(Jenkins.java:1458)
          Daniel Kirkdorffer made changes -
          Priority Original: Critical [ 2 ] New: Blocker [ 1 ]

          Having the same problem:

          Caused by: java.lang.NullPointerException
          at au.com.centrumsystems.hudson.plugin.buildpipeline.BuildPipelineView.getItems(BuildPipelineView.java:773)
          at hudson.security.AuthorizationStrategy$1.hasPermission(AuthorizationStrategy.java:104)
          at hudson.security.ACL.hasPermission(ACL.java:64)
          at hudson.model.View.hasPermission(View.java:580)
          at hudson.model.ViewGroupMixIn.getViews(ViewGroupMixIn.java:115)
          at jenkins.model.Jenkins.getViews(Jenkins.java:1454)
          at sun.reflect.GeneratedMethodAccessor1658.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
          at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
          at groovy.lang.MetaClassImpl$GetBeanMethodMetaProperty.getProperty(MetaClassImpl.java:3457)
          at org.codehaus.groovy.runtime.callsite.GetEffectivePojoPropertySite.getProperty(GetEffectivePojoPropertySite.java:61)

          etc...

          If the user doesn't have access to the Initial Job, as defined by Roles and Job name patterns, we get this nasty error and users have to use "My Views" to see their jobs.

          v1.4.2 with Jenkins 1.528.

          This is a non-starter.

          Daniel Kirkdorffer added a comment - Having the same problem: Caused by: java.lang.NullPointerException at au.com.centrumsystems.hudson.plugin.buildpipeline.BuildPipelineView.getItems(BuildPipelineView.java:773) at hudson.security.AuthorizationStrategy$1.hasPermission(AuthorizationStrategy.java:104) at hudson.security.ACL.hasPermission(ACL.java:64) at hudson.model.View.hasPermission(View.java:580) at hudson.model.ViewGroupMixIn.getViews(ViewGroupMixIn.java:115) at jenkins.model.Jenkins.getViews(Jenkins.java:1454) at sun.reflect.GeneratedMethodAccessor1658.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at groovy.lang.MetaClassImpl$GetBeanMethodMetaProperty.getProperty(MetaClassImpl.java:3457) at org.codehaus.groovy.runtime.callsite.GetEffectivePojoPropertySite.getProperty(GetEffectivePojoPropertySite.java:61) etc... If the user doesn't have access to the Initial Job, as defined by Roles and Job name patterns, we get this nasty error and users have to use "My Views" to see their jobs. v1.4.2 with Jenkins 1.528. This is a non-starter.

          Christoph Huber added a comment - - edited

          We had the same issue with plugin version 1.4.2 and Jenkins version 1.544. After upgrading to 1.4.3, the issue disappeared! So this can probably be closed.

          Christoph Huber added a comment - - edited We had the same issue with plugin version 1.4.2 and Jenkins version 1.544. After upgrading to 1.4.3, the issue disappeared! So this can probably be closed.

          Also same problem.

          The combination to reproduce this problem is:

          • Jenkins 1.554.2
          • Build pipeline plugin 1.4.2 or higher. I tried it with 1.4.3 and 1.4.4-snapshot (27.06.2014)
          • Enabled security with 'Role-Based Strategy'
          1. Create a global role for all users with Overall: read, Job: discovery, View: read permission and assign it to all your users;
          2. Create project roles with Job: read and whatever else you need and assign it selected users;
          3. Create a build pipeline view and you will get the error for all the users who do not have Job: read for the job with build pipeline.

          Works like a charm with Build pipeline v 1.4.1

          Jānis Balodis added a comment - Also same problem. The combination to reproduce this problem is: Jenkins 1.554.2 Build pipeline plugin 1.4.2 or higher. I tried it with 1.4.3 and 1.4.4-snapshot (27.06.2014) Enabled security with 'Role-Based Strategy' Create a global role for all users with Overall: read, Job: discovery, View: read permission and assign it to all your users; Create project roles with Job: read and whatever else you need and assign it selected users; Create a build pipeline view and you will get the error for all the users who do not have Job: read for the job with build pipeline. Works like a charm with Build pipeline v 1.4.1

          Please try reproduce with latest version and provide stacktrace

          Kanstantsin Shautsou added a comment - Please try reproduce with latest version and provide stacktrace
          Kanstantsin Shautsou made changes -
          Labels Original: access build-pipeline-plugin denied doge error jenkins plugin servletexception stacktrace New: security
          Kanstantsin Shautsou made changes -
          Link New: This issue duplicates JENKINS-20603 [ JENKINS-20603 ]

            recena Manuel Recena Soto
            xxyy Philipp Nowak
            Votes:
            8 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: