Michael,

I tried following your blog post:
https://jenkins.io/blog/2019/01/07/webhook-firewalls/

I did the following additional steps not in your blog post using a Jenkins
2.190.2 server:


   1. I configured the smee endpoint, https://smee.io/myendpoint
   2. I ran the smee client, which just sits there, and waits for
   notifications on https://smee.io/myendpoint , and then forwards these
   notifications to http://localhost:8080/github-webhook/
    using this script:






*#!/bin/sh URL=https://smee.io/myendpoint <https://smee.io/myendpoint>
   SMEE=/Users/craigrodrigues/smee/node_modules/smee-client/bin/smee.js
   TARGET=http://localhost:8080/github-webook/
   <http://localhost:8080/github-webook/> $SMEE --url $URL  --target $TARGET*


   3. I configured a webhook on my GitHub repository to connect to
   https://smee.io/myendpoint
   4. I do a git push to my github repo
   5. GitHub does a POST on https://smee.io/myendpoint
   6. Smee client forwards that post to
   http://localhost:8080/github-webhook/


On my Jenkins server, I had to configure this:
[image: image.png]

After doing a *git push*, if I look in the logs of the smee client, I see:
















*    status: 403,      text: '<html>\n' +        '<head>\n' +        '<meta
http-equiv="Content-Type" content="text/html;charset=utf-8"/>\n' +
'<title>Error 403 No valid crumb was included in the request</title>\n' +
      '</head>\n' +        '<body><h2>HTTP ERROR 403</h2>\n' +
'<p>Problem accessing /github-webook/. Reason:\n' +        '<pre>    No
valid crumb was included in the request</pre></p><hr><a
href="http://eclipse.org/jetty <http://eclipse.org/jetty>">Powered by
Jetty:// 9.4.z-SNAPSHOT</a><hr/>\n' +        '\n' +        '</body>\n' +
    '</html>\n',      method: 'POST',      path: '/github-webook/'    },*


So it looks like in order to access http://localhost:8080/github-webhook/ ,
I need to pass some sort of authentication
in order to access that URL.

How did you configure this in your setup?

--
Craig

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAG%3DrPVcOun6NyxqgLyQqk5N1AQ%3Dod0TxLdJKrdU_0835MLHf%2BA%40mail.gmail.com.

Reply via email to