title: Github Jenkins webhook security problems
body: <p>I've been using Github Jenkins webhook for a while with no problem. 
  I have my Jenkins running behind a Nginx proxy and the only security installed was the nginx htpasswd.
  So my Github webhook looked like this:</p>
  
  <p><a href="https://user:pass@jenkins.blablabla.biz/job/script/buildWithParameters" rel="nofollow noreferrer">https://user:pass@jenkins.blablabla.biz/job/script/buildWithParameters</a></p>
  
  <p>Being user and pass the credentials from htpasswd file.</p>
  
  <p>Right now I'm trying to add users to my Jenkins and I activated matrix based security to it with the option to register and login to Jenkins.
  The server works perfect initially asking for nginx credentials and jenkins login second.</p>
  
  <p>I created a github user in Jenkins and I generated a token for him.
  Now I changed my Github webhook to use the new Jenkins github user credentials:</p>
  
  <p><a href="https://github:token@jenkins.blablabla.biz/job/script/buildWithParameters" rel="nofollow noreferrer">https://github:token@jenkins.blablabla.biz/job/script/buildWithParameters</a></p>
  
  <p>As long as I know this should work. But it does not.
  I think that the problem here is having the two security systems activated (nginx htpasswd and jenkins login). But I want both.</p>
  
  <p>Do I have to use the two credentials in my webhook? How can I do that?</p>
  
  <p>When I use nginx credential Github receives this response from jenkins when webhook is triggered:</p>
  
  <blockquote>
    <p>Authentication required  You are authenticated as: anonymous
    Groups that you are in:    Permission you need to have (but didn't):
    hudson.model.Hudson.Read  ... which is implied by:
    hudson.security.Permission.GenericRead  ... which is implied by:
    hudson.model.Hudson.Administer</p>
  </blockquote>
  
  <p>And when I use jenkins credential Github receives this response from jenkins when webhook is triggered:</p>
  
  <blockquote>
    <p> 401 Authorization Required  <h1>401 Authorization Required</h1>
    <hr>nginx/1.11.10  </p>
  </blockquote>