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

404 when not logged in when clicking link in hudson-e-mail

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • core
    • None
    • Platform: All, OS: All

      When a user is not logged into hudson gui and clicks a link in a hudson-email like:
      See <http://server/hudson/job/jobname/176/>

      He gets a 404 error:

      HTTP Status 404 -

      type Status report

      message

      description The requested resource () is not available.
      Apache Tomcat/6.0.18

          [JENKINS-4740] 404 when not logged in when clicking link in hudson-e-mail

          btosabre added a comment -

          This is definitively not a feature request. In most cases* Hudson redirects to login page as expected, but in some cases it doesn't -> and this is a bug.

          • - by case I mean security settings, try for example by giving anonymous user READ access to Hudson and to individula jobs if you use Project Matrix Authorization Strategy -> it should work then.

          In our case the problem occurs when:

          • we use Project Matrix Authorization Strategy,
          • anonymous user has "general" read access (hudson.model.Hudson.READ), but
          • anonymous user doesn't have access rights to the job.

          I am currently working on preparing a patch for this particular problem. I'll attach it later today.

          btosabre added a comment - This is definitively not a feature request. In most cases* Hudson redirects to login page as expected, but in some cases it doesn't -> and this is a bug. - by case I mean security settings, try for example by giving anonymous user READ access to Hudson and to individula jobs if you use Project Matrix Authorization Strategy -> it should work then. In our case the problem occurs when: we use Project Matrix Authorization Strategy, anonymous user has "general" read access (hudson.model.Hudson.READ), but anonymous user doesn't have access rights to the job. I am currently working on preparing a patch for this particular problem. I'll attach it later today.

          btosabre added a comment -

          Patch to SVN revision 37296. Mainly adds tests. The fix consists of two small changes in model.hudson.Hudson class.

          btosabre added a comment - Patch to SVN revision 37296. Mainly adds tests. The fix consists of two small changes in model.hudson.Hudson class.

          btosabre added a comment -

          BTW - as a work around you may remove READ permission for user anonymous in system configuration matrix. Of course this will forbid not logged users to access Hudson.

          btosabre added a comment - BTW - as a work around you may remove READ permission for user anonymous in system configuration matrix. Of course this will forbid not logged users to access Hudson.

          Edwin Renner added a comment -

          we are facing the same problem, any progress on this issue or a workaround?
          thanks

          Edwin Renner added a comment - we are facing the same problem, any progress on this issue or a workaround? thanks

          Thomas Fields added a comment -

          I'm getting this too. Is there a fix?

          Thomas Fields added a comment - I'm getting this too. Is there a fix?

          David Porter added a comment -

          Removing Read Overall > Anonymous worked as a fix for me.

          Thank you btosabre!

          David Porter added a comment - Removing Read Overall > Anonymous worked as a fix for me. Thank you btosabre!

          John Dyer added a comment -

          Anyone?

          John Dyer added a comment - Anyone?

          Thomas Fields added a comment -

          Are we any closer to getting this fixed? There's 15 votes to fix this. How many do we need?

          Thomas Fields added a comment - Are we any closer to getting this fixed? There's 15 votes to fix this. How many do we need?

          sogabe added a comment - - edited

          Adding "Job DISCOVER" permission to anonymous can resolve this issue.

          According to help, "Job DISCOVER" means
          "This permission grants discover access to jobs. Lower than read permissions, it allows you to redirect anonymous users to the login page when they try to access a job url. Without it they would get a 404 error and wouldnt be able to discover project names.

          sogabe added a comment - - edited Adding "Job DISCOVER" permission to anonymous can resolve this issue. According to help, "Job DISCOVER" means "This permission grants discover access to jobs. Lower than read permissions, it allows you to redirect anonymous users to the login page when they try to access a job url. Without it they would get a 404 error and wouldnt be able to discover project names.

          Probably DISCOVER permission appeared later, but now last comment solve this issue.

          Kanstantsin Shautsou added a comment - Probably DISCOVER permission appeared later, but now last comment solve this issue.

            Unassigned Unassigned
            2sober 2sober
            Votes:
            16 Vote for this issue
            Watchers:
            18 Start watching this issue

              Created:
              Updated:
              Resolved: